Skip to content

Commit

Permalink
Introduce a cohesive UI section #3325
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgiosironi committed Jun 14, 2024
1 parent 5c50aea commit 8199f40
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ export const renderAsHtml = (viewModel: ViewModel): HtmlPage => toHtmlPage({
<p>
<a href="${viewModel.groupHomePageHref}">View public group page</a>
</p>
<section class="group-management-section">
${renderCurrentlyFeaturedLists(viewModel.currentlyFeaturedLists)}
</section>
<section class="group-management-section">
${renderListsThatCanBeFeatured(viewModel.listsThatCanBeFeatured)}
<section>
<h2>Featured lists</h2>
<p>Featuring a list on your group home page lets you highlight your review and curation activity to readers.</p>
<section class="group-management-section">
${renderCurrentlyFeaturedLists(viewModel.currentlyFeaturedLists)}
</section>
<section class="group-management-section">
${renderListsThatCanBeFeatured(viewModel.listsThatCanBeFeatured)}
</section>
</section>
`),
});
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const renderCurrentlyFeaturedLists = (viewModel: CurrentlyFeaturedLists):
() => '<p>Currently no featured lists</p>',
() => renderForms(viewModel),
),
(content) => `<h2>Currently featured lists</h2>
(content) => `<h3>Currently featured lists</h3>
${content}
`,
toHtmlFragment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export const renderListsThatCanBeFeatured = (viewModel: ListsThatCanBeFeatured):
(items) => `<ul class="list-names-with-actions">${renderListItems(items)}</ul>`,
),
(forms) => toHtmlFragment(`
<h2>Feature a list</h2>
<p class="standard-form__sub_heading_secondary_text">Choose a list to feature on your group page.</p>
<h3>Feature a list</h3>
${forms}
`),
);

0 comments on commit 8199f40

Please sign in to comment.