Skip to content

Commit

Permalink
Extract a supplementary card into read-side/html-pages/shared-compone…
Browse files Browse the repository at this point in the history
…nts #3229
  • Loading branch information
davidcmoulton committed May 8, 2024
1 parent ffb7880 commit bb62ba2
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/read-side/html-pages/groups-page/render-groups.ts
@@ -1,9 +1,9 @@
import { pipe } from 'fp-ts/function';
import { renderListItems } from '../../../shared-components/render-list-items';
import { supplementaryCard } from '../../../shared-components/supplementary-card';
import { supplementaryInfo } from '../../../shared-components/supplementary-info';
import { HtmlFragment, toHtmlFragment } from '../../../types/html-fragment';
import { renderListOfCards } from '../shared-components/list-of-cards';
import { supplementaryCard } from '../shared-components/supplementary-card';

const supplementaryItems = [
supplementaryCard(
Expand Down
Expand Up @@ -3,11 +3,11 @@ import * as RA from 'fp-ts/ReadonlyArray';
import { pipe } from 'fp-ts/function';
import { renderScietyFeedCard } from './render-sciety-feed-card';
import { renderListItems } from '../../../../shared-components/render-list-items';
import { supplementaryCard } from '../../../../shared-components/supplementary-card';
import { supplementaryInfo } from '../../../../shared-components/supplementary-info';
import { HtmlFragment, toHtmlFragment } from '../../../../types/html-fragment';
import { renderListOfCards } from '../../shared-components/list-of-cards';
import { renderLegacyPaginationControls } from '../../shared-components/pagination';
import { supplementaryCard } from '../../shared-components/supplementary-card';
import { ViewModel } from '../view-model';

const supplementaryItems = [
Expand Down
1 change: 1 addition & 0 deletions src/read-side/html-pages/shared-components/_index.scss
Expand Up @@ -9,4 +9,5 @@
@use 'site-footer';
@use 'site-header';
@use 'standard-page-layout';
@use 'supplementary-card';
@use 'tabs';
@@ -0,0 +1,14 @@
@use 'button';
@use 'card';

.supplementary-card {
@include card.basics();
}

.supplementary-card__title {
@include card.title();
}

.supplementary-card__button_link {
@include button.primary-link();
}
@@ -0,0 +1 @@
export { supplementaryCard } from './supplementary-card';
@@ -1,4 +1,4 @@
import { HtmlFragment, toHtmlFragment } from '../types/html-fragment';
import { HtmlFragment, toHtmlFragment } from '../../../../types/html-fragment';

export const supplementaryCard = (title: string, content: HtmlFragment): HtmlFragment => toHtmlFragment(`
<article class="supplementary-card">
Expand Down
14 changes: 0 additions & 14 deletions src/sass/_supplementary.scss
@@ -1,7 +1,5 @@
@use 'layout';
@use 'card';
@use 'states';
@use 'button';

.supplementary-info {
@include layout.allow-edge-to-edge-content-when-narrow();
Expand All @@ -15,15 +13,3 @@
.supplementary-list__item {
@include card.list-item();
}

.supplementary-card {
@include card.basics();
}

.supplementary-card__title {
@include card.title();
}

.supplementary-card__button_link {
@include button.primary-link();
}

0 comments on commit bb62ba2

Please sign in to comment.