-
Notifications
You must be signed in to change notification settings - Fork 0
Add Research Subdirectory #1
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
Changes from all commits
ae26511
d5ff3d1
1963fd0
7209403
fac44ce
be5cba5
4cf83e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| layout: 'layouts/base.njk' | ||
| --- | ||
|
|
||
| <main> | ||
| <section id="research-list"> | ||
| <h1>{{ title }}</h1> | ||
| <p class="intro">{{ content | safe }}</p> | ||
|
|
||
| <div class="article-list"> | ||
| {% for post in collections.research | reverse %} | ||
| <article class="article-item"> | ||
| <div class="article-title-line"> | ||
| <h2><a href="{{ post.url | url }}">{{ post.data.title }}</a></h2> | ||
| {% if post.data.status %} | ||
| <span class="status-badge status-{{ post.data.status | slug }}">{{ post.data.status }}</span> | ||
|
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Using a slug filter on status may not handle all edge cases. Sanitize or restrict status values to ensure valid CSS class names and prevent styling issues. Suggested implementation: You must define a
Example (in your .eleventy.js config): eleventyConfig.addFilter("cssclass", function(value) {
return String(value)
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-+|-+$/g, '');
}); |
||
| {% endif %} | ||
| </div> | ||
| <p class="meta"> | ||
| <time datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate("DDD") }}</time> | ||
| </p> | ||
| {% if post.data.description %} | ||
| <p class="excerpt">{{ post.data.description }}</p> | ||
| {% endif %} | ||
| <a href="{{ post.url | url }}" class="read-more">Read More →</a> | ||
| </article> | ||
| {% endfor %} | ||
| </div> | ||
| </section> | ||
| </main> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| layout: 'layouts/base.njk' | ||
| --- | ||
|
|
||
| <div class="page-with-left-sidebar"> | ||
|
|
||
| {# The "Left Leaf": TOC Sidebar #} | ||
| <aside class="page-sidebar"> | ||
| <div class="toc-container sticky-toc"> | ||
| <h2>Table of Contents</h2> | ||
| {{ content | toc | safe }} | ||
| </div> | ||
| </aside> | ||
|
|
||
| {# The "Middle Leaf": Main Article Content #} | ||
| <main class="page-content-main"> | ||
| <article> | ||
| <header class="research-header"> | ||
| <h1>{{ title }}</h1> | ||
| <p class="meta"> | ||
| Published on <time datetime="{{ date | htmlDateString }}">{{ date | readableDate("DDD") }}</time> | ||
| {% if status == "In Progress" and lastUpdated %} | ||
| <br> | ||
| <span class="last-updated">Last updated on <time datetime="{{ lastUpdated | htmlDateString }}">{{ lastUpdated | readableDate("DDD") }}</time></span> | ||
| {% endif %} | ||
| </p> | ||
| </header> | ||
| <div class="research-content"> | ||
| {{ content | safe }} | ||
| </div> | ||
| </article> | ||
| </main> | ||
|
|
||
| </div> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| /* --- Basic Reset & Defaults --- */ | ||
| * { | ||
| box-sizing: border-box; /* Makes padding/border calculation more intuitive */ | ||
| box-sizing: border-box; | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
|
|
||
| body { | ||
| font-family: 'Poppins', sans-serif; /* Assuming you added Poppins font */ | ||
| font-family: 'Poppins', sans-serif; | ||
| line-height: 1.6; | ||
| background-color: #0f0f24; /* << Dark blue/purple background */ | ||
| color: #dcdcdc; /* << Light grey default text */ | ||
| background-color: #0f0f24; | ||
| color: #dcdcdc; | ||
| padding-top: 60px; | ||
| } |
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.
Wrapping
{{ content }}(which itself outputs<p>tags) inside another<p>leads to invalid nested paragraphs. Consider using a<div class="intro">…</div>or output raw content without an extra<p>wrapper.