Skip to content

Commit

Permalink
feat(ui): show preview image in home page
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed May 12, 2023
1 parent ee88cec commit 97b8dfe
Show file tree
Hide file tree
Showing 39 changed files with 334 additions and 271 deletions.
10 changes: 4 additions & 6 deletions _data/locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,16 @@ post:
share_link:
title: أنسخ الرابط
succeed: تم نسخ الرابط بنجاح!
# pinned prompt of posts list on homepage
pin_prompt: مثبت

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/bg-BG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: Копирай линк
succeed: Линкът е копиран успешно!
# pinned prompt of posts list on homepage
pin_prompt: Прикрепенa

# categories page
categories:
Expand Down
10 changes: 4 additions & 6 deletions _data/locales/cs-CZ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,16 @@ post:
share_link:
title: Kopírovat odkaz
succeed: Zkopírováno!
# pinned prompt of posts list on homepage
pin_prompt: Připnuto

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/de-DE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ post:
share_link:
title: Link kopieren
succeed: Link erfolgreich kopiert!
# pinned prompt of posts list on homepage
pin_prompt: Angepinnt

# categories page
categories:
Expand Down
12 changes: 5 additions & 7 deletions _data/locales/el-GR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,16 @@ post:
share_link:
title: Αντιγραφή συνδέσμου
succeed: Η διεύθυνση αντιγράφθηκε με επιτυχία!
# pinned prompt of posts list on homepage
pin_prompt: Pinned

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
Expand All @@ -90,4 +88,4 @@ categories:
plural: Κατηγορίες
post_measure:
singular: Δημοσίευση
plural: Δημοσιεύσεις
plural: Δημοσιεύσεις
10 changes: 4 additions & 6 deletions _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,16 @@ post:
share_link:
title: Copy link
succeed: Link copied successfully!
# pinned prompt of posts list on homepage
pin_prompt: Pinned

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
Expand Down
4 changes: 1 addition & 3 deletions _data/locales/es-ES.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ post:
pageview_measure: visitas
read_time:
unit: min
prompt: ' de lectura'
prompt: " de lectura"
relate_posts: Lecturas adicionales
share: Compartir
button:
Expand All @@ -70,8 +70,6 @@ post:
share_link:
title: Copiar enlace
succeed: ¡Enlace copiado!
# pinned prompt of posts list on homepage
pin_prompt: Fijado

# categories page
categories:
Expand Down
10 changes: 4 additions & 6 deletions _data/locales/fi-FI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,16 @@ post:
share_link:
title: Kopioi linkki
succeed: Linkki kopioitu onnistuneesti!
# pinned prompt of posts list on homepage
pin_prompt: Kiinnitetty

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/fr-FR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: Copier le lien
succeed: Lien copié avec succès !
# pinned prompt of posts list on homepage
pin_prompt: Épinglé

# categories page
categories:
Expand Down
8 changes: 3 additions & 5 deletions _data/locales/hu-HU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ copyright:
# Displayed in the footer
brief: Néhány jog fenntartva.
verbose: >-
Az oldalon található tartalmak
Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
hacsak másképp nincs jelezve.
Az oldalon található tartalmak
Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
hacsak másképp nincs jelezve.
meta: Készítve :PLATFORM motorral :THEME témával.

Expand Down Expand Up @@ -72,8 +72,6 @@ post:
share_link:
title: Link másolása
succeed: Link sikeresen másolva!
# pinned prompt of posts list on homepage
pin_prompt: Kitűzve

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/id-ID.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: Salin tautan
succeed: Tautan berhasil disalin!
# pinned prompt of posts list on homepage
pin_prompt: Disematkan

# categories page
categories:
Expand Down
13 changes: 5 additions & 8 deletions _data/locales/it-IT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ copyright:
Eccetto quando esplicitamente menzionato, i post di questo blog sono da ritenersi sotto
i termini di licenza Creative Commons Attribution 4.0 International (CC BY 4.0).
meta: Servizio offerto da :PLATFORM con tema :THEME.
meta: Servizio offerto da :PLATFORM con tema :THEME.
not_found:
statment: Ci scusiamo, non è stato possibile trovare l'URL in questione. Potrebbe puntare ad una pagina non esistente.

