-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2ec40b
commit 6576678
Showing
5 changed files
with
123 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
```{=html} | ||
|
||
<% | ||
// Number of columns | ||
const cols = 2; | ||
// Card alignment | ||
const align = "left"; | ||
// Borders | ||
const hideBorders = false; | ||
// Cap Options | ||
const imgHeight = "100%"; | ||
%> | ||
|
||
<link href="/assets/css/all.css" rel="stylesheet"> | ||
|
||
<div class="list grid quarto-listing-cols-<%=cols%>"> | ||
<% for (const item of items) { %> | ||
<div class="g-col-1" <%= metadataAttrs(item) %>> | ||
<a href="<%= item.website %>" target="_blank" rel="noopener" class="grid-item-link custom-link"> <!-- Added custom-link class --> | ||
<div class="quarto-grid-item card h-100 <%-`card-${align}`%><%= hideBorders ? ' borderless' : '' %>"> | ||
<% if (item.image) { %> | ||
<p class="card-img-top"> | ||
<img src="<%= item.image %>" class="thumbnail-image card-img" style="height: auto;" alt="<%= item['image-alt'] %>"> | ||
</p> | ||
<% } else { %> | ||
<div class="card-img-bg" <%= imgHeight ? ` style="height: ${imgHeight};"` : '' %>> </div> | ||
<% } %> | ||
<% if ('title' || 'subtitle' || otherFields.length > 0) { %> | ||
<div class="card-body post-contents"> | ||
<% if ('title') { %><h5 class="no-anchor card-title listing-title custom-link"><%= item.title %></h5><% } %> | ||
<% if ('subtitle') { %><div class="card-subtitle listing-subtitle custom-link"><%= item.subtitle %></div><% } %> | ||
<% if ('description') { %> | ||
<div class="card-text listing-description delink custom-link"><%= item.description %></div> | ||
<% } %> | ||
<% | ||
const flexJustify = 'author' && 'date' ? "justify" : 'author' ? "start" : "end"; | ||
%> | ||
<% if ('author' || 'date') { %> | ||
<div class="card-attribution card-text-small <%-flexJustify%>"> | ||
<% if ('author') { %><div class="listing-author"><%= item.author %></div><% } %> | ||
<% if ('date') { %><div class="listing-date"><%= item.date %></div><% } %> | ||
</div> | ||
<% } %> | ||
<style> | ||
.listing-categories .listing-category .listing-href { | ||
color: inherit; /* blue colors for links too */ | ||
text-decoration: inherit; /* no underline */ | ||
} | ||
</style> | ||
<div class="listing-categories" style="padding-top: 1em;"> | ||
<% if ('github') { %> | ||
<div class="listing-category"> | ||
<a class="listing-href" href="<%= item.github %>" target="_blank" rel="noopener">Github <i class="fa-brands fa-github"></i></a> | ||
</div> | ||
<% } %> | ||
<% if (item.website) { %> | ||
<div class="listing-category"> | ||
<a class="listing-href" href="<%= item.website %>" target="_blank" rel="noopener">Website <i class="fa-brands fa-firefox-browser"></i></a> | ||
</div> | ||
<% } %> | ||
</div> | ||
</div> | ||
<% } %> | ||
</div> | ||
</a> <!-- Added custom-link class --> | ||
</div> | ||
<% } %> | ||
</div> | ||
|
||
|
||
``` |
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
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
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
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