diff options
author | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2019-07-04 16:01:16 +0300 |
---|---|---|
committer | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2021-08-11 15:02:36 +0300 |
commit | 33930d6adc3476c358acf25d69d2c4cfee7201cb (patch) | |
tree | 22815535fe4fbe66e5391338f10b637e25116055 | |
parent | 16763796503454e9cd666e0c644f079c1f0df96d (diff) |
Sync from 1cafcb39c8a101893ae30f92a0a789e2c1d8b85b
- [x] SCSS
- [x] JS
- [x] i18n files
- [x] HTML
- [x] gitalk
- [x] FontAwesome 5
- [ ] Docs
Fixes #287
50 files changed, 763 insertions, 139 deletions
diff --git a/docs/user.md b/docs/user.md index 8669915..b850229 100644 --- a/docs/user.md +++ b/docs/user.md @@ -219,58 +219,58 @@ You can add groups of links and links much as you want. weight = 0 identifier = "home" name = "Home" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-home\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-home\" aria-hidden=\"true\"></i>" url = "/" [[menu.main]] weight = 1 identifier = "categories" name = "Categories" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-bookmark\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-bookmark\" aria-hidden=\"true\"></i>" url = "/categories" [[menu.main]] weight = 2 identifier = "tags" name = "Tags" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-tags\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-tags\" aria-hidden=\"true\"></i>" url = "/tags" [[menu.main]] weight = 3 identifier = "archives" name = "Archives" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-archive\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-archive\" aria-hidden=\"true\"></i>" url = "/archives" [[menu.main]] weight = 4 identifier = "search" name = "Search" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-search\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-search\" aria-hidden=\"true\"></i>" url = "/#search" class = "st-search-show-outputs" [[menu.main]] weight = 4 identifier = "about" name = "About" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-question\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-question\" aria-hidden=\"true\"></i>" url = "/#about" [[menu.links]] weight = 0 identifier = "github" name = "GitHub" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-github\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-github\" aria-hidden=\"true\"></i>" url = "https://github.com/kakawait" [[menu.links]] weight = 1 identifier = "stackoverflow" name = "Stack Overflow" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-stack-overflow\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-stack-overflow\" aria-hidden=\"true\"></i>" url = "https://stackoverflow.com/users/636472/kakawait" [[menu.misc]] weight = 0 identifier = "rss" name = "RSS" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-rss\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-rss\" aria-hidden=\"true\"></i>" url = "/index.xml" ``` diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3fb4277..18f16db 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -50,51 +50,51 @@ canonifyurls = true weight = 1 identifier = "home" name = "Home" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-home\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-home\" aria-hidden=\"true\"></i>" url = "/" [[menu.main]] weight = 2 identifier = "categories" name = "Categories" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-bookmark\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-bookmark\" aria-hidden=\"true\"></i>" url = "/categories" [[menu.main]] weight = 3 identifier = "tags" name = "Tags" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-tags\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-tags\" aria-hidden=\"true\"></i>" url = "/tags" [[menu.main]] weight = 4 identifier = "archives" name = "Archives" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-archive\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-archive\" aria-hidden=\"true\"></i>" url = "/archives" [[menu.main]] weight = 5 identifier = "about" name = "About" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-question\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-question\" aria-hidden=\"true\"></i>" url = "/#about" [[menu.links]] weight = 1 identifier = "github" name = "GitHub" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-github\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-github\" aria-hidden=\"true\"></i>" url = "https://github.com/kakawait" [[menu.links]] weight = 2 identifier = "stackoverflow" name = "Stack Overflow" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-stack-overflow\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-stack-overflow\" aria-hidden=\"true\"></i>" url = "https://stackoverflow.com/users/636472/kakawait" [[menu.misc]] weight = 1 identifier = "rss" name = "RSS" - pre = "<i class=\"sidebar-button-icon fa fa-lg fa-rss\"></i>" + pre = "<i class=\"sidebar-button-icon fa fa-lg fa-rss\" aria-hidden=\"true\"></i>" url = "/index.xml" [params] diff --git a/i18n/de-de.yaml b/i18n/de-de.yaml index 9785123..0c1991f 100644 --- a/i18n/de-de.yaml +++ b/i18n/de-de.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Suche Datum (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "Lesen Sie mehr über den Autor" + +- id: "global.zoom_in_on_picture" + translation: "Vergrößern Sie das Bild" + +- id: "global.go_to_homepage" + translation: "Gehe zur Homepage" + +- id: "global.open_link" + translation: "Öffne den Link" + +- id: "global.open_post" + translation: "Öffnen Sie den Beitrag" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "kein Beitrag gefunden" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "kommentieren und teilen" +- id: "post.comment" + translation: "Hinterlasse einen Kommentar" + +- id: "post.back_to_top" + translation: "Zurück nach oben" + +- id: "post.share" + translation: "Diesen Beitrag teilen" + +- id: "post.gallery" + translation: "Gallerie" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "bild" + +- id: "post.image.other" + translation: "{n} bild" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "Alle Rechte vorbehalten" @@ -154,4 +189,4 @@ translation: "November" - id: "date.month.december" - translation: "Dezember"
\ No newline at end of file + translation: "Dezember" diff --git a/i18n/en-us.yaml b/i18n/en-us.yaml index c1b147e..b690651 100644 --- a/i18n/en-us.yaml +++ b/i18n/en-us.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Search date (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "Read more about the author" + +- id: "global.zoom_in_on_picture" + translation: "Zoom in on the picture" + +- id: "global.go_to_homepage" + translation: "Go to homepage" + +- id: "global.open_link" + translation: "Open the link" + +- id: "global.open_post" + translation: "Open the post" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "no post found" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Comment and share" +- id: "post.comment" + translation: "Leave a comment" + +- id: "post.back_to_top" + translation: "Back to top" + +- id: "post.share" + translation: "Share this post" + +- id: "post.gallery" + translation: "Gallery" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "image" + +- id: "post.image.other" + translation: "{n} images" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "All Rights Reserved" diff --git a/i18n/es-es.yaml b/i18n/es-es.yaml index bc21b0c..57de2ad 100644 --- a/i18n/es-es.yaml +++ b/i18n/es-es.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Buscar fecha (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "Leer más sobre el autor" + +- id: "global.zoom_in_on_picture" + translation: "Acercar a la imagen" + +- id: "global.go_to_homepage" + translation: "Ir a la página de inicio" + +- id: "global.open_link" + translation: "Abre el enlace" + +- id: "global.open_post" + translation: "Abre el post" + ## GLOBAL.POSTS_FOUND ## - id: "global.posts_found.zero" translation: "no se encontraron artículos" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Comentar y compartir" +- id: "post.comment" + translation: "Deja un comentario" + +- id: "post.back_to_top" + translation: "Volver arriba" + +- id: "post.share" + translation: "Compartir esta publicacion" + +- id: "post.gallery" + translation: "Galería" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "imágen" + +- id: "post.image.other" + translation: "{n} imágenes" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "Todos los derechos reservados" diff --git a/i18n/fr-fr.yaml b/i18n/fr-fr.yaml index d3b7604..41e8a56 100644 --- a/i18n/fr-fr.yaml +++ b/i18n/fr-fr.yaml @@ -38,6 +38,21 @@ - id: "global.search_date" translation: "Rechercher une date (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "En savoir plus sur l'auteur" + +- id: "global.zoom_in_on_picture" + translation: "Zoomer sur l'image" + +- id: "global.go_to_homepage" + translation: "Aller à la page principale" + +- id: "global.open_link" + translation: "Ouvrir le lien" + +- id: "global.open_post" + translation: "Ouvrir l'article" + ## GLOBAL.POSTS_FOUND ## - id: "global.posts_found.zero" translation: "aucun article trouvé" @@ -109,6 +124,26 @@ - id: "post.comment_and_share" translation: "Commenter et partager" +- id: "post.comment" + translation: "Laisser un commentaire" + +- id: "post.back_to_top" + translation: "Retour en haut de page" + +- id: "post.share" + translation: "Partager cette publication" + +- id: "post.gallery" + translation: "Galerie" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "image" + +- id: "post.image.other" + translation: "{n} images" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "Tous droits réservés" diff --git a/i18n/it-it.yaml b/i18n/it-it.yaml index c895c6c..8bcf5ec 100644 --- a/i18n/it-it.yaml +++ b/i18n/it-it.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Cerca data (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "Leggi di più sull'autore" + +- id: "global.zoom_in_on_picture" + translation: "Ingrandisci l'immagine" + +- id: "global.go_to_homepage" + translation: "Vai alla pagina principale" + +- id: "global.open_link" + translation: "Apri il link" + +- id: "global.open_post" + translation: "Apri il post" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "nessun post trovato" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Commenta e condividi" +- id: "post.comment" + translation: "Lascia un commento" + +- id: "post.back_to_top" + translation: "Torna in cima" + +- id: "post.share" + translation: "Condividi questo post" + +- id: "post.gallery" + translation: "Galerie" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "immagine" + +- id: "post.image.other" + translation: "{n} immagini" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "Tutti i diritti riservati" diff --git a/i18n/ja.yaml b/i18n/ja.yaml index 25a64c6..a416520 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "日付検索 (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "著者についてもっと読む" + +- id: "global.zoom_in_on_picture" + translation: "写真を拡大する" + +- id: "global.go_to_homepage" + translation: "ホームページへ" + +- id: "global.open_link" + translation: "リンクを開く" + +- id: "global.open_post" + translation: "投稿を開く" + ## GLOBAL.POST_FOUND ## - id: "global.post_found.zero" translation: "見つかりませんでした。" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "コメント・共有" +- id: "post.comment" + translation: "コメントを残す" + +- id: "post.back_to_top" + translation: "トップに戻る" + +- id: "post.share" + translation: "この記事を共有する" + +- id: "post.gallery" + translation: "ギャラリー" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "偶像" + +- id: "post.image.other" + translation: "{n} イメージ" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "All Rights Reserved" diff --git a/i18n/nl-nl.yaml b/i18n/nl-nl.yaml index 26aca41..f7f5e97 100644 --- a/i18n/nl-nl.yaml +++ b/i18n/nl-nl.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Zoek op datum (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "Lees meer over de auteur" + +- id: "global.zoom_in_on_picture" + translation: "Zoom in op de foto" + +- id: "global.go_to_homepage" + translation: "Ga naar homepagina" + +- id: "global.open_link" + translation: "Open de link" + +- id: "global.open_post" + translation: "Open het bericht" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "Geen posts gevonden" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Reageer en deel" +- id: "post.comment" + translation: "Laat een reactie achter" + +- id: "post.back_to_top" + translation: "Terug naar boven" + +- id: "post.share" + translation: "Deel dit bericht" + +- id: "post.gallery" + translation: "Galerij" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "image" + +- id: "post.image.other" + translation: "{n} images" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "Alle rechten voorbehouden" diff --git a/i18n/pl.yaml b/i18n/pl.yaml index 6e37753..113e4cb 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Szukaj datę (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "Przeczytaj więcej o autorze" + +- id: "global.zoom_in_on_picture" + translation: "Powiększ zdjęcie" + +- id: "global.go_to_homepage" + translation: "Wróć do strony głównej" + +- id: "global.open_link" + translation: "Otwórz link" + +- id: "global.open_post" + translation: "Otwórz post" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "nie znaleziono wpisów" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Skomentuj i Udostępnij" +- id: "post.comment" + translation: "Zostaw komentarz" + +- id: "post.back_to_top" + translation: "Powrót do góry" + +- id: "post.share" + translation: "Podziel się tym postem" + +- id: "post.gallery" + translation: "Galeria" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "image" + +- id: "post.image.other" + translation: "{n} images" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "Wszystkie prawa zastrzeżone" diff --git a/i18n/pt-br.yaml b/i18n/pt-br.yaml index c87abbb..1df0ec9 100644 --- a/i18n/pt-br.yaml +++ b/i18n/pt-br.yaml @@ -53,6 +53,21 @@ - id: "global.search_date" translation: "Pesquisar data (AAAA/MM/DD)" +- id: "global.read_more_about_author" + translation: "Leia mais sobre o autor" + +- id: "global.zoom_in_on_picture" + translation: "Ampliar a imagem" + +- id: "global.go_to_homepage" + translation: "Vá para a página inicial" + +- id: "global.open_link" + translation: "Abra o link" + +- id: "global.open_post" + translation: "Abra o post" + ## GLOBAL.POST_FOUND ## - id: "global.post_found.zero" translation: "não foram encontrados artigos" @@ -124,6 +139,26 @@ - id: "post.comment_and_share" translation: "Comentar e compartilhar" +- id: "post.comment" + translation: "Deixe um comentário" + +- id: "post.back_to_top" + translation: "De volta ao topo" + +- id: "post.share" + translation: "Compartilhe esta postagem" + +- id: "post.gallery" + translation: "Galeria" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "imagen" + +- id: "post.image.other" + translation: "{n} imagens" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "All Rights Reserved" diff --git a/i18n/ru.yaml b/i18n/ru.yaml index 818cc0c..a9407d2 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Поиск по дате (ГГГГ/ММ/ДД)" +- id: "global.read_more_about_author" + translation: "Узнайте больше об авторе" + +- id: "global.zoom_in_on_picture" + translation: "Увеличить картинку" + +- id: "global.go_to_homepage" + translation: "Вернуться на домашнюю страницу" + +- id: "global.open_link" + translation: "открыть ссылку" + +- id: "global.open_post" + translation: "открой пост" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "Статей не найдено" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Обсудить и поделиться" +- id: "post.comment" + translation: "Оставить комментарий" + +- id: "post.back_to_top" + translation: "Вернуться к началу" + +- id: "post.share" + translation: "Поделиться этой записью" + +- id: "post.gallery" + translation: "галерея" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "образ" + +- id: "post.image.other" + translation: "{n} изображений" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "All Rights Reserved" diff --git a/i18n/sv-se.yaml b/i18n/sv-se.yaml index 77f2625..a940eca 100644 --- a/i18n/sv-se.yaml +++ b/i18n/sv-se.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Sök datum (YYYY-MM-DD)" +- id: "global.read_more_about_author" + translation: "Läs mer om författaren" + +- id: "global.zoom_in_on_picture" + translation: "Zooma in på bilden" + +- id: "global.go_to_homepage" + translation: "Gå till hemsidan" + +- id: "global.open_link" + translation: "Öppna länken" + +- id: "global.open_post" + translation: "Öppna inlägget" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "inga inlägg hittades" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Kommentera och dela" +- id: "post.comment" + translation: "Lämna en kommentar" + +- id: "post.back_to_top" + translation: "Tillbaka till toppen" + +- id: "post.share" + translation: "Dela det här inlägget" + +- id: "post.gallery" + translation: "Galleri" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "image" + +- id: "post.image.other" + translation: "{n} images" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "Alla rättigheter förbehållna" diff --git a/i18n/vi.yaml b/i18n/vi.yaml index 8456993..079e068 100644 --- a/i18n/vi.yaml +++ b/i18n/vi.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "Tìm theo ngày (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "Tìm hiểu thêm về tác giả" + +- id: "global.zoom_in_on_picture" + translation: "Phóng to hình ảnh" + +- id: "global.go_to_homepage" + translation: "Tới trang chủ" + +- id: "global.open_link" + translation: "Mở liên kết" + +- id: "global.open_post" + translation: "Mở bài" + ## GLOBAL.POST_FOUND ## - id: "global.posts_found.zero" translation: "không tìm thấy kết quả" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "Bình luận và chia sẻ" +- id: "post.comment" + translation: "Để lại một bình luận" + +- id: "post.back_to_top" + translation: "Trở lại đầu trang" + +- id: "post.share" + translation: "Chia sẻ bài viết này" + +- id: "post.gallery" + translation: "Bộ sưu tập" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "image" + +- id: "post.image.other" + translation: "{n} images" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "All Rights Reserved" diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index d6594c2..692c664 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "搜索日期 (YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "阅读有关作者的更多信息" + +- id: "global.zoom_in_on_picture" + translation: "放大图片" + +- id: "global.go_to_homepage" + translation: "去首页" + +- id: "global.open_link" + translation: "打开链接" + +- id: "global.open_post" + translation: "打开帖子" + ## GLOBAL.POST_FOUND ## - id: "global.post_found.zero" translation: "没有找到文章" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "注释和共享" +- id: "post.comment" + translation: "发表评论" + +- id: "post.back_to_top" + translation: "回到顶部" + +- id: "post.share" + translation: "分享这个帖子" + +- id: "post.gallery" + translation: "画廊" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "图片" + +- id: "post.image.other" + translation: "{n} 图片" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "All Rights Reserved" @@ -154,4 +189,4 @@ translation: "十一月" - id: "date.month.december" - translation: "十二月"
\ No newline at end of file + translation: "十二月" diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index 07f3803..67eccd9 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -44,6 +44,21 @@ - id: "global.search_date" translation: "搜尋日期(YYYY/MM/DD)" +- id: "global.read_more_about_author" + translation: "閱讀有關作者的更多信息" + +- id: "global.zoom_in_on_picture" + translation: "放大圖片" + +- id: "global.go_to_homepage" + translation: "去首頁" + +- id: "global.open_link" + translation: "打開鏈接" + +- id: "global.open_post" + translation: "打開帖子" + ## GLOBAL.POSTS_FOUND ## - id: "global.posts_found.zero" translation: "沒有找到文章" @@ -115,6 +130,26 @@ - id: "post.comment_and_share" translation: "留言與分享" +- id: "post.comment" + translation: "發表評論" + +- id: "post.back_to_top" + translation: "回到頂部" + +- id: "post.share" + translation: "分享這個帖子" + +- id: "post.gallery" + translation: "畫廊" + +## POST.IMAGE ## + +- id: "post.image.one" + translation: "圖片" + +- id: "post.image.other" + translation: "{n} 圖片" + ## FOOTER ## - id: "footer.all_rights_reserved" translation: "All Rights Reserved" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a9a90d0..e8d4c34 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,14 +8,14 @@ class="{{ with .Params.coverimage }}hasCover{{ end }} {{ if eq .Params.covermeta "out" }}hasCoverMetaOut{{ else }}hasCoverMetaIn{{ end }} {{ with .Params.coverCaption }}hasCoverCaption{{ end }}"> - <article class="post" itemscope itemType="http://schema.org/BlogPosting"> + <article class="post"> {{ with .Params.covercaption }} <span class="post-header-cover-caption caption">{{ . | markdownify }}</span> {{ end }} {{ if or (not .Params.coverimage) (eq .Params.covermeta "out") }} {{ partial "post/header.html" . }} {{ end }} - <div class="post-content markdown" itemprop="articleBody"> + <div class="post-content markdown"> <div class="main-content-wrap"> {{ (replaceRE "<!--\\s*[t|T][o|O][c|C]\\s*-->" (printf "<h1 id=\"table-of-contents\">%s</h1>%s" (i18n "post.toc") .TableOfContents) .Content) | safeHTML }} {{ partial "post/gallery.html" . }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 4a0ee91..1981b67 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -22,32 +22,32 @@ {{ else }} {{ .Scratch.Set "thumbnailImagePosition" "bottom" }} {{ end }} -<article class="postShorten postShorten--thumbnailimg-{{ .Scratch.Get "thumbnailImagePosition" }}" itemscope itemType="http://schema.org/BlogPosting"> +<article class="postShorten postShorten--thumbnailimg-{{ .Scratch.Get "thumbnailImagePosition" }}"> <div class="postShorten-wrap"> {{ if and (.Scratch.Get "thumbnailImage") (eq (.Scratch.Get "thumbnailImagePosition") "top")}} {{ with .Params.link }} - <a href="{{ . | absURL }}" target="_blank"> + <a href="{{ . | absURL }}" aria-label="{{ if i18n "global.open_post" }}{{ i18n "global.open_post" }}: {{ .Title }}{{ end }}" target="_blank"> {{ else }} - <a href="{{ $.Permalink }}"> + <a href="{{ .Permalink }}" aria-label="{{ if i18n "global.open_post" }}{{ i18n "global.open_post" }}: {{ .Title }}{{ end }}"> {{ end }} <div class="postShorten-thumbnailimg"> - <img alt="" itemprop="image" src="{{ .Scratch.Get "thumbnailImage" }}"/> + <img alt="" src="{{ .Scratch.Get "thumbnailImage" }}"/> </div> </a> {{ end }} <div class="postShorten-header"> - <h1 class="postShorten-title" itemprop="headline"> + <h1 class="postShorten-title"> {{ with .Params.link }} - <a class="link-unstyled" href="{{ . | absURL }}" target="_blank"> + <a class="link-unstyled" href="{{ . | absURL }}" aria-label="{{ if i18n "global.open_post" }}{{ i18n "global.open_post" }}: {{ .Title }}{{ end }}" target="_blank"> {{ else }} - <a class="link-unstyled" href="{{ $.Permalink }}"> + <a class="link-unstyled" href="{{ .Permalink }}" aria-label="{{ if i18n "global.open_post" }}{{ i18n "global.open_post" }}: {{ .Title }}{{ end }}"> {{ end }} {{ .Title }} </a> </h1> {{ partial "post/meta" . }} </div> - <div class="postShorten-excerpt" itemprop="articleBody"> + <div class="postShorten-excerpt"> {{ if .Params.Summary }} {{ .Params.Summary | markdownify }} {{ else }} @@ -55,9 +55,9 @@ {{ end }} <p> {{ with .Params.link }} - <a href="{{ . | absURL }}" class="postShorten-excerpt_link link" target="_blank">{{ i18n "post.read_more" }}</a> + <a href="{{ . | absURL }}" class="postShorten-excerpt_link link" aria-label="{{ if i18n "global.open_post" }}{{ i18n "global.open_post" }}: {{ .Title }}{{ end }}"> target="_blank">{{ i18n "post.read_more" }}</a> {{ else }} - <a href="{{ $.Permalink }}" class="postShorten-excerpt_link link">{{ i18n "post.read_more" }}</a> + <a href="{{ .Permalink }}" class="postShorten-excerpt_link link" aria-label="{{ if i18n "global.open_post" }}{{ i18n "global.open_post" }}: {{ .Title }}{{ end }}">{{ i18n "post.read_more" }}</a> {{ end }} {{ with .Params.readingtime }} <span class="postShorten-readingtime"> @@ -68,9 +68,9 @@ </div> </div> {{ if and (.Scratch.Get "thumbnailImage") (ne (.Scratch.Get "thumbnailImagePosition") "top")}} - <a href="{{ .Permalink }}"> + <a href="{{ .Permalink }}" aria-label="{{ if i18n "global.open_post" }}{{ i18n "global.open_post" }}: {{ .Title }}{{ end }}"> <div class="postShorten-thumbnailimg"> - <img alt="" itemprop="image" src="{{ .Scratch.Get "thumbnailImage" }}"/> + <img alt="" src="{{ .Scratch.Get "thumbnailImage" }}"/> </div> </a> {{ end }} diff --git a/layouts/partials/about.html b/layouts/partials/about.html index 406fb17..411781e 100644 --- a/layouts/partials/about.html +++ b/layouts/partials/about.html @@ -1,7 +1,7 @@ <div id="about"> <div id="about-card"> <div id="about-btn-close"> - <i class="fa fa-remove"></i> + <i class="fa fa-times"></i> </div> {{ with ($.Scratch.Get "authorPicture") }} <img id="about-card-picture" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=110{{ end }}" alt="{{ i18n "global.author_picture" }}" /> @@ -19,7 +19,7 @@ {{ end }} {{ with .Site.Author.location }} <div id="about-card-location"> - <i class="fa fa-map-marker"></i> + <i class="fa fa-map-marker-alt"></i> <br/> {{ . }} </div> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 4b91049..7334277 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -25,6 +25,7 @@ <html lang="{{ .Site.LanguageCode }}"> <head> {{ partial "head_start.html" . }} + {{ partial "schema.html" . }} {{ partial "meta.html" . }} <title>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</title> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 86c363e..8c9f987 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,15 +1,15 @@ <header id="header" data-behavior="{{ .Scratch.Get "sidebarBehavior" }}"> <i id="btn-open-sidebar" class="fa fa-lg fa-bars"></i> <div class="header-title"> - <a class="header-title-link" href="{{ "/" | relLangURL }}">{{ .Site.Title }}</a> + <a class="header-title-link" href="{{ "/" | relLangURL }}" aria-label="{{ if i18n "global.go_to_homepage" }}{{ i18n "global.go_to_homepage" }}{{ end }}">{{ .Site.Title }}</a> </div> {{ with .Site.Params.header.rightLink }} {{ if and (in .url ":") (not (in .url (printf "%s" $.Site.BaseURL))) }} <a class="{{ if .icon }}header-right-icon {{ else }}header-right-picture {{ end }}{{ with .class }}{{ . }}{{ end }}" - href="{{ .url | safeURL }}" target="_blank" rel="noopener"> + href="{{ .url | safeURL }}" target="_blank" rel="noopener" aria-label="{{ if i18n "global.open_link" }}{{ i18n "global.open_link" }}: {{ .url | safeURL }}{{ end }}"> {{ else if .url }} <a class="{{ if .icon }}header-right-icon {{ else }}header-right-picture {{ end }}{{ with .class }}{{ . }}{{ end }}" - href="{{ .url | safeURL }}"> + href="{{ .url | safeURL }}" aria-label="{{ if i18n "global.open_link" }}{{ i18n "global.open_link" }}: {{ .url | safeURL }}{{ end }}"> {{ end }} {{ if .icon }} <i class="fa fa-lg fa-{{ .icon }}"></i> diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 14cff57..2ba9797 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -1,9 +1,9 @@ {{ range .menu }} <li class="sidebar-button"> {{ if and (or (in .URL "://") (in .URL "mailto:") (in .URL "tel:") (in .URL "callto:") (in .URL "skype:")) (not (in .URL (printf "%s" $.root.Site.BaseURL))) }} - <a class="sidebar-button-link {{ if eq .Identifier "search" }}open-algolia-search{{ end }}" href="{{ .URL | safeURL }}" target="_blank" rel="noopener"> + <a class="sidebar-button-link {{ if eq .Identifier "search" }}open-algolia-search{{ end }}" href="{{ .URL | safeURL }}" target="_blank" rel="noopener" title="{{ .Name }}"> {{ else }} - <a class="sidebar-button-link {{ if eq .Identifier "search" }}open-algolia-search{{ end }}" href="{{ .URL | relLangURL }}"> + <a class="sidebar-button-link {{ if eq .Identifier "search" }}open-algolia-search{{ end }}" href="{{ .URL | relLangURL }}" title="{{ .Name }}"> {{ end }} {{ .Pre }} {{ $name := (i18n (printf "global.%s" .Identifier)) }} diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index 8677695..36a7950 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -4,7 +4,7 @@ {{ if .Site.Params.swapPaginator }} {{ if .Paginator.HasPrev }} <li class="pagination-prev"> - <a class="btn btn--default btn--small" href="{{ .Paginator.Prev.URL }}"> + <a class="btn btn--default btn--small" href="{{ .Paginator.Prev.URL }}" aria-label="{{ i18n "pagination.older_posts" }}"> <i class="fa fa-angle-left text-base icon-mr"></i> <span>{{ i18n "pagination.older_posts" }}</span> </a> @@ -12,7 +12,7 @@ {{ end }} {{ if .Paginator.HasNext }} <li class="pagination-next"> - <a class="btn btn--default btn--small" href="{{ .Paginator.Next.URL }}"> + <a class="btn btn--default btn--small" href="{{ .Paginator.Next.URL }}" aria-label="{{ i18n "pagination.newer_posts" }}"> <span>{{ i18n "pagination.newer_posts" }}</span> <i class="fa fa-angle-right text-base icon-ml"></i> </a> @@ -21,7 +21,7 @@ {{ else }} {{ if .Paginator.HasPrev }} <li class="pagination-prev"> - <a class="btn btn--default btn--small" href="{{ .Paginator.Prev.URL }}"> + <a class="btn btn--default btn--small" href="{{ .Paginator.Prev.URL }}" aria-label="{{ i18n "pagination.newer_posts" }}"> <i class="fa fa-angle-left text-base icon-mr"></i> <span>{{ i18n "pagination.newer_posts" }}</span> </a> @@ -29,7 +29,7 @@ {{ end }} {{ if .Paginator.HasNext }} <li class="pagination-next"> - <a class="btn btn--default btn--small" href="{{ .Paginator.Next.URL }}"> + <a class="btn btn--default btn--small" href="{{ .Paginator.Next.URL }}" aria-label="{{ i18n "pagination.older_posts" }}"> <span>{{ i18n "pagination.older_posts" }}</span> <i class="fa fa-angle-right text-base icon-ml"></i> </a> diff --git a/layouts/partials/post/actions.html b/layouts/partials/post/actions.html index 3a62ffa..909e9c4 100644 --- a/layouts/partials/post/actions.html +++ b/layouts/partials/post/actions.html @@ -5,7 +5,7 @@ {{ if .Site.Params.swapPaginator }} <li class="post-action"> {{ with .PrevInSection }} - <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}"> + <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.previous" }}: {{ .Title }}"> {{ else }} <a class="post-action-btn btn btn--disabled"> {{ end }} @@ -15,7 +15,7 @@ </li> <li class="post-action"> {{ with .NextInSection }} - <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}"> + <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.next" }}: {{ .Title }}"> {{ else }} <a class="post-action-btn btn btn--disabled"> {{ end }} @@ -26,7 +26,7 @@ {{ else }} <li class="post-action"> {{ with .NextInSection }} - <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}"> + <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.next" }}: {{ .Title }}"> {{ else }} <a class="post-action-btn btn btn--disabled"> {{ end }} @@ -36,7 +36,7 @@ </li> <li class="post-action"> {{ with .PrevInSection }} - <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}"> + <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.previous" }}: {{ .Title }}"> {{ else }} <a class="post-action-btn btn btn--disabled"> {{ end }} @@ -50,14 +50,14 @@ <ul class="post-actions post-action-share" > {{ if (not (eq .Params.showSocial false)) }} <li class="post-action hide-lg hide-md hide-sm"> - <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions"> - <i class="fa fa-share-alt"></i> + <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions" aria-label="{{ i18n "post.share" }}"> + <i class="fa fa-share-alt" aria-hidden="true"></i> </a> </li> {{ range .Site.Params.sharingOptions }} <li class="post-action hide-xs"> - <a class="post-action-btn btn btn--default" target="new" href="{{ printf .url $.Permalink }}"> - <i class="fa {{ .icon }}"></i> + <a class="post-action-btn btn btn--default" target="new" href="{{ printf .url $.Permalink }}" title="{{ i18n "global.share_on" }} {{ .name }}" aria-label="{{ i18n "global.share_on" }} {{ .name }}"> + <i class="fa {{ .icon }}" aria-hidden="true"></i> </a> </li> {{ end }} @@ -71,11 +71,11 @@ {{ end }} <li class="post-action"> {{ if findRE "<!--\\s*[t|T][o|O][c|C]\\s*-->" .Content }} - <a class="post-action-btn btn btn--default" href="#table-of-contents"> + <a class="post-action-btn btn btn--default" href="#table-of-contents" aria-label="{{ i18n "post.toc" }}"> {{ else }} - <a class="post-action-btn btn btn--default" href="#"> + <a class="post-action-btn btn btn--default" href="#" aria-label="{{ i18n "post.back_to_top" }}"> {{ end }} - <i class="fa fa-list"></i> + <i class="fa fa-list" aria-hidden="true"></i> </a> </li> </ul> diff --git a/layouts/partials/post/gallery.html b/layouts/partials/post/gallery.html index 95d92d5..8ec52e5 100644 --- a/layouts/partials/post/gallery.html +++ b/layouts/partials/post/gallery.html @@ -1,19 +1,26 @@ +{{ $GALLERY_IMAGES_DISPLAYED_LIMIT := 3 }} {{ if and .Site.Params.imageGallery .Params.gallery }} {{ $galleryLength := len .Params.gallery }} {{ $imageGalleryClass := "" }} {{ if gt $galleryLength 0 }} <div class="image-gallery"> <div class="image-gallery-metabar"> - <span>Gallery {{ $galleryLength }} images</span> + <span>{{ i18n "post.gallery"}} {{ if gt $galleryLength 1 }}{{ replace (i18n "post.image.other") "{n}" $galleryLength }}{{ else }}{{ i18n "post.image.one" }}{{ end }}</span> </div> <div class="image-gallery-photos {{ if gt $galleryLength 2 }}image-gallery-photos--thumbnail{{ end }}"> {{ range $index, $element := .Params.gallery }} {{ $image := (split $element " ") }} {{ $imageLength := len $image }} <div class="photo-box"> - <a class="photo-box-inner fancybox" data-fancybox-group="gallery-{{ $.File.UniqueID }}" - title="{{ if gt $imageLength 2 }}{{ index $image 2 }}{{ else }}{{ index $image 1 }}{{ end }}" href="{{ index $image 0 }}"> - <img class="photo" src="{{ if gt $imageLength 2 }}{{ index $image 1 }}{{ else }}{{ index $image 0 }}{{ end }}" itemprop="image"> + <a class="photo-box-inner fancybox" + data-fancybox-group="gallery-{{ $.File.UniqueID }}" + data-caption="{{ if gt $imageLength 2 }}{{ index $image 2 }}{{ else }}{{ index $image 1 }}{{ end }}" + title="{{ if gt $imageLength 2 }}{{ index $image 2 }}{{ else }}{{ index $image 1 }}{{ end }}" + href="{{ index $image 0 }}" + aria-label="{{ i18n "global.zoom_in_on_picture" }}"> + {{ if lt $index $GALLERY_IMAGES_DISPLAYED_LIMIT }} + <img class="photo" src="{{ if gt $imageLength 2 }}{{ index $image 1 }}{{ else }}{{ index $image 0 }}{{ end }}"> + {{ end }} </a> </div> {{ end }} diff --git a/layouts/partials/post/header.html b/layouts/partials/post/header.html index a6226c8..30937d3 100644 --- a/layouts/partials/post/header.html +++ b/layouts/partials/post/header.html @@ -1,12 +1,12 @@ <div class="post-header main-content-wrap {{ if $.Params.metaalignment }}text-{{ $.Params.metaalignment }}{{ else }}text-left{{ end }}"> {{ with $.Params.link }} <h1 itemprop="headline"> - <a class="link" href="{{ . | absURL }}" target="_blank" itemprop="url"> + <a class="link" href="{{ . | absURL }}" target="_blank" rel="noopener" aria-label="{{ i18n "global.open_link"}}: {{ . | absURL }}"> {{ $.Title }} </a> </h1> {{ else }} - <h1 class="post-title" itemprop="headline"> + <h1 class="post-title"> {{ $.Title }} </h1> {{ end }} diff --git a/layouts/partials/post/meta.html b/layouts/partials/post/meta.html index d143721..01408b1 100644 --- a/layouts/partials/post/meta.html +++ b/layouts/partials/post/meta.html @@ -1,7 +1,7 @@ {{ if not (eq .Params.showMeta false) }} <div class="postShorten-meta post-meta"> {{ if not (eq .Params.showDate false) }} - <time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}"> + <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}"> {{ partial "internal/date.html" . }} </time> {{ end }} diff --git a/layouts/partials/post/share-options.html b/layouts/partials/post/share-options.html index 871f3c2..061e59f 100644 --- a/layouts/partials/post/share-options.html +++ b/layouts/partials/post/share-options.html @@ -1,13 +1,15 @@ +{{ if .Site.Params.sharingOptions }} <div id="share-options-bar" class="share-options-bar" data-behavior="{{ .Scratch.Get "sidebarBehavior" }}"> - <i id="btn-close-shareoptions" class="fa fa-close"></i> + <i id="btn-close-shareoptions" class="fa fa-times"></i> <ul class="share-options"> {{ range .Site.Params.sharingOptions }} <li class="share-option"> - <a class="share-option-btn" target="new" href="{{ printf .url (substr (querify "x" $.Permalink) 2) }}"> - <i class="fa {{ .icon }}"></i><span>{{ printf (i18n "global.share_on") .name }}</span> + <a class="share-option-btn" target="new" href="{{ printf .url (substr (querify "x" $.Permalink) 2) }}" aria-label="{{ i18n "global.share_on" }} {{ .name }}"> + <i class="fa {{ .icon }}" aria-hidden="true"></i><span>{{ printf (i18n "global.share_on") .name }}</span> </a> </li> {{ end }} </ul> </div> -<div id="share-options-mask" class="share-options-mask"></div>
\ No newline at end of file +<div id="share-options-mask" class="share-options-mask"></div> +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/schema.html b/layouts/partials/schema.html new file mode 100644 index 0000000..d169fb0 --- /dev/null +++ b/layouts/partials/schema.html @@ -0,0 +1,56 @@ +<script type="application/ld+json"> +{{ if eq .Section "posts" }} +{ + "@context": "https://schema.org", + "@type": "BlogPosting", + "headline": {{ .Title }}, + {{ if .Params.coverimage }} + "image": {{ .Params.coverImage | absURL }}, + {{ else if .Params.thumbnailImage }} + "image": {{ .Params.thumbnailImage | absURL }}, + {{ end }} + "datePublished": {{ .PublishDate }}, + "dateModified": {{ .Lastmod }}, + "author": { + "@type": "Person", + "name": {{ .Site.Author.name }}, + {{ with ($.Scratch.Get "authorPicture") }} + "image": {{ . }} + {{ end }} + }, + "mainEntityOfPage": { + "@type": "WebPage", + "@id": "{{ .Permalink }}" + }, + "publisher": { + "@type": "Organization", + "name": {{ .Site.Title }}, + {{ with ($.Scratch.Get "authorPicture") }} + "logo": { + "@type": "ImageObject", + "url": {{ . }} + } + {{ end }} + }, + "description": {{ .Summary | plainify | safeHTML }}, + "keywords": [{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if .Site.Params.keywords }}, {{ delimit .Site.Params.keywords ", " }}{{ end }}] +} +{{ else }} +{ + "@context":"http://schema.org", + "@type":"Website", + "@id":"{{ .Site.BaseURL }}", + "author": { + "@type": "Person", + "name": {{ .Site.Author.name }}, + {{ with ($.Scratch.Get "authorPicture") }} + "image": {{ . }} + {{ end }} + }, + "name":"{{ .Site.Title }}", + "description":"{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}", + "url":"{{ .Permalink }}", + "keywords":"[{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if .Site.Params.keywords }}, {{ delimit .Site.Params.keywords ", " }}{{ end }}]" +} +{{ end }} +</script>
\ No newline at end of file diff --git a/layouts/partials/script.html b/layouts/partials/script.html index 355befb..a7cd608 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -34,7 +34,7 @@ $(document).ready(function() { {{ if not (eq .Params.comments false) }} {{ if .Site.DisqusShortname }} <script> - var disqus_config = function () { + var disqus_config = function() { this.page.url = '{{ .Permalink }}'; {{ if .Params.disqusIdentifier }} this.page.identifier = '{{ .Params.disqusIdentifier }}'; diff --git a/layouts/partials/search.html b/layouts/partials/search.html index 5e2b38c..5f49a64 100644 --- a/layouts/partials/search.html +++ b/layouts/partials/search.html @@ -2,7 +2,7 @@ <div id="algolia-search-modal" class="modal-container"> <div class="modal"> <div class="modal-header"> - <span class="close-button"><i class="fa fa-close"></i></span> + <span class="close-button"><i class="fa fa-times"></i></span> <a href="https://algolia.com" target="_blank" rel="noopener" class="searchby-algolia text-color-light link-unstyled"> <span class="searchby-algolia-text text-color-light text-small">by</span> <img class="searchby-algolia-logo" src="https://www.algolia.com/static_assets/images/press/downloads/algolia-light.svg"> diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index ef0f6f9..dac5dcc 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -2,7 +2,7 @@ <div class="sidebar-container"> {{ with ($.Scratch.Get "authorPicture") }} <div class="sidebar-profile"> - <a href="{{ if $.Site.Params.sidebar.profile.url }}{{ $.Site.Params.sidebar.profile.url }}{{ else }}{{ "/#about" }}{{ end }}"> + <a href="{{ if $.Site.Params.sidebar.profile.url }}{{ $.Site.Params.sidebar.profile.url }}{{ else }}{{ "/#about" }}{{ end }}" aria-label="{{ i18n "global.read_more_about_author"}}"> <img class="sidebar-profile-picture" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=110{{ end }}" alt="{{ i18n "global.author_picture" }}" /> </a> <h4 class="sidebar-profile-name">{{ $.Site.Author.name }}</h4> diff --git a/src/js/about.js b/src/js/about.js index 4e526da..f5dfc51 100755 --- a/src/js/about.js +++ b/src/js/about.js @@ -33,6 +33,15 @@ e.preventDefault(); self.playBack(); }); + // Detect click on close button outside of card + self.$about.click(function(e) { + e.preventDefault(); + self.playBack(); + }); + // Deny closing the about page when users click on the card + self.$aboutCard.click(function(event) { + event.stopPropagation(); + }); }, /** diff --git a/src/js/fancybox.js b/src/js/fancybox.js index e06e4df..98663c2 100755 --- a/src/js/fancybox.js +++ b/src/js/fancybox.js @@ -1,6 +1,6 @@ (function($) { 'use strict'; - + // Run fancybox feature $(document).ready(function() { @@ -9,51 +9,31 @@ * @returns {void} */ function fancyFox() { - var arrows = true; - var thumbs = null; + var thumbs = false; // disable navigation arrows and display thumbs on medium and large screens if ($(window).height() > 480) { - arrows = false; - thumbs = { - width: 70, - height: 70 - }; + thumbs = true; } $('.fancybox').fancybox({ - maxWidth: 900, - maxHeight: 800, - fitToView: true, - width: '50%', - height: '50%', - autoSize: true, - arrows: arrows, - closeClick: false, - openEffect: 'elastic', - closeEffect: 'elastic', - prevEffect: 'none', - nextEffect: 'none', - padding: '0', - helpers: { - thumbs: thumbs, - overlay: { - css: { - overflow: 'hidden', - background: 'rgba(0, 0, 0, 0.85)' - } - } - }, - afterLoad: function() { - setTimeout(function() { - $('.fancybox-next > span, .fancybox-prev > span').css('visibility', 'visible'); - }, 400); + buttons: [ + 'fullScreen', + 'thumbs', + 'share', + 'download', + 'zoom', + 'close' + ], + thumbs: { + autoStart: thumbs, + axis: 'x' } }); } fancyFox(); - + $(window).smartresize(function() { fancyFox(); }); diff --git a/src/js/header.js b/src/js/header.js index 3b499cc..1d25243 100755 --- a/src/js/header.js +++ b/src/js/header.js @@ -12,7 +12,7 @@ this.headerHeight = this.$header.height(); // CSS class located in `source/_css/layout/_header.scss` this.headerUpCSSClass = 'header-up'; - this.delta = 5; + this.delta = 15; this.lastScrollTop = 0; }; diff --git a/src/js/post-bottom-bar.js b/src/js/post-bottom-bar.js index 20fd5e9..b6d0c13 100755 --- a/src/js/post-bottom-bar.js +++ b/src/js/post-bottom-bar.js @@ -12,8 +12,10 @@ this.$postBottomBar = $('.post-bottom-bar'); this.$postFooter = $('.post-actions-wrap'); this.$header = $('#header'); - this.delta = 1; + this.delta = 15; this.lastScrollTop = 0; + this.lastScrollDownPos = 0; + this.lastScrollUpPos = 0; }; PostBottomBar.prototype = { @@ -47,17 +49,26 @@ swipePostBottomBar: function() { var scrollTop = $(window).scrollTop(); var postFooterOffsetTop = this.$postFooter.offset().top; - // show bottom bar - // if the user scrolled upwards more than `delta` - // and `post-footer` div isn't visible - if (this.lastScrollTop > scrollTop && - (postFooterOffsetTop + this.$postFooter.height() > scrollTop + $(window).height() || - postFooterOffsetTop < scrollTop + this.$header.height())) { - this.$postBottomBar.slideDown(); + + // scrolling up + if (this.lastScrollTop > scrollTop) { + // show bottom bar + // if the user scrolled upwards more than `delta` + // and `post-footer` div isn't visible + if (Math.abs(this.lastScrollDownPos - scrollTop) > this.delta && + (postFooterOffsetTop + this.$postFooter.height() > scrollTop + $(window).height() || + postFooterOffsetTop < scrollTop + this.$header.height())) { + this.$postBottomBar.slideDown(); + this.lastScrollUpPos = scrollTop; + } } - else { + + // scrolling down + if (scrollTop > this.lastScrollUpPos + this.delta) { this.$postBottomBar.slideUp(); + this.lastScrollDownPos = scrollTop; } + this.lastScrollTop = scrollTop; } }; diff --git a/src/js/share-options.js b/src/js/share-options.js index 24367c3..3ca41fe 100755 --- a/src/js/share-options.js +++ b/src/js/share-options.js @@ -1,8 +1,8 @@ (function($) { 'use strict'; - + // Open and close the share options bar - + /** * ShareOptionsBar * @constructor @@ -13,16 +13,16 @@ this.$closeBtn = $('#btn-close-shareoptions'); this.$body = $('body'); }; - + ShareOptionsBar.prototype = { - + /** * Run ShareOptionsBar feature * @return {void} */ run: function() { var self = this; - + // Detect the click on the open button self.$openBtn.click(function() { if (!self.$shareOptionsBar.hasClass('opened')) { @@ -30,7 +30,7 @@ self.$closeBtn.show(); } }); - + // Detect the click on the close button self.$closeBtn.click(function() { if (self.$shareOptionsBar.hasClass('opened')) { @@ -39,14 +39,14 @@ } }); }, - + /** * Open share options bar * @return {void} */ openShareOptions: function() { var self = this; - + // Check if the share option bar isn't opened // and prevent multiple click on the open button with `.processing` class if (!self.$shareOptionsBar.hasClass('opened') && @@ -54,26 +54,27 @@ // Open the share option bar self.$shareOptionsBar.addClass('processing opened'); self.$body.css('overflow', 'hidden'); + setTimeout(function() { self.$shareOptionsBar.removeClass('processing'); }, 250); } }, - + /** * Close share options bar * @return {void} */ closeShareOptions: function() { var self = this; - + // Check if the share options bar is opened // and prevent multiple click on the close button with `.processing` class if (self.$shareOptionsBar.hasClass('opened') && !this.$shareOptionsBar.hasClass('processing')) { // Close the share option bar self.$shareOptionsBar.addClass('processing').removeClass('opened'); - + setTimeout(function() { self.$shareOptionsBar.removeClass('processing'); self.$body.css('overflow', ''); @@ -81,7 +82,7 @@ } } }; - + $(document).ready(function() { var shareOptionsBar = new ShareOptionsBar(); shareOptionsBar.run(); diff --git a/src/scss/components/_alert.scss b/src/scss/components/_alert.scss index 80d6d87..298f771 100755 --- a/src/scss/components/_alert.scss +++ b/src/scss/components/_alert.scss @@ -6,6 +6,7 @@ margin: 1em 0 0; border: none; border-left: 3px solid; + word-break: break-word; p { margin: 1.5em 0 0; @@ -66,4 +67,4 @@ } } } -}
\ No newline at end of file +} diff --git a/src/scss/components/_archive.scss b/src/scss/components/_archive.scss index 813b6de..02183b8 100755 --- a/src/scss/components/_archive.scss +++ b/src/scss/components/_archive.scss @@ -25,7 +25,7 @@ .archive-post-date { color: map-get($colors, light); } - // Change styl of the list by adding font-awesome icon + // Change style of the list by adding font-awesome icon &::before { font-family: 'FontAwesome'; content: '\f0da'; @@ -33,4 +33,4 @@ } } } -}
\ No newline at end of file +} diff --git a/src/scss/components/_fancybox.scss b/src/scss/components/_fancybox.scss new file mode 100644 index 0000000..4bd8a56 --- /dev/null +++ b/src/scss/components/_fancybox.scss @@ -0,0 +1,27 @@ +.fancybox-caption-wrap { + padding: 0; + background: transparent; + + .fancybox-caption { + text-align: center; + border: none; + } +} + +.fancybox-thumbs { + top: auto; + width: auto; + bottom: 0; + left: 0; + right: 0; + height: 95px; + padding: 10px 10px 5px 10px; + box-sizing: border-box; + opacity: 1; + background: transparent; +} + +.fancybox-show-thumbs .fancybox-inner { + right: 0; + bottom: 95px; +} diff --git a/src/scss/components/_figure.scss b/src/scss/components/_figure.scss index 116785e..d3e0371 100755 --- a/src/scss/components/_figure.scss +++ b/src/scss/components/_figure.scss @@ -18,6 +18,10 @@ float: right; margin: 2px; } + .fig-video { + width: 100%; + height: auto; + } &.fig-20 { @extend .left; width: calc(20% - 4px); diff --git a/src/scss/components/_image-gallery.scss b/src/scss/components/_image-gallery.scss index 10a067a..c9afb59 100755 --- a/src/scss/components/_image-gallery.scss +++ b/src/scss/components/_image-gallery.scss @@ -63,7 +63,7 @@ padding-bottom: 40%; margin-bottom: $image-gallery-photos-margin; } - // Resize seconde image minus space between 2 images + // Resize second image minus space between 2 images &:nth-child(2) { margin-right: $image-gallery-photos-margin; // width: 50% minus the space between 2 images @@ -75,4 +75,4 @@ } } } -}
\ No newline at end of file +} diff --git a/src/scss/components/_post-actions.scss b/src/scss/components/_post-actions.scss index a2899d7..a23c5dd 100755 --- a/src/scss/components/_post-actions.scss +++ b/src/scss/components/_post-actions.scss @@ -86,6 +86,7 @@ } } +// Hide post actions in print layout @media print { .post-actions-wrap { display: none; diff --git a/src/scss/components/_post.scss b/src/scss/components/_post.scss index 6b25cf0..3572868 100755 --- a/src/scss/components/_post.scss +++ b/src/scss/components/_post.scss @@ -43,11 +43,16 @@ width: auto; max-width: 100%; } - :not(blockquote):not(.alert) { + :not(blockquote):not(li):not(.alert) { & > p { margin: 1.5em 0 0 0; } } + li { + p { + margin: 0 0 0 0; + } + } } .post-footer { margin-top: 20px; diff --git a/src/scss/components/_postShorten.scss b/src/scss/components/_postShorten.scss index 1194556..14ae00f 100755 --- a/src/scss/components/_postShorten.scss +++ b/src/scss/components/_postShorten.scss @@ -151,9 +151,11 @@ margin: 15px 0 15px 0; img { - width: auto; - height: auto; + width: 100%; + height: auto; + max-height: $post-bottom-thumbnail-image-max-height; + object-fit: cover; } } } -}
\ No newline at end of file +} diff --git a/src/scss/components/_share-options-bar.scss b/src/scss/components/_share-options-bar.scss index 04bf805..6b2f3ac 100755 --- a/src/scss/components/_share-options-bar.scss +++ b/src/scss/components/_share-options-bar.scss @@ -6,6 +6,7 @@ background: white; height: 100%; clear: both; + box-sizing: border-box; border-top: 1px solid #eef2f8; transition: transform .25s ease-in-out; z-index: map-get($z-indexes, 'c-share-options-bar'); @@ -46,7 +47,8 @@ width: 100%; padding: 10px 0 10px 0; - .fa { + .fa, + .fab { margin-right: 15px; } } @@ -115,4 +117,4 @@ .share-options-bar { display: none; } -}
\ No newline at end of file +} diff --git a/src/scss/layouts/_about.scss b/src/scss/layouts/_about.scss index 6d7bb91..a8ea995 100755 --- a/src/scss/layouts/_about.scss +++ b/src/scss/layouts/_about.scss @@ -10,6 +10,7 @@ line-height: 100%; overflow-y: auto; overflow-x: hidden; + cursor: pointer; z-index: map-get($z-indexes, l-about); #about-card { @@ -22,6 +23,7 @@ margin: 15px auto; border-radius: 3px; padding: 30px 0; + cursor: initial; @include prefix(box-shadow, 0 0 5px rgba(0, 0, 0, 0.50), 'webkit' 'moz'); #about-btn-close { @@ -110,4 +112,4 @@ } } } -}
\ No newline at end of file +} diff --git a/src/scss/themes/_hljs-tranquilpeak.scss b/src/scss/themes/_hljs-tranquilpeak.scss index ed8eecb..1560578 100755 --- a/src/scss/themes/_hljs-tranquilpeak.scss +++ b/src/scss/themes/_hljs-tranquilpeak.scss @@ -122,6 +122,18 @@ figure.highlight, color: map-get($highlight-colors, bondi-blue); } } + // Clojure + &.clj .code { + .builtin-name { + color: map-get($highlight-colors, persimmon); + } + .name { + color: map-get($highlight-colors, scampi); + } + .number { + color: map-get($highlight-colors, bondi-blue); + } + } // C# &.cs .code { .preprocessor, @@ -460,6 +472,15 @@ figure.highlight, color: map-get($highlight-colors, scampi); } } + // Lisp + &.lisp .code { + .name { + color: map-get($highlight-colors, persimmon); + } + .number { + color: map-get($highlight-colors, bondi-blue); + } + } // SCSS &.scss { .tag, @@ -558,4 +579,4 @@ figure.highlight, color: map-get($highlight-colors, bondi-blue); } } -}
\ No newline at end of file +} diff --git a/src/scss/tranquilpeak.scss b/src/scss/tranquilpeak.scss index f83e1bd..f31cbcc 100755 --- a/src/scss/tranquilpeak.scss +++ b/src/scss/tranquilpeak.scss @@ -38,6 +38,7 @@ 'components/button', 'components/caption', 'components/code', + 'components/fancybox', 'components/figure', 'components/form', 'components/hide', diff --git a/src/scss/utils/_variables.scss b/src/scss/utils/_variables.scss index 3c60521..109c256 100755 --- a/src/scss/utils/_variables.scss +++ b/src/scss/utils/_variables.scss @@ -244,6 +244,7 @@ $pagination-height: 60px; // Post thumbnail image // Width and height of post's thumbnail image $post-thumbnail-image-width: 140px; +$post-bottom-thumbnail-image-max-height: 250px; // Tooltip $tooltip: ( |