Expand Down Expand Up @@ -70,18 +69,16 @@ post:
share_link:
title: Copia link
succeed: Link copiato con successo!
# pinned prompt of posts list on homepage
pin_prompt: In alto

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: '%b'
dayjs: 'MMM'
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
Expand Down
6 changes: 2 additions & 4 deletions _data/locales/ko-KR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ post:
share_link:
title: 링크 복사하기
succeed: 링크가 복사되었습니다!
# pinned prompt of posts list on homepage
pin_prompt:

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%Y/%m/%d'
dayjs: 'YYYY/MM/DD'
strftime: "%Y/%m/%d"
dayjs: "YYYY/MM/DD"

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/my-MM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: လင့်ခ်ကို ကူးယူရန်
succeed: လင့်ခ်ကို ကူးယူလိုက်ပြီ။
# pinned prompt of posts list on homepage
pin_prompt: ချိတ်ထားသည်။

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: Copie o link
succeed: Link copiado com sucesso!
# pinned prompt of posts list on homepage
pin_prompt: Fixado

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/ru-RU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: Скопировать ссылку
succeed: Ссылка успешно скопирована!
# pinned prompt of posts list on homepage
pin_prompt: Закреплено

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/tr-TR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: Linki kopyala
succeed: Link kopyalandı.
# pinned prompt of posts list on homepage
pin_prompt: Sabitlendi

# categories page
categories:
Expand Down
2 changes: 0 additions & 2 deletions _data/locales/uk-UA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ post:
share_link:
title: Скопіювати посилання
succeed: Посилання успішно скопійовано!
# pinned prompt of posts list on homepage
pin_prompt: Закріплено

# categories page
categories:
Expand Down
3 changes: 0 additions & 3 deletions _data/locales/vi-VN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ copyright:
verbose: >-
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).
meta: Trang web này được tạo bởi :PLATFORM với chủ đề :THEME.

not_found:
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.

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

# categories page
categories:
Expand Down
6 changes: 2 additions & 4 deletions _data/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,13 @@ post:
share_link:
title: 分享链接
succeed: 链接已复制!
# pinned prompt of posts list on homepage
pin_prompt: 顶置

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%Y/%m/%d'
dayjs: 'YYYY/MM/DD'
strftime: "%Y/%m/%d"
dayjs: "YYYY/MM/DD"

# categories page
categories:
Expand Down
23 changes: 13 additions & 10 deletions _includes/js-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@
{% endif %}
{% endif %}

{% if page.layout == 'post' or page.layout == 'page' %}
<!-- image lazy-loading & popup & clipboard -->
{% assign _urls = site.data.assets[origin]['magnific-popup'].js
| append: ','
| append: site.data.assets[origin].lazysizes.js
| append: ','
| append: site.data.assets[origin].clipboard.js
%}
{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
{% assign _urls = site.data.assets[origin].lazysizes.js %}

{% unless page.layout == 'home' %}
{% assign _urls = _urls
| append: ','
| append: site.data.assets[origin]['magnific-popup'].js
| append: ','
| append: site.data.assets[origin].clipboard.js
%}
{% endunless %}

{% include jsdelivr-combine.html urls=_urls %}
{% endif %}
Expand All @@ -43,9 +46,9 @@
{% endif %}

{% case page.layout %}
{% when 'categories', 'post', 'page' %}
{% when 'home', 'categories', 'post', 'page' %}
{% assign type = page.layout %}
{% when 'home', 'archives', 'category', 'tag' %}
{% when 'archives', 'category', 'tag' %}
{% assign type = 'misc' %}
{% else %}
{% assign type = 'commons' %}
Expand Down
Loading

0 comments on commit 97b8dfe

Please sign in to comment.