-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tinkering with templates for example listing
- Loading branch information
1 parent
e21e931
commit bc6ac79
Showing
5 changed files
with
164 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
--- | ||
title: Examples | ||
listing: | ||
id: listing-examples | ||
contents: examples.yml | ||
type: grid | ||
sort: date desc | ||
sort-ui: false | ||
grid-columns: 4 | ||
grid-columns: 2 | ||
filter-ui: true | ||
template: template.ejs | ||
|
||
# css: styles.css | ||
|
||
|
||
--- | ||
|
||
Some examples of projects that have used Molecular Nodes in their production. | ||
Some examples of projects that have used Molecular Nodes in their production. | ||
|
||
::: {#listing-examples} | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<style> | ||
.grid-container { | ||
max-width: 1400px; | ||
margin: 0 auto; | ||
padding: 20px; | ||
} | ||
|
||
.grid { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); | ||
gap: 20px; | ||
max-width: 100%; | ||
} | ||
|
||
@media (min-width: 992px) { | ||
.grid { | ||
grid-template-columns: repeat(3, 1fr); | ||
} | ||
} | ||
|
||
.grid-item { | ||
break-inside: avoid; | ||
margin-bottom: 20px; | ||
border: 1px solid #ddd; | ||
border-radius: 8px; | ||
transition: transform 0.2s ease-in-out; | ||
} | ||
|
||
.grid-item:hover { | ||
transform: translateY(-5px); | ||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.media-wrapper { | ||
margin-bottom: 15px; | ||
} | ||
|
||
.media-wrapper img, | ||
.media-wrapper video { | ||
width: 100%; | ||
/* height: 100px; */ | ||
object-fit: cover; | ||
border-radius: 8px 8px 0 0; | ||
} | ||
|
||
.card-title { | ||
margin: 0 0 10px 0; | ||
font-size: 1.25rem; | ||
color: #333; | ||
} | ||
|
||
.quarto-grid-link { | ||
text-decoration: none; | ||
color: inherit; | ||
} | ||
|
||
.listing-description { | ||
font-size: 0.95rem; | ||
line-height: 1.5; | ||
color: #666; | ||
margin-bottom: 15px; | ||
} | ||
|
||
.card-attribution { | ||
font-size: 0.85rem; | ||
color: #777; | ||
} | ||
|
||
.card-footer { | ||
border-top: 1px solid #eee; | ||
padding-top: 10px; | ||
margin-top: auto; | ||
font-size: 0.85rem; | ||
color: #888; | ||
} | ||
|
||
.no-external { | ||
text-decoration: none; | ||
color: inherit; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
:::: {.grid .text-center .list} | ||
|
||
<% for (const item of items) { %> | ||
:::: {.quarto-grid-item .card .h-100 .w-100 .card-center .hovercard-extension} | ||
:::: {.card-body .post-contents} | ||
[ | ||
`<h5 class="no-anchor card-title listing-title">`{=html} | ||
<%= item.title %> | ||
`</h5>`{=html} | ||
](<%- item.path %>){.quarto-grid-link} | ||
<% if (item.video && item.video.endsWith(".mp4")) { %> | ||
:::: {.media-wrapper} | ||
<video controls muted loop autoplay> | ||
<source src="<%= item.video %>" type="video/mp4"> | ||
Your browser does not support the video tag. | ||
</video> | ||
::: | ||
<% } else if (item.video) { %> | ||
:::: {.media-wrapper} | ||
<video controls muted loop autoplay> | ||
<source src="<%= item.video %>.mp4" type="video/mp4"> | ||
Your browser does not support the video tag. | ||
</video> | ||
::: | ||
<% } else if (item.image) { %> | ||
[![](<%= item.image %>){.media-wrapper}](<%= item.path %>) | ||
<% } %> | ||
:::: {.card-text .listing-description} | ||
<%= item.description %> | ||
::: | ||
:::: {.card-attribution .card-text-small .justify} | ||
:::: {.listing-author} | ||
[<%= item.author %>](<%= item.path %>){.no-external} | ||
::: | ||
::: | ||
:::: {.card-footer} | ||
:::: {.listing-file-modified} | ||
***Updated**: <%= item['file-modified'] %>* | ||
::: | ||
::: | ||
::: | ||
::: | ||
<% } %> | ||
|
||
::: |