Migrate from Bazel
This commit is contained in:
commit
016dbd0814
59 changed files with 7044 additions and 0 deletions
134
themes/retro-future/templates/base.html
Normal file
134
themes/retro-future/templates/base.html
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ lang | default(value='en') }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
||||
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
|
||||
<meta name="author" content="{{ config.author | default(value='') }}">
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="{{ get_url(path='favicon.svg', trailing_slash=false) }}">
|
||||
|
||||
{% if config.generate_feeds %}
|
||||
<link rel="alternate" type="application/atom+xml" title="{{ config.title }}" href="{{ get_url(path='atom.xml', trailing_slash=false) }}">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{{ get_url(path='style.css', trailing_slash=false) }}">
|
||||
|
||||
{% block extra_head %}{% endblock extra_head %}
|
||||
|
||||
{% if config.extra.mermaid %}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
|
||||
const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'base',
|
||||
themeVariables: isDark ? {
|
||||
primaryColor: '#88c0d0', primaryTextColor: '#d8dee9', primaryBorderColor: '#5e81ac',
|
||||
lineColor: '#d08770', secondaryColor: '#81a1c1', tertiaryColor: '#b48ead',
|
||||
background: '#2e3440', mainBkg: '#3b4252', secondBkg: '#434c5e', tertiaryBkg: '#4c566a',
|
||||
textColor: '#d8dee9', border1: '#4c566a', border2: '#434c5e',
|
||||
note: '#ebcb8b', noteBorder: '#d08770', noteBkg: '#5e81ac'
|
||||
} : {
|
||||
primaryColor: '#62a0d8', primaryTextColor: '#2e3440', primaryBorderColor: '#4271ae',
|
||||
lineColor: '#d2a256', secondaryColor: '#d2a256', tertiaryColor: '#b48ead',
|
||||
background: '#ffffff', mainBkg: '#f5f5f5', secondBkg: '#e8e8e8', tertiaryBkg: '#d8d8d8',
|
||||
textColor: '#2e3440', border1: '#cccccc', border2: '#d8d8d8',
|
||||
note: '#d2a256', noteBorder: '#d2a256', noteBkg: '#f5f5f5'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.analytics.service == "plausible" %}
|
||||
<script defer data-domain="{{ config.extra.analytics.id }}" src="{{ config.extra.analytics.self_hosted_url }}/js/script.js"></script>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.querySelectorAll('pre code').forEach(function(code) {
|
||||
const lines = code.textContent.split('\n');
|
||||
const lineCount = lines[lines.length - 1] === '' ? lines.length - 1 : lines.length;
|
||||
const lineNumbers = document.createElement('div');
|
||||
lineNumbers.className = 'line-numbers';
|
||||
lineNumbers.setAttribute('aria-hidden', 'true');
|
||||
for (let i = 1; i <= lineCount; i++) {
|
||||
lineNumbers.textContent += i + '\n';
|
||||
}
|
||||
code.parentElement.insertBefore(lineNumbers, code);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<div class="container">
|
||||
{% block header_nav %}
|
||||
<nav aria-label="Main navigation">
|
||||
<ul>
|
||||
<li><a href="{{ get_url(path='posts', trailing_slash=true) }}" {% if current_path is starting_with('/posts') %}aria-current="page"{% endif %}>Blog</a></li>
|
||||
{% for link in config.extra.nav_links | default(value=[]) %}
|
||||
<li><a href="{{ link.url }}" {% if current_path is starting_with(link.url) and link.url != '/' %}aria-current="page"{% endif %}>{{ link.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="header-bio">
|
||||
<div class="header-bio__photo">
|
||||
<picture>
|
||||
<source srcset="{{ get_url(path='images/me.webp') }}" type="image/webp">
|
||||
<img src="{{ get_url(path='images/me.jpg') }}" alt="{{ config.author }}">
|
||||
</picture>
|
||||
</div>
|
||||
<div class="header-bio__info">
|
||||
<div class="header-bio__main">
|
||||
<div class="header-bio__name">{{ config.author }}</div>
|
||||
{% if config.extra.bio %}
|
||||
<div class="header-bio__text">{{ config.extra.bio }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="header-bio__socials">
|
||||
{% for social in config.extra.socials %}
|
||||
<a href="{{ social.url }}" rel="me" aria-label="{{ social.name | capitalize }}">
|
||||
{% if social.icon == "github" %}
|
||||
<svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
|
||||
{% elif social.icon == "mastodon" %}
|
||||
<svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z"/></svg>
|
||||
{% elif social.icon == "twitter" %}
|
||||
<svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
|
||||
{% elif social.icon == "forgejo" %}
|
||||
<svg viewBox="0 0 212 212" width="20" height="20">
|
||||
<g transform="translate(6,6)" stroke="currentColor" fill="none">
|
||||
<path d="M58 168 v-98 a50 50 0 0 1 50-50 h20" stroke-width="25"/>
|
||||
<path d="M58 168 v-30 a50 50 0 0 1 50-50 h20" stroke-width="25"/>
|
||||
<circle cx="142" cy="20" r="18" stroke-width="15"/>
|
||||
<circle cx="142" cy="88" r="18" stroke-width="15"/>
|
||||
<circle cx="58" cy="180" r="18" stroke-width="15"/>
|
||||
</g>
|
||||
</svg>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if config.generate_feeds %}
|
||||
<a href="{{ get_url(path='atom.xml', trailing_slash=false) }}" aria-label="RSS Feed">
|
||||
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5">
|
||||
<circle cx="5" cy="19" r="2" fill="currentColor" stroke="none"/>
|
||||
<path d="M4 11a9 9 0 0 1 9 9"/>
|
||||
<path d="M4 4a16 16 0 0 1 16 16"/>
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock header_nav %}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue