Skip to content

Commit 97b8dfe

Browse files
committed
feat(ui): show preview image in home page
1 parent ee88cec commit 97b8dfe

39 files changed

+334
-271
lines changed

_data/locales/ar.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,16 @@ post:
7070
share_link:
7171
title: أنسخ الرابط
7272
succeed: تم نسخ الرابط بنجاح!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: مثبت
7573

7674
# Date time format.
7775
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7876
df:
7977
post:
80-
strftime: '%b %e, %Y'
81-
dayjs: 'll'
78+
strftime: "%b %e, %Y"
79+
dayjs: "ll"
8280
archives:
83-
strftime: '%b'
84-
dayjs: 'MMM'
81+
strftime: "%b"
82+
dayjs: "MMM"
8583

8684
# categories page
8785
categories:

_data/locales/bg-BG.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Копирай линк
7272
succeed: Линкът е копиран успешно!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Прикрепенa
7573

7674
# categories page
7775
categories:

_data/locales/cs-CZ.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,16 @@ post:
7070
share_link:
7171
title: Kopírovat odkaz
7272
succeed: Zkopírováno!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Připnuto
7573

7674
# Date time format.
7775
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7876
df:
7977
post:
80-
strftime: '%b %e, %Y'
81-
dayjs: 'll'
78+
strftime: "%b %e, %Y"
79+
dayjs: "ll"
8280
archives:
83-
strftime: '%b'
84-
dayjs: 'MMM'
81+
strftime: "%b"
82+
dayjs: "MMM"
8583

8684
# categories page
8785
categories:

_data/locales/de-DE.yml

-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ post:
6969
share_link:
7070
title: Link kopieren
7171
succeed: Link erfolgreich kopiert!
72-
# pinned prompt of posts list on homepage
73-
pin_prompt: Angepinnt
7472

7573
# categories page
7674
categories:

_data/locales/el-GR.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,16 @@ post:
7070
share_link:
7171
title: Αντιγραφή συνδέσμου
7272
succeed: Η διεύθυνση αντιγράφθηκε με επιτυχία!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Pinned
7573

7674
# Date time format.
7775
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7876
df:
7977
post:
80-
strftime: '%b %e, %Y'
81-
dayjs: 'll'
78+
strftime: "%b %e, %Y"
79+
dayjs: "ll"
8280
archives:
83-
strftime: '%b'
84-
dayjs: 'MMM'
81+
strftime: "%b"
82+
dayjs: "MMM"
8583

8684
# categories page
8785
categories:
@@ -90,4 +88,4 @@ categories:
9088
plural: Κατηγορίες
9189
post_measure:
9290
singular: Δημοσίευση
93-
plural: Δημοσιεύσεις
91+
plural: Δημοσιεύσεις

_data/locales/en.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,16 @@ post:
7070
share_link:
7171
title: Copy link
7272
succeed: Link copied successfully!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Pinned
7573

7674
# Date time format.
7775
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7876
df:
7977
post:
80-
strftime: '%b %e, %Y'
81-
dayjs: 'll'
78+
strftime: "%b %e, %Y"
79+
dayjs: "ll"
8280
archives:
83-
strftime: '%b'
84-
dayjs: 'MMM'
81+
strftime: "%b"
82+
dayjs: "MMM"
8583

8684
# categories page
8785
categories:

_data/locales/es-ES.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ post:
5959
pageview_measure: visitas
6060
read_time:
6161
unit: min
62-
prompt: ' de lectura'
62+
prompt: " de lectura"
6363
relate_posts: Lecturas adicionales
6464
share: Compartir
6565
button:
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Copiar enlace
7272
succeed: ¡Enlace copiado!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Fijado
7573

7674
# categories page
7775
categories:

_data/locales/fi-FI.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,16 @@ post:
6969
share_link:
7070
title: Kopioi linkki
7171
succeed: Linkki kopioitu onnistuneesti!
72-
# pinned prompt of posts list on homepage
73-
pin_prompt: Kiinnitetty
7472

7573
# Date time format.
7674
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7775
df:
7876
post:
79-
strftime: '%b %e, %Y'
80-
dayjs: 'll'
77+
strftime: "%b %e, %Y"
78+
dayjs: "ll"
8179
archives:
82-
strftime: '%b'
83-
dayjs: 'MMM'
80+
strftime: "%b"
81+
dayjs: "MMM"
8482

8583
# categories page
8684
categories:

_data/locales/fr-FR.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Copier le lien
7272
succeed: Lien copié avec succès !
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Épinglé
7573

7674
# categories page
7775
categories:

_data/locales/hu-HU.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ copyright:
3838
# Displayed in the footer
3939
brief: Néhány jog fenntartva.
4040
verbose: >-
41-
Az oldalon található tartalmak
42-
Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
43-
hacsak másképp nincs jelezve.
41+
Az oldalon található tartalmak
42+
Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
43+
hacsak másképp nincs jelezve.
4444
4545
meta: Készítve :PLATFORM motorral :THEME témával.
4646

@@ -72,8 +72,6 @@ post:
7272
share_link:
7373
title: Link másolása
7474
succeed: Link sikeresen másolva!
75-
# pinned prompt of posts list on homepage
76-
pin_prompt: Kitűzve
7775

7876
# categories page
7977
categories:

_data/locales/id-ID.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Salin tautan
7272
succeed: Tautan berhasil disalin!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Disematkan
7573

7674
# categories page
7775
categories:

