-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
dbed056
commit c455c7d
Showing
6 changed files
with
59 additions
and
11 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 |
---|---|---|
@@ -1,11 +1,19 @@ | ||
{%- from "file/macro.njk" import file -%} | ||
{% extends "document.njk" %} | ||
|
||
{% block content %} | ||
{%- if files %} | ||
<ul> | ||
{%- for file in files %} | ||
<li><a href="{{ parentUrl }}{{ file._id }}">{{ icon(file.properties["post-type"]) }} {{ file.properties.filename }}</a></li> | ||
<ol class="no-bullets"> | ||
{%- for item in files %} | ||
<li> | ||
{{ file({ | ||
title: item.properties.filename, | ||
href: parentUrl + item._id, | ||
icon: item.properties["post-type"], | ||
meta: item.properties.url | ||
}) }} | ||
</li> | ||
{%- endfor %} | ||
</ul> | ||
</ol> | ||
{%- endif %} | ||
{% endblock %} |
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,11 +1,19 @@ | ||
{%- from "file/macro.njk" import file -%} | ||
{% extends "document.njk" %} | ||
|
||
{% block content %} | ||
{%- if posts %} | ||
<ul> | ||
{%- for post in posts %} | ||
<li><a href="{{ parentUrl }}{{ post._id }}">{{ icon(post.properties["post-type"]) }} {{ post.properties.name }}</a></li> | ||
<ol class="no-bullets"> | ||
{%- for item in posts %} | ||
<li> | ||
{{ file({ | ||
title: item.properties.name or item.properties['post-type'] | capitalize, | ||
href: parentUrl + item._id, | ||
icon: item.properties["post-type"], | ||
meta: item.properties.url | ||
}) }} | ||
</li> | ||
{%- endfor %} | ||
</ul> | ||
</ol> | ||
{%- endif %} | ||
{% endblock %} |
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,3 @@ | ||
{% macro file(opts) %} | ||
{%- include "./template.njk" -%} | ||
{% endmacro %} |
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,17 @@ | ||
.file__title { | ||
--flow-space: 0; | ||
@extend %label; | ||
} | ||
|
||
.file__title svg { | ||
inline-size: var(--step-0); | ||
margin-inline-end: var(--space-inline); | ||
} | ||
|
||
.file__meta { | ||
@extend %caption; | ||
|
||
color: var(--color-neutral-dark); | ||
margin-block-start: 0; | ||
margin-inline-start: calc(var(--step-0) + var(--space-inline)); | ||
} |
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,7 @@ | ||
{%- set classes = "file" + (" " + opts.classes if opts.classes) -%} | ||
<article class="{{ classes }}"> | ||
<h2 class="file__title"> | ||
{{ icon(opts.icon) }}<a href="{{ opts.href }}">{{ opts.title }}</a> | ||
</h2> | ||
<p class="file__meta">{{ opts.meta }}</p> | ||
</article> |
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