This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500&family=Playfair+Display:ital,wght@0,600;0,700;1,500;1,600&display=swap" rel="stylesheet">
|
||||
<link rel="icon" href="{{ '/static/favicon.svg'|url }}" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="{{ '/static/style.css'|url }}?v=5">
|
||||
<link rel="stylesheet" href="{{ '/static/style.css'|url }}?v=6">
|
||||
<script src="{{ '/static/tags.js'|url }}?v=1" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -4,3 +4,13 @@
|
||||
{% if tag_record %}<a href="{{ tag_record|url }}" rel="tag">{{ tag_record.title }}</a>{% else %}<span>{{ tag }}</span>{% endif %}
|
||||
{% endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro taxonomy_labels(items) -%}
|
||||
{% for item in items %}
|
||||
{% set parts = item.split('\t', 1) %}
|
||||
{% if parts[0] != '-' %}
|
||||
{% set tag_record = site.get('/tags/' ~ parts[0]) %}
|
||||
{% if tag_record %}<a href="{{ tag_record|url }}" rel="tag">{{ parts[1] }}</a>{% else %}<span class="non-taxonomy-label">{{ parts[1] }}</span>{% endif %}
|
||||
{% else %}<span class="non-taxonomy-label">{{ parts[1] }}</span>{% endif %}
|
||||
{% endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "macros/tag-links.html" import tag_links, taxonomy_labels with context %}
|
||||
{% block body %}
|
||||
{% set devlog = site.get(this.path ~ '/devlog') %}
|
||||
<article class="project-page">
|
||||
@@ -48,10 +49,10 @@
|
||||
<dd>{{ this.repository_license }}</dd>
|
||||
</div>
|
||||
</div>
|
||||
{% if this.repository_languages %}
|
||||
{% if this.repository_language_labels %}
|
||||
<div class="post-info-row">
|
||||
<dt>Languages</dt>
|
||||
<dd class="technology-list">{% for language in this.repository_languages %}<span>{{ language }}</span>{% endfor %}</dd>
|
||||
<dd class="technology-list">{{ taxonomy_labels(this.repository_language_labels) }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="repository-pair repository-counts">
|
||||
@@ -71,11 +72,11 @@
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
{% if this.technology_tags %}
|
||||
{% if this.technology_labels %}
|
||||
<section class="project-technologies">
|
||||
<div class="shell">
|
||||
<div class="section-heading"><span>Built with</span><span>{{ this.technology_tags|length }} technologies</span></div>
|
||||
<div class="technology-list project-technology-list">{% for tag in this.technology_tags %}<span>{{ tag }}</span>{% endfor %}</div>
|
||||
<div class="section-heading"><span>Built with</span><span>{{ this.technology_labels|length }} technologies</span></div>
|
||||
<div class="technology-list project-technology-list">{{ taxonomy_labels(this.technology_labels) }}</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
{% from "macros/tag-links.html" import tag_links with context %}
|
||||
{% block body %}
|
||||
{% set filter_tags = namespace(values=[]) %}
|
||||
{% if this._id in ['blog', 'articles'] %}
|
||||
{% if this._id in ['blog', 'articles', 'projects'] %}
|
||||
{% for item in this.children %}
|
||||
{% for tag in item.tags %}
|
||||
{% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %}
|
||||
{% for tag in item_tags %}
|
||||
{% if tag not in filter_tags.values %}{% set filter_tags.values = filter_tags.values + [tag] %}{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
@@ -30,13 +31,13 @@
|
||||
{% endif %}
|
||||
<div class="card-grid">
|
||||
{% for item in this.children %}
|
||||
<article class="entry-card accent-{{ item.kicker|lower }}"{% if filter_tags.values %} data-filter-item data-tags="{{ item.tags|join(' ') }}"{% endif %}>
|
||||
{% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %}
|
||||
<article class="entry-card accent-{{ item.kicker|lower }}"{% if filter_tags.values %} data-filter-item data-tags="{{ item_tags|join(' ') }}"{% endif %}>
|
||||
<div class="entry-meta"><span class="label">{{ item.kicker }}</span><time>{{ item.date|dateformat('YYYY.MM.dd') }}</time></div>
|
||||
<h2><a href="{{ item|url }}">{{ item.title }}</a></h2>
|
||||
<p>{{ item.summary }}</p>
|
||||
{% if item.tags %}
|
||||
{% if item._model == 'project' %}<div class="technology-list entry-tags">{% for tag in item.technology_tags %}<span>{{ tag }}</span>{% endfor %}</div>
|
||||
{% else %}<div class="entry-tags">{{ tag_links(item.tags) }}</div>{% endif %}
|
||||
{% if item_tags %}
|
||||
<div class="entry-tags{% if item._model == 'project' %} technology-list{% endif %}">{{ tag_links(item_tags) }}</div>
|
||||
{% endif %}
|
||||
<a class="read-more" href="{{ item|url }}">{% if item._model == 'project' %}View project{% else %}Read entry{% endif %} →</a>
|
||||
</article>
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
<div class="tag-directory">
|
||||
{% for tag in this.children %}
|
||||
{% set usage = namespace(count=0) %}
|
||||
{% for section_id in ['blog', 'articles'] %}
|
||||
{% for section_id in ['projects', 'blog', 'articles'] %}
|
||||
{% for item in site.query('/' ~ section_id) %}
|
||||
{% if tag._id in item.tags %}{% set usage.count = usage.count + 1 %}{% endif %}
|
||||
{% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %}
|
||||
{% if tag._id in item_tags %}{% set usage.count = usage.count + 1 %}{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<a class="tag-directory-card" href="{{ tag|url }}">
|
||||
|
||||
+7
-5
@@ -2,9 +2,10 @@
|
||||
{% from "macros/tag-links.html" import tag_links with context %}
|
||||
{% block body %}
|
||||
{% set matches = namespace(items=[]) %}
|
||||
{% for section_id in ['blog', 'articles'] %}
|
||||
{% for section_id in ['projects', 'blog', 'articles'] %}
|
||||
{% for item in site.query('/' ~ section_id) %}
|
||||
{% if this._id in item.tags %}{% set matches.items = matches.items + [item] %}{% endif %}
|
||||
{% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %}
|
||||
{% if this._id in item_tags %}{% set matches.items = matches.items + [item] %}{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<section class="hero compact">
|
||||
@@ -23,17 +24,18 @@
|
||||
{% if matches.items %}
|
||||
<div class="card-grid">
|
||||
{% for item in matches.items|sort(attribute='date', reverse=true) %}
|
||||
{% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %}
|
||||
<article class="entry-card accent-{{ item.kicker|lower }}">
|
||||
<div class="entry-meta"><span class="label">{{ item.kicker }}</span><time>{{ item.date|dateformat('YYYY.MM.dd') }}</time></div>
|
||||
<h2><a href="{{ item|url }}">{{ item.title }}</a></h2>
|
||||
<p>{{ item.summary }}</p>
|
||||
{% if item.tags %}<div class="entry-tags">{{ tag_links(item.tags) }}</div>{% endif %}
|
||||
<a class="read-more" href="{{ item|url }}">Read entry →</a>
|
||||
{% if item_tags %}<div class="entry-tags">{{ tag_links(item_tags) }}</div>{% endif %}
|
||||
<a class="read-more" href="{{ item|url }}">{% if item._model == 'project' %}View project{% else %}Read entry{% endif %} →</a>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="empty-state">No blog entries or articles use this tag yet.</p>
|
||||
<p class="empty-state">No projects, blog entries, or articles use this tag yet.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user