_data/locales/it-IT.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ copyright:
4040
Eccetto quando esplicitamente menzionato, i post di questo blog sono da ritenersi sotto
4141
i termini di licenza Creative Commons Attribution 4.0 International (CC BY 4.0).
4242
43-
44-
meta: Servizio offerto da :PLATFORM con tema :THEME.
43+
meta: Servizio offerto da :PLATFORM con tema :THEME.
4544
not_found:
4645
statment: Ci scusiamo, non è stato possibile trovare l'URL in questione. Potrebbe puntare ad una pagina non esistente.
4746

@@ -70,18 +69,16 @@ post:
7069
share_link:
7170
title: Copia link
7271
succeed: Link copiato con successo!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: In alto
7572

7673
# Date time format.
7774
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7875
df:
7976
post:
80-
strftime: '%b %e, %Y'
81-
dayjs: 'll'
77+
strftime: "%b %e, %Y"
78+
dayjs: "ll"
8279
archives:
83-
strftime: '%b'
84-
dayjs: 'MMM'
80+
strftime: "%b"
81+
dayjs: "MMM"
8582

8683
# categories page
8784
categories:

_data/locales/ko-KR.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,13 @@ post:
7070
share_link:
7171
title: 링크 복사하기
7272
succeed: 링크가 복사되었습니다!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt:
7573

7674
# Date time format.
7775
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7876
df:
7977
post:
80-
strftime: '%Y/%m/%d'
81-
dayjs: 'YYYY/MM/DD'
78+
strftime: "%Y/%m/%d"
79+
dayjs: "YYYY/MM/DD"
8280

8381
# categories page
8482
categories:

_data/locales/my-MM.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: လင့်ခ်ကို ကူးယူရန်
7272
succeed: လင့်ခ်ကို ကူးယူလိုက်ပြီ။
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: ချိတ်ထားသည်။
7573

7674
# categories page
7775
categories:

_data/locales/pt-BR.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Copie o link
7272
succeed: Link copiado com sucesso!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Fixado
7573

7674
# categories page
7775
categories:

_data/locales/ru-RU.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Скопировать ссылку
7272
succeed: Ссылка успешно скопирована!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Закреплено
7573

7674
# categories page
7775
categories:

_data/locales/tr-TR.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Linki kopyala
7272
succeed: Link kopyalandı.
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Sabitlendi
7573

7674
# categories page
7775
categories:

_data/locales/uk-UA.yml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ post:
7070
share_link:
7171
title: Скопіювати посилання
7272
succeed: Посилання успішно скопійовано!
73-
# pinned prompt of posts list on homepage
74-
pin_prompt: Закріплено
7573

7674
# categories page
7775
categories:

_data/locales/vi-VN.yml

-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ copyright:
3939
verbose: >-
4040
Trừ khi có ghi chú khác, các bài viết đăng trên trang này được cấp phép bởi tác giả theo giấy phép Creative Commons Attribution 4.0 International (CC BY 4.0).
4141
meta: Trang web này được tạo bởi :PLATFORM với chủ đề :THEME.
42-
4342
not_found:
4443
statment: Xin lỗi, chúng tôi đã đặt nhầm URL hoặc đường dẫn trỏ đến một trang nào đó không tồn tại.
4544

@@ -68,8 +67,6 @@ post:
6867
share_link:
6968
title: Sao chép đường dẫn
7069
succeed: Đã sao chép đường dẫn thành công!
71-
# pinned prompt of posts list on homepage
72-
pin_prompt: Bài ghim
7370

7471
# categories page
7572
categories:

_data/locales/zh-CN.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,13 @@ post:
6969
share_link:
7070
title: 分享链接
7171
succeed: 链接已复制!
72-
# pinned prompt of posts list on homepage
73-
pin_prompt: 顶置
7472

7573
# Date time format.
7674
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
7775
df:
7876
post:
79-
strftime: '%Y/%m/%d'
80-
dayjs: 'YYYY/MM/DD'
77+
strftime: "%Y/%m/%d"
78+
dayjs: "YYYY/MM/DD"
8179

8280
# categories page
8381
categories:

_includes/js-selector.html

+13-10
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
{% endif %}
1010
{% endif %}
1111

12-
{% if page.layout == 'post' or page.layout == 'page' %}
13-
<!-- image lazy-loading & popup & clipboard -->
14-
{% assign _urls = site.data.assets[origin]['magnific-popup'].js
15-
| append: ','
16-
| append: site.data.assets[origin].lazysizes.js
17-
| append: ','
18-
| append: site.data.assets[origin].clipboard.js
19-
%}
12+
{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
13+
{% assign _urls = site.data.assets[origin].lazysizes.js %}
14+
15+
{% unless page.layout == 'home' %}
16+
{% assign _urls = _urls
17+
| append: ','
18+
| append: site.data.assets[origin]['magnific-popup'].js
19+
| append: ','
20+
| append: site.data.assets[origin].clipboard.js
21+
%}
22+
{% endunless %}
2023

2124
{% include jsdelivr-combine.html urls=_urls %}
2225
{% endif %}
@@ -43,9 +46,9 @@
4346
{% endif %}
4447

4548
{% case page.layout %}
46-
{% when 'categories', 'post', 'page' %}
49+
{% when 'home', 'categories', 'post', 'page' %}
4750
{% assign type = page.layout %}
48-
{% when 'home', 'archives', 'category', 'tag' %}
51+
{% when 'archives', 'category', 'tag' %}
4952
{% assign type = 'misc' %}
5053
{% else %}
5154
{% assign type = 'commons' %}

0 commit comments

Comments
 (0)