-
Notifications
You must be signed in to change notification settings - Fork 6
Add blog section with summary display on listing page #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ent/blog/_index.md to define the blog section. :: Added two sample blog post content/blog/second.md and content/blog/first.md with Lorem Ipsum text. :: Updated layouts/blog/list.html to display only the summary of each blog post in the listing. :: Added <more--> tag in second.md to define the summary cutoff point. :: Set summaryLength parameter in config.toml to control the length of automatically generated summaries.
|
I'm not sure the purpose of this PR, it doesn't seem to add any content relevant to snapcrafters, and we haven't discussed publicizing a blog? I'm going to close this for now, but please feel free to come and chat with us on Matrix: https://matrix.to/#/#snapcrafters:matrix.org |
soumyaDghosh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, these initial HTML implementation looks good. But do the changes requested. Also, please fix the PR description, use backticks "`" when you need to write a code block. And rewrite the PR description properly in a List style.
|
Okay - now I understand. There is pretty minimal boilerplate in here, so I suggest we just add the structure when we publish the first post. A single PR with two commits:
|
|
Okay - from a structure perspective I think this is good to merge, but let's wait to merge it until we've added the first blog post, too. That way we don't have a totally empty blog page 🙂 |
|
Actually -- looks like there are some alignment issues. If you take a look at the |
|
Till now I completed the structural part of the blog and now I will work on styling the pages, please review the changes that I made till now. @soumyaDghosh |
|
Completed the styling of the blog site, please review @soumyaDghosh |
|
@jnsgruk As much I tested. I think this PR is ready to merge. If you have any suggestions, please let us know. |
|
Some screenshots, looking great! 🎉 Thanks a lot @bits-and-atoms! |
|
I'll take a look at this over the next couple of days, thanks folks! |
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| title: "Blogs" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title: "Blogs" | |
| title: "Blog" |
| background-image: linear-gradient(to right, rgba(255, 255, 255, 0.3) 0 100%), | ||
| url({{absURL "launchpad.svg"}}); | ||
| } | ||
|
|
||
| .breadcrumbs a { | ||
| font-size: 1rem; | ||
| text-decoration: none; | ||
| font-weight: 600; | ||
| color: #666; | ||
| } | ||
|
|
||
| .breadcrumbs a:hover, | ||
| .breadcrumbs a:focus { | ||
| color: #333; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .breadcrumbs a:visited { | ||
| color: #666; | ||
| } | ||
|
|
||
| /* Container for the blog list */ | ||
| .blog-list-container { | ||
| max-width: 800px; | ||
| margin: 0 auto; | ||
| text-align: left; | ||
| } | ||
|
|
||
| /* Header styling for blog pages */ | ||
| .blog-header { | ||
| margin-bottom: 2rem; | ||
| } | ||
|
|
||
| /* Blog content sizing */ | ||
| .blog-content { | ||
| font-size: 1.1rem; | ||
| /* Increased font size */ | ||
| line-height: 1.8; | ||
| /* Increased line height for better readability */ | ||
| max-width: 100%; | ||
| /* Ensure content uses full width */ | ||
| } | ||
|
|
||
| /* Blog page title */ | ||
| .blog-page-title { | ||
| font-size: 2.5rem; | ||
| font-weight: 700; | ||
| margin-bottom: 0.75rem; | ||
| } | ||
|
|
||
| /* Description text under the title */ | ||
| .blog-page-description { | ||
| margin-top: 0.7rem; | ||
| font-size: 1.4rem; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| /* Card styling for each blog entry */ | ||
| .blog-card { | ||
| background-color: #f5f5f5; | ||
| border-radius: 8px; | ||
| margin-bottom: 1.5rem; | ||
| padding: 1rem; | ||
| } | ||
|
|
||
| /* Card title area */ | ||
| .blog-card-title { | ||
| margin: 0; | ||
| line-height: 1.2; | ||
| font-weight: 700; | ||
| font-size: 1.6rem; | ||
| color: #333; | ||
| } | ||
|
|
||
| /* Summary styling within the card */ | ||
| .blog-card-summary { | ||
| margin-top: 0.5rem; | ||
| } | ||
|
|
||
| .blog-card-summary p { | ||
| font-size: 1.1rem; | ||
| font-weight: 500; | ||
| color: #555; | ||
| } | ||
|
|
||
| /* Hyperlink styling for the blog card */ | ||
| .blog-card-link-wrapper { | ||
| display: block; | ||
| color: inherit; | ||
| text-decoration: none; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .blog-card-link-wrapper:visited { | ||
| color: inherit; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .blog-card-link-wrapper:hover, | ||
| .blog-card-link-wrapper:focus, | ||
| .blog-card-link-wrapper:visited:hover, | ||
| .blog-card-link-wrapper:visited:focus { | ||
| color: #0052cc; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| /* Draft status badge */ | ||
| .draft-badge { | ||
| font-size: 0.85rem; | ||
| color: #999; | ||
| } | ||
|
|
||
| /* Footer metadata area within the blog card */ | ||
| .blog-card-meta { | ||
| margin-top: 0.5rem; | ||
| font-size: 0.9rem; | ||
| } | ||
|
|
||
| .blog-single-container { | ||
| max-width: 800px; | ||
| margin: 0 auto; | ||
| text-align: left; | ||
| font-size: 1.2rem; | ||
| } | ||
|
|
||
| .tag-list { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| gap: 0.5rem; | ||
| list-style: none; | ||
| padding: 0rem; | ||
| } | ||
|
|
||
| .tag-card { | ||
| background-color: #e0e0e0; | ||
| border-radius: 4px; | ||
| padding: 0.5rem 1rem; | ||
| } | ||
|
|
||
| .tag-card a { | ||
| text-decoration: none; | ||
| color: #333; | ||
| font-weight: 500; | ||
| } | ||
|
|
||
| .tag-card a:hover, | ||
| .tag-card a:focus { | ||
| color: #0052cc; | ||
| } | ||
|
|
||
| .blog-meta { | ||
| font-size: 1rem; | ||
| color: #2f2d2d; | ||
| margin-top: 0.5rem; | ||
| margin-bottom: 1.5rem; | ||
| } | ||
|
|
||
| .blog-meta span { | ||
| margin-right: 0.5rem; | ||
| } | ||
|
|
||
| .blog-canonical a { | ||
| color: #333; | ||
| /* Neutral color */ | ||
| text-decoration: underline; | ||
| /* Always underline */ | ||
| } | ||
|
|
||
| .blog-canonical a:visited { | ||
| color: #333; | ||
| /* Remove purple color once clicked */ | ||
| } | ||
|
|
||
| .blog-canonical a:hover, | ||
| .blog-canonical a:focus { | ||
| color: #0052cc; | ||
| /* Blue on hover/focus */ | ||
| } | ||
|
|
||
| .toc-card { | ||
| background-color: #f5f5f5; | ||
| border-radius: 8px; | ||
| padding: 0.5rem; | ||
| margin-bottom: 1.2rem; | ||
| } | ||
|
|
||
| .toc-title { | ||
| font-weight: 700; | ||
| font-size: 1.1rem; | ||
| color: #333; | ||
| } | ||
|
|
||
| .toc-content { | ||
| margin-top: 0.5rem; | ||
| } | ||
|
|
||
| .toc-list { | ||
| list-style: none; | ||
| padding: 0; | ||
| } | ||
|
|
||
| .toc-item a { | ||
| color: #333; | ||
| /* Always black */ | ||
| text-decoration: none; | ||
| /* No underline */ | ||
| } | ||
|
|
||
| .toc-item a:visited { | ||
| color: #333; | ||
| /* Remove purple color once clicked */ | ||
| } | ||
|
|
||
| .toc-item a:hover, | ||
| .toc-item a:focus { | ||
| color: #0052cc; | ||
| /* Blue on hover/focus */ | ||
| text-decoration: none; | ||
| /* No underline */ | ||
| } | ||
|
|
||
| .footer-nav-card { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| background-color: #f5f5f5; | ||
| border-radius: 8px; | ||
| padding: 0.5rem; | ||
| margin-top: 1rem; | ||
| } | ||
|
|
||
| .footer-nav-link { | ||
| flex: 1; | ||
| text-align: center; | ||
| padding: 0.5rem; | ||
| color: #333; | ||
| text-decoration: none; | ||
| font-weight: 500; | ||
| } | ||
|
|
||
| .footer-nav-link:hover, | ||
| .footer-nav-link:focus { | ||
| background-color: #dcdcdc; | ||
| color: #333; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .footer-nav-prev { | ||
| border-right: 1px solid #ccc; | ||
| } | ||
|
|
||
| .footer-nav-next { | ||
| border-left: 1px solid #ccc; | ||
| } | ||
|
|
||
| .footer-nav-text { | ||
| display: block; | ||
| font-size: 0.9rem; | ||
| margin-bottom: 0.5rem; | ||
| } | ||
|
|
||
| .footer-nav-title { | ||
| display: block; | ||
| font-size: 1rem; | ||
| font-weight: 700; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try to reduce this a little bit? I'd like to have as few overrides to Vanilla as possible, so that it's easy to keep up to date as the design system evolves?
This feels like an excessive amount of change? I could be wrong, but I'd like to use standard components as much as we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @jnsgruk, thanks a lot for the feedback. I'll take up this PR from here, and will migrate the CSS to the vanilla framework.
|
(I accidentally clicked approve, not request changes! Sorry!) |




Added a new section for blogs.