1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
{% extends "_base.html" %}
{% block page %}homepage{% endblock page%}
{% block lang %}{% if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ section.lang }}{% endif %}{% endblock lang %}
{% block title %}{{ config.title }}{% endblock title %}
{% block desc %}
<meta name="description" content="{{ config.description }}">
{% endblock desc %}
{% block head %}
{% if config.markdown.highlight_theme == "css" %}
{% if config.extra.force_theme == "dark" %}
<link id="hl" rel="stylesheet" type="text/css" href="{{ get_url(path='hl-dark.css') }}" />
{% else %}
<link id="hl" rel="stylesheet" type="text/css" href="{{ get_url(path='hl-light.css') }}" />
{% endif %}
{% endif %}
{% if section.extra.math %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/copy-tex.min.js" integrity="sha384-HORx6nWi8j5/mYA+y57/9/CZc5z8HnEw4WUZWy5yOn9ToKBv1l58vJaufFAn9Zzi" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
renderMathInElement(document.body, {
delimiters: [
{ left: '$$', right: '$$', display: true },
{ left: '$', right: '$', display: false },
{ left: '\\(', right: '\\)', display: false },
{ left: '\\[', right: '\\]', display: true }
],
throwOnError: false
});
});
</script>
{% endif %}
{% endblock head %}
{% block content %}
<div id="wrapper">
<main>
<section id="info">
{% if section.extra.avatar %}
<img src="{{ get_url(path=section.extra.avatar) }}" alt="avatar">
{% endif %}
<div id="text">
<div>
<span id="name">{{ section.extra.name }}</span>
{% if section.extra.id %}
<span id="id">@{{ section.extra.id }}</span>
{% endif %}
</div>
{% if section.extra.bio %}
<div id="bio"> {{ section.extra.bio }} </div>
{% endif %}
</div>
</section>
<section id="links">
<div id="left">
{% for section in config.extra.sections %}
<a {% if section.is_external %}href="{{ section.path }}" target="_blank" rel='noreferrer noopener'{% else %}href="{{ get_url(path=section.path) }}" class="instant"{% endif %}>{{ section.name }}</a>
{% endfor %}
</div>
<div id="right">
{% for link in section.extra.links %}
<a href="{{ link.url }}" aria-label="{{ link.name }}" target="_blank" rel='noreferrer noopener'>
{% set icon_path = "icon/" ~ link.icon ~ ".svg" %}
{% set icon = load_data(path=icon_path) %}
{{ icon | safe }}
</a>
{% endfor %}
{% if not section.extra.footer and not config.extra.force_theme %}
{% set moon_icon = load_data(path="icon/moon.svg") %}
{% set sun_icon = load_data(path="icon/sun.svg") %}
<button id="theme-toggle" aria-label="theme switch">
<span class="moon-icon">{{ moon_icon | safe }}</span>
<span class="sun-icon">{{ sun_icon | safe }}</span>
</button>
{% endif %}
</div>
</section>
<section id="brief" class="prose">
{{ section.content | trim | safe }}
</section>
{% if section.extra.recent %}
{% set blog_section_path = config.extra.blog_section_path | trim_start_matches(pat="/") %}
{% set section_md_path = blog_section_path ~ "/_index.md" %}
{% set blog_section = get_section(path=section_md_path) %}
<section class="layout-list">
<div class="post-list">
{% for post in blog_section.pages | slice(end=section.extra.recent_max) %}
<a class="post instant {% if post.extra.featured %}featured{% endif %}" href="{{ post.permalink | safe }}">
<span>{{ post.title }}</span>
<span class="line"></span>
<span class="date">{{ post.date | date(format=section.extra.date_format) }}</span>
</a>
{% endfor %}
</div>
<div class="read-more">
<a class="instant" href="{{ config.extra.blog_section_path }}">{{ section.extra.recent_more_text }}</a>
</div>
</section>
{% endif %}
</main>
{% if section.extra.footer %}
{% include "_footer.html" %}
{% endif %}
</div>
{% endblock content %}
{% block script %}
<script src="{{ get_url(path='js/lightense.min.js') }}"></script>
{% if section.extra.mermaid %}
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true });
</script>
{% endif %}
{% endblock script %}
|