-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.j2
164 lines (159 loc) · 7.18 KB
/
home.j2
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{% from "macros.j2" import render_social_icons %}
{% block style %}
<link rel="stylesheet" href="{{ static_url }}assets/aoyama.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;700&display=swap" rel="stylesheet">
<!--
*********
Theme: Aoyama(https://github.com/jessuni/typlog-aoyama)
Author: Jessie Ji (https://jessieji.com)
This theme is dedicated to Typlog (https://typlog.com) and is hereby licensed to Typlog only.
*********
-->
{% endblock %}
{% block script %}
<script src="{{ static_url }}assets/font.js"></script>
<script src="{{ static_url }}index.js"></script>
{% endblock %}
{% set aoyama = query.config('aoyama') %}
{% block body %}
{% set podcast = site.podcast %}
<div class="snap-container">
<section class="section landing">
{% if aoyama and aoyama.video_cover %}
<div class="video-cover">
<video poster="{{ aoyama.video_cover.poster }}" muted preload autoplay loop playsinline>
<source src="{{ aoyama.video_cover.src }}" type="{{aoyama.video_cover.type}}">
{%if aoyama.video_cover.poster %}
<img src="{{ aoyama.video_cover.poster }}">
{% endif %}
</video>
</div>
{% endif %}
{% if podcast and not site.logo %}
{% set subject = podcast %}
{% else %}
{% set subject = site %}
{% endif %}
{% set type = 'site' %}
{% include "./_partials/side.j2" %}
<div class="site-links">
{% if site.primary_links %}
<div class="site-nav">
<button id="menu" type="button" class="site-nav_button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M3 7a1 1 0 1 0 0 2h24a1 1 0 1 0 0-2H3zm0 7a1 1 0 1 0 0 2h24a1 1 0 1 0 0-2H3zm0 7a1 1 0 1 0 0 2h24a1 1 0 1 0 0-2H3z"/></svg></button>
<nav class="site-nav_list">
<ul class="site-nav_dropdown">
{% for nav in site.primary_links %}
<li><a href="{{ nav.url }}" {% if nav.blank %} target="_blank"{% endif %}>{{ nav.title }}</a></li>
{% endfor %}
</ul>
</nav>
<div class="site-nav_mask">
<button type="button" class="site-nav_close">
<svg viewBox="0 0 24 24"><path class="a" d="M.75 23.249l22.5-22.5M23.25 23.249L.75.749"></path></svg></button>
</div>
</div>
{% endif %}
{% if podcast %}
<ul class="site-podcast">
<li><a href="{{ linkify('/feed/audio.xml') }}" aria-label="RSS" title="RSS"><i class="icon icon-feed" aria-hidden="true"></i></a></li>
{% for item in podcast.links %}
<li>
<a href="{{ linkify(item.url) }}"{% if item.blank %} target="_blank"{% endif %} title="{{ item.title }}" aria-label="{{ item.title }}"><i class="icon icon-{{ item.icon }}" aria-hidden="true"></i>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if site.socials %}
<div class="site-social">
{% if podcast and podcast.email %}
{{ render_social_icons(site, podcast.email) }}
{% else %}
{{ render_social_icons(site) }}
{% endif %}
</div>
{% endif %}
<div class="site-search">
<a href="#" class="js-search"
{% if features.algolia %}data-id="{{ site.algolia_id }}" data-key="{{ site.algolia_key }}"{% endif %}>
<i class="icon icon-search" aria-label="Search"></i>
</a>
</div>
<div class="site-subscribe">
<button class="js-subscribe">{{ translate('subscribe', site.primary_lang) }}</button>
</div>
{% include "./_partials/toggle.j2" %}
</div>
<svg class="scroll-indicator" viewBox="0 0 80 124" xmlns="http://www.w3.org/2000/svg"><path id="scroller" d="M39.2 48c4.2 0 7.6-3.4 7.6-7.5v-7.8a7.6 7.6 0 0 0-15.1 0v7.8c0 4.1 3.4 7.5 7.5 7.5Z"/><path d="M67.8 11.6a39.6 39.6 0 0 1 11.6 28.1v43.7a39.6 39.6 0 0 1-67.8 28A39.6 39.6 0 0 1 0 83.4V39.6a39.6 39.6 0 0 1 67.8-28ZM39.7 9.4A30.2 30.2 0 0 0 9.4 39.7v43.7A30.2 30.2 0 0 0 61 104.8c5.6-5.6 9-13.1 9-21.6V39.7A30.2 30.2 0 0 0 39.7 9.4Z"/></svg>
</section>
{% set featured = query.featured_subjects(count=10, contains=['authors', 'tags']) | sort(attribute = "published_at", reverse = True) %}
{% if featured %}
<section class="section featured" id="featured-posts">
<div class="featured-inner">
<div class="featured-slider">
{% for item in featured %}
<div class="hero-wrap">
{% if item.cover %}
{% set layout = "horizontal" if item.cover.width > item.cover.height else "vertical" %}
<div class="hero {{ layout }} has-cover">
{% else %}
<div class="hero">
{% endif %}
{% if item.cover %}
<a class="hero-cover" href="{{ linkify(item.url) }}" style="background-image:url({{ item.cover.src|thumbnail('l') }})" aria-label="The cover of article: {{ item.title }}">
</a>
{% endif %}
<div class="hero-info">
{% if item.tags %}
<div class="hero-tags">
{% for tag in item.tags %}
<a href="{{ linkify(tag.url) }}">{{ tag.title }}</a>
{% endfor %}
</div>
{% endif %}
<div class="hero-headline">
<div class="hero-headline__inner">
<h2><a href="{{ linkify(item.url) }}">{{ item.title }}</a></h2>
{% if item.subtitle %}
<h3>{{ item.subtitle }}</h3>
{% endif %}
</div>
</div>
<div class="hero-meta">
{% if item.authors %}
<div class="hero-authors">
{% for author in item.authors %}
<a href="{{ linkify(author.url) }}">{{ author.name }}</a>
{% endfor %}
</div>
{% endif %}
<time class="hero-time" datetime="{{ item.published_at|xmldatetime }}" itemprop="datePublished">{{ item.published_at.strftime('%b %d, %Y') }}</time>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<nav class="featured-nav">
<button id="prev" type="button" aria-label="view previous post" title="view previous post" disabled><i class="icon icon-chevron-left"></i></button>
<button id="next" type="button" aria-label="view next post" title="view next post" disabled><i class="icon icon-chevron-right"></i></button>
</nav>
</section>
{% endif %}
<section class="section extra" id="extra-posts">
{% include "./_partials/side.j2" %}
<div class="subject-list">
<div class="subject-list_inner">
{% set items = query.latest_subjects(count=5) %}
{% include "./_partials/list.j2" %}
<nav class="subject-list_nav">
<a href="{{ linkify('/archive/') }}"><span>{{ translate('more', site.primary_lang) }}</span><i class="icon icon-chevron-right"></i></a>
</nav>
</div>
</div>
</section>
{% include "_snippets/brand_foot.j2" %}
</div>
{% endblock %}