diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..5387630 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Jekyll", + "image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye", + "onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", + "postCreateCommand": "bash .devcontainer/post-create.sh", + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.defaultProfile.linux": "bash" + }, + "extensions": [ + // Liquid tags auto-complete + "killalau.vscode-liquid-snippets", + // Liquid syntax highlighting and formatting + "Shopify.theme-check-vscode", + // Shell + "timonwong.shellcheck", + "mkhl.shfmt", + // Common formatter + "EditorConfig.EditorConfig", + "esbenp.prettier-vscode", + "stylelint.vscode-stylelint", + "yzhang.markdown-all-in-one", + // Git + "mhutchie.git-graph" + ] + } + } +} diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000..a4bc282 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +if [ -f package.json ]; then + bash -i -c "nvm install --lts && nvm install-latest-npm" + npm i + npm run build +fi + +# Install dependencies for shfmt extension +curl -sS https://webi.sh/shfmt | sh &>/dev/null + +# Add OMZ plugins +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions +sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc + +# Avoid git log use less +echo -e "\nunset LESS" >>~/.zshrc diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index 87089c9..1ec3e11 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -37,12 +37,12 @@ jobs: - name: Setup Pages id: pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3 + ruby-version: 3.3 bundler-cache: true - name: Build site @@ -53,11 +53,11 @@ jobs: - name: Test site run: | bundle exec htmlproofer _site \ - \-\-disable-external=true \ + \-\-disable-external \ \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" - name: Upload site artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: "_site${{ steps.pages.outputs.base_path }}" @@ -70,4 +70,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index a917e6b..7dd7cef 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,11 @@ package-lock.json # IDE configurations .idea -.vscode +.vscode/* +!.vscode/settings.json +!.vscode/extensions.json +!.vscode/tasks.json # Misc +_sass/vendors assets/js/dist diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..082bc94 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["ms-vscode-remote.remote-containers"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5e8a04f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,30 @@ +{ + // Prettier + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + // Shopify Liquid + "files.associations": { + "*.html": "liquid" + }, + "[markdown]": { + "editor.defaultFormatter": "yzhang.markdown-all-in-one" + }, + // Formatter + "[html][liquid]": { + "editor.defaultFormatter": "Shopify.theme-check-vscode" + }, + "[shellscript]": { + "editor.defaultFormatter": "mkhl.shfmt" + }, + // Disable vscode built-in stylelint + "css.validate": false, + "scss.validate": false, + "less.validate": false, + // Stylint extension settings + "stylelint.snippet": ["css", "scss"], + "stylelint.validate": ["css", "scss"], + // Run tasks in macOS + "terminal.integrated.profiles.osx": { + "zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] } + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..7f0fdb8 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run Jekyll Server", + "type": "shell", + "command": "./tools/run.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "detail": "Runs the Jekyll server with live reload." + }, + { + "label": "Build Jekyll Site", + "type": "shell", + "command": "./tools/test.sh", + "group": { + "kind": "build" + }, + "problemMatcher": [], + "detail": "Build the Jekyll site for production." + } + ] +} diff --git a/Gemfile b/Gemfile index 26c1b0c..7835d7d 100644 --- a/Gemfile +++ b/Gemfile @@ -2,27 +2,13 @@ source "https://rubygems.org" -gem "jekyll-theme-chirpy", "~> 6.2", ">= 6.2.2" +gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.4" -group :test do - gem "html-proofer", "~> 4.4" -end +gem "html-proofer", "~> 5.0", group: :test -# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem -# and associated library. platforms :mingw, :x64_mingw, :mswin, :jruby do gem "tzinfo", ">= 1", "< 3" gem "tzinfo-data" end -# Performance-booster for watching directories on Windows -gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] - -# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem -# do not have a Java counterpart. -gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] - -# Lock jekyll-sass-converter to 2.x on Linux-musl -if RUBY_PLATFORM =~ /linux-musl/ - gem "jekyll-sass-converter", "~> 2.0" -end +gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin] diff --git a/README.md b/README.md index 69c104b..9166c36 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,11 @@ With Notebook, you can easily contribute to technical content and gain valuable Hey there, fellow developer !!!... I'm happy to see you intrested in contributing to this open source project. Since, this project is an open notebook for everyone, you're always welcome to make your techinal writing contribution by writing you own blog, tip & trick, documentation and much more. All you have to do is write down your content in `markdown` *(just like how wrote this README.md file)* and place those file within `_posts` directory. -> First time ???... Then I highly recommend you to check out [CONTRIBUTING.md](CONTRIBUTING.md "goto CONTRIBUTING.md"). +> First time ???... Then I highly recommend you to check out [CONTRIBUTING.md](docs/CONTRIBUTING.md "goto CONTRIBUTING.md"). -- **Step 1:** Make sure you install the required dependencies like `Ruby`, `bundler` and `Jekyll` framework. Installation varies from platform to platform, so make sure to check out the [CONTRIBUTING.md](CONTRIBUTING.md "goto CONTRIBUTING.md"). +- **Step 1:** Setting up development environment. Refer to [CONTRIBUTING.md](docs/CONTRIBUTING.md "goto CONTRIBUTING.md") that guide you to setup the required evironment for the project. -- **Step 2:** After installing the required dependencies, [fork](https://github.com/Grow-with-Open-Source/Notebook/fork "Let's fork this repo") this repository and clone it in your local system, using the following command: +- **Step 2:** After setting up environment, [fork](https://github.com/Grow-with-Open-Source/Notebook/fork "Let's fork this repo") this repository and clone it in your local system, using the following command: ```bash git clone https://github.com//Notebook.git ``` @@ -80,7 +80,7 @@ unique_key_value: ```yml shamith_watchdogs: name: Shamith Nakka - twitter: Shamith29188225 + twitter: shamith_nakka url: https://github.com/iamwatchdogs/ ``` @@ -90,7 +90,8 @@ shamith_watchdogs: - **Step 6:** Now to the actual task, Create a new markdown file with `YYYY-MM_DD-your-post-name.md` *(make sure your post name is in small letters and separated by single dash)* within the [`_post`](/tree/main/_posts/) directory. -- **Step 7:** Each and every markdown file that you have created for content writing should contain the following meta data (or) config: +- **Step 7:** Each and every markdown file that you have created for content writing should contain the following meta data called `Front Matter +`: ```md --- title: @@ -98,7 +99,7 @@ shamith_watchdogs: categories: [<main_categories>, <sub_categories_1>, ..., <sub_categories_n>] tags: [<tag_1>, ..., <tag_n>] author: <respective_author_key_value> - img_path: "/assets/img/<your_img_directory_name>/" + media_subpath: "/assets/img/<your_img_directory_name>/" image: path: <name_of_the_img_for_page_cover> alt: <alternative_text> @@ -118,7 +119,7 @@ date: 2023-09-21 20:34:00 +0530 categories: [Welcome, Guide] tags: [introduction] author: shamith_watchdogs -img_path: "/assets/img/welcome-page/" +media_subpath: "/assets/img/welcome-page" image: path: "welcome-img.jpg" alt: "Welcome Page" @@ -132,10 +133,10 @@ image: > [!NOTE] > - Note that the `+/-TTTT` in the `date` section refers the **UTC offset**. You can find your **UTC offset** value by searching for your country in the [list of UTC](https://en.wikipedia.org/wiki/List_of_UTC_offsets "Goto List of UTC offsets"). And if you're from India, you can use the above UTC offset from the example. -> - Also not that `img_path` and `image` *(including its sub attributes)* are optional and only need when you're going to add images to your post. +> - Also not that `media_subpath` and `image` *(including its sub attributes)* are optional and only need when you're going to add images to your post. > - If there are more than one person working on a single post use `authors` attribute instead of `author`. And the input for the `authors` attribute will be a list of key of authors specified within the [`authors.yml`](_data/authors.yml) file. -- **Step 8:** Now, you can proceed to write your technical content. And if you have any images that are part of your technical writing, then create a new directory using your post's name within `assets/img` directory as `assets/img/<your-post-name>`. Now add your images to your folder. After adding images to your folder, don't forget to add location to `img_path` attribute as `img_path: ../../assets/img/<your-post-name>`. Now, you can directly access your images with specifying full relative path. +- **Step 8:** Now, you can proceed to write your technical content. And if you have any images that are part of your technical writing, then create a new directory using your post's name within `assets/img` directory as `assets/img/<your-post-name>`. Now add your images to your folder. After adding images to your folder, don't forget to add location to `media_subpath` attribute as `media_subpath: ../../assets/img/<your-post-name>`. Now, you can directly access your images with specifying full relative path. > [!NOTE] > It's highly suggested to use CDN links for images. But if you could not for any reason, then you can proceed with above process. diff --git a/_config.yml b/_config.yml index 1a5dadb..1c5de1b 100644 --- a/_config.yml +++ b/_config.yml @@ -3,10 +3,6 @@ # Import the theme theme: jekyll-theme-chirpy -# Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites -# and doesn't have a custom domain. -baseurl: "/Notebook" - # The language of the webpage › http://www.lingoes.net/en/translator/langcode.htm # If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed, # otherwise, the layout language will use the default value of 'en'. @@ -26,14 +22,15 @@ tagline: >- # it will display as the sub-title description: >- # used by seo meta and the atom feed A minimal, responsive and feature-rich Jekyll theme for technical writing. -# fill in the protocol & hostname for your site, e.g., 'https://username.github.io' +# Fill in the protocol & hostname for your site. +# E.g. 'https://username.github.io', note that it does not end with a '/'. url: "https://grow-with-open-source.github.io/" github: - username: Grow-with-Open-Source # change to your github username + username: Grow-with-Open-Source # change to your GitHub username twitter: - username: _gwos # change to your twitter username + username: _gwos # change to your Twitter username social: # Change to your full name. @@ -42,20 +39,44 @@ social: email: contact.growwithopensource@gmail.com # change to your email address links: # The first element serves as the copyright owner's link - - https://github.com/Grow-with-Open-Source/ - # - https://x.com/username # change to your twitter homepage - - https://github.com/iamwatchdogs # change to your github homepage + - https://twitter.com/_gwos # change to your Twitter homepage + - https://github.com/Grow-with-Open-Source # change to your GitHub homepage + - https://www.linkedin.com/company/Grow-with-Open-Source # Uncomment below to add more social links # - https://www.facebook.com/username - - https://www.linkedin.com/company/Grow-with-Open-Source/ -google_site_verification: # fill in to your verification string +# Site Verification Settings +webmaster_verifications: + google: # fill in your Google verification code + bing: # fill in your Bing verification code + alexa: # fill in your Alexa verification code + yandex: # fill in your Yandex verification code + baidu: # fill in your Baidu verification code + facebook: # fill in your Facebook verification code # ↑ -------------------------- # The end of `jekyll-seo-tag` settings -google_analytics: - id: # fill in your Google Analytics ID +# Web Analytics Settings +analytics: + google: + id: # fill in your Google Analytics ID + goatcounter: + id: # fill in your GoatCounter ID + umami: + id: # fill in your Umami ID + domain: # fill in your Umami domain + matomo: + id: # fill in your Matomo ID + domain: # fill in your Matomo domain + cloudflare: + id: # fill in your Cloudflare Web Analytics token + fathom: + id: # fill in your Fathom Site ID + +# Page views settings +pageviews: + provider: # now only supports 'goatcounter' # Prefer color scheme setting. # @@ -65,27 +86,32 @@ google_analytics: # # Available options: # -# light - Use the light color scheme -# dark - Use the dark color scheme +# light — Use the light color scheme +# dark — Use the dark color scheme # -theme_mode: # [light|dark] +theme_mode: # [light | dark] -# The CDN endpoint for images. +# The CDN endpoint for media resources. # Notice that once it is assigned, the CDN url -# will be added to all image (site avatar & posts' images) paths starting with '/' +# will be added to all media resources (site avatar, posts' images, audio and video files) paths starting with '/' # # e.g. 'https://cdn.com' -img_cdn: +cdn: # the avatar on sidebar, support local or CORS resources -avatar: assets/img/favicons/android-chrome-384x384.png +avatar: "assets/img/favicons/android-chrome-384x384.png" + +# The URL of the site-wide social preview image used in SEO `og:image` meta tag. +# It can be overridden by a customized `page.image` in front matter. +social_preview_image: "assets/img/favicons/android-chrome-384x384.png" # string, local or CORS resources # boolean type, the global switch for TOC in posts. toc: true comments: - active: giscus # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable - # The active options are as follows: + # Global switch for the post-comment system. Keeping it empty means disabled. + provider: giscus # [disqus | utterances | giscus] + # The provider options are as follows: disqus: shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname # utterances settings › https://utteranc.es/ @@ -99,6 +125,7 @@ comments: category: "Notebook-Comments" category_id: "DIC_kwDOKaBqDs4CZvoj" mapping: # optional, default to 'pathname' + strict: # optional, default to '0' input_position: # optional, default to 'bottom' lang: # optional, default to the value of `site.lang` reactions_enabled: # optional, default to the value of `1` @@ -109,16 +136,27 @@ assets: enabled: # boolean, keep empty means false # specify the Jekyll environment, empty means both # only works if `assets.self_host.enabled` is 'true' - env: # [development|production] + env: # [development | production] pwa: - enabled: true # the option for PWA feature + enabled: true # The option for PWA feature (installable) + cache: + enabled: true # The option for PWA offline cache + # Paths defined here will be excluded from the PWA cache. + # Usually its value is the `baseurl` of another website that + # shares the same domain name as the current website. + deny_paths: + # - "/example" # URLs match `<SITE_URL>/example/*` will not be cached by the PWA paginate: 10 +# The base URL of your site +baseurl: "/Notebook" + # ------------ The following options are not recommended to be modified ------------------ kramdown: + footnote_backlink: "↩︎" syntax_highlighter: rouge syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options css_class: highlight @@ -159,10 +197,6 @@ defaults: path: assets/img/favicons values: swcache: true - - scope: - path: assets/js/dist - values: - swcache: true sass: style: compressed @@ -182,10 +216,10 @@ exclude: - docs - tools - README.md - - CHANGELOG.md - LICENSE + - purgecss.js - rollup.config.js - - package*.json + - "package*.json" jekyll-archives: enabled: [categories, tags] diff --git a/_data/contact.yml b/_data/contact.yml index 6f90ea4..95ddc8b 100644 --- a/_data/contact.yml +++ b/_data/contact.yml @@ -16,16 +16,30 @@ - type: rss icon: "fas fa-rss" noblank: true + +- type: linkedin + icon: 'fab fa-linkedin' + url: 'https://linkedin.com/company/grow-with-open-source' + # Uncomment and complete the url below to enable more contact options # # - type: mastodon # icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/> # url: '' # Fill with your Mastodon account page, rel="me" will be applied for verification # -- type: linkedin - icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/> - url: 'https://linkedin.com/company/grow-with-open-source' # Fill with your Linkedin homepage # # - type: stack-overflow # icon: 'fab fa-stack-overflow' # url: '' # Fill with your stackoverflow homepage +# +# - type: bluesky +# icon: 'fa-brands fa-bluesky' +# url: '' # Fill with your Bluesky profile link +# +# - type: reddit +# icon: 'fa-brands fa-reddit' +# url: '' # Fill with your Reddit profile link +# +# - type: threads +# icon: 'fa-brands fa-threads' +# url: '' # Fill with your Threads profile link diff --git a/_data/locales/ar.yml b/_data/locales/ar.yml deleted file mode 100644 index c608298..0000000 --- a/_data/locales/ar.yml +++ /dev/null @@ -1,91 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: منشور - category: فئة - tag: وسم - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: الرئيسية - categories: الفئات - tags: الوسوم - archives: الأرشيف - about: حول - -# the text displayed in the search bar & search results -search: - hint: بحث - cancel: إلغاء - no_results: نأسف! لا يوجد نتائج. - -panel: - lastmod: المحدثة مؤخرا - trending_tags: الوسوم الشائعة - toc: محتويات - -copyright: - # Shown at the bottom of the post - license: - template: هذا المنشور تحت ترخيص :LICENSE_NAME بواسطة المؤلف. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: بعض الحقوق محفوظة. - verbose: >- - ما لم يذكر خلاف ذلك ، يتم ترخيص منشورات المدونة على هذا الموقع - بموجب ترخيص Creative Commons Attribution 4.0 International (CC BY 4.0) من قبل المؤلف. - -meta: باستخدام :PLATFORM السمة :THEME - -not_found: - statment: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة. - -notification: - update_found: يتوفر اصدار جديد للمحتوى. - update: تحديث - -# ----- Posts related labels ----- - -post: - written_by: بواسطة - posted: نشّر - updated: حدّث - words: كلمات - pageview_measure: مشاهدات - read_time: - unit: دقيقة - prompt: قراءة - relate_posts: إقرأ المزيد - share: شارك - button: - next: الأجدد - previous: الأقدم - copy_code: - succeed: تم النسخ! - share_link: - title: أنسخ الرابط - succeed: تم نسخ الرابط بنجاح! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: فئة - plural: فئات - post_measure: - singular: منشور - plural: منشورات diff --git a/_data/locales/bg-BG.yml b/_data/locales/bg-BG.yml deleted file mode 100644 index 3e04993..0000000 --- a/_data/locales/bg-BG.yml +++ /dev/null @@ -1,81 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Публикация - category: Категория - tag: Таг - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Начало - categories: Категории - tags: Тагове - archives: Архив - about: За мен - -# the text displayed in the search bar & search results -search: - hint: търси - cancel: Отмени - no_results: Упс! Не са намерени резултати. - -panel: - lastmod: Наскоро обновени - trending_tags: Популярни тагове - toc: Съдържание - -copyright: - # Shown at the bottom of the post - license: - template: Тази публикация е лицензирана под :LICENSE_NAME от автора. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Някои права запазени. - verbose: >- - Освен ако не е посочено друго, публикациите в блога на този сайт са лицензирани - под лиценза Creative Commons Attribution 4.0 (CC BY 4.0) от автора. - -meta: Създадено чрез :PLATFORM и :THEME тема - -not_found: - statment: Съжалявам, но на този URL адрес няма налично съдържание. - -notification: - update_found: Налична е нова версия на съдържанието. - update: Обнови - -# ----- Posts related labels ----- - -post: - written_by: Автор - posted: Публикувана - updated: Обновена - words: думи - pageview_measure: преглеждания - read_time: - unit: мин - prompt: четиво - relate_posts: Още за четене - share: Споделете - button: - next: По-нови - previous: По-стари - copy_code: - succeed: Копирано! - share_link: - title: Копирай линк - succeed: Линкът е копиран успешно! - -# categories page -categories: - category_measure: - singular: категория - plural: категории - post_measure: - singular: публикация - plural: публикации diff --git a/_data/locales/cs-CZ.yml b/_data/locales/cs-CZ.yml deleted file mode 100644 index e515c08..0000000 --- a/_data/locales/cs-CZ.yml +++ /dev/null @@ -1,89 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Příspěvek - category: Kategorie - tag: Štítek - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Domů - categories: Kategorie - tags: Štítky - archives: Archivy - about: O mně - -# the text displayed in the search bar & search results -search: - hint: hledat - cancel: Zrušit - no_results: Ups! Žádný výsledek nenalezen. - -panel: - lastmod: Nedávno aktualizováno - trending_tags: Trendy štítky - toc: Obsah - -copyright: - # Shown at the bottom of the post - license: - template: Tento příspěvek je licencován pod :LICENSE_NAME autorem. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Některá práva vyhrazena. - verbose: >- - Pokud není uvedeno jinak, jsou příspěvky na tomto webu licencovány - pod licencí Creative Commons Attribution 4.0 International (CC BY 4.0) Licence autora. - -meta: Použití :PLATFORM s motivem :THEME - -not_found: - statment: Omlouváme se, adresu URL jsme špatně umístili nebo odkazuje na něco, co neexistuje. - -notification: - update_found: Je k dispozici nová verze obsahu. - update: Aktualizace - -# ----- Posts related labels ----- - -post: - written_by: Od - posted: Zveřejněno - updated: Aktualizováno - words: slova - pageview_measure: zhlednutí - read_time: - unit: minut - prompt: čtení - relate_posts: Další čtení - share: Sdílet - button: - next: Novější - previous: Starší - copy_code: - succeed: Zkopírováno! - share_link: - title: Kopírovat odkaz - succeed: Zkopírováno! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: kategorie - post_measure: - singular: příspěvěk - plural: příspěvky diff --git a/_data/locales/de-DE.yml b/_data/locales/de-DE.yml deleted file mode 100644 index 6b187b4..0000000 --- a/_data/locales/de-DE.yml +++ /dev/null @@ -1,87 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Eintrag - category: Kategorie - tag: Tag - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Startseite - categories: Kategorien - tags: Tags - archives: Archiv - about: Über - -# the text displayed in the search bar & search results -search: - hint: Suche - cancel: Abbrechen - no_results: Ups! Keine Einträge gefunden. - -panel: - lastmod: Kürzlich aktualisiert - trending_tags: Beliebte Tags - toc: Inhalt - -copyright: - # Shown at the bottom of the post - license: - template: Dieser Eintrag ist vom Autor unter :LICENSE_NAME lizensiert. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Einige Rechte vorbehalten. - verbose: >- - Alle Einträge auf dieser Seite stehen, soweit nicht anders angegeben, unter der Lizenz Creative Commons Attribution 4.0 (CC BY 4.0). - -meta: Powered by :PLATFORM with :THEME theme - -not_found: - statment: Entschuldigung, dieser Link verweist auf keine vorhandene Ressource. - -notification: - update_found: Eine neue Version ist verfügbar. - update: Neue Version - -# ----- Posts related labels ----- - -post: - written_by: Von - posted: Veröffentlicht - updated: Aktualisiert - words: Wörter - pageview_measure: Aufrufe - read_time: - unit: Minuten - prompt: Lesezeit - relate_posts: Weiterlesen - share: Teilen - button: - next: Nächster Eintrag - previous: Eintrag vorher - copy_code: - succeed: Kopiert! - share_link: - title: Link kopieren - succeed: Link erfolgreich kopiert! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%d.%m.%Y" - dayjs: "DD.MM.YYYY" - -# categories page -categories: - category_measure: - singular: Kategorie - plural: Kategorien - post_measure: - singular: Eintrag - plural: Einträge diff --git a/_data/locales/el-GR.yml b/_data/locales/el-GR.yml deleted file mode 100644 index ab5fb0e..0000000 --- a/_data/locales/el-GR.yml +++ /dev/null @@ -1,91 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Δημοσίευση - category: Κατηγορία - tag: Ετικέτα - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Home - categories: Κατηγορίες - tags: Ετικέτες - archives: Αρχεία - about: Σχετικά - -# the text displayed in the search bar & search results -search: - hint: αναζήτηση - cancel: Ακύρωση - no_results: Oops! Κανένα αποτέλεσμα δεν βρέθηκε. - -panel: - lastmod: Σχετικά ενημερωμένα - trending_tags: Ετικέτες τάσης - toc: Περιεχόμενα - -copyright: - # Shown at the bottom of the post - license: - template: Η δημοσίευση αυτή βρίσκεται υπο την άδεια :LICENSE_NAME Greekforce1821. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Ορισμένα δικαιώματα reserved. - verbose: >- - Εκτός αλλού ή οπουδήποτε αλλού, τα blog posts σε αυτήν την σελίδα βρίσκονται υπο την άδεια - Creative Commons Attribution 4.0 International (CC BY 4.0) του δημιουργού. - -meta: Αξιοποιώντας την :PLATFORM theme :THEME - -not_found: - statment: Συγνώμη, έχουμε τοποθετήσει λάθος αυτήν την διεύθυνση URL ή υποδεικνύει κάτι που δεν υπάρχει. - -notification: - update_found: Υπάρχει διαθέσιμη μια νέα έκδοση του περιεχομένου. - update: Ενημέρωση - -# ----- Posts related labels ----- - -post: - written_by: Από - posted: Δημοσιεύθηκε - updated: Ενημερώθηκε - words: λέξεις - pageview_measure: προβολές - read_time: - unit: Λεπτά - prompt: διαβάσματος - relate_posts: Περισσότερα - share: Κοινοποιήστε - button: - next: Νεότερα - previous: Παλαιότερα - copy_code: - succeed: Αντιγράφθηκε! - share_link: - title: Αντιγραφή συνδέσμου - succeed: Η διεύθυνση αντιγράφθηκε με επιτυχία! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: Κατηγορία - plural: Κατηγορίες - post_measure: - singular: Δημοσίευση - plural: Δημοσιεύσεις diff --git a/_data/locales/en.yml b/_data/locales/en.yml deleted file mode 100644 index d7faa44..0000000 --- a/_data/locales/en.yml +++ /dev/null @@ -1,91 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Post - category: Category - tag: Tag - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Home - categories: Categories - tags: Tags - archives: Archives - about: About - -# the text displayed in the search bar & search results -search: - hint: search - cancel: Cancel - no_results: Oops! No results found. - -panel: - lastmod: Recently Updated - trending_tags: Trending Tags - toc: Contents - -copyright: - # Shown at the bottom of the post - license: - template: This post is licensed under :LICENSE_NAME by the author. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Some rights reserved. - verbose: >- - Except where otherwise noted, the blog posts on this site are licensed - under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author. - -meta: Using the :THEME theme for :PLATFORM - -not_found: - statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. - -notification: - update_found: A new version of content is available. - update: Update - -# ----- Posts related labels ----- - -post: - written_by: By - posted: Posted - updated: Updated - words: words - pageview_measure: views - read_time: - unit: min - prompt: read - relate_posts: Further Reading - share: Share - button: - next: Newer - previous: Older - copy_code: - succeed: Copied! - share_link: - title: Copy link - succeed: Link copied successfully! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: category - plural: categories - post_measure: - singular: post - plural: posts diff --git a/_data/locales/es-ES.yml b/_data/locales/es-ES.yml deleted file mode 100644 index 5529230..0000000 --- a/_data/locales/es-ES.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Entrada - category: Categoría - tag: Etiqueta - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Inicio - categories: Categorías - tags: Etiquetas - archives: Archivo - about: Acerca de - -# the text displayed in the search bar & search results -search: - hint: Buscar - cancel: Cancelar - no_results: ¡Oops! No se encuentran resultados. - -panel: - lastmod: Actualizado recientemente - trending_tags: Etiquetas populares - toc: Contenido - -copyright: - # Shown at the bottom of the post - license: - template: Esta entrada está licenciada bajo :LICENSE_NAME por el autor. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Algunos derechos reservados. - verbose: >- - Salvo que se indique explícitamente, las entradas de este blog están licenciadas - bajo la Creative Commons Attribution 4.0 International (CC BY 4.0) License por el autor. - -meta: Hecho con :PLATFORM usando el tema :THEME - -not_found: - statment: Lo sentimos, hemos perdido esa URL o apunta a algo que no existe. - -notification: - update_found: Hay una nueva versión de contenido disponible. - update: Actualizar - -# ----- Posts related labels ----- - -post: - written_by: Por - posted: Publicado - updated: Actualizado - words: palabras - pageview_measure: visitas - read_time: - unit: min - prompt: " de lectura" - relate_posts: Lecturas adicionales - share: Compartir - button: - next: Nuevo - previous: Anterior - copy_code: - succeed: ¡Copiado! - share_link: - title: Copiar enlace - succeed: ¡Enlace copiado! - -# categories page -categories: - category_measure: categorias - post_measure: entradas diff --git a/_data/locales/fi-FI.yml b/_data/locales/fi-FI.yml deleted file mode 100644 index c817d2b..0000000 --- a/_data/locales/fi-FI.yml +++ /dev/null @@ -1,90 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Julkaisu - category: Kateogoria - tag: Tagi - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Koti - categories: Kateogoriat - tags: Tagit - archives: Arkistot - about: Minusta - -# the text displayed in the search bar & search results -search: - hint: etsi - cancel: Peruuta - no_results: Hups! Ei tuloksia. - -panel: - lastmod: Viimeksi päivitetty - trending_tags: Trendaavat tagit - toc: Sisältö - -copyright: - # Shown at the bottom of the post - license: - template: Tämä julkaisu on lisenssoitu :LICENSE_NAME julkaisijan toimesta. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Jotkut oikeudet pidätetään. - verbose: >- - Paitsi jos erikseen mainitaan on kaikki sisältö Creative Commons Attribution 4.0 International (CC BY 4.0) Lisensoitu kirjoittajan toimesta. - -meta: Käytetään :PLATFORM iä Teema :THEME - -not_found: - statment: Valitettavasti tällä URL-osoitteella ei ole saatavilla sisältöä. - -notification: - update_found: Uusi versio sisällöstä on saatavilla. - update: Päivitä - -# ----- Posts related labels ----- - -post: - written_by: Kirjoittaja - posted: Julkaistu - updated: Päivitetty - words: sanaa - pageview_measure: katselukertoja - read_time: - unit: minuuttia - prompt: lukea - relate_posts: Jatka lukemista - share: Jaa - button: - next: Uudempi - previous: Vanhempi - copy_code: - succeed: Kopiotu! - share_link: - title: Kopioi linkki - succeed: Linkki kopioitu onnistuneesti! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: kategoria - plural: kategoriat - post_measure: - singular: julkaisu - plural: julkaisut diff --git a/_data/locales/fr-FR.yml b/_data/locales/fr-FR.yml deleted file mode 100644 index 72b034d..0000000 --- a/_data/locales/fr-FR.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Post - category: Catégorie - tag: Tag - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Accueil - categories: Catégories - tags: Tags - archives: Archives - about: A propos de - -# the text displayed in the search bar & search results -search: - hint: recherche - cancel: Annuler - no_results: Oups ! Aucun résultat trouvé. - -panel: - lastmod: Récemment mis à jour - trending_tags: Tags tendance - toc: Contenu - -copyright: - # Shown at the bottom of the post - license: - template: Cet article est sous licence :LICENSE_NAME par l'auteur. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Certains droits réservés. - verbose: >- - Sauf mention contraire, les articles de ce site sont publiés sous licence - sous la licence Creative Commons Attribution 4.0 International (CC BY 4.0) par l'auteur. - -meta: Propulsé par :PLATFORM avec le thème :THEME - -not_found: - statment: Désolé, nous avons égaré cette URL ou elle pointe vers quelque chose qui n'existe pas. - -notification: - update_found: Une nouvelle version du contenu est disponible. - update: Mise à jour - -# ----- Posts related labels ----- - -post: - written_by: Par - posted: Posté - updated: Mis à jour - words: mots - pageview_measure: vues - read_time: - unit: min - prompt: lire - relate_posts: Autres lectures - share: Partager - button: - next: Plus récent - previous: Plus ancien - copy_code: - succeed: Copié ! - share_link: - title: Copier le lien - succeed: Lien copié avec succès ! - -# categories page -categories: - category_measure: catégories - post_measure: posts diff --git a/_data/locales/hu-HU.yml b/_data/locales/hu-HU.yml deleted file mode 100644 index b09f2cd..0000000 --- a/_data/locales/hu-HU.yml +++ /dev/null @@ -1,79 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Bejegyzés - category: Kategória - tag: Címke - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Kezdőlap - categories: Kategóriák - tags: Címkék - archives: Archívum - about: Rólam - -# the text displayed in the search bar & search results -search: - hint: keresés - cancel: Mégse - no_results: Oops! Nincs találat a keresésre. - -panel: - lastmod: Legutóbb frissítve - trending_tags: Népszerű Címkék - toc: Tartalom - links: Blog linkek - -copyright: - # Shown at the bottom of the post - license: - template: A bejegyzés :LICENSE_NAME licenccel rendelkezik. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # 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. - -meta: Készítve :PLATFORM motorral :THEME témával - -not_found: - statment: Sajnáljuk, az URL-t rosszul helyeztük el, vagy valami nem létezőre mutat. - -notification: - update_found: Elérhető a tartalom új verziója. - update: Frissítés - -# ----- Posts related labels ----- - -post: - written_by: Szerző - posted: Létrehozva - updated: Frissítve - words: szó - pageview_measure: látogató - read_time: - unit: perc - prompt: elolvasni - relate_posts: További olvasnivaló - share: Megosztás - button: - next: Újabb - previous: Régebbi - copy_code: - succeed: Másolva! - share_link: - title: Link másolása - succeed: Link sikeresen másolva! - -# categories page -categories: - category_measure: kategória - post_measure: bejegyzés diff --git a/_data/locales/id-ID.yml b/_data/locales/id-ID.yml deleted file mode 100644 index 29ad156..0000000 --- a/_data/locales/id-ID.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Postingan - category: Kategori - tag: Tagar - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Beranda - categories: Kategori - tags: Tagar - archives: Arsip - about: Tentang - -# the text displayed in the search bar & search results -search: - hint: Cari - cancel: Batal - no_results: Ups! Tidak ada hasil yang ditemukan. - -panel: - lastmod: Postingan Terbaru - trending_tags: Tagar Terpopuler - toc: Konten - -copyright: - # Shown at the bottom of the post - license: - template: Postingan ini dilisensikan di bawah :LICENSE_NAME oleh penulis. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Sebagian konten dilindungi. - verbose: >- - Kecuali jika dinyatakan, Postingan blog di situs ini dilisensikan - di bawah Lisensi Creative Commons Attribution 4.0 International (CC BY 4.0) oleh penulis. - -meta: Didukung oleh :PLATFORM dengan tema :THEME - -not_found: - statment: Maaf, kami gagal menemukan URL itu atau memang mengarah ke sesuatu yang tidak ada. - -notification: - update_found: Versi konten baru tersedia. - update: Perbarui - -# ----- Posts related labels ----- - -post: - written_by: Oleh - posted: Diterbitkan - updated: Diperbarui - words: kata - pageview_measure: dilihat - read_time: - unit: menit - prompt: baca - relate_posts: Postingan Lainya - share: Bagikan - button: - next: Terbaru - previous: Terlama - copy_code: - succeed: Disalin! - share_link: - title: Salin tautan - succeed: Tautan berhasil disalin! - -# categories page -categories: - category_measure: kategori - post_measure: Postingan diff --git a/_data/locales/it-IT.yml b/_data/locales/it-IT.yml deleted file mode 100644 index cf7b691..0000000 --- a/_data/locales/it-IT.yml +++ /dev/null @@ -1,90 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Post - category: Categoria - tag: Tag - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Pagina principale - categories: Categorie - tags: Tags - archives: Archivio - about: Informazioni - -# the text displayed in the search bar & search results -search: - hint: ricerca - cancel: Cancella - no_results: Oops! La ricerca non ha fornito risultati. - -panel: - lastmod: Aggiornati recentemente - trending_tags: Tags più cliccati - toc: Contenuti - -copyright: - # Shown at the bottom of the post - license: - template: Questo post è sotto licenza :LICENSE_NAME a nome dell'autore. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Alcuni diritti riservati. - verbose: >- - 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 -not_found: - statment: Ci scusiamo, non è stato possibile trovare l'URL in questione. Potrebbe puntare ad una pagina non esistente. - -notification: - update_found: Nuova versione del contenuto disponibile. - update: Aggiornamento - -# ----- Posts related labels ----- - -post: - written_by: Da - posted: Postato - updated: Aggiornato - words: parole - pageview_measure: visioni - read_time: - unit: min - prompt: lettura - relate_posts: Continua a leggere - share: Condividi - button: - next: Più recenti - previous: Meno recenti - copy_code: - succeed: Copiato! - share_link: - title: Copia link - succeed: Link copiato con successo! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: categoria - plural: categorie - post_measure: - singular: post - plural: posts diff --git a/_data/locales/ko-KR.yml b/_data/locales/ko-KR.yml deleted file mode 100644 index 4dd221b..0000000 --- a/_data/locales/ko-KR.yml +++ /dev/null @@ -1,84 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: 포스트 - category: 카테고리 - tag: 태그 - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: 홈 - categories: 카테고리 - tags: 태그 - archives: 아카이브 - about: 정보 - -# the text displayed in the search bar & search results -search: - hint: 검색 - cancel: 취소 - no_results: 검색 결과가 없습니다. - -panel: - lastmod: 최근 업데이트 - trending_tags: 인기 태그 - toc: 바로가기 - -copyright: - # Shown at the bottom of the post - license: - template: 이 기사는 저작권자의 :LICENSE_NAME 라이센스를 따릅니다. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: 일부 권리 보유 - verbose: >- - 명시되지 않는 한 이 사이트의 블로그 게시물은 작성자의 - Creative Commons Attribution 4.0 International(CC BY 4.0) 라이선스에 따라 사용이 허가되었습니다. - -meta: Powered by :PLATFORM with :THEME theme - -not_found: - statment: 해당 URL은 존재하지 않습니다. - -notification: - update_found: 새 버전의 콘텐츠를 사용할 수 있습니다. - update: 업데이트 - -# ----- Posts related labels ----- - -post: - written_by: By - posted: 게시 - updated: 업데이트 - words: 단어 - pageview_measure: 조회 - read_time: - unit: 분 - prompt: 읽는 시간 - relate_posts: 관련된 글 - share: 공유하기 - button: - next: 다음 글 - previous: 이전 글 - copy_code: - succeed: 복사되었습니다! - share_link: - title: 링크 복사하기 - succeed: 링크가 복사되었습니다! - -# 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" - -# categories page -categories: - category_measure: 카테고리 - post_measure: 포스트 diff --git a/_data/locales/my-MM.yml b/_data/locales/my-MM.yml deleted file mode 100644 index 98848d5..0000000 --- a/_data/locales/my-MM.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: ပို့စ် - category: ကဏ္ဍ - tag: နာမ(တက်ဂ်) - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: အဓိကစာမျက်နှာ - categories: ကဏ္ဍများ - tags: နာမ(တက်ဂ်)များ - archives: မှတ်တမ်း​တိုက် - about: အကြောင်းအရာ - -# the text displayed in the search bar & search results -search: - hint: ရှာဖွေမည် - cancel: ဖျက်သိမ်းမည် - no_results: အိုး! ဘာမှမရှိပါ - -panel: - lastmod: မကြာသေးမီကမွမ်းမံထားသည် - trending_tags: ခေတ်စားနေသည့်တက်ဂ်များ - toc: အကြောင်းအရာများ - -copyright: - # Shown at the bottom of the post - license: - template: ဤပို့စ်သည်စာရေးသူ၏ :LICENSE_NAME လိုင်စင်ရထားသည်။ - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: မူပိုင်ခွင့်အချို့ကို လက်ဝယ်ထားသည်။ - verbose: >- - အခြားမှတ်သားထားချက်များမှလွဲ၍ ဤဆိုက်ရှိ ဘလော့ဂ်ပို့စ်များသည် စာရေးသူ၏ - Creative Commons Attribution 4.0 International (CC BY 4.0) အောက်တွင် လိုင်စင်ရထားပါသည်။ - -meta: Powered by :PLATFORM with :THEME theme - -not_found: - statment: ဝမ်းနည်းပါသည်၊ ကျွန်ုပ်တို့သည် အဆိုပါ URL ကို မှားယွင်းစွာ နေရာချထားခြင်း သို့မဟုတ် ၎င်းသည် မရှိသောအရာကို ညွှန်ပြနေပါသည်။ - -notification: - update_found: အကြောင်းအရာဗားရှင်းအသစ်ကို ရနိုင်ပါပြီ။ - update: အပ်ဒိတ် - -# ----- Posts related labels ----- - -post: - written_by: ကရေးသားခဲ့သည်။ - posted: တင်ထားခဲ့သည်။ - updated: မွမ်းမံထားခဲ့သည်။ - words: စကားလုံးများ - pageview_measure: အမြင်များ - read_time: - unit: မိနစ် - prompt: ဖတ်ပါမည် - relate_posts: နောက်ထပ်ဖတ်ရန် - share: မျှဝေရန် - button: - next: အသစ်များ - previous: အဟောင်းများ - copy_code: - succeed: ကူးယူလိုက်ပြီ။ - share_link: - title: လင့်ခ်ကို ကူးယူရန် - succeed: လင့်ခ်ကို ကူးယူလိုက်ပြီ။ - -# categories page -categories: - category_measure: ကဏ္ဍများ - post_measure: ပို့စ်များ diff --git a/_data/locales/pt-BR.yml b/_data/locales/pt-BR.yml deleted file mode 100644 index 4cef833..0000000 --- a/_data/locales/pt-BR.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Post - category: Categoria - tag: Tag - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Home - categories: Categorias - tags: Tags - archives: Arquivos - about: Sobre - -# the text displayed in the search bar & search results -search: - hint: Buscar - cancel: Cancelar - no_results: Oops! Nenhum resultado encontrado. - -panel: - lastmod: Atualizados recentemente - trending_tags: Trending Tags - toc: Conteúdo - -copyright: - # Shown at the bottom of the post - license: - template: Esta postagem está licenciada sob :LICENSE_NAME pelo autor. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Alguns direitos reservados. - verbose: >- - Exceto onde indicado de outra forma, as postagens do blog neste site são licenciadas sob a - Creative Commons Attribution 4.0 International (CC BY 4.0) License pelo autor. - -meta: Feito com :PLATFORM usando o tema :THEME - -not_found: - statment: Desculpe, a página não foi encontrada. - -notification: - update_found: Uma nova versão do conteúdo está disponível. - update: atualização - -# ----- Posts related labels ----- - -post: - written_by: Por - posted: Postado em - updated: Atualizado - words: palavras - pageview_measure: visualizações - read_time: - unit: min - prompt: " de leitura" - relate_posts: Leia também - share: Compartilhar - button: - next: Próximo - previous: Anterior - copy_code: - succeed: Copiado! - share_link: - title: Copie o link - succeed: Link copiado com sucesso! - -# categories page -categories: - category_measure: categorias - post_measure: posts diff --git a/_data/locales/ru-RU.yml b/_data/locales/ru-RU.yml deleted file mode 100644 index 4377300..0000000 --- a/_data/locales/ru-RU.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Публикация - category: Категория - tag: Тег - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Домашняя страница - categories: Категории - tags: Теги - archives: Архив - about: О сайте - -# the text displayed in the search bar & search results -search: - hint: поиск - cancel: Отменить - no_results: Ох! Ничего не найдено. - -panel: - lastmod: Недавно обновлено - trending_tags: Популярные теги - toc: Содержание - -copyright: - # Shown at the bottom of the post - license: - template: Публикация защищена лицензией :LICENSE_NAME. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Некоторые права защищены. - verbose: >- - Публикации на сайте защищены лицензией Creative Commons Attribution 4.0 International (CC BY 4.0), - если в тексте публикации не указано иное. - -meta: Powered by :PLATFORM with :THEME theme - -not_found: - statment: Извините, эта ссылка указывает на ресурс который не существует. - -notification: - update_found: Доступна новая версия контента. - update: Обновлять - -# ----- Posts related labels ----- - -post: - written_by: Автор - posted: Время публикации - updated: Обновлено - words: слов - pageview_measure: просмотров - read_time: - unit: минут - prompt: чтения - relate_posts: Вам также может быть интересно - share: Поделиться - button: - next: Предыдущая публикация - previous: Следующая публикация - copy_code: - succeed: Скопировано успешно! - share_link: - title: Скопировать ссылку - succeed: Ссылка успешно скопирована! - -# categories page -categories: - category_measure: категории - post_measure: публикации diff --git a/_data/locales/sl-SI.yml b/_data/locales/sl-SI.yml deleted file mode 100644 index 7ab18b1..0000000 --- a/_data/locales/sl-SI.yml +++ /dev/null @@ -1,91 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Objava #Post - category: Kategorija #Category - tag: Oznaka #Tag - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Domov #Home - categories: Kategorije #Categories - tags: Oznake #Tags - archives: Arhiv #Archives - about: O meni #About - -# the text displayed in the search bar & search results -search: - hint: išči #search - cancel: Prekliči #Cancel - no_results: Ups! Vsebina ni bila najdena #Oops! No results found. - -panel: - lastmod: Nedavno Posodobljeno #Recently Updated - trending_tags: Priljubljene Oznake #Trending Tags - toc: Vsebina #Contents - -copyright: - # Shown at the bottom of the post - license: - template: Ta objava je licencirana pod :LICENCE_NAME s strani avtorja. #This post is licensed under :LICENSE_NAME by the author. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Nekatere pravice pridržane. #Some rights reserved. - verbose: >- - Razen kjer navedeno drugače, vse objave spletnega dnevnika so licencirane - pod Creative Commons Attribution 4.0 International (CC BY 4.0) s strani avtorja. - -meta: Uporabljena :PLATFORM tema :THEME #Using the :PLATFORM theme :THEME - -not_found: - statment: Oprostite, hiperpovezava je neustrezna ali vsebina ne obstajata. #Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. - -notification: - update_found: Novejša različica vsebine je na voljo. #A new version of content is available. - update: Posodobi #Update - -# ----- Posts related labels ----- - -post: - written_by: Od #By - posted: Objavljeno #Posted - updated: Posodobljeno #Updated - words: besede #words - pageview_measure: ogledi #views - read_time: - unit: min - prompt: beri #read - relate_posts: Nadaljnje branje #Further Reading - share: Deli #Share - button: - next: Novejše #Newer - previous: Starejše #Older - copy_code: - succeed: Kopirano! #Copied! - share_link: - title: Kopiraj povezavo #Copy link - succeed: Povezava uspešno kopirana! #Link copied successfully! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%e %b, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: kategorija #category - plural: kategorije #categories - post_measure: - singular: objava #post - plural: objave #posts diff --git a/_data/locales/sv-SE.yml b/_data/locales/sv-SE.yml deleted file mode 100644 index 7ec2ee2..0000000 --- a/_data/locales/sv-SE.yml +++ /dev/null @@ -1,91 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Inlägg #Post - category: Kategori #Category - tag: Tagga #Tag - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Hem #Home - categories: Kategorier #Categories - tags: Taggar #Tags - archives: Arkiv #Archives - about: Om #About - -# the text displayed in the search bar & search results -search: - hint: sök - cancel: Avbryt - no_results: Hoppsan! Hittade inga sökträffar. - -panel: - lastmod: Senast uppdaterad - trending_tags: Trendande taggar - toc: Innehåll - -copyright: - # Shown at the bottom of the post - license: - template: Den här posten är publicerad under licensen :LICENSE_NAME av författaren. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Vissa rättigheter är reserverade. - verbose: >- - Om inte annat anges är blogginläggen på denna webbplats licensierade - under Creative Commons Attribution 4.0 International (CC BY 4.0) av författaren. - -meta: Byggd med :PLATFORM och temat :THEME - -not_found: - statment: Ursäkta, vi har tappat bort den här webbadressen eller så pekar den på något som inte längre finns. - -notification: - update_found: Det finns en ny version av innehållet. - update: Uppdatera sidan - -# ----- Posts related labels ----- - -post: - written_by: Av - posted: Postad - updated: Uppdaterad - words: ord - pageview_measure: visningar - read_time: - unit: min - prompt: läsning - relate_posts: Mer läsning - share: Dela - button: - next: Nyare - previous: Äldre - copy_code: - succeed: Kopierat! - share_link: - title: Kopiera länk - succeed: Länken har kopierats! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: kategori - plural: kategorier - post_measure: - singular: inlägg - plural: inlägg diff --git a/_data/locales/th.yml b/_data/locales/th.yml deleted file mode 100644 index 22cb00a..0000000 --- a/_data/locales/th.yml +++ /dev/null @@ -1,91 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: โพสต์ - category: หมวดหมู่ - tag: แท็ก - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: หน้าแรก - categories: หมวดหมู่ - tags: แท็ก - archives: คลังเก็บ - about: เกี่ยวกับ - -# the text displayed in the search bar & search results -search: - hint: ค้นหา - cancel: ยกเลิก - no_results: โอ๊ะ! ไม่พบผลลัพธ์ - -panel: - lastmod: อัปเดตล่าสุด - trending_tags: แท็กยอดนิยม - toc: เนื้อหา - -copyright: - # Shown at the bottom of the post - license: - template: โพสต์นี้อยู่ภายใต้การอนุญาต :LICENSE_NAME โดยผู้เขียน - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: สงวนลิขสิทธิ์เป็นบางส่วน - verbose: >- - เว้นแต่ว่าจะระบุเป็นอย่างอื่น โพสต์บนเว็บไซต์นี้อยู่ภายใต้ - สัญญาอนุญาตครีเอทีฟคอมมอนส์แบบ 4.0 นานาชาติ (CC BY 4.0) โดยผู้เขียน - -meta: กำลังใช้ธีมของ :PLATFORM ชื่อ :THEME - -not_found: - statment: ขออภัย เราวาง URL นั้นไว้ผิดที่ หรือมันชี้ไปยังสิ่งที่ไม่มีอยู่ - -notification: - update_found: มีเวอร์ชันใหม่ของเนื้อหา - update: อัปเดต - -# ----- Posts related labels ----- - -post: - written_by: โดย - posted: โพสต์เมื่อ - updated: อัปเดตเมื่อ - words: คำ - pageview_measure: ครั้ง - read_time: - unit: นาที - prompt: อ่าน - relate_posts: อ่านต่อ - share: แชร์ - button: - next: ใหม่กว่า - previous: เก่ากว่า - copy_code: - succeed: คัดลอกแล้ว! - share_link: - title: คัดลอกลิงก์ - succeed: คัดลอกลิงก์เรียบร้อยแล้ว! - -# Date time format. -# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format> -df: - post: - strftime: "%b %e, %Y" - dayjs: "ll" - archives: - strftime: "%b" - dayjs: "MMM" - -# categories page -categories: - category_measure: - singular: หมวดหมู่ - plural: หมวดหมู่ - post_measure: - singular: โพสต์ - plural: โพสต์ diff --git a/_data/locales/tr-TR.yml b/_data/locales/tr-TR.yml deleted file mode 100644 index 50d8110..0000000 --- a/_data/locales/tr-TR.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Gönderi - category: Kategori - tag: Etiket - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Ana Sayfa - categories: Kategoriler - tags: Etiketler - archives: Arşiv - about: Hakkında - -# the text displayed in the search bar & search results -search: - hint: Ara... - cancel: İptal - no_results: Hop! Öyle bir şey bulamadım. - -panel: - lastmod: Son Güncellenenler - trending_tags: Yükselen Etiketler - toc: İçindekiler - -copyright: - # Shown at the bottom of the post - license: - template: Bu gönderi :LICENSE_NAME lisansı altındadır. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/deed.tr - - # Displayed in the footer - brief: Bazı hakları saklıdır. - verbose: >- - Aksi belirtilmediği sürece, bu sitedeki gönderiler Creative Commons Atıf 4.0 Uluslararası (CC BY 4.0) Lisansı altındadır. - Kısaca sayfa linkini vererek değiştirebilir / paylaşabilirsiniz. - -meta: :PLATFORM ve :THEME teması - -not_found: - statment: Üzgünüz, bu linki yanlış yerleştirdik veya var olmayan bir şeye işaret ediyor. - -notification: - update_found: İçeriğin yeni bir sürümü mevcut. - update: Güncelle - -# ----- Posts related labels ----- - -post: - written_by: Yazan - posted: Gönderim - updated: Güncelleme - words: sözcük - pageview_measure: görüntülenme - read_time: - unit: dakikada - prompt: okunabilir - relate_posts: Benzer Gönderiler - share: Paylaş - button: - next: İleri - previous: Geri - copy_code: - succeed: Kopyalandı. - share_link: - title: Linki kopyala - succeed: Link kopyalandı. - -# categories page -categories: - category_measure: kategori - post_measure: gönderi diff --git a/_data/locales/uk-UA.yml b/_data/locales/uk-UA.yml deleted file mode 100644 index b605073..0000000 --- a/_data/locales/uk-UA.yml +++ /dev/null @@ -1,77 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Публікація - category: Категорія - tag: Тег - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Домашня сторінка - categories: Категорії - tags: Теги - archives: Архів - about: Про сайт - -# the text displayed in the search bar & search results -search: - hint: пошук - cancel: Скасувати - no_results: Ох! Нічого не знайдено. - -panel: - lastmod: Нещодавно оновлено - trending_tags: Популярні теги - toc: Зміст - -copyright: - # Shown at the bottom of the post - license: - template: Публікація захищена ліцензією :LICENSE_NAME. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Деякі права захищено. - verbose: >- - Публікації на сайті захищено ліцензією Creative Commons Attribution 4.0 International (CC BY 4.0), - якщо інше не вказано в тексті. - -meta: Powered by :PLATFORM with :THEME theme - -not_found: - statment: Вибачте, це посилання вказує на ресурс, що не існує. - -notification: - update_found: Доступна нова версія вмісту. - update: Оновлення - -# ----- Posts related labels ----- - -post: - written_by: Автор - posted: Час публікації - updated: Оновлено - words: слів - pageview_measure: переглядів - read_time: - unit: хвилин - prompt: читання - relate_posts: Вас також може зацікавити - share: Поділитися - button: - next: Попередня публікація - previous: Наступна публікація - copy_code: - succeed: Успішно скопійовано! - share_link: - title: Скопіювати посилання - succeed: Посилання успішно скопійовано! - -# categories page -categories: - category_measure: категорії - post_measure: публікації diff --git a/_data/locales/vi-VN.yml b/_data/locales/vi-VN.yml deleted file mode 100644 index 617431a..0000000 --- a/_data/locales/vi-VN.yml +++ /dev/null @@ -1,76 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: Bài viết - category: Danh mục - tag: Thẻ - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: Trang chủ - categories: Các danh mục - tags: Các thẻ - archives: Lưu trữ - about: Giới thiệu - -# the text displayed in the search bar & search results -search: - hint: tìm kiếm - cancel: Hủy - no_results: Không có kết quả tìm kiếm. - -panel: - lastmod: Mới cập nhật - trending_tags: Các thẻ thịnh hành - toc: Mục lục - -copyright: - # Shown at the bottom of the post - license: - template: Bài viết này được cấp phép bởi tác giả theo giấy phép :LICENSE_NAME. - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: Một số quyền được bảo lưu. - 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. - -notification: - update_found: Đã có phiên bản mới của nội dung. - update: Cập nhật - -# ----- Posts related labels ----- - -post: - written_by: Viết bởi - posted: Đăng lúc - updated: Cập nhật lúc - words: từ - pageview_measure: lượt xem - read_time: - unit: phút - prompt: đọc - relate_posts: Bài viết liên quan - share: Chia sẻ - button: - next: Mới hơn - previous: Cũ hơn - copy_code: - succeed: Đã sao chép! - share_link: - title: Sao chép đường dẫn - succeed: Đã sao chép đường dẫn thành công! - -# categories page -categories: - category_measure: danh mục - post_measure: bài viết diff --git a/_data/locales/zh-CN.yml b/_data/locales/zh-CN.yml deleted file mode 100644 index f828134..0000000 --- a/_data/locales/zh-CN.yml +++ /dev/null @@ -1,83 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: 文章 - category: 分类 - tag: 标签 - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: 首页 - categories: 分类 - tags: 标签 - archives: 归档 - about: 关于 - -# the text displayed in the search bar & search results -search: - hint: 搜索 - cancel: 取消 - no_results: 搜索结果为空 - -panel: - lastmod: 最近更新 - trending_tags: 热门标签 - toc: 文章内容 - -copyright: - # Shown at the bottom of the post - license: - template: 本文由作者按照 :LICENSE_NAME 进行授权 - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: 保留部分权利。 - verbose: >- - 除非另有说明,本网站上的博客文章均由作者按照知识共享署名 4.0 国际 (CC BY 4.0) 许可协议进行授权。 - -meta: 本站采用 :PLATFORM 主题 :THEME - -not_found: - statment: 抱歉,我们放错了该 URL,或者它指向了不存在的内容。 - -notification: - update_found: 发现新版本的内容。 - update: 更新 - -# ----- Posts related labels ----- - -post: - written_by: 作者 - posted: 发表于 - updated: 更新于 - words: 字 - pageview_measure: 次浏览 - read_time: - unit: 分钟 - prompt: 阅读 - relate_posts: 相关文章 - share: 分享 - button: - next: 下一篇 - previous: 上一篇 - copy_code: - succeed: 已复制! - share_link: - title: 分享链接 - succeed: 链接已复制! - -# 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" - -# categories page -categories: - category_measure: 个分类 - post_measure: 篇文章 diff --git a/_data/locales/zh-TW.yml b/_data/locales/zh-TW.yml deleted file mode 100644 index 911253b..0000000 --- a/_data/locales/zh-TW.yml +++ /dev/null @@ -1,83 +0,0 @@ -# The layout text of site - -# ----- Commons label ----- - -layout: - post: 文章 - category: 分類 - tag: 標籤 - -# The tabs of sidebar -tabs: - # format: <filename_without_extension>: <value> - home: 首頁 - categories: 分類 - tags: 標籤 - archives: 封存 - about: 關於 - -# the text displayed in the search bar & search results -search: - hint: 搜尋 - cancel: 取消 - no_results: 沒有搜尋結果 - -panel: - lastmod: 最近更新 - trending_tags: 熱門標籤 - toc: 文章摘要 - -copyright: - # Shown at the bottom of the post - license: - template: 本文章以 :LICENSE_NAME 授權 - name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ - - # Displayed in the footer - brief: 保留部份權利。 - verbose: >- - 除非另有說明,否則本網誌的文章均由作者按照姓名標示 4.0 國際 (CC BY 4.0) 授權條款進行授權。 - -meta: 本網站使用 :PLATFORM 產生,採用 :THEME 主題 - -not_found: - statment: 抱歉,您可能正在存取一個已被移動的 URL,或者它從未存在。 - -notification: - update_found: 發現新版本更新。 - update: 更新 - -# ----- Posts related labels ----- - -post: - written_by: 作者 - posted: 發布於 - updated: 更新於 - words: 字 - pageview_measure: 次瀏覽 - read_time: - unit: 分鐘 - prompt: 閱讀 - relate_posts: 相關文章 - share: 分享 - button: - next: 下一篇 - previous: 上一篇 - copy_code: - succeed: 已複製! - share_link: - title: 分享連結 - succeed: 已複製連結! - -# 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" - -# categories page -categories: - category_measure: 個分類 - post_measure: 篇文章 diff --git a/_data/origin/basic.yml b/_data/origin/basic.yml deleted file mode 100644 index 9ffc76c..0000000 --- a/_data/origin/basic.yml +++ /dev/null @@ -1,49 +0,0 @@ -# fonts - -webfonts: /assets/lib/fonts/main.css - -# Libraries - -jquery: - js: /assets/lib/jquery/jquery.min.js - -bootstrap: - css: /assets/lib/bootstrap/bootstrap.min.css - js: /assets/lib/bootstrap/bootstrap.bundle.min.js - -toc: - css: /assets/lib/tocbot/tocbot.min.css - js: /assets/lib/tocbot/tocbot.min.js - -fontawesome: - css: /assets/lib/fontawesome-free/css/all.min.css - -search: - js: /assets/lib/simple-jekyll-search/simple-jekyll-search.min.js - -mermaid: - js: /assets/lib/mermaid/mermaid.min.js - -dayjs: - js: - common: /assets/lib/dayjs/dayjs.min.js - locale: /assets/lib/dayjs/locale/en.min.js - relativeTime: /assets/lib/dayjs/plugin/relativeTime.min.js - localizedFormat: /assets/lib/dayjs/plugin/localizedFormat.min.js - -magnific-popup: - css: /assets/lib/magnific-popup/magnific-popup.css - js: /assets/lib/magnific-popup/jquery.magnific-popup.min.js - -lazy-polyfill: - css: /assets/lib/loading-attribute-polyfill/loading-attribute-polyfill.min.css - js: /assets/lib/loading-attribute-polyfill/loading-attribute-polyfill.umd.min.js - -clipboard: - js: /assets/lib/clipboard/clipboard.min.js - -polyfill: - js: /assets/lib/polyfill-v3-es6/polyfill.min.js - -mathjax: - js: /assets/lib/mathjax/tex-chtml.js diff --git a/_data/origin/cors.yml b/_data/origin/cors.yml deleted file mode 100644 index 7322695..0000000 --- a/_data/origin/cors.yml +++ /dev/null @@ -1,60 +0,0 @@ -# CDNs - -cdns: - # Google Fonts - - url: https://fonts.googleapis.com - - url: https://fonts.gstatic.com - args: crossorigin - - url: https://fonts.googleapis.com - # jsDelivr CDN - - url: https://cdn.jsdelivr.net - -# fonts - -webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;700;900&display=swap - -# Libraries - -jquery: - js: https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js - -bootstrap: - css: https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css - js: https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js - -toc: - css: https://cdn.jsdelivr.net/npm/tocbot@4.21.1/dist/tocbot.min.css - js: https://cdn.jsdelivr.net/npm/tocbot@4.21.1/dist/tocbot.min.js - -fontawesome: - css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css - -search: - js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js - -mermaid: - js: https://cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js - -dayjs: - js: - common: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/dayjs.min.js - locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/locale/:LOCALE.min.js - relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/plugin/relativeTime.min.js - localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.9/plugin/localizedFormat.min.js - -magnific-popup: - css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css - js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js - -lazy-polyfill: - css: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.min.css - js: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.umd.min.js - -clipboard: - js: https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js - -polyfill: - js: https://polyfill.io/v3/polyfill.min.js?features=es6 - -mathjax: - js: https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js diff --git a/_data/share.yml b/_data/share.yml index 536ac01..a2d4191 100644 --- a/_data/share.yml +++ b/_data/share.yml @@ -14,12 +14,40 @@ platforms: icon: "fab fa-telegram" link: "https://t.me/share/url?url=URL&text=TITLE" - # Uncomment below if you need to. - # - type: Linkedin icon: "fab fa-linkedin" link: "https://www.linkedin.com/sharing/share-offsite/?url=URL" + + - type: Bluesky + icon: "fa-brands fa-bluesky" + link: "https://bsky.app/intent/compose?text=TITLE%20URL" + + - type: Threads + icon: "fa-brands fa-square-threads" + link: "https://www.threads.net/intent/post?text=TITLE%20URL" + + # Uncomment below if you need to. + # # # - type: Weibo # icon: "fab fa-weibo" - # link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL" + # link: "https://service.weibo.com/share/share.php?title=TITLE&url=URL" + # + # - type: Mastodon + # icon: "fa-brands fa-mastodon" + # # See: https://github.com/justinribeiro/share-to-mastodon#properties + # instances: + # - label: mastodon.social + # link: "https://mastodon.social/" + # - label: mastodon.online + # link: "https://mastodon.online/" + # - label: fosstodon.org + # link: "https://fosstodon.org/" + # - label: photog.social + # link: "https://photog.social/" + # + # + # - type: Reddit + # icon: "fa-brands fa-square-reddit" + # link: "https://www.reddit.com/submit?url=URL&title=TITLE" + # diff --git a/_includes/comments.html b/_includes/comments.html deleted file mode 100644 index 39e521f..0000000 --- a/_includes/comments.html +++ /dev/null @@ -1,5 +0,0 @@ -<!-- The comments switcher --> -{% if page.comments and site.comments.active %} - {% capture path %}comments/{{ site.comments.active }}.html{% endcapture %} - {% include {{ path }} %} -{% endif %} diff --git a/_includes/comments/disqus.html b/_includes/comments/disqus.html deleted file mode 100644 index e59ed37..0000000 --- a/_includes/comments/disqus.html +++ /dev/null @@ -1,50 +0,0 @@ -<!-- The Disqus lazy loading. --> - -<div id="disqus_thread"> - <p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p> -</div> - -<script type="text/javascript"> - var disqus_config = function () { - this.page.url = '{{ page.url | absolute_url }}'; - this.page.identifier = '{{ page.url }}'; - }; - - /* Lazy loading */ - var disqus_observer = new IntersectionObserver( - function (entries) { - if (entries[0].isIntersecting) { - (function () { - var d = document, - s = d.createElement('script'); - s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js'; - s.setAttribute('data-timestamp', +new Date()); - (d.head || d.body).appendChild(s); - })(); - - disqus_observer.disconnect(); - } - }, - { threshold: [0] } - ); - - disqus_observer.observe(document.querySelector('#disqus_thread')); - - /* Auto switch theme */ - function reloadDisqus() { - if (event.source === window && event.data && event.data.direction === ModeToggle.ID) { - /* Disqus hasn't been loaded */ - if (typeof DISQUS === 'undefined') { - return; - } - - if (document.readyState == 'complete') { - DISQUS.reset({ reload: true, config: disqus_config }); - } - } - } - - if (document.querySelector('.mode-toggle')) { - window.addEventListener('message', reloadDisqus); - } -</script> diff --git a/_includes/comments/giscus.html b/_includes/comments/giscus.html deleted file mode 100644 index 8f04246..0000000 --- a/_includes/comments/giscus.html +++ /dev/null @@ -1,65 +0,0 @@ -<!-- https://giscus.app/ --> -<script type="text/javascript"> - (function () { - const origin = 'https://giscus.app'; - const iframe = 'iframe.giscus-frame'; - const lightTheme = 'light'; - const darkTheme = 'dark_dimmed'; - - let initTheme = lightTheme; - const html = document.documentElement; - - if ( - (html.hasAttribute('data-mode') && - html.getAttribute('data-mode') === 'dark') || - (!html.hasAttribute('data-mode') && - window.matchMedia('(prefers-color-scheme: dark)').matches) - ) { - initTheme = darkTheme; - } - - let giscusAttributes = { - src: 'https://giscus.app/client.js', - 'data-repo': '{{ site.comments.giscus.repo}}', - 'data-repo-id': '{{ site.comments.giscus.repo_id }}', - 'data-category': '{{ site.comments.giscus.category }}', - 'data-category-id': '{{ site.comments.giscus.category_id }}', - 'data-mapping': '{{ site.comments.giscus.mapping | default: 'pathname' }}', - 'data-reactions-enabled': '{{ site.comments.giscus.reactions_enabled | default: '1' }}', - 'data-emit-metadata': '0', - 'data-theme': initTheme, - 'data-input-position': '{{ site.comments.giscus.input_position | default: 'bottom' }}', - 'data-lang': '{{ site.comments.giscus.lang | default: lang }}', - 'data-loading': 'lazy', - crossorigin: 'anonymous', - async: '' - }; - - let giscusScript = document.createElement('script'); - Object.entries(giscusAttributes).forEach(([key, value]) => - giscusScript.setAttribute(key, value) - ); - document.getElementById('tail-wrapper').appendChild(giscusScript); - - addEventListener('message', (event) => { - if ( - event.source === window && - event.data && - event.data.direction === ModeToggle.ID - ) { - /* global theme mode changed */ - const mode = event.data.message; - const theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme; - - const message = { - setConfig: { - theme: theme - } - }; - - const giscus = document.querySelector(iframe).contentWindow; - giscus.postMessage({ giscus: message }, origin); - } - }); - })(); -</script> diff --git a/_includes/comments/utterances.html b/_includes/comments/utterances.html deleted file mode 100644 index 34dddcd..0000000 --- a/_includes/comments/utterances.html +++ /dev/null @@ -1,50 +0,0 @@ -<!-- https://utteranc.es/ --> -<script - src="https://utteranc.es/client.js" - repo="{{ site.comments.utterances.repo }}" - issue-term="{{ site.comments.utterances.issue_term }}" - crossorigin="anonymous" - async -></script> - -<script type="text/javascript"> - (function () { - const origin = 'https://utteranc.es'; - const iframe = 'iframe.utterances-frame'; - const lightTheme = 'github-light'; - const darkTheme = 'github-dark'; - let initTheme = lightTheme; - const html = document.documentElement; - - if ( - (html.hasAttribute('data-mode') && html.getAttribute('data-mode') === 'dark') || - (!html.hasAttribute('data-mode') && window.matchMedia('(prefers-color-scheme: dark)').matches) - ) { - initTheme = darkTheme; - } - - addEventListener('message', (event) => { - let theme; - - /* credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> */ - if (event.origin === origin) { - /* page initial */ - theme = initTheme; - } else if (event.source === window && event.data && event.data.direction === ModeToggle.ID) { - /* global theme mode changed */ - const mode = event.data.message; - theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme; - } else { - return; - } - - const message = { - type: 'set-theme', - theme: theme - }; - - const utterances = document.querySelector(iframe).contentWindow; - utterances.postMessage(message, origin); - }); - })(); -</script> diff --git a/_includes/datetime.html b/_includes/datetime.html deleted file mode 100644 index 9f954b6..0000000 --- a/_includes/datetime.html +++ /dev/null @@ -1,20 +0,0 @@ -<!-- - Date format snippet - See: ${JS_ROOT}/utils/locale-dateime.js ---> - -{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %} -{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %} - -<time - {% if include.class %} - class="{{ include.class }}" - {% endif %} - data-ts="{{ include.date | date: '%s' }}" - data-df="{{ df_dayjs }}" - {% if include.tooltip %} - data-bs-toggle="tooltip" data-bs-placement="bottom" - {% endif %} -> - {{ include.date | date: df_strftime }} -</time> diff --git a/_includes/embed/linkedin.html b/_includes/embed/linkedin.html new file mode 100644 index 0000000..8bd8481 --- /dev/null +++ b/_includes/embed/linkedin.html @@ -0,0 +1,17 @@ +{% assign id = include.id %} +{% assign height = include.height | default: '1200' %} +{% assign width = include.width | default: '600' %} +{% assign title = include.title | default: 'Embedded LinkedIn Post' %} + +<div style="width: 100%; padding: 1rem; display: flex; justify-content: center; align-items: center;"> + <iframe + src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:{{ id }}" + height="{{ height }}" + width="{{ width }}" + frameborder="0" + allowfullscreen="" + title="{{ title }}" + style="padding: 1.2rem; border-radius: 2.5rem;" + name="linkedin-embed-{{ id }}" + ></iframe> +</div> \ No newline at end of file diff --git a/_includes/embed/twitch.html b/_includes/embed/twitch.html deleted file mode 100644 index 043d532..0000000 --- a/_includes/embed/twitch.html +++ /dev/null @@ -1,7 +0,0 @@ -<iframe - class="embed-video twitch" - src="https://player.twitch.tv/?video={{ include.id }}&parent={{ site.url | split: '://' | last | remove: '/' }}" - frameborder="0" - allowfullscreen="true" - scrolling="no" -></iframe> diff --git a/_includes/embed/twitter.html b/_includes/embed/twitter.html new file mode 100644 index 0000000..c7f105f --- /dev/null +++ b/_includes/embed/twitter.html @@ -0,0 +1,75 @@ +{% assign theme = include.theme | default: "dark" %} +{% assign align = include.align | default: "center" %} +{% assign width = include.width %} +{% assign cards = include.cards %} +{% assign conversation = include.conversation %} + +<div id="tweet-{{ include.id }}"> + <style> + :root { + --tweet-border-radius: 13.5px; + } + #tweet-{{ include.id }} iframe, + #tweet-{{ include.id }} iframe[data-tweet-id] { + border-radius: var(--tweet-border-radius) !important; + -webkit-border-radius: var(--tweet-border-radius) !important; + -moz-border-radius: var(--tweet-border-radius) !important; + } + </style> +</div> + +<script> + /* --- Twitter Embed Script --- */ + window.twttr = (function (d, s, id) { + var fjs = d.getElementsByTagName(s)[0]; + var t = window.twttr || {}; + + if (d.getElementById(id)) return t; + + var js = d.createElement(s); + js.id = id; + js.src = "https://platform.twitter.com/widgets.js"; + fjs.parentNode.insertBefore(js, fjs); + + t._e = []; + t.ready = function (f) { + t._e.push(f); + }; + + return t; + })(document, "script", "twitter-wjs"); + + /* --- Injecting Tweet to the DOM element --- */ + window.twttr.ready(function () { + var options = { + theme: "{{ theme }}", + align: "{{ align }}", + }; + + if ("{{ width }}") options.width = "{{ width }}"; + if ("{{ cards }}") options.cards = "{{ cards }}"; + if ("{{ conversation }}") options.conversation = "{{ conversation }}"; + + window.twttr.widgets.createTweet( + "{{ include.id }}", + document.getElementById("tweet-{{ include.id }}"), + options + ); + }); + + /* --- Load Twitter widgets --- */ + if (typeof window.tweetLoader === "undefined") { + window.tweetLoader = function () { + try { + window.twttr.widgets.load(); + } catch (error) { + console.error("Error loading Twitter widgets:", error); + } + }; + + document.addEventListener("DOMContentLoaded", window.tweetLoader, { + once: true, + passive: true, + }); + } +</script> \ No newline at end of file diff --git a/_includes/embed/youtube.html b/_includes/embed/youtube.html deleted file mode 100644 index 640011f..0000000 --- a/_includes/embed/youtube.html +++ /dev/null @@ -1,9 +0,0 @@ -<iframe - class="embed-video youtube" - loading="lazy" - src="https://www.youtube.com/embed/{{ include.id }}" - title="YouTube video player" - frameborder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" - allowfullscreen -></iframe> diff --git a/_includes/favicons.html b/_includes/favicons.html deleted file mode 100644 index 201f6d8..0000000 --- a/_includes/favicons.html +++ /dev/null @@ -1,17 +0,0 @@ -<!-- - The Favicons for Web, Android, Microsoft, and iOS (iPhone and iPad) Apps - Generated by: https://realfavicongenerator.net/ ---> - -{% capture favicon_path %}{{ '/assets/img/favicons' | relative_url }}{% endcapture %} - -<link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}/apple-touch-icon.png"> -<link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}/favicon-32x32.png"> -<link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}/favicon-16x16.png"> -<link rel="manifest" href="{{ favicon_path }}/site.webmanifest"> -<link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico"> -<meta name="apple-mobile-web-app-title" content="{{ site.title }}"> -<meta name="application-name" content="{{ site.title }}"> -<meta name="msapplication-TileColor" content="#da532c"> -<meta name="msapplication-config" content="{{ favicon_path }}/browserconfig.xml"> -<meta name="theme-color" content="#ffffff"> diff --git a/_includes/footer.html b/_includes/footer.html deleted file mode 100644 index a992355..0000000 --- a/_includes/footer.html +++ /dev/null @@ -1,36 +0,0 @@ -<!-- The Footer --> - -<footer - aria-label="Site Info" - class=" - d-flex flex-column justify-content-center text-muted - flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3 - " -> - <p> - {{ '©' }} - <time>{{ 'now' | date: '%Y' }}</time> - <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>. - {% if site.data.locales[include.lang].copyright.brief %} - <span - data-bs-toggle="tooltip" - data-bs-placement="top" - title="{{ site.data.locales[include.lang].copyright.verbose }}" - > - {{- site.data.locales[include.lang].copyright.brief -}} - </span> - {% endif %} - </p> - - <p> - {%- capture _platform -%} - <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a> - {%- endcapture -%} - - {%- capture _theme -%} - <a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a> - {%- endcapture -%} - - {{ site.data.locales[include.lang].meta | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }} - </p> -</footer> diff --git a/_includes/google-analytics.html b/_includes/google-analytics.html deleted file mode 100644 index e5e5119..0000000 --- a/_includes/google-analytics.html +++ /dev/null @@ -1,14 +0,0 @@ -<!-- - The GA snippet ---> -<!-- Global site tag (gtag.js) - Google Analytics --> -<script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.id }}"></script> -<script> - document.addEventListener("DOMContentLoaded", function(event) { - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - - gtag('js', new Date()); - gtag('config', '{{ site.google_analytics.id }}'); - }); -</script> diff --git a/_includes/head.html b/_includes/head.html deleted file mode 100644 index fb12d99..0000000 --- a/_includes/head.html +++ /dev/null @@ -1,99 +0,0 @@ -<!-- The Head --> - -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7"> - <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e"> - <meta name="apple-mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> - <meta - name="viewport" - content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover" - > - - {% capture seo_tags %} - {% seo title=false %} - {% endcapture %} - - {% if page.image %} - {% assign img = page.image.path | default: page.image %} - - {% unless img contains '://' %} - {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %} - {% capture target %}"{{ img | absolute_url }}"{% endcapture %} - - {% if site.img_cdn contains '//' %} - <!-- it's a cross-origin URL --> - {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %} - {% else %} - <!-- it's a local file path --> - {%- capture replacement -%} - "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}" - {%- endcapture -%} - {% endif %} - - {% assign seo_tags = seo_tags | replace: target, replacement %} - {% endunless %} - {% endif %} - - {{ seo_tags }} - - <title> - {%- unless page.layout == 'home' -%} - {{ page.title | append: ' | ' }} - {%- endunless -%} - {{ site.title }} - - - {% include_cached favicons.html %} - - {% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %} - - - {% else %} - {% for cdn in site.data.origin[type].cdns %} - - - {% endfor %} - - - {% endif %} - - - {% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %} - - - - - - {% endif %} - - - - - - - - - - {% if site.toc and page.toc %} - - {% endif %} - - {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %} - - {% endif %} - - {% if page.layout == 'page' or page.layout == 'post' %} - - - {% endif %} - - - - {% unless site.theme_mode %} - {% include mode-toggle.html %} - {% endunless %} - - {% include metadata-hook.html %} - diff --git a/_includes/js-selector.html b/_includes/js-selector.html deleted file mode 100644 index b332f10..0000000 --- a/_includes/js-selector.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -{% assign urls = site.data.origin[type].jquery.js - | append: ',' - | append: site.data.origin[type].bootstrap.js - | append: ',' - | append: site.data.origin[type].search.js -%} - - - -{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %} - {% assign urls = urls | append: ',' | append: site.data.origin[type]['lazy-polyfill'].js %} - - {% unless page.layout == 'home' %} - - {% assign urls = urls - | append: ',' - | append: site.data.origin[type]['magnific-popup'].js - | append: ',' - | append: site.data.origin[type].clipboard.js - %} - {% endunless %} -{% endif %} - -{% if page.layout == 'home' - or page.layout == 'post' - or page.layout == 'archives' - or page.layout == 'category' - or page.layout == 'tag' -%} - {% assign locale = site.lang | split: '-' | first %} - - {% assign urls = urls - | append: ',' - | append: site.data.origin[type].dayjs.js.common - | append: ',' - | append: site.data.origin[type].dayjs.js.locale - | replace: ':LOCALE', locale - | append: ',' - | append: site.data.origin[type].dayjs.js.relativeTime - | append: ',' - | append: site.data.origin[type].dayjs.js.localizedFormat - %} -{% endif %} - -{% if page.content contains ' - -{% if page.math %} - - - - -{% endif %} - -{% if jekyll.environment == 'production' %} - - {% if site.pwa.enabled %} - - {% else %} - - {% endif %} - - - {% if site.google_analytics.id != empty and site.google_analytics.id %} - {% include google-analytics.html %} - {% endif %} -{% endif %} diff --git a/_includes/jsdelivr-combine.html b/_includes/jsdelivr-combine.html deleted file mode 100644 index cffa699..0000000 --- a/_includes/jsdelivr-combine.html +++ /dev/null @@ -1,26 +0,0 @@ -{% assign urls = include.urls | split: ',' %} - -{% assign combined_urls = nil %} - -{% assign domain = 'https://cdn.jsdelivr.net/' %} - -{% for url in urls %} - {% if url contains domain %} - {% assign url_snippet = url | slice: domain.size, url.size %} - - {% if combined_urls %} - {% assign combined_urls = combined_urls | append: ',' | append: url_snippet %} - {% else %} - {% assign combined_urls = domain | append: 'combine/' | append: url_snippet %} - {% endif %} - - {% elsif url contains '//' %} - - {% else %} - - {% endif %} -{% endfor %} - -{% if combined_urls %} - -{% endif %} diff --git a/_includes/lang.html b/_includes/lang.html deleted file mode 100644 index 19558a0..0000000 --- a/_includes/lang.html +++ /dev/null @@ -1,8 +0,0 @@ -{% comment %} - Detect appearance language and return it through variable "lang" -{% endcomment %} -{% if site.data.locales[site.lang] %} - {% assign lang = site.lang %} -{% else %} - {% assign lang = 'en' %} -{% endif %} diff --git a/_includes/language-alias.html b/_includes/language-alias.html deleted file mode 100644 index abfa7ba..0000000 --- a/_includes/language-alias.html +++ /dev/null @@ -1,70 +0,0 @@ -{% comment %} - - Convert the alias of the syntax language to the official name - - See: - -{% endcomment %} - -{% assign _lang = include.language | default: '' %} - -{% case _lang %} - {% when 'actionscript', 'as', 'as3' %} - {{ 'ActionScript' }} - {% when 'applescript' %} - {{ 'AppleScript' }} - {% when 'brightscript', 'bs', 'brs' %} - {{ 'BrightScript' }} - {% when 'cfscript', 'cfc' %} - {{ 'CFScript' }} - {% when 'coffeescript', 'coffee', 'coffee-script' %} - {{ 'CoffeeScript' }} - {% when 'cs', 'csharp' %} - {{ 'C#' }} - {% when 'erl' %} - {{ 'Erlang' }} - {% when 'graphql' %} - {{ 'GraphQL' }} - {% when 'haskell', 'hs' %} - {{ 'Haskell' }} - {% when 'javascript', 'js' %} - {{ 'JavaScript' }} - {% when 'make', 'mf', 'gnumake', 'bsdmake' %} - {{ 'Makefile' }} - {% when 'md', 'mkd' %} - {{ 'Markdown' }} - {% when 'm' %} - {{ 'Matlab' }} - {% when 'objective_c', 'objc', 'obj-c', 'obj_c', 'objectivec' %} - {{ 'Objective-C' }} - {% when 'perl', 'pl' %} - {{ 'Perl' }} - {% when 'php','php3','php4','php5' %} - {{ 'PHP' }} - {% when 'py' %} - {{ 'Python' }} - {% when 'rb' %} - {{ 'Ruby' }} - {% when 'rs','no_run','ignore','should_panic' %} - {{ 'Rust' }} - {% when 'bash', 'zsh', 'ksh', 'sh' %} - {{ 'Shell' }} - {% when 'st', 'squeak' %} - {{ 'Smalltalk' }} - {% when 'tex'%} - {{ 'TeX' }} - {% when 'latex' %} - {{ 'LaTex' }} - {% when 'ts', 'typescript' %} - {{ 'TypeScript' }} - {% when 'vb', 'visualbasic' %} - {{ 'Visual Basic' }} - {% when 'vue', 'vuejs' %} - {{ 'Vue.js' }} - {% when 'yml' %} - {{ 'YAML' }} - {% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml', 'json' %} - {{ _lang | upcase }} - {% else %} - {{ _lang | capitalize }} -{% endcase %} diff --git a/_includes/mermaid.html b/_includes/mermaid.html deleted file mode 100644 index 967cfb4..0000000 --- a/_includes/mermaid.html +++ /dev/null @@ -1,58 +0,0 @@ - - diff --git a/_includes/metadata-hook.html b/_includes/metadata-hook.html deleted file mode 100644 index fd7e9bd..0000000 --- a/_includes/metadata-hook.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/_includes/mode-toggle.html b/_includes/mode-toggle.html deleted file mode 100644 index a347750..0000000 --- a/_includes/mode-toggle.html +++ /dev/null @@ -1,143 +0,0 @@ - - - diff --git a/_includes/no-linenos.html b/_includes/no-linenos.html deleted file mode 100644 index 8500693..0000000 --- a/_includes/no-linenos.html +++ /dev/null @@ -1,10 +0,0 @@ -{% comment %} - Remove the line number of the code snippet. -{% endcomment %} - -{% assign content = include.content %} - -{% if content contains '
' %}
-  {% assign content = content | replace: '
', '' %}
-{% endif %}
diff --git a/_includes/notification.html b/_includes/notification.html
deleted file mode 100644
index 80049b0..0000000
--- a/_includes/notification.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
diff --git a/_includes/origin-type.html b/_includes/origin-type.html
deleted file mode 100644
index 7f72012..0000000
--- a/_includes/origin-type.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% comment %} Site static assets origin type {% endcomment %}
-
-{% assign type = 'cors' %}
-
-{% if site.assets.self_host.enabled %}
-  {% if site.assets.self_host.env %}
-    {% if site.assets.self_host.env == jekyll.environment %}
-      {% assign type = 'basic' %}
-    {% endif %}
-  {% else %}
-    {% assign type = 'basic' %}
-  {% endif %}
-{% endif %}
diff --git a/_includes/post-nav.html b/_includes/post-nav.html
deleted file mode 100644
index 736bec3..0000000
--- a/_includes/post-nav.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
diff --git a/_includes/post-paginator.html b/_includes/post-paginator.html
deleted file mode 100644
index c74e978..0000000
--- a/_includes/post-paginator.html
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
diff --git a/_includes/post-sharing.html b/_includes/post-sharing.html
deleted file mode 100644
index a316001..0000000
--- a/_includes/post-sharing.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
diff --git a/_includes/read-time.html b/_includes/read-time.html
deleted file mode 100644
index 9952410..0000000
--- a/_includes/read-time.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-{% assign words = include.content | strip_html | number_of_words: 'auto' %}
-
-
-
-{% assign wpm = 180 %}
-{% assign min_time = 1 %}
-
-{% assign read_time = words | divided_by: wpm %}
-
-{% unless read_time > 0 %}
-  {% assign read_time = min_time %}
-{% endunless %}
-
-{% capture read_prompt %}
-  {{- site.data.locales[include.lang].post.read_time.prompt -}}
-{% endcapture %}
-
-
-
-  
-    {{- read_time -}}
-    {{ ' ' }}
-    {{- site.data.locales[include.lang].post.read_time.unit -}}
-  
-  {%- if include.prompt -%}
-    {%- assign _prompt_words = read_prompt | number_of_words: 'auto' -%}
-    {%- unless _prompt_words > 1 -%}{{ ' ' }}{%- endunless -%}
-    {{ read_prompt }}
-  {%- endif -%}
-
diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html
deleted file mode 100644
index 36352b0..0000000
--- a/_includes/refactor-content.html
+++ /dev/null
@@ -1,266 +0,0 @@
-
-
-{% assign _content = include.content %}
-
-
-
-{% if _content contains '', ''
-    | replace: '
', '' - | replace: '
', '
' - %} -{% endif %} - - - -{% if _content contains '
' %}
-  {% assign _content = _content
-    | replace: '
', '' - %} -{% endif %} - - - -{% if _content contains '', - '' - | replace: '', - '' - %} -{% endif %} - - - -{% assign IMG_TAG = ' - {% if site.img_cdn %} - {% if site.img_cdn contains '//' %} - {% assign _path_prefix = site.img_cdn %} - {% else %} - {% assign _path_prefix = site.img_cdn | relative_url %} - {% endif %} - {% else %} - {% assign _path_prefix = site.baseurl %} - {% endif %} - - - {% if page.img_path %} - {% assign _path = page.img_path | append: '/' | replace: '//', '/' %} - {% assign _path_prefix = _path_prefix | append: _path %} - {% endif %} - - {% for _img_snippet in _img_snippets %} - {% if forloop.first %} - {% assign _img_content = _img_snippet %} - {% continue %} - {% endif %} - - {% assign _left = _img_snippet | split: '>' | first %} - {% assign _right = _img_snippet | remove: _left %} - - {% unless _left contains 'src=' %} - {% continue %} - {% endunless %} - - {% assign _left = _left | remove: ' /' | replace: ' w=', ' width=' | replace: ' h=', ' height=' %} - {% assign _attrs = _left | split: '" ' %} - - {% assign _src = null %} - {% assign _lqip = null %} - {% assign _class = null %} - - {% for _attr in _attrs %} - {% unless _attr contains '=' %} - {% continue %} - {% endunless %} - - {% assign _pair = _attr | split: '="' %} - {% capture _key %}{{ _pair | first }}{% endcapture %} - {% capture _value %}{{ _pair | last | remove: '"' }}{% endcapture %} - - {% case _key %} - {% when 'src' %} - {% assign _src = _value %} - {% when 'lqip' %} - {% assign _lqip = _value %} - {% when 'class' %} - {% assign _class = _value %} - {% endcase %} - {% endfor %} - - - {% if _class %} - {% capture _old_class %}class="{{ _class }}"{% endcapture %} - {% assign _left = _left | remove: _old_class %} - {% endif %} - - {% assign _final_src = null %} - {% assign _lazyload = true %} - - {% unless _src contains '//' %} - {% assign _final_src = _path_prefix | append: _src %} - {% assign _src_alt = 'src="' | append: _path_prefix %} - {% assign _left = _left | replace: 'src="', _src_alt %} - {% endunless %} - - {% if _lqip %} - {% if _lqip contains 'data:' %} - {% assign _lazyload = false %} - {% assign _class = _class | append: ' blur' %} - {% else %} - {% assign _lqip_alt = 'lqip="' | append: _path_prefix %} - {% assign _left = _left | replace: 'lqip="', _lqip_alt %} - {% endif %} - - - {% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %} - - {% else %} - {% assign _class = _class | append: ' shimmer' %} - {% endif %} - - - {% if _lazyload %} - {% assign _left = _left | append: ' loading="lazy"' %} - {% endif %} - - {% if page.layout == 'home' %} - - {% assign _wrapper_start = '
' %} - - {% assign _img_content = _img_content | append: _wrapper_start %} - {% assign _right = _right | prepend: '>` is wrapped by `` --> - {% assign _parent = _right | slice: 1, 4 %} - - {% if _parent == '' %} - - {% assign _size = _img_content | size | minus: 1 %} - {% capture _class %} - class="img-link{% unless _lqip %} shimmer{% endunless %}" - {% endcapture %} - {% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>' %} - - {% else %} - - {% assign _wrapper_start = _final_src - | default: _src - | prepend: '' - %} - - {% assign _img_content = _img_content | append: _wrapper_start %} - {% assign _right = '> - {% assign _img_content = _img_content | append: IMG_TAG | append: _left | append: _right %} - {% endfor %} - - {% if _img_content %} - {% assign _content = _img_content %} - {% endif %} -{% endif %} - - - -{% if _content contains '
' %} - {% assign _code_spippets = _content | split: '
' %} - {% assign _new_content = '' %} - - {% for _snippet in _code_spippets %} - {% if forloop.last %} - {% assign _new_content = _new_content | append: _snippet %} - - {% else %} - {% assign _left = _snippet | split: '><' | last %} - - {% if _left contains 'file="' %} - {% assign _label_text = _left | split: 'file="' | last | split: '"' | first %} - {% assign _label_icon = 'far fa-file-code fa-fw' %} - {% else %} - {% assign _lang = _left | split: 'language-' | last | split: ' ' | first %} - {% capture _label_text %}{% include language-alias.html language=_lang %}{% endcapture %} - {% assign _label_icon = 'fas fa-code fa-fw small' %} - {% endif %} - - {% capture _label %} - - {% endcapture %} - - {% assign _new_content = _new_content - | append: _snippet - | append: '
' - | append: _label - | append: '
' - | append: '
' - %} - {% endif %} - {% endfor %} - - {% assign _content = _new_content %} -{% endif %} - - - -{% assign heading_levels = '2,3,4,5' | split: ',' %} -{% assign _heading_content = _content %} - -{% for level in heading_levels %} - {% assign mark_start = '' - %} - - {% assign left = snippet | split: mark_end | first %} - {% assign right = snippet | slice: left.size, snippet.size %} - {% assign left = left | replace_first: '">', '">' | append: '' %} - - {% assign _new_content = _new_content | append: mark_start | append: left | append: anchor | append: right %} - {% endfor %} - - {% assign _heading_content = _new_content %} - {% endif %} -{% endfor %} - -{% assign _content = _heading_content %} - - -{{ _content }} diff --git a/_includes/related-posts.html b/_includes/related-posts.html deleted file mode 100644 index ebe98d0..0000000 --- a/_includes/related-posts.html +++ /dev/null @@ -1,96 +0,0 @@ - - - -{% assign TOTAL_SIZE = 3 %} - - -{% assign TAG_SCORE = 1 %} - - -{% assign CATEGORY_SCORE = 0.5 %} - -{% assign SEPARATOR = ':' %} - -{% assign match_posts = '' | split: '' %} - -{% for category in page.categories %} - {% assign match_posts = match_posts | push: site.categories[category] | uniq %} -{% endfor %} - -{% for tag in page.tags %} - {% assign match_posts = match_posts | push: site.tags[tag] | uniq %} -{% endfor %} - -{% assign last_index = match_posts.size | minus: 1 %} -{% assign score_list = '' | split: '' %} - -{% for i in (0..last_index) %} - {% assign post = match_posts[i] %} - - {% if post.url == page.url %} - {% continue %} - {% endif %} - - {% assign score = 0 %} - - {% for tag in post.tags %} - {% if page.tags contains tag %} - {% assign score = score | plus: TAG_SCORE %} - {% endif %} - {% endfor %} - - {% for category in post.categories %} - {% if page.categories contains category %} - {% assign score = score | plus: CATEGORY_SCORE %} - {% endif %} - {% endfor %} - - {% if score > 0 %} - {% capture score_item %}{{ score }}{{ SEPARATOR }}{{ i }}{% endcapture %} - {% assign score_list = score_list | push: score_item %} - {% endif %} -{% endfor %} - -{% assign index_list = '' | split: '' %} - -{% if score_list.size > 0 %} - {% assign score_list = score_list | sort | reverse %} - {% for entry in score_list limit: TOTAL_SIZE %} - {% assign index = entry | split: SEPARATOR | last %} - {% assign index_list = index_list | push: index %} - {% endfor %} -{% endif %} - -{% assign relate_posts = '' | split: '' %} - -{% for index in index_list %} - {% assign i = index | to_integer %} - {% assign relate_posts = relate_posts | push: match_posts[i] %} -{% endfor %} - -{% if relate_posts.size > 0 %} - - -{% endif %} diff --git a/_includes/search-loader.html b/_includes/search-loader.html deleted file mode 100644 index be3ca8a..0000000 --- a/_includes/search-loader.html +++ /dev/null @@ -1,47 +0,0 @@ - - -{% capture result_elem %} -
-
-

{title}

- -
-

{snippet}

-
-{% endcapture %} - -{% capture not_found %}

{{ site.data.locales[include.lang].search.no_results }}

{% endcapture %} - - diff --git a/_includes/search-results.html b/_includes/search-results.html deleted file mode 100644 index c224c5f..0000000 --- a/_includes/search-results.html +++ /dev/null @@ -1,10 +0,0 @@ - - -
-
-
- {% include_cached trending-tags.html %} -
-
-
-
diff --git a/_includes/sidebar.html b/_includes/sidebar.html deleted file mode 100644 index 99d6dcc..0000000 --- a/_includes/sidebar.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - diff --git a/_includes/toc.html b/_includes/toc.html deleted file mode 100644 index 604d2c1..0000000 --- a/_includes/toc.html +++ /dev/null @@ -1,13 +0,0 @@ -{% assign enable_toc = false %} -{% if site.toc and page.toc %} - {% if page.content contains ' -

{{- site.data.locales[include.lang].panel.toc -}}

- - -{% endif %} diff --git a/_includes/topbar.html b/_includes/topbar.html deleted file mode 100644 index 3d079ed..0000000 --- a/_includes/topbar.html +++ /dev/null @@ -1,77 +0,0 @@ - - -
-
- - - - - -
- {% if page.layout == 'home' %} - {{- site.data.locales[include.lang].title | default: site.title -}} - {% elsif page.collection == 'tabs' or page.layout == 'page' %} - {%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%} - {{- site.data.locales[include.lang].tabs[tab_key] | default: page.title -}} - {% else %} - {{- site.data.locales[include.lang].layout[page.layout] | default: page.layout | capitalize -}} - {% endif %} -
- - - - - - - - -
-
diff --git a/_includes/trending-tags.html b/_includes/trending-tags.html deleted file mode 100644 index 57369f0..0000000 --- a/_includes/trending-tags.html +++ /dev/null @@ -1,46 +0,0 @@ - - -{% assign MAX = 10 %} - -{% assign size_list = '' | split: '' %} -{% assign tag_list = '' | split: '' %} - -{% for tag in site.tags %} - {% assign size = tag | last | size %} - {% assign size_list = size_list | push: size %} - - {% assign tag_str = tag | first | append: '::' | append: size %} - {% assign tag_list = tag_list | push: tag_str %} -{% endfor %} - -{% assign size_list = size_list | sort | reverse %} - -{% assign tag_list = tag_list | sort_natural %} - -{% assign trending_tags = '' | split: '' %} - -{% for size in size_list limit: MAX %} - {% for tag_str in tag_list %} - {% assign tag = tag_str | split: '::' %} - {% assign tag_name = tag | first %} - {% assign tag_size = tag | last | plus: 0 %} - {% if tag_size == size %} - {% unless trending_tags contains tag_name %} - {% assign trending_tags = trending_tags | push: tag_name %} - {% break %} - {% endunless %} - {% endif %} - {% endfor %} -{% endfor %} - -{% if trending_tags.size > 0 %} -
-

{{- site.data.locales[include.lang].panel.trending_tags -}}

-
- {% for tag_name in trending_tags %} - {% assign url = tag_name | slugify | url_encode | prepend: '/tags/' | append: '/' %} - - {% endfor %} -
-
-{% endif %} diff --git a/_includes/update-list.html b/_includes/update-list.html deleted file mode 100644 index cdeebeb..0000000 --- a/_includes/update-list.html +++ /dev/null @@ -1,39 +0,0 @@ - - -{% assign MAX_SIZE = 5 %} - -{% assign all_list = '' | split: '' %} - -{% for post in site.posts %} - {% if post.last_modified_at and post.last_modified_at != post.date %} - {% capture elem %} - {{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}} - {% endcapture %} - {% assign all_list = all_list | push: elem %} - {% endif %} -{% endfor %} - -{% assign all_list = all_list | sort | reverse %} - -{% assign update_list = '' | split: '' %} - -{% for entry in all_list limit: MAX_SIZE %} - {% assign update_list = update_list | push: entry %} -{% endfor %} - -{% if update_list.size > 0 %} -
-

{{- site.data.locales[include.lang].panel.lastmod -}}

-
    - {% for item in update_list %} - {% assign index = item | split: '::' | last | plus: 0 %} - {% assign post = site.posts[index] %} - {% assign url = post.url | relative_url %} -
  • - {{ post.title }} -
  • - {% endfor %} -
-
- -{% endif %} diff --git a/_javascript/_copyright b/_javascript/_copyright deleted file mode 100644 index 5fcb83f..0000000 --- a/_javascript/_copyright +++ /dev/null @@ -1 +0,0 @@ -Notebook v<%= pkg.version %> | © 2023 <%= pkg.author %> | <%= pkg.license %> Licensed | <%= pkg.homepage %> diff --git a/_javascript/categories.js b/_javascript/categories.js deleted file mode 100644 index 15d8251..0000000 --- a/_javascript/categories.js +++ /dev/null @@ -1,7 +0,0 @@ -import { basic, initSidebar, initTopbar } from './modules/layouts'; -import { categoryCollapse } from './modules/plugins'; - -basic(); -initSidebar(); -initTopbar(); -categoryCollapse(); diff --git a/_javascript/commons.js b/_javascript/commons.js deleted file mode 100644 index 05a9765..0000000 --- a/_javascript/commons.js +++ /dev/null @@ -1,5 +0,0 @@ -import { basic, initSidebar, initTopbar } from './modules/layouts'; - -basic(); -initSidebar(); -initTopbar(); diff --git a/_javascript/home.js b/_javascript/home.js deleted file mode 100644 index 02948c9..0000000 --- a/_javascript/home.js +++ /dev/null @@ -1,8 +0,0 @@ -import { basic, initSidebar, initTopbar } from './modules/layouts'; -import { initLocaleDatetime, loadImg } from './modules/plugins'; - -basic(); -initSidebar(); -initTopbar(); -initLocaleDatetime(); -loadImg(); diff --git a/_javascript/misc.js b/_javascript/misc.js deleted file mode 100644 index c7a19d6..0000000 --- a/_javascript/misc.js +++ /dev/null @@ -1,7 +0,0 @@ -import { basic, initSidebar, initTopbar } from './modules/layouts'; -import { initLocaleDatetime } from './modules/plugins'; - -basic(); -initSidebar(); -initTopbar(); -initLocaleDatetime(); diff --git a/_javascript/modules/components/back-to-top.js b/_javascript/modules/components/back-to-top.js deleted file mode 100644 index 777a659..0000000 --- a/_javascript/modules/components/back-to-top.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Reference: https://bootsnipp.com/snippets/featured/link-to-top-page - */ - -export function back2top() { - const $window = $(window); - const $btn = $('#back-to-top'); - - $window.on('scroll', () => { - if ($window.scrollTop() > 50) { - $btn.fadeIn(); - } else { - $btn.fadeOut(); - } - }); - - $btn.on('click', () => { - $window.scrollTop(0); - }); -} diff --git a/_javascript/modules/components/category-collapse.js b/_javascript/modules/components/category-collapse.js deleted file mode 100644 index d6027a1..0000000 --- a/_javascript/modules/components/category-collapse.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Tab 'Categories' expand/close effect. - */ -const childPrefix = 'l_'; -const parentPrefix = 'h_'; -const collapse = $('.collapse'); - -export function categoryCollapse() { - /* close up top-category */ - collapse.on('hide.bs.collapse', function () { - /* Bootstrap collapse events. */ const parentId = - parentPrefix + $(this).attr('id').substring(childPrefix.length); - if (parentId) { - $(`#${parentId} .far.fa-folder-open`).attr( - 'class', - 'far fa-folder fa-fw' - ); - $(`#${parentId} i.fas`).addClass('rotate'); - $(`#${parentId}`).removeClass('hide-border-bottom'); - } - }); - - /* expand the top category */ - collapse.on('show.bs.collapse', function () { - const parentId = - parentPrefix + $(this).attr('id').substring(childPrefix.length); - if (parentId) { - $(`#${parentId} .far.fa-folder`).attr( - 'class', - 'far fa-folder-open fa-fw' - ); - $(`#${parentId} i.fas`).removeClass('rotate'); - $(`#${parentId}`).addClass('hide-border-bottom'); - } - }); -} diff --git a/_javascript/modules/components/clipboard.js b/_javascript/modules/components/clipboard.js deleted file mode 100644 index f4634cf..0000000 --- a/_javascript/modules/components/clipboard.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Clipboard functions - * - * Dependencies: - * - popper.js (https://github.com/popperjs/popper-core) - * - clipboard.js (https://github.com/zenorocha/clipboard.js) - */ - -const clipboardSelector = '.code-header>button'; -const ICON_SUCCESS = 'fas fa-check'; -const ATTR_TIMEOUT = 'timeout'; -const ATTR_TITLE_SUCCEED = 'data-title-succeed'; -const ATTR_TITLE_ORIGIN = 'data-bs-original-title'; -const TIMEOUT = 2000; // in milliseconds - -function isLocked(node) { - if ($(node)[0].hasAttribute(ATTR_TIMEOUT)) { - let timeout = $(node).attr(ATTR_TIMEOUT); - if (Number(timeout) > Date.now()) { - return true; - } - } - return false; -} - -function lock(node) { - $(node).attr(ATTR_TIMEOUT, Date.now() + TIMEOUT); -} - -function unlock(node) { - $(node).removeAttr(ATTR_TIMEOUT); -} - -function getIcon(btn) { - let iconNode = $(btn).children(); - return iconNode.attr('class'); -} - -const ICON_DEFAULT = getIcon(clipboardSelector); - -function showTooltip(btn) { - const succeedTitle = $(btn).attr(ATTR_TITLE_SUCCEED); - $(btn).attr(ATTR_TITLE_ORIGIN, succeedTitle).tooltip('show'); -} - -function hideTooltip(btn) { - $(btn).tooltip('hide').removeAttr(ATTR_TITLE_ORIGIN); -} - -function setSuccessIcon(btn) { - let btnNode = $(btn); - let iconNode = btnNode.children(); - iconNode.attr('class', ICON_SUCCESS); -} - -function resumeIcon(btn) { - let btnNode = $(btn); - let iconNode = btnNode.children(); - iconNode.attr('class', ICON_DEFAULT); -} - -export function initClipboard() { - // Initial the clipboard.js object - if ($(clipboardSelector).length) { - const clipboard = new ClipboardJS(clipboardSelector, { - target(trigger) { - let codeBlock = trigger.parentNode.nextElementSibling; - return codeBlock.querySelector('code .rouge-code'); - } - }); - - const clipboardList = document.querySelectorAll(clipboardSelector); - [...clipboardList].map( - (elem) => - new bootstrap.Tooltip(elem, { - placement: 'left' - }) - ); - - clipboard.on('success', (e) => { - e.clearSelection(); - - const trigger = e.trigger; - if (isLocked(trigger)) { - return; - } - - setSuccessIcon(trigger); - showTooltip(trigger); - lock(trigger); - - setTimeout(() => { - hideTooltip(trigger); - resumeIcon(trigger); - unlock(trigger); - }, TIMEOUT); - }); - } - - /* --- Post link sharing --- */ - - const btnCopyLink = $('#copy-link'); - - btnCopyLink.on('click', (e) => { - let target = $(e.target); - - if (isLocked(target)) { - return; - } - - // Copy URL to clipboard - navigator.clipboard.writeText(window.location.href).then(() => { - const defaultTitle = target.attr(ATTR_TITLE_ORIGIN); - const succeedTitle = target.attr(ATTR_TITLE_SUCCEED); - // Switch tooltip title - target.attr(ATTR_TITLE_ORIGIN, succeedTitle).tooltip('show'); - lock(target); - - setTimeout(() => { - target.attr(ATTR_TITLE_ORIGIN, defaultTitle); - unlock(target); - }, TIMEOUT); - }); - }); - - btnCopyLink.on('mouseleave', function (e) { - const target = $(e.target); - target.tooltip('hide'); - console.log('mouse leave...'); - }); -} diff --git a/_javascript/modules/components/img-loading.js b/_javascript/modules/components/img-loading.js deleted file mode 100644 index 07288a8..0000000 --- a/_javascript/modules/components/img-loading.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Setting up image lazy loading and LQIP switching - */ - -const ATTR_DATA_SRC = 'data-src'; -const ATTR_DATA_LQIP = 'data-lqip'; -const C_SHIMMER = 'shimmer'; -const C_BLUR = 'blur'; - -function handleImage() { - const $img = $(this); - - if (this.hasAttribute(ATTR_DATA_LQIP) && this.complete) { - $img.parent().removeClass(C_BLUR); - } else { - $img.parent().removeClass(C_SHIMMER); - } -} - -/* Switch LQIP with real image url */ -function switchLQIP(img) { - // Sometimes loaded from cache without 'data-src' - if (img.hasAttribute(ATTR_DATA_SRC)) { - const $img = $(img); - const dataSrc = $img.attr(ATTR_DATA_SRC); - $img.attr('src', encodeURI(dataSrc)); - } -} - -export function loadImg() { - const $images = $('article img'); - - if ($images.length) { - $images.on('load', handleImage); - } - - /* Images loaded from the browser cache do not trigger the 'load' event */ - $('article img[loading="lazy"]').each(function () { - if (this.complete) { - $(this).parent().removeClass(C_SHIMMER); - } - }); - - const $lqips = $(`article img[${ATTR_DATA_LQIP}="true"]`); - - if ($lqips.length) { - const isHome = $('#post-list').length > 0; - - $lqips.each(function () { - if (isHome) { - // JavaScript runs so fast that LQIPs in home page will never be detected - // Delay 50ms to ensure LQIPs visibility - setTimeout(() => { - switchLQIP(this); - }, 50); - } else { - switchLQIP(this); - } - }); - } -} diff --git a/_javascript/modules/components/img-popup.js b/_javascript/modules/components/img-popup.js deleted file mode 100644 index 7f78d99..0000000 --- a/_javascript/modules/components/img-popup.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Set up image popup - * - * See: https://github.com/dimsemenov/Magnific-Popup - */ - -export function imgPopup() { - if ($('.popup') <= 0) { - return; - } - - $('.popup').magnificPopup({ - type: 'image', - closeOnContentClick: true, - showCloseBtn: false, - zoom: { - enabled: true, - duration: 300, - easing: 'ease-in-out' - } - }); -} diff --git a/_javascript/modules/components/locale-datetime.js b/_javascript/modules/components/locale-datetime.js deleted file mode 100644 index 214f2bf..0000000 --- a/_javascript/modules/components/locale-datetime.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Update month/day to locale datetime - * - * Requirement: - */ - -/* A tool for locale datetime */ -class LocaleHelper { - static get attrTimestamp() { - return 'data-ts'; - } - - static get attrDateFormat() { - return 'data-df'; - } - - static get locale() { - return $('html').attr('lang').substring(0, 2); - } - - static getTimestamp(elem) { - return Number(elem.attr(LocaleHelper.attrTimestamp)); // unix timestamp - } - - static getDateFormat(elem) { - return elem.attr(LocaleHelper.attrDateFormat); - } -} - -export function initLocaleDatetime() { - dayjs.locale(LocaleHelper.locale); - dayjs.extend(window.dayjs_plugin_localizedFormat); - - $(`[${LocaleHelper.attrTimestamp}]`).each(function () { - const date = dayjs.unix(LocaleHelper.getTimestamp($(this))); - const text = date.format(LocaleHelper.getDateFormat($(this))); - $(this).text(text); - $(this).removeAttr(LocaleHelper.attrTimestamp); - $(this).removeAttr(LocaleHelper.attrDateFormat); - - // setup tooltips - const tooltip = $(this).attr('data-bs-toggle'); - if (typeof tooltip === 'undefined' || tooltip !== 'tooltip') { - return; - } - - const tooltipText = date.format('llll'); // see: https://day.js.org/docs/en/display/format#list-of-localized-formats - $(this).attr('data-bs-title', tooltipText); - new bootstrap.Tooltip($(this)); - }); -} diff --git a/_javascript/modules/components/mode-watcher.js b/_javascript/modules/components/mode-watcher.js deleted file mode 100644 index 7b2298a..0000000 --- a/_javascript/modules/components/mode-watcher.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Add listener for theme mode toggle - */ -const $toggleElem = $('.mode-toggle'); - -export function modeWatcher() { - if ($toggleElem.length === 0) { - return; - } - - $toggleElem.off().on('click', (e) => { - const $target = $(e.target); - let $btn = - $target.prop('tagName') === 'button'.toUpperCase() - ? $target - : $target.parent(); - - modeToggle.flipMode(); // modeToggle: `_includes/mode-toggle.html` - $btn.trigger('blur'); // remove the clicking outline - }); -} diff --git a/_javascript/modules/components/search-display.js b/_javascript/modules/components/search-display.js deleted file mode 100644 index ad009c2..0000000 --- a/_javascript/modules/components/search-display.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * This script make #search-result-wrapper switch to unloaded or shown automatically. - */ -const $btnSbTrigger = $('#sidebar-trigger'); -const $btnSearchTrigger = $('#search-trigger'); -const $btnCancel = $('#search-cancel'); -const $content = $('#main-wrapper>.container>.row'); -const $topbarTitle = $('#topbar-title'); -const $search = $('search'); -const $resultWrapper = $('#search-result-wrapper'); -const $results = $('#search-results'); -const $input = $('#search-input'); -const $hints = $('#search-hints'); -const $viewport = $('html,body'); - -// class names -const C_LOADED = 'loaded'; -const C_UNLOADED = 'unloaded'; -const C_FOCUS = 'input-focus'; -const C_FLEX = 'd-flex'; - -class ScrollBlocker { - static offset = 0; - static resultVisible = false; - - static on() { - ScrollBlocker.offset = window.scrollY; - $viewport.scrollTop(0); - } - - static off() { - $viewport.scrollTop(ScrollBlocker.offset); - } -} - -/*--- Actions in mobile screens (Sidebar hidden) ---*/ -class MobileSearchBar { - static on() { - $btnSbTrigger.addClass(C_UNLOADED); - $topbarTitle.addClass(C_UNLOADED); - $btnSearchTrigger.addClass(C_UNLOADED); - $search.addClass(C_FLEX); - $btnCancel.addClass(C_LOADED); - } - - static off() { - $btnCancel.removeClass(C_LOADED); - $search.removeClass(C_FLEX); - $btnSbTrigger.removeClass(C_UNLOADED); - $topbarTitle.removeClass(C_UNLOADED); - $btnSearchTrigger.removeClass(C_UNLOADED); - } -} - -class ResultSwitch { - static on() { - if (!ScrollBlocker.resultVisible) { - // the block method must be called before $(#main-wrapper>.container) unloaded. - ScrollBlocker.on(); - $resultWrapper.removeClass(C_UNLOADED); - $content.addClass(C_UNLOADED); - ScrollBlocker.resultVisible = true; - } - } - - static off() { - if (ScrollBlocker.resultVisible) { - $results.empty(); - if ($hints.hasClass(C_UNLOADED)) { - $hints.removeClass(C_UNLOADED); - } - $resultWrapper.addClass(C_UNLOADED); - $content.removeClass(C_UNLOADED); - - // now the release method must be called after $(#main-wrapper>.container) display - ScrollBlocker.off(); - - $input.val(''); - ScrollBlocker.resultVisible = false; - } - } -} - -function isMobileView() { - return $btnCancel.hasClass(C_LOADED); -} - -export function displaySearch() { - $btnSearchTrigger.on('click', function () { - MobileSearchBar.on(); - ResultSwitch.on(); - $input.trigger('focus'); - }); - - $btnCancel.on('click', function () { - MobileSearchBar.off(); - ResultSwitch.off(); - }); - - $input.on('focus', function () { - $search.addClass(C_FOCUS); - }); - - $input.on('focusout', function () { - $search.removeClass(C_FOCUS); - }); - - $input.on('input', () => { - if ($input.val() === '') { - if (isMobileView()) { - $hints.removeClass(C_UNLOADED); - } else { - ResultSwitch.off(); - } - } else { - ResultSwitch.on(); - if (isMobileView()) { - $hints.addClass(C_UNLOADED); - } - } - }); -} diff --git a/_javascript/modules/components/sidebar.js b/_javascript/modules/components/sidebar.js deleted file mode 100644 index 9d8567e..0000000 --- a/_javascript/modules/components/sidebar.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Expand or close the sidebar in mobile screens. - */ - -const $body = $('body'); -const ATTR_DISPLAY = 'sidebar-display'; - -class SidebarUtil { - static isExpanded = false; - - static toggle() { - if (SidebarUtil.isExpanded === false) { - $body.attr(ATTR_DISPLAY, ''); - } else { - $body.removeAttr(ATTR_DISPLAY); - } - - SidebarUtil.isExpanded = !SidebarUtil.isExpanded; - } -} - -export function sidebarExpand() { - $('#sidebar-trigger').on('click', SidebarUtil.toggle); - $('#mask').on('click', SidebarUtil.toggle); -} diff --git a/_javascript/modules/components/toc.js b/_javascript/modules/components/toc.js deleted file mode 100644 index bfb0c00..0000000 --- a/_javascript/modules/components/toc.js +++ /dev/null @@ -1,13 +0,0 @@ -export function toc() { - if (document.querySelector('main h2')) { - // see: https://github.com/tscanlin/tocbot#usage - tocbot.init({ - tocSelector: '#toc', - contentSelector: '.content', - ignoreSelector: '[data-toc-skip]', - headingSelector: 'h2, h3, h4', - orderedList: false, - scrollSmooth: false - }); - } -} diff --git a/_javascript/modules/components/tooltip-loader.js b/_javascript/modules/components/tooltip-loader.js deleted file mode 100644 index a906600..0000000 --- a/_javascript/modules/components/tooltip-loader.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Initial Bootstrap Tooltip. - */ -export function loadTooptip() { - const tooltipTriggerList = document.querySelectorAll( - '[data-bs-toggle="tooltip"]' - ); - - [...tooltipTriggerList].map( - (tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl) - ); -} diff --git a/_javascript/modules/layouts.js b/_javascript/modules/layouts.js deleted file mode 100644 index 28f7962..0000000 --- a/_javascript/modules/layouts.js +++ /dev/null @@ -1,3 +0,0 @@ -export { basic } from './layouts/basic'; -export { initSidebar } from './layouts/sidebar'; -export { initTopbar } from './layouts/topbar'; diff --git a/_javascript/modules/layouts/basic.js b/_javascript/modules/layouts/basic.js deleted file mode 100644 index fb36a8b..0000000 --- a/_javascript/modules/layouts/basic.js +++ /dev/null @@ -1,7 +0,0 @@ -import { back2top } from '../components/back-to-top'; -import { loadTooptip } from '../components/tooltip-loader'; - -export function basic() { - back2top(); - loadTooptip(); -} diff --git a/_javascript/modules/layouts/sidebar.js b/_javascript/modules/layouts/sidebar.js deleted file mode 100644 index 8795693..0000000 --- a/_javascript/modules/layouts/sidebar.js +++ /dev/null @@ -1,7 +0,0 @@ -import { modeWatcher } from '../components/mode-watcher'; -import { sidebarExpand } from '../components/sidebar'; - -export function initSidebar() { - modeWatcher(); - sidebarExpand(); -} diff --git a/_javascript/modules/layouts/topbar.js b/_javascript/modules/layouts/topbar.js deleted file mode 100644 index cfcd0ed..0000000 --- a/_javascript/modules/layouts/topbar.js +++ /dev/null @@ -1,5 +0,0 @@ -import { displaySearch } from '../components/search-display'; - -export function initTopbar() { - displaySearch(); -} diff --git a/_javascript/modules/plugins.js b/_javascript/modules/plugins.js deleted file mode 100644 index fb892e2..0000000 --- a/_javascript/modules/plugins.js +++ /dev/null @@ -1,6 +0,0 @@ -export { categoryCollapse } from './components/category-collapse'; -export { initClipboard } from './components/clipboard'; -export { loadImg } from './components/img-loading'; -export { imgPopup } from './components/img-popup'; -export { initLocaleDatetime } from './components/locale-datetime'; -export { toc } from './components/toc'; diff --git a/_javascript/page.js b/_javascript/page.js deleted file mode 100644 index f13bd2f..0000000 --- a/_javascript/page.js +++ /dev/null @@ -1,9 +0,0 @@ -import { basic, initSidebar, initTopbar } from './modules/layouts'; -import { loadImg, imgPopup, initClipboard } from './modules/plugins'; - -basic(); -initSidebar(); -initTopbar(); -loadImg(); -imgPopup(); -initClipboard(); diff --git a/_javascript/post.js b/_javascript/post.js deleted file mode 100644 index 86ea32b..0000000 --- a/_javascript/post.js +++ /dev/null @@ -1,17 +0,0 @@ -import { basic, initSidebar, initTopbar } from './modules/layouts'; -import { - loadImg, - imgPopup, - initLocaleDatetime, - initClipboard, - toc -} from './modules/plugins'; - -initSidebar(); -initTopbar(); -loadImg(); -imgPopup(); -initLocaleDatetime(); -initClipboard(); -toc(); -basic(); diff --git a/_layouts/archives.html b/_layouts/archives.html deleted file mode 100644 index 4f7ad7d..0000000 --- a/_layouts/archives.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -layout: page -# The Archives of posts. ---- - -{% include lang.html %} - -{% assign df_strftime_m = site.data.locales[lang].df.archives.strftime | default: '/ %m' %} -{% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %} - -
- {% for post in site.posts %} - {% assign cur_year = post.date | date: '%Y' %} - - {% if cur_year != last_year %} - {% unless forloop.first %}{% endunless %} - - - {{ '
    ' }} - - {% assign last_year = cur_year %} - {% endif %} - -
  • - {% assign ts = post.date | date: '%s' %} - {{ post.date | date: '%d' }} - - {{ post.date | date: df_strftime_m }} - - {{ post.title }} -
  • - - {% if forloop.last %}
{% endif %} - {% endfor %} -
diff --git a/_layouts/categories.html b/_layouts/categories.html deleted file mode 100644 index 0515097..0000000 --- a/_layouts/categories.html +++ /dev/null @@ -1,138 +0,0 @@ ---- -layout: page -# All the Categories of posts ---- - -{% include lang.html %} - -{% assign HEAD_PREFIX = 'h_' %} -{% assign LIST_PREFIX = 'l_' %} - -{% assign group_index = 0 %} - -{% assign sort_categories = site.categories | sort %} - -{% for category in sort_categories %} - {% assign category_name = category | first %} - {% assign posts_of_category = category | last %} - {% assign first_post = posts_of_category | first %} - - {% if category_name == first_post.categories[0] %} - {% assign sub_categories = '' | split: '' %} - - {% for post in posts_of_category %} - {% assign second_category = post.categories[1] %} - {% if second_category %} - {% unless sub_categories contains second_category %} - {% assign sub_categories = sub_categories | push: second_category %} - {% endunless %} - {% endif %} - {% endfor %} - - {% assign sub_categories = sub_categories | sort %} - {% assign sub_categories_size = sub_categories | size %} - -
- -
- - - - {% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %} - {{ category_name }} - - - {% assign top_posts_size = site.categories[category_name] | size %} - - {% if sub_categories_size > 0 %} - {{ sub_categories_size }} - {% if sub_categories_size > 1 %} - {{ - site.data.locales[lang].categories.category_measure.plural - | default: site.data.locales[lang].categories.category_measure - }} - {% else %} - {{ - site.data.locales[lang].categories.category_measure.singular - | default: site.data.locales[lang].categories.category_measure - }} - {% endif -%} - , - {% endif %} - - {{ top_posts_size }} - - {% if top_posts_size > 1 %} - {{ - site.data.locales[lang].categories.post_measure.plural - | default: site.data.locales[lang].categories.post_measure - }} - {% else %} - {{ - site.data.locales[lang].categories.post_measure.singular - | default: site.data.locales[lang].categories.post_measure - }} - {% endif %} - - - - - {% if sub_categories_size > 0 %} - - - - {% else %} - - - - {% endif %} -
- - - - {% if sub_categories_size > 0 %} -
-
    - {% for sub_category in sub_categories %} -
  • - - - {% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %} - {{ sub_category }} - - {% assign posts_size = site.categories[sub_category] | size %} - - {{ posts_size }} - - {% if posts_size > 1 %} - {{ - site.data.locales[lang].categories.post_measure.plural - | default: site.data.locales[lang].categories.post_measure - }} - {% else %} - {{ - site.data.locales[lang].categories.post_measure.singular - | default: site.data.locales[lang].categories.post_measure - }} - {% endif %} - -
  • - {% endfor %} -
-
- {% endif %} -
- - - {% assign group_index = group_index | plus: 1 %} - {% endif %} -{% endfor %} diff --git a/_layouts/category.html b/_layouts/category.html deleted file mode 100644 index b064f27..0000000 --- a/_layouts/category.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -layout: page -# The Category layout ---- - -{% include lang.html %} - -
-

- - {{ page.title }} - {{ page.posts | size }} -

- -
    - {% for post in page.posts %} -
  • - {{ post.title }} - - {% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %} -
  • - {% endfor %} -
-
diff --git a/_layouts/compress.html b/_layouts/compress.html deleted file mode 100644 index bb34487..0000000 --- a/_layouts/compress.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -# Jekyll layout that compresses HTML -# v3.1.0 -# http://jch.penibelst.de/ -# © 2014–2015 Anatol Broder -# MIT License ---- - -{% capture _LINE_FEED %} -{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "
" %}{% endif %}{% unless _pre_before contains "
" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " ;; ;" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %}
Step Bytes
raw {{ content | size }}{% if _profile_endings %}
endings {{ _profile_endings }}{% endif %}{% if _profile_startings %}
startings {{ _profile_startings }}{% endif %}{% if _profile_comments %}
comments {{ _profile_comments }}{% endif %}{% if _profile_collapse %}
collapse {{ _profile_collapse }}{% endif %}{% if _profile_clippings %}
clippings {{ _profile_clippings }}{% endif %}
{% endif %}{% endif %} diff --git a/_layouts/default.html b/_layouts/default.html deleted file mode 100644 index 9f83e81..0000000 --- a/_layouts/default.html +++ /dev/null @@ -1,94 +0,0 @@ ---- -layout: compress ---- - - - -{% include origin-type.html %} - -{% include lang.html %} - -{% capture prefer_mode %} - {% if site.theme_mode %} - data-mode="{{ site.theme_mode }}" - {% endif %} -{% endcapture %} - -{% if layout.tail_includes %} - {% assign has_tail = true %} -{% endif %} - - - - {% include head.html %} - - - {% include sidebar.html lang=lang %} - -
-
- {% include topbar.html lang=lang %} - -
-
- {{ content }} -
- - - -
- -
- -
- {% if has_tail %} - {% for _include in layout.tail_includes %} - {% assign _include_path = _include | append: '.html' %} - {% include {{ _include_path }} lang=lang %} - {% endfor %} - {% endif %} - - {% include_cached footer.html lang=lang %} -
-
- - {% include_cached search-results.html lang=lang %} -
- - -
- -
- - {% if site.pwa.enabled %} - {% include_cached notification.html lang=lang %} - {% endif %} - - - - {% include js-selector.html %} - - {% if page.mermaid %} - {% include mermaid.html %} - {% endif %} - - {% include_cached search-loader.html %} - - diff --git a/_layouts/home.html b/_layouts/home.html deleted file mode 100644 index b5b6f7f..0000000 --- a/_layouts/home.html +++ /dev/null @@ -1,115 +0,0 @@ ---- -layout: default ---- - -{% include lang.html %} - -{% assign pinned = site.posts | where: 'pin', 'true' %} -{% assign default = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %} - -{% assign posts = '' | split: '' %} - - - -{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %} -{% assign pinned_num = pinned.size | minus: offset %} - -{% if pinned_num > 0 %} - {% for i in (offset..pinned.size) limit: pinned_num %} - {% assign posts = posts | push: pinned[i] %} - {% endfor %} -{% else %} - {% assign pinned_num = 0 %} -{% endif %} - - - -{% assign default_beg = offset | minus: pinned.size %} - -{% if default_beg < 0 %} - {% assign default_beg = 0 %} -{% endif %} - -{% assign default_num = paginator.posts | size | minus: pinned_num %} -{% assign default_end = default_beg | plus: default_num | minus: 1 %} - -{% if default_num > 0 %} - {% for i in (default_beg..default_end) %} - {% assign posts = posts | push: default[i] %} - {% endfor %} -{% endif %} - -{% capture _content %} -
- {% for post in posts %} -
- - {% assign card_body_col = '12' %} - - {% if post.image %} - {% assign src = post.image.path | default: post.image %} - {% unless src contains '//' %} - {% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %} - {% endunless %} - - {% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %} - -
- {{ alt }} -
- - {% assign card_body_col = '7' %} - {% endif %} - -
-
-

{{ post.title }}

- -
-

- {% include no-linenos.html content=post.content %} - {{ content | markdownify | strip_html | truncate: 200 | escape }} -

-
- - - -
- -
-
-
- {% endfor %} -
- -{% endcapture %} - -{% include refactor-content.html content=_content lang=lang %} - -{% if paginator.total_pages > 1 %} - {% include post-paginator.html %} -{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html deleted file mode 100644 index cd04bdc..0000000 --- a/_layouts/page.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -layout: default ---- - -{% include lang.html %} - -{% capture _content %} - {% if layout.refactor or page.layout == 'page' %} - {% include refactor-content.html content=content lang=lang %} - {% else %} - {{ content }} - {% endif %} -{% endcapture %} - -
- {% if page.layout == 'page' or page.collection == 'tabs' %} - {% assign tab_key = page.title | downcase %} - {% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %} -

- {{ title }} -

-
- {{ _content }} -
- {% else %} - {{ _content }} - {% endif %} -
diff --git a/_layouts/post.html b/_layouts/post.html deleted file mode 100644 index 0b99d49..0000000 --- a/_layouts/post.html +++ /dev/null @@ -1,135 +0,0 @@ ---- -layout: page -refactor: true -panel_includes: - - toc -tail_includes: - - related-posts - - post-nav - - comments ---- - -{% include lang.html %} - -
-

{{ page.title }}

- - - -
- -
- {{ content }} -
- -
- - {% if page.categories.size > 0 %} - - {% endif %} - - - {% if page.tags.size > 0 %} - - {% endif %} - -
-
- {% if site.data.locales[lang].copyright.license.template %} - {% capture _replacement %} - - {{ site.data.locales[lang].copyright.license.name }} - - {% endcapture %} - - {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }} - {% endif %} -
- - {% include post-sharing.html lang=lang %} -
- -
- diff --git a/_layouts/tag.html b/_layouts/tag.html deleted file mode 100644 index d766d09..0000000 --- a/_layouts/tag.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -layout: page -# The layout for Tag page ---- - -{% include lang.html %} - -
-

- - {{ page.title }} - {{ page.posts | size }} -

-
    - {% for post in page.posts %} -
  • - {{ post.title }} - - {% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %} -
  • - {% endfor %} -
-
diff --git a/_layouts/tags.html b/_layouts/tags.html deleted file mode 100644 index 7800ca0..0000000 --- a/_layouts/tags.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: page -# All the Tags of posts. ---- - -
- {% assign tags = '' | split: '' %} - {% for t in site.tags %} - {% assign tags = tags | push: t[0] %} - {% endfor %} - - {% assign sorted_tags = tags | sort_natural %} - - {% for t in sorted_tags %} - - {% endfor %} -
diff --git a/_posts/2023-09-21-welcome-page.md b/_posts/2023-09-21-welcome-page.md index a5558a7..0698440 100644 --- a/_posts/2023-09-21-welcome-page.md +++ b/_posts/2023-09-21-welcome-page.md @@ -4,7 +4,7 @@ date: 2023-09-21 20:34:00 +0530 categories: [Welcome, Guide] tags: [introduction] author: shamith_watchdogs -img_path: "/assets/img/welcome-page/" +media_subpath: "/assets/img/welcome-page" image: path: "welcome-img.jpg" alt: "Welcome Page" diff --git a/_posts/2023-09-27-contribute-to-notebook.md b/_posts/2023-09-27-contribute-to-notebook.md index 9ca4f18..6319b43 100644 --- a/_posts/2023-09-27-contribute-to-notebook.md +++ b/_posts/2023-09-27-contribute-to-notebook.md @@ -3,7 +3,7 @@ title: Contribute to Notebook date: 2023-09-27 13:23:00 +0530 categories: [Welcome, Tutorial] tags: [introduction, markdown] -img_path: "/assets/img/contribute-to-notebook" +media_subpath: "/assets/img/contribute-to-notebook" image: path: "page-cover.png" alt: "Contribution Page" @@ -17,113 +17,171 @@ Welcome to the [**Notebook**](https://github.com/Grow-with-Open-Source/Notebook ### Setting up Environment -It's highly suggest to use any Linux distro _(Ubuntu: highly recommended)_ compared to Windows. Most of the cases, you won't face any issues while building the project within your local system if you follow the instruction below properly. But if you're facing any issue, you can post them within the repo discussion [Help Request](https://github.com/Grow-with-Open-Source/Notebook/discussions/3 "Goto Help Request Discussion")... +Let's start by setting up the project within your local system. Most of the cases, you won't face any issues while building the project within your local system if you follow the instruction below properly. But if you're facing any issue, you can post them within the repo discussion [Help Request](https://github.com/Grow-with-Open-Source/Notebook/discussions/3 "Goto Help Request Discussion")... -#### For Ubuntu: +#### Using Dev Container -If you're using a Linux distribution - **Ubuntu**, follow these steps: +This approach is platform independent as it uses Docker to create the isolated development environment within dev container. You can use it Windows, Linux and MacOS system with ease. Let's start from scratch, shall we ???... -- Install `Ruby` and other prerequisites: +- Start by downloading and Installing [Docker Desktop](https://www.docker.com/products/docker-desktop/ "go download docker desktop") on your system. +- Then download and install [VS Code](https://code.visualstudio.com/ "go download vs code"). +- Within your VS Code, Install [Dev Container extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers "go install dev-container extension") from the extensions tab. + +Well that's it... You got the all the things are ready and all you gotta do is reopen the project file by clicking Reopen in container, just as shown below... + +![Dev Container Demo](../dev-container-demo.gif) + +Dev container does all the heavy lifting for you and creates a container and setup the required environment for you. Now, you can write your blog within this dev container and then commit and push your changes though the shell of the container. + +> If you're doing this for the first time, it might take a while depending on your system specs. + {: .prompt-tip } + +#### For Windows: + +Coming to windows-based system, it highly recommended to use [Dev Container](#using-dev-container) approach as it simplifies the complex installation and dependencies handling. But if you wish to go for a native installation, You can find it in the below disclosed details below. + +
+Native Installation (Not Recommended) + +

So you want to do things in a hard way. It's not like we're hear to judge you, but all we got to say is that "THIS 👇" is one heck of a process you have to go through. Can't you just stick to Dev Container ???...

+ +

Anyways, Here's how you can setup the required environment thought native installation in Windows...

+ +
    +
  • Start by downloading and installing the Ruby using Ruby Installer, and choose the latest one with Devkit with default options.
  • +
  • Run ridk install on command prompt, If the installer doesn't prompt you the following image at the end of the installation...
  • + prompt-img +
  • Go ahead and select MSYS2 and MINGW development toolchain option by pressing 3 + Enter
  • +
  • Open a new command prompt window from the start menu, Use the following command to check whether Ruby has been properly installed and its PATH has been set properly.
  • +
    + +
    +
    +
    1
    +
    ruby -v
    +
    +
  • Now use the following command to install Jekyll and Bundler:
  • +
    +
    + +
    +
    +
    1
    +
    gem install jekyll bundler jekyll-theme-chirpy
    +
    +
    +
  • Now, your system is ready to build and use the project locally.
  • +
+
+

You can checkout Jekyll Docs for more details regarding installation.

+
+
+ +#### For Unix-based Systems: + +For Unix-based systems, it's **recommended** to go for **native installation** but you can do for [Dev Container](#using-dev-container "go back to dev-containers") if you want some application-level isolation. Now that's out of our way, let's take a took at the installation process... + +- Installing Jekyll framework with required dependcies based on your system/distro from [Jekyll official docs](https://jekyllrb.com/docs/installation/ "goto jekyll docs"). +- And that's it... you're done, you got required environment for running project. + +Just so that we get a glimpse of a native installation, let's take a look how we do things in unix-based system by taking **Ubuntu** _(most popular distro used from beginners to general-purpose user and power users)_. + +- Starting up by updating your system file using, +```bash +sudo apt update -y && sudo apt upgrade -y +``` + +- Now it's time for `ruby` and other core dependencies, ```bash -sudo apt-get install ruby-full build-essential zlib1g-dev -y +sudo apt -y install ruby-full build-essential zlib1g-dev ``` -> Avoid installing RubyGems packages (called gems) as the root user. Instead, set up a gem installation directory for your user account. The following commands will add environment variables to your `~/.bashrc`{: .file-path} file to configure the gem installation path: +- Now that we've got our core dependencies, let's add environment variables, ```bash echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc -source ~/.bashrc ``` -{: .prompt-info} -- Use the following command, to check whether `Ruby` has properly installed and its PATH has been set properly. -```bash -ruby -v -``` +> Note that as it's not recommended to install or set environmental variable on `root` level and keep things `user` level, atleast as recommended by [official docs](https://jekyllrb.com/docs/installation/ "goto jekyll docs"). But if you still want to do, just make sure you know what you're doing. +{: .prompt-info} -- Finally, install Jekyll and Bundler: +- Now, let's source the `~/.bashrc`{: .file-path} to access the environmental variable within the current session. ```bash -gem install jekyll bundler +source ~/.bashrc ``` -> For Other Linux Distros, check the offical Jekyll webpage[^other-linux-distros-installation]. Also make sure, you have installed `bundler` along with jekyll using the follow command: +- Now that we have installed dependecies and configured all the environmental varible, let's test if `ruby` is installed properly or not... ```bash -gem install bundler +ruby -v ``` -{: .prompt-tip} -- Use the following command to check whether the `bundler` and jekyll framework installed properly or not. +- Finish up the installation by installing required dependecies for the project, ```bash -bundle info --path jekyll-theme-chirpy +gem install jekyll bundler jekyll-theme-chirpy ``` -#### For Windows: - -For Windows users, setting up the environment is a bit more involved: - -- Start by downloading and installing the the `Ruby` using [RubyInstaller](https://rubyinstaller.org/downloads/ "Download RubyInstaller"), choose the the latest one with Devkit with default options. - -- At the end of installation, You'll get CMD asking you to enter option between 1-3. Enter 3 as input, then you can enter 2 if you want to update `MYSYS2` but that's totally optional. After all the installation is done, press enter to close the CMD prompt. -![prompt-img](cmd-prompt-img.png) +- And it's done, now you have the required environment to run the project. -- Use the following command, to check whether `Ruby` has properly installed and its PATH has been set properly. -```powershell -ruby -v -``` +#### For MacOS: -- Open a new command prompt window from the start menu and install Jekyll and Bundler: -```powershell -gem install jekyll bundler -``` +Coming to MacOs-based system, it kinda similar situtation with [Unix-based system](#for-unix-based-systems "goto unix-based system section") 'cause it's one of the offspring of Unix-based system. Anyways, all I was trying to say is that you can either with **native installation** _(which is recommended)_ or [Dev Container](#using-dev-container "go back to dev-containers") _(another fairly good option)_. And if you want to proceed with native installation, here's how you can do it... -- Use the following command to check whether the `bundler` and jekyll framework installed properly or not. +- Make sure you have [Homebrew](https://brew.sh/ "Install Homebrew") package manager installed. If not you can install using, ```bash -bundle info --path jekyll-theme-chirpy +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -#### For MacOS: - -If you're on MacOS, follow these steps: - -> Ensure you have the [Homebrew](https://brew.sh/ "Install Homebrew") package manager installed. If you're facing any issues while setting up the project in MacOS, check out the [Trobleshooting post](https://github.com/Grow-with-Open-Source/Notebook/discussions/3#discussioncomment-7151280) within the [Help Request](https://github.com/Grow-with-Open-Source/Notebook/discussions/3 "Goto Help Request Discussion") discussion. -{: .prompt-warning} +> If you're facing any issues while setting up the project in MacOS, check out the [Trobleshooting post](https://github.com/Grow-with-Open-Source/Notebook/discussions/3#discussioncomment-7151280) within the [Help Request](https://github.com/Grow-with-Open-Source/Notebook/discussions/3 "Goto Help Request Discussion") discussion. +{: .prompt-info} -- Install `chruby` and `ruby-install` with Homebrew: -```bash -brew install chruby ruby-install xz +- Now we're going install `chruby` as version manager to install and manager various version of `ruby` +```zsh +brew install chruby ruby-install ``` -- Install the latest stable version of Ruby _(supported by Jekyll[^jekyll-offical-website])_: -```bash -ruby-install ruby 3.1.3 +- Let's go ahead and install `ruby` version 3.4.1 which is recommended by [official docs](https://jekyllrb.com/docs/installation/macos/ "open jekyll docs"). +```zsh +ruby-install ruby 3.4.1 ``` -- This will take a few minutes, and once it’s done, configure your shell to automatically use chruby: -```bash +- Now that's done, let's configure the shell for `chruby` to work as expected. +```zsh echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc -echo "chruby ruby-3.1.3" >> ~/.zshrc # run 'chruby' to see actual version +echo "chruby ruby-3.4.1" >> ~/.zshrc # run 'chruby' to see actual version ``` -> If you’re using Bash, replace `.zshrc` with `.bash_profile`. If you’re not sure, read this external guide to [find out which shell you’re using](https://www.moncefbelyamani.com/which-shell-am-i-using-how-can-i-switch/ "find you shell"). +> If you’re using Bash, replace `.zshrc` with `.bashrc` or `.bash_profile` . If you’re not sure, read this external guide to [find out which shell you’re using](https://www.moncefbelyamani.com/which-shell-am-i-using-how-can-i-switch/ "find you shell"). {: .prompt-info} -- Quit and relaunch Terminal, then check that everything is working: -```bash -ruby -v +- Now that we have configured `chruby`, let's make sure the changes are updated within our current session, +```zsh +source ~/.zshrc +# +# If your default shell is bash, then use the following +# +# source ~/.bashrc +# +# (or) +# +# source ~/.bash_profile +# +# depending on where you have configured ``` -- After installing Ruby with chruby, install the latest Jekyll & bundler gem: -```bash -gem install bundler jekyll +- Time for testing !!!... Let's see if `ruby` is installed properly or not, +```zsh +ruby -v ``` -- Use the following command to check whether the `bundler` and jekyll framework installed properly or not. -```bash -bundle info --path jekyll-theme-chirpy +- Finally, let's install the core dependencies for the project... +```zsh +gem install jekyll bundler jekyll-theme-chirpy ``` +- Now you're ready to use the project... + ### **Building the Project** After setting up the environment, you can start contributing to the project: @@ -132,10 +190,10 @@ After setting up the environment, you can start contributing to the project: - Clone the forked repository to your local machine. ```bash - #cloning the repo + # cloning the repo git clone https://github.com//Notebook.git - #entering the project directory + # entering the project directory cd Notebook ``` @@ -180,7 +238,7 @@ unique_key_value: ```yaml shamith_watchdogs: name: Shamith Nakka - twitter: Shamith29188225 + twitter: shamith_nakka url: https://github.com/iamwatchdogs/ ``` {: .prompt-tip file='_data/authors.yml'} @@ -195,7 +253,7 @@ shamith_watchdogs: categories: [, , ..., ] tags: [, ..., ] author: - img_path: "/assets/img//" + media_subpath: "/assets/img//" image: path: alt: @@ -212,7 +270,7 @@ date: 2023-09-21 20:34:00 +0530 categories: [Welcome, Guide] tags: [introduction] author: shamith_watchdogs -img_path: "/assets/img/welcome-page/" +media_subpath: "/assets/img/welcome-page/" image: path: "welcome-img.jpg" alt: "Welcome Page" diff --git a/_posts/2024-10-22-introduction-to-github-actions.md b/_posts/2024-10-22-introduction-to-github-actions.md index f74ee72..3b958fb 100644 --- a/_posts/2024-10-22-introduction-to-github-actions.md +++ b/_posts/2024-10-22-introduction-to-github-actions.md @@ -4,7 +4,7 @@ date: 2024-10-22 02:08:00 +0530 categories: [DevOps, GitHub-Actions] tags: [github, github-action, devops, ci-cd, automation, beginner] author: shamith_watchdogs -img_path: "/assets/img/intro-to-github-actions/" +media_subpath: "/assets/img/intro-to-github-actions" image: path: "github-action.jpg" alt: "GitHub Actions" diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss deleted file mode 100644 index 3e6901a..0000000 --- a/_sass/addon/commons.scss +++ /dev/null @@ -1,1541 +0,0 @@ -/* - The common styles -*/ - -html { - @media (prefers-color-scheme: light) { - &:not([data-mode]), - &[data-mode='light'] { - @include light-scheme; - } - - &[data-mode='dark'] { - @include dark-scheme; - } - } - - @media (prefers-color-scheme: dark) { - &:not([data-mode]), - &[data-mode='dark'] { - @include dark-scheme; - } - - &[data-mode='light'] { - @include light-scheme; - } - } - - & { - font-size: 16px; - } -} - -body { - background: var(--main-bg); - padding: env(safe-area-inset-top) env(safe-area-inset-right) - env(safe-area-inset-bottom) env(safe-area-inset-left); - color: var(--text-color); - -webkit-font-smoothing: antialiased; - font-family: $font-family-base; -} - -/* --- Typography --- */ - -@for $i from 1 through 5 { - h#{$i} { - @extend %heading; - - @if $i > 1 { - @extend %section; - @extend %anchor; - } - - @if $i < 5 { - $factor: 0.18rem; - - @if $i == 1 { - $factor: 0.23rem; - } - - font-size: 1rem + (5 - $i) * $factor; - } @else { - font-size: 1rem; - } - } -} - -a { - @extend %link-color; - - text-decoration: none; -} - -img { - max-width: 100%; - height: auto; - transition: all 0.35s ease-in-out; - - .blur & { - $blur: 20px; - - -webkit-filter: blur($blur); - filter: blur($blur); - } -} - -blockquote { - border-left: 5px solid var(--blockquote-border-color); - padding-left: 1rem; - color: var(--blockquote-text-color); - - &[class^='prompt-'] { - border-left: 0; - position: relative; - padding: 1rem 1rem 1rem 3rem; - color: var(--prompt-text-color); - - @extend %rounded; - - &::before { - text-align: center; - width: 3rem; - position: absolute; - left: 0.25rem; - margin-top: 0.4rem; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - } - - > p:last-child { - margin-bottom: 0; - } - } - - @include prompt('tip', '\f0eb', 'regular'); - @include prompt('info', '\f06a'); - @include prompt('warning', '\f06a'); - @include prompt('danger', '\f071'); -} - -kbd { - font-family: inherit; - display: inline-block; - vertical-align: middle; - line-height: 1.3rem; - min-width: 1.75rem; - text-align: center; - margin: 0 0.3rem; - padding-top: 0.1rem; - color: var(--kbd-text-color); - background-color: var(--kbd-bg-color); - border-radius: 0.25rem; - border: solid 1px var(--kbd-wrap-color); - box-shadow: inset 0 -2px 0 var(--kbd-wrap-color); -} - -footer { - font-size: 0.8rem; - background-color: var(--main-bg); - height: $footer-height; - border-top: 1px solid var(--main-border-color); - - @extend %text-color; - - a { - @extend %text-highlight; - - &:hover { - @extend %link-hover; - } - } - - p { - line-height: 1.75; - text-align: center; - margin-bottom: 0; - } -} - -/* fontawesome icons */ -i { - &.far, - &.fas { - @extend %no-cursor; - } -} - -/* --- Panels --- */ - -.access { - top: 2rem; - transition: top 0.2s ease-in-out; - margin-top: 3rem; - margin-bottom: 4rem; - - &:only-child { - position: -webkit-sticky; - position: sticky; - } - - > section { - padding-left: 1rem; - border-left: 1px solid var(--main-border-color); - - &:not(:last-child) { - margin-bottom: 4rem; - } - } - - .content { - font-size: 0.9rem; - } -} - -#panel-wrapper { - /* the headings */ - .panel-heading { - font-family: inherit; - line-height: inherit; - - @include label(inherit); - } - - .post-tag { - line-height: 1.05rem; - font-size: 0.85rem; - border-radius: 0.8rem; - padding: 0.3rem 0.5rem; - margin: 0 0.35rem 0.5rem 0; - - &:hover { - transition: all 0.3s ease-in; - } - } -} - -#access-lastmod { - a { - &:hover { - @extend %link-hover; - } - - @extend %no-bottom-border; - - color: inherit; - } -} - -.footnotes > ol { - padding-left: 2rem; - margin-top: 0.5rem; - - > li { - &:not(:last-child) { - margin-bottom: 0.3rem; - } - - @extend %sup-fn-target; - - > p { - margin-left: 0.25em; - margin-top: 0; - margin-bottom: 0; - } - } -} - -.footnote { - @at-root a#{&} { - @include ml-mr(1px); - @include pl-pr(2px); - - border-bottom-style: none !important; - } -} - -sup { - @extend %sup-fn-target; -} - -.reversefootnote { - @at-root a#{&} { - font-size: 0.6rem; - line-height: 1; - position: relative; - bottom: 0.25em; - margin-left: 0.25em; - border-bottom-style: none !important; - } -} - -/* --- Begin of Markdown table style --- */ - -/* it will be created by Liquid */ -.table-wrapper { - overflow-x: auto; - margin-bottom: 1.5rem; - - > table { - min-width: 100%; - overflow-x: auto; - border-spacing: 0; - - thead { - border-bottom: solid 2px rgba(210, 215, 217, 0.75); - - th { - @extend %table-cell; - } - } - - tbody { - tr { - border-bottom: 1px solid var(--tb-border-color); - - &:nth-child(2n) { - background-color: var(--tb-even-bg); - } - - &:nth-child(2n + 1) { - background-color: var(--tb-odd-bg); - } - - td { - @extend %table-cell; - } - } - } /* tbody */ - } /* table */ -} - -/* --- post --- */ - -.preview-img { - aspect-ratio: 40 / 21; - width: 100%; - height: 100%; - overflow: hidden; - - @extend %rounded; - - &:not(.no-bg) { - img { - background: var(--img-bg); - } - } - - img { - height: 100%; - -o-object-fit: cover; - object-fit: cover; - - @extend %rounded; - } -} - -.post-preview { - @extend %rounded; - - border: 0; - background: var(--card-bg); - box-shadow: var(--card-shadow); - - &::before { - @extend %rounded; - - content: ''; - width: 100%; - height: 100%; - position: absolute; - background-color: var(--card-hovor-bg); - opacity: 0; - transition: opacity 0.35s ease-in-out; - } - - &:hover { - &::before { - opacity: 0.3; - } - } -} - -main { - line-height: 1.75; - - h1 { - margin-top: 2rem; - margin-bottom: 1.5rem; - } - - p { - > a.popup { - &:not(.normal):not(.left):not(.right) { - @include align-center; - } - } - } - - .categories, - #tags, - #archives { - a:not(:hover) { - @extend %no-bottom-border; - } - } -} - -.post-meta { - font-size: 0.85rem; - - a { - &:not([class]):hover { - @extend %link-hover; - } - } - - em { - @extend %normal-font-style; - } -} - -.content { - font-size: 1.08rem; - margin-top: 2rem; - overflow-wrap: break-word; - - a { - &.popup { - @extend %no-cursor; - @extend %img-caption; - @include mt-mb(0.5rem); - - cursor: zoom-in; - } - - &:not(.img-link) { - @extend %link-underline; - - &:hover { - @extend %link-hover; - } - } - } - - ol, - ul { - &:not([class]), - &.task-list { - -webkit-padding-start: 1.75rem; - padding-inline-start: 1.75rem; - - li { - margin: 0.25rem 0; - padding-left: 0.25rem; - } - - ol, - ul { - -webkit-padding-start: 1.25rem; - padding-inline-start: 1.25rem; - margin: 0.5rem 0; - } - } - } - - ul.task-list { - -webkit-padding-start: 1.25rem; - padding-inline-start: 1.25rem; - - li { - list-style-type: none; - padding-left: 0; - - /* checkbox icon */ - > i { - width: 2rem; - margin-left: -1.25rem; - color: var(--checkbox-color); - - &.checked { - color: var(--checkbox-checked-color); - } - } - - ul { - -webkit-padding-start: 1.75rem; - padding-inline-start: 1.75rem; - } - } - - input[type='checkbox'] { - margin: 0 0.5rem 0.2rem -1.3rem; - vertical-align: middle; - } - } /* ul */ - - dl > dd { - margin-left: 1rem; - } - - ::marker { - color: var(--text-muted-color); - } -} /* .content */ - -.tag:hover { - @extend %tag-hover; -} - -.post-tag { - display: inline-block; - min-width: 2rem; - text-align: center; - border-radius: 0.5rem; - border: 1px solid var(--btn-border-color); - padding: 0 0.4rem; - color: var(--text-muted-color); - line-height: 1.3rem; - - &:not(:last-child) { - margin-right: 0.2rem; - } -} - -.rounded-10 { - border-radius: 10px !important; -} - -.img-link { - color: transparent; - display: inline-flex; -} - -.shimmer { - overflow: hidden; - position: relative; - background: var(--img-bg); - - &::before { - content: ''; - position: absolute; - background: var(--shimmer-bg); - height: 100%; - width: 100%; - -webkit-animation: shimmer 1.3s infinite; - animation: shimmer 1.3s infinite; - } - - @-webkit-keyframes shimmer { - 0% { - transform: translateX(-100%); - } - - 100% { - transform: translateX(100%); - } - } - - @keyframes shimmer { - 0% { - transform: translateX(-100%); - } - - 100% { - transform: translateX(100%); - } - } -} - -.embed-video { - width: 100%; - height: 100%; - margin-bottom: 1rem; - - @extend %rounded; - - &.youtube { - aspect-ratio: 16 / 9; - } - - &.twitch { - aspect-ratio: 310 / 189; - } -} - -/* --- buttons --- */ -.btn-lang { - border: 1px solid !important; - padding: 1px 3px; - border-radius: 3px; - color: var(--link-color); - - &:focus { - box-shadow: none; - } -} - -/* --- Effects classes --- */ - -.loaded { - display: block !important; - - @at-root .d-flex#{&} { - display: flex !important; - } -} - -.unloaded { - display: none !important; -} - -.visible { - visibility: visible !important; -} - -.hidden { - visibility: hidden !important; -} - -.flex-grow-1 { - flex-grow: 1 !important; -} - -.btn-box-shadow { - box-shadow: var(--card-shadow); -} - -/* overwrite bootstrap muted */ -.text-muted { - color: var(--text-muted-color) !important; -} - -/* Overwrite bootstrap tooltip */ -.tooltip-inner { - font-size: 0.7rem; - max-width: 220px; - text-align: left; -} - -/* Overwrite bootstrap outline button */ -.btn.btn-outline-primary { - &:not(.disabled):hover { - border-color: #007bff !important; - } -} - -.disabled { - color: rgb(206, 196, 196); - pointer-events: auto; - cursor: not-allowed; -} - -.hide-border-bottom { - border-bottom: none !important; -} - -.input-focus { - box-shadow: none; - border-color: var(--input-focus-border-color) !important; - background: center !important; - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; -} - -.left { - float: left; - margin: 0.75rem 1rem 1rem 0 !important; -} - -.right { - float: right; - margin: 0.75rem 0 1rem 1rem !important; -} - -/* --- Overriding --- */ - -/* magnific-popup */ - -figure .mfp-title { - text-align: center; - padding-right: 0; - margin-top: 0.5rem; -} - -.mfp-img { - transition: none; -} - -/* mermaid */ -.mermaid { - text-align: center; -} - -/* MathJax */ -mjx-container { - overflow-y: hidden; - min-width: auto !important; -} - -/* --- sidebar layout --- */ - -$sidebar-display: 'sidebar-display'; -$btn-border-width: 3px; -$btn-mb: 0.5rem; - -#sidebar { - @include pl-pr(0); - - position: fixed; - top: 0; - left: 0; - height: 100%; - overflow-y: auto; - width: $sidebar-width; - z-index: 99; - background: var(--sidebar-bg); - border-right: 1px solid var(--sidebar-border-color); - - /* Hide scrollbar for Chrome, Safari and Opera */ - &::-webkit-scrollbar { - display: none; - } - - /* Hide scrollbar for IE, Edge and Firefox */ - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ - - %sidebar-link-hover { - &:hover { - color: var(--sidebar-active-color); - } - } - - a { - @extend %sidebar-links; - } - - #avatar { - display: block; - width: 7rem; - height: 7rem; - overflow: hidden; - box-shadow: var(--avatar-border-color) 0 0 0 2px; - transform: translateZ(0); /* fixed the zoom in Safari */ - - img { - transition: transform 0.5s; - - &:hover { - transform: scale(1.2); - } - } - } - - .profile-wrapper { - @include mt-mb(2.5rem); - @extend %clickable-transition; - - padding-left: 2.5rem; - padding-right: 1.25rem; - width: 100%; - } - - .site-title { - font-family: inherit; - font-weight: 900; - font-size: 1.75rem; - line-height: 1.2; - letter-spacing: 0.25px; - margin-top: 1.25rem; - margin-bottom: 0.5rem; - - a { - @extend %clickable-transition; - @extend %sidebar-link-hover; - - color: var(--site-title-color); - } - } - - .site-subtitle { - font-size: 95%; - color: var(--site-subtitle-color); - margin-top: 0.25rem; - word-spacing: 1px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - - ul { - margin-bottom: 2rem; - - li.nav-item { - opacity: 0.9; - width: 100%; - padding-left: 1.5rem; - padding-right: 1.5rem; - - a.nav-link { - @include pt-pb(0.6rem); - - display: flex; - align-items: center; - border-radius: 0.75rem; - font-weight: 600; - - &:hover { - background-color: var(--sidebar-hover-bg); - } - - i { - font-size: 95%; - opacity: 0.8; - margin-right: 1.5rem; - } - - span { - font-size: 90%; - letter-spacing: 0.2px; - } - } - - &.active { - .nav-link { - color: var(--sidebar-active-color); - background-color: var(--sidebar-hover-bg); - - span { - opacity: 1; - } - } - } - - &:not(:first-child) { - margin-top: 0.25rem; - } - } - } - - .sidebar-bottom { - padding-left: 2rem; - padding-right: 1rem; - margin-bottom: 1.5rem; - - %button { - width: 1.75rem; - height: 1.75rem; - margin-bottom: $btn-mb; // multi line gap - border-radius: 50%; - color: var(--sidebar-btn-color); - background-color: var(--sidebar-btn-bg); - text-align: center; - display: flex; - align-items: center; - justify-content: center; - box-shadow: var(--sidebar-border-color) 0 0 0 1px; - - &:hover { - background-color: var(--sidebar-hover-bg); - } - } - - a { - @extend %button; - @extend %sidebar-link-hover; - @extend %clickable-transition; - - &:not(:last-child) { - margin-right: $sb-btn-gap; - } - } - - i { - line-height: 1.75rem; - } - - .mode-toggle { - padding: 0; - border: 0; - - @extend %button; - @extend %sidebar-links; - @extend %sidebar-link-hover; - } - - .icon-border { - @extend %no-cursor; - @include ml-mr(calc(($sb-btn-gap - $btn-border-width) / 2)); - - background-color: var(--sidebar-btn-color); - content: ''; - width: $btn-border-width; - height: $btn-border-width; - border-radius: 50%; - margin-bottom: $btn-mb; - } - } /* .sidebar-bottom */ -} /* #sidebar */ - -@media (hover: hover) { - #sidebar ul > li:last-child::after { - transition: top 0.5s ease; - } - - .nav-link { - transition: background-color 0.3s ease-in-out; - } - - .post-preview { - transition: background-color 0.35s ease-in-out; - } -} - -#search-result-wrapper { - display: none; - height: 100%; - width: 100%; - overflow: auto; - - .content { - margin-top: 2rem; - } -} - -/* --- top-bar --- */ - -#topbar-wrapper { - height: $topbar-height; - background-color: var(--topbar-bg); -} - -#topbar { - button i { - color: #999999; - } - - #breadcrumb { - font-size: 1rem; - color: var(--text-muted-color); - padding-left: 0.5rem; - - a:hover { - @extend %link-hover; - } - - span { - &:not(:last-child) { - &::after { - content: '›'; - padding: 0 0.3rem; - } - } - } - } -} /* #topbar */ - -::-webkit-input-placeholder { - @include placeholder; -} - -::-moz-placeholder { - @include placeholder; -} - -:-ms-input-placeholder { - @include placeholder; -} - -::-ms-input-placeholder { - @include placeholder; -} - -::placeholder { - @include placeholder; -} - -:focus::-webkit-input-placeholder { - @include placeholder-focus; -} - -:focus::-moz-placeholder { - @include placeholder-focus; -} - -:focus:-ms-input-placeholder { - @include placeholder-focus; -} - -:focus::-ms-input-placeholder { - @include placeholder-focus; -} - -:focus::placeholder { - @include placeholder-focus; -} - -search { - display: flex; - width: 100%; - border-radius: 1rem; - border: 1px solid var(--search-border-color); - background: var(--main-bg); - padding: 0 0.5rem; - - i { - z-index: 2; - font-size: 0.9rem; - color: var(--search-icon-color); - } -} - -#sidebar-trigger, -#search-trigger { - display: none; -} - -/* 'Cancel' link */ -#search-cancel { - color: var(--link-color); - display: none; - white-space: nowrap; - - @extend %cursor-pointer; -} - -#search-input { - background: center; - border: 0; - border-radius: 0; - padding: 0.18rem 0.3rem; - color: var(--text-color); - height: auto; - - &:focus { - box-shadow: none; - } -} - -#search-hints { - padding: 0 1rem; - - h4 { - margin-bottom: 1.5rem; - } - - .post-tag { - display: inline-block; - line-height: 1rem; - font-size: 1rem; - background: var(--search-tag-bg); - border: none; - padding: 0.5rem; - margin: 0 1.25rem 1rem 0; - - &::before { - content: '#'; - color: var(--text-muted-color); - padding-right: 0.2rem; - } - - @extend %link-color; - } -} - -#search-results { - padding-bottom: 3rem; - - a { - &:hover { - @extend %link-hover; - } - - @extend %link-color; - @extend %no-bottom-border; - @extend %heading; - - font-size: 1.4rem; - line-height: 2.5rem; - } - - > article { - width: 100%; - - &:not(:last-child) { - margin-bottom: 1rem; - } - - /* icons */ - i { - color: #818182; - margin-right: 0.15rem; - font-size: 80%; - } - - > p { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - } - } -} /* #search-results */ - -#topbar-title { - display: none; - font-size: 1.1rem; - font-weight: 600; - font-family: sans-serif; - color: var(--topbar-text-color); - text-align: center; - width: 70%; - overflow: hidden; - text-overflow: ellipsis; - word-break: keep-all; - white-space: nowrap; -} - -#mask { - display: none; - position: fixed; - inset: 0 0 0 0; - height: 100%; - width: 100%; - z-index: 1; - - @at-root [#{$sidebar-display}] & { - display: block !important; - } -} - -/* --- basic wrappers --- */ - -#main-wrapper { - position: relative; - - @include pl-pr(0); - - > .container { - min-height: 100vh; - } -} - -#topbar-wrapper.row, -#main-wrapper > .container > .row, -#search-result-wrapper > .row { - @include ml-mr(0); -} - -#tail-wrapper { - > :not(script) { - margin-top: 3rem; - } - - > :only-child { - margin-top: 0; - } -} - -/* --- button back-to-top --- */ - -#back-to-top { - display: none; - z-index: 1; - cursor: pointer; - position: fixed; - right: 1rem; - bottom: calc($footer-height-large - $back2top-size / 2); - background: var(--button-bg); - color: var(--btn-backtotop-color); - padding: 0; - width: $back2top-size; - height: $back2top-size; - border-radius: 50%; - border: 1px solid var(--btn-backtotop-border-color); - transition: transform 0.2s ease-out; - -webkit-transition: transform 0.2s ease-out; - - &:hover { - transform: translate3d(0, -5px, 0); - -webkit-transform: translate3d(0, -5px, 0); - } - - i { - line-height: $back2top-size; - position: relative; - bottom: 2px; - } -} - -#notification { - @-webkit-keyframes popup { - from { - opacity: 0; - bottom: 0; - } - } - - @keyframes popup { - from { - opacity: 0; - bottom: 0; - } - } - - .toast-header { - background: none; - border-bottom: none; - color: inherit; - } - - .toast-body { - font-family: Lato, sans-serif; - line-height: 1.25rem; - - button { - font-size: 90%; - min-width: 4rem; - } - } - - &.toast { - &.show { - display: block; - min-width: 20rem; - border-radius: 0.5rem; - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); - background-color: rgba(255, 255, 255, 0.5); - color: #1b1b1eba; - position: fixed; - left: 50%; - bottom: 20%; - transform: translateX(-50%); - -webkit-animation: popup 0.8s; - animation: popup 0.8s; - } - } -} - -/* - Responsive Design: - - {sidebar, content, panel} >= 1200px screen width - {sidebar, content} >= 850px screen width - {content} <= 849px screen width - -*/ - -@media all and (max-width: 576px) { - main { - .content { - > blockquote[class^='prompt-'] { - @include ml-mr(-1rem); - - border-radius: 0; - max-width: none; - } - } - } - - #avatar { - width: 5rem; - height: 5rem; - } -} - -@media all and (max-width: 768px) { - %full-width { - max-width: 100%; - } - - #topbar { - @extend %full-width; - } - - #main-wrapper > .container { - @extend %full-width; - @include pl-pr(0); - } -} - -/* hide sidebar and panel */ -@media all and (max-width: 849px) { - @mixin slide($append: null) { - $basic: transform 0.4s ease; - - @if $append { - transition: $basic, $append; - } @else { - transition: $basic; - } - } - - footer { - @include slide; - - height: $footer-height-large; - padding: 1.5rem 0; - } - - [#{$sidebar-display}] { - #sidebar { - transform: translateX(0); - } - - #main-wrapper { - transform: translateX($sidebar-width); - } - - #back-to-top { - visibility: hidden; - } - } - - #sidebar { - @include slide; - - transform: translateX(-$sidebar-width); /* hide */ - -webkit-transform: translateX(-$sidebar-width); - } - - #main-wrapper { - @include slide; - } - - #topbar, - #main-wrapper > .container { - max-width: 100%; - } - - #search-result-wrapper { - width: 100%; - } - - #breadcrumb, - search { - display: none; - } - - #topbar-wrapper { - @include slide(top 0.2s ease); - - left: 0; - } - - main, - #panel-wrapper { - margin-top: 0; - } - - #topbar-title, - #sidebar-trigger, - #search-trigger { - display: block; - } - - #search-result-wrapper .content { - letter-spacing: 0; - } - - #tags { - justify-content: center !important; - } - - h1.dynamic-title { - display: none; - - ~ .content { - margin-top: 2.5rem; - } - } -} /* max-width: 849px */ - -/* Sidebar is visible */ -@media all and (min-width: 850px) { - /* Solved jumping scrollbar */ - html { - overflow-y: scroll; - } - - #main-wrapper { - margin-left: $sidebar-width; - } - - #sidebar { - .profile-wrapper { - margin-top: 3rem; - } - } - - #search-hints { - display: none; - } - - search { - max-width: $search-max-width; - } - - #search-result-wrapper { - max-width: $main-content-max-width; - justify-content: start !important; - } - - main { - h1 { - margin-top: 3rem; - } - } - - div.content .table-wrapper > table { - min-width: 70%; - } - - /* button 'back-to-Top' position */ - #back-to-top { - right: 5%; - bottom: calc($footer-height - $back2top-size / 2); - } - - #topbar-title { - text-align: left; - } -} - -/* Pad horizontal */ -@media all and (min-width: 992px) and (max-width: 1199px) { - #main-wrapper > .container .col-lg-11 { - flex: 0 0 96%; - max-width: 96%; - } -} - -/* Compact icons in sidebar & panel hidden */ -@media all and (min-width: 850px) and (max-width: 1199px) { - #search-results > div { - max-width: 700px; - } - - #breadcrumb { - width: 65%; - overflow: hidden; - text-overflow: ellipsis; - word-break: keep-all; - white-space: nowrap; - } -} - -/* panel hidden */ -@media all and (max-width: 1199px) { - #panel-wrapper { - display: none; - } - - #main-wrapper > .container > div.row { - justify-content: center !important; - } -} - -/* --- desktop mode, both sidebar and panel are visible --- */ - -@media all and (min-width: 1200px) { - search { - margin-right: 4rem; - } - - #search-input { - transition: all 0.3s ease-in-out; - } - - #search-results > article { - width: 45%; - - &:nth-child(odd) { - margin-right: 1.5rem; - } - - &:nth-child(even) { - margin-left: 1.5rem; - } - - &:last-child:nth-child(odd) { - position: relative; - right: 24.3%; - } - } - - .content { - font-size: 1.03rem; - } -} - -@media all and (min-width: 1400px) { - #back-to-top { - right: calc((100vw - $sidebar-width - 1140px) / 2 + 3rem); - } -} - -@media all and (min-width: 1650px) { - $icon-gap: 1rem; - - #main-wrapper { - margin-left: $sidebar-width-large; - } - - #topbar-wrapper { - left: $sidebar-width-large; - } - - search { - margin-right: calc( - $main-content-max-width / 4 - $search-max-width - 0.75rem - ); - } - - #main-wrapper > .container { - max-width: $main-content-max-width; - padding-left: 1.75rem !important; - padding-right: 1.75rem !important; - } - - main.col-12, - #tail-wrapper { - padding-right: 4.5rem !important; - } - - #back-to-top { - right: calc( - (100vw - $sidebar-width-large - $main-content-max-width) / 2 + 2rem - ); - } - - #sidebar { - width: $sidebar-width-large; - - .profile-wrapper { - margin-top: 3.5rem; - margin-bottom: 2.5rem; - padding-left: 3.5rem; - } - - ul { - li.nav-item { - @include pl-pr(2.75rem); - } - } - - .sidebar-bottom { - padding-left: 2.75rem; - margin-bottom: 1.75rem; - - a:not(:last-child) { - margin-right: $sb-btn-gap-lg; - } - - .icon-border { - @include ml-mr(calc(($sb-btn-gap-lg - $btn-border-width) / 2)); - } - } - } -} /* min-width: 1650px */ diff --git a/_sass/addon/module.scss b/_sass/addon/module.scss deleted file mode 100644 index 9119b3d..0000000 --- a/_sass/addon/module.scss +++ /dev/null @@ -1,192 +0,0 @@ -/* -* Mainly scss modules, only imported to `assets/css/main.scss` -*/ - -/* ---------- scss placeholder --------- */ - -%heading { - color: var(--heading-color); - font-weight: 400; - font-family: $font-family-heading; -} - -%section { - main & { - margin-top: 2.5rem; - margin-bottom: 1.25rem; - - &:focus { - outline: none; /* avoid outline in Safari */ - } - } -} - -%anchor { - .anchor { - font-size: 80%; - } - - @media (hover: hover) { - .anchor { - visibility: hidden; - opacity: 0; - transition: opacity 0.25s ease-in, visibility 0s ease-in 0.25s; - } - - &:hover { - .anchor { - visibility: visible; - opacity: 1; - transition: opacity 0.25s ease-in, visibility 0s ease-in 0s; - } - } - } -} - -%tag-hover { - background: var(--tag-hover); - transition: background 0.35s ease-in-out; -} - -%table-cell { - padding: 0.4rem 1rem; - font-size: 95%; - white-space: nowrap; -} - -%link-hover { - color: #d2603a !important; - border-bottom: 1px solid #d2603a; - text-decoration: none; -} - -%link-color { - color: var(--link-color); -} - -%link-underline { - border-bottom: 1px solid var(--link-underline-color); -} - -%clickable-transition { - transition: all 0.3s ease-in-out; -} - -%no-cursor { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -%no-bottom-border { - border-bottom: none; -} - -%cursor-pointer { - cursor: pointer; -} - -%normal-font-style { - font-style: normal; -} - -%rounded { - border-radius: $base-radius; -} - -%img-caption { - + em { - display: block; - text-align: center; - font-style: normal; - font-size: 80%; - padding: 0; - color: #6d6c6c; - } -} - -%sidebar-links { - color: var(--sidebar-muted-color); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -%text-clip { - display: -webkit-box; - overflow: hidden; - text-overflow: ellipsis; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; -} - -%text-highlight { - color: inherit; - font-weight: 600; -} - -%sup-fn-target { - &:target { - background-color: var(--footnote-target-bg); - width: -moz-fit-content; - width: -webkit-fit-content; - width: fit-content; - transition: background-color 1.75s ease-in-out; - } -} - -/* ---------- scss mixin --------- */ - -@mixin mt-mb($value) { - margin-top: $value; - margin-bottom: $value; -} - -@mixin ml-mr($value) { - margin-left: $value; - margin-right: $value; -} - -@mixin pt-pb($val) { - padding-top: $val; - padding-bottom: $val; -} - -@mixin pl-pr($val) { - padding-left: $val; - padding-right: $val; -} - -@mixin placeholder { - color: var(--text-muted-color) !important; -} - -@mixin placeholder-focus { - opacity: 0.6; -} - -@mixin label($font-size: 1rem, $font-weight: 600, $color: var(--label-color)) { - color: $color; - font-size: $font-size; - font-weight: $font-weight; -} - -@mixin align-center { - position: relative; - left: 50%; - transform: translateX(-50%); -} - -@mixin prompt($type, $fa-content, $fa-style: 'solid') { - &.prompt-#{$type} { - background-color: var(--prompt-#{$type}-bg); - - &::before { - content: $fa-content; - color: var(--prompt-#{$type}-icon-color); - font: var(--fa-font-#{$fa-style}); - } - } -} diff --git a/_sass/addon/syntax.scss b/_sass/addon/syntax.scss deleted file mode 100644 index 68796f2..0000000 --- a/_sass/addon/syntax.scss +++ /dev/null @@ -1,292 +0,0 @@ -/* -* The syntax highlight. -*/ - -@import 'colors/syntax-light'; -@import 'colors/syntax-dark'; - -html { - @media (prefers-color-scheme: light) { - &:not([data-mode]), - &[data-mode='light'] { - @include light-syntax; - } - - &[data-mode='dark'] { - @include dark-syntax; - } - } - - @media (prefers-color-scheme: dark) { - &:not([data-mode]), - &[data-mode='dark'] { - @include dark-syntax; - } - - &[data-mode='light'] { - @include light-syntax; - } - } -} - -/* -- code snippets -- */ - -%code-snippet-bg { - background-color: var(--highlight-bg-color); -} - -%code-snippet-padding { - padding-left: 1rem; - padding-right: 1.5rem; -} - -.highlighter-rouge { - color: var(--highlighter-rouge-color); - margin-top: 0.5rem; - margin-bottom: 1.2em; /* Override BS Inline-code style */ -} - -.highlight { - @extend %rounded; - @extend %code-snippet-bg; - - @at-root figure#{&} { - @extend %code-snippet-bg; - } - - overflow: auto; - padding-bottom: 0.75rem; - - pre { - margin-bottom: 0; - font-size: $code-font-size; - line-height: 1.4rem; - word-wrap: normal; /* Fixed Safari overflow-x */ - } - - table { - td { - &:first-child { - display: inline-block; - margin-left: 1rem; - margin-right: 0.75rem; - } - - &:last-child { - padding-right: 2rem !important; - } - - pre { - overflow: visible; /* Fixed iOS safari overflow-x */ - word-break: normal; /* Fixed iOS safari linenos code break */ - } - } - } - - .lineno { - text-align: right; - color: var(--highlight-lineno-color); - -webkit-user-select: none; - -moz-user-select: none; - -o-user-select: none; - -ms-user-select: none; - user-select: none; - } -} /* .highlight */ - -code { - -webkit-hyphens: none; - -ms-hyphens: none; - hyphens: none; - color: var(--code-color); - - &.highlighter-rouge { - font-size: $code-font-size; - padding: 3px 5px; - word-break: break-word; - border-radius: 4px; - background-color: var(--inline-code-bg); - } - - &.filepath { - background-color: inherit; - color: var(--filepath-text-color); - font-weight: 600; - padding: 0; - } - - a > &.highlighter-rouge { - padding-bottom: 0; /* show link's underlinke */ - color: inherit; - } - - a:hover > &.highlighter-rouge { - border-bottom: none; - } - - blockquote & { - color: inherit; - } -} - -td.rouge-code { - @extend %code-snippet-padding; - - /* - Prevent some browser extends from - changing the URL string of code block. - */ - a { - color: inherit !important; - border-bottom: none !important; - pointer-events: none; - } -} - -div[class^='language-'] { - @extend %rounded; - @extend %code-snippet-bg; - - box-shadow: var(--language-border-color) 0 0 0 1px; - - .content > & { - @include ml-mr(-1rem); - - border-radius: 0; - } - - .highlight { - border-top-left-radius: 0; - border-top-right-radius: 0; - } -} - -/* Hide line numbers for default, console, and terminal code snippets */ -div { - &.nolineno, - &.language-plaintext, - &.language-console, - &.language-terminal { - td:first-child { - padding: 0 !important; - margin-right: 0; - - .lineno { - display: none; - } - } - } -} - -.code-header { - @extend %no-cursor; - - display: flex; - justify-content: space-between; - align-items: center; - height: $code-header-height; - margin-left: 0.75rem; - margin-right: 0.25rem; - - /* the label block */ - span { - line-height: $code-header-height; - - /* label icon */ - i { - font-size: 1rem; - width: $code-icon-width; - color: var(--code-header-icon-color); - - &.small { - font-size: 70%; - } - } - - @at-root [file] #{&} > i { - position: relative; - top: 1px; /* center the file icon */ - } - - /* label text */ - &::after { - content: attr(data-label-text); - font-size: 0.85rem; - font-weight: 600; - color: var(--code-header-text-color); - } - } - - /* clipboard */ - button { - @extend %cursor-pointer; - @extend %rounded; - - border: 1px solid transparent; - height: $code-header-height; - width: $code-header-height; - padding: 0; - background-color: inherit; - - i { - color: var(--code-header-icon-color); - } - - &[timeout] { - &:hover { - border-color: var(--clipboard-checked-color); - } - - i { - color: var(--clipboard-checked-color); - } - } - - &:focus { - outline: none; - } - - &:not([timeout]):hover { - background-color: rgba(128, 128, 128, 0.37); - - i { - color: white; - } - } - } -} - -@media all and (min-width: 576px) { - div[class^='language-'] { - .content > & { - @include ml-mr(0); - - border-radius: $base-radius; - } - - .code-header { - @include ml-mr(0); - - $dot-margin: 1rem; - - &::before { - content: ''; - display: inline-block; - margin-left: $dot-margin; - width: $code-dot-size; - height: $code-dot-size; - border-radius: 50%; - background-color: var(--code-header-muted-color); - box-shadow: ($code-dot-size + $code-dot-gap) 0 0 - var(--code-header-muted-color), - ($code-dot-size + $code-dot-gap) * 2 0 0 - var(--code-header-muted-color); - } - - span { - // center the text of label - margin-left: calc(($dot-margin + $code-dot-size) / 2 * -1); - } - } - } -} diff --git a/_sass/addon/variables.scss b/_sass/addon/variables.scss deleted file mode 100644 index 8924a00..0000000 --- a/_sass/addon/variables.scss +++ /dev/null @@ -1,33 +0,0 @@ -/* - * The SCSS variables - */ - -/* sidebar */ - -$sidebar-width: 260px !default; /* the basic width */ -$sidebar-width-large: 300px !default; /* screen width: >= 1650px */ -$sb-btn-gap: 0.8rem !default; -$sb-btn-gap-lg: 1rem !default; - -/* other framework sizes */ - -$topbar-height: 3rem !default; -$search-max-width: 200px !default; -$footer-height: 5rem !default; -$footer-height-large: 6rem !default; /* screen width: < 850px */ -$main-content-max-width: 1250px !default; -$base-radius: 0.625rem !default; -$back2top-size: 2.75rem !default; - -/* syntax highlight */ - -$code-font-size: 0.85rem !default; -$code-header-height: 2.25rem !default; -$code-dot-size: 0.75rem !default; -$code-dot-gap: 0.5rem !default; -$code-icon-width: 1.75rem !default; - -/* fonts */ - -$font-family-base: 'Source Sans Pro', 'Microsoft Yahei', sans-serif !default; -$font-family-heading: Lato, 'Microsoft Yahei', sans-serif !default; diff --git a/_sass/colors/syntax-dark.scss b/_sass/colors/syntax-dark.scss deleted file mode 100644 index d898c65..0000000 --- a/_sass/colors/syntax-dark.scss +++ /dev/null @@ -1,164 +0,0 @@ -/* - * The syntax dark mode styles. - */ - -@mixin dark-syntax { - --language-border-color: #2d2d2d; - --highlight-bg-color: #151515; - --highlighter-rouge-color: #c9def1; - --highlight-lineno-color: #808080; - --inline-code-bg: #323238; - --code-color: #b0b0b0; - --code-header-text-color: #6a6a6a; - --code-header-muted-color: #353535; - --code-header-icon-color: #565656; - --clipboard-checked-color: #2bcc2b; - --filepath-text-color: #cacaca; - - .highlight .gp { - color: #87939d; - } - - /* --- Syntax highlight theme from `rougify style base16.dark` --- */ - - .highlight table td { - padding: 5px; - } - - .highlight table pre { - margin: 0; - } - - .highlight, - .highlight .w { - color: #d0d0d0; - background-color: #151515; - } - - .highlight .err { - color: #151515; - background-color: #ac4142; - } - - .highlight .c, - .highlight .ch, - .highlight .cd, - .highlight .cm, - .highlight .cpf, - .highlight .c1, - .highlight .cs { - color: #848484; - } - - .highlight .cp { - color: #f4bf75; - } - - .highlight .nt { - color: #f4bf75; - } - - .highlight .o, - .highlight .ow { - color: #d0d0d0; - } - - .highlight .p, - .highlight .pi { - color: #d0d0d0; - } - - .highlight .gi { - color: #90a959; - } - - .highlight .gd { - color: #f08a8b; - background-color: #320000; - } - - .highlight .gh { - color: #6a9fb5; - background-color: #151515; - font-weight: bold; - } - - .highlight .k, - .highlight .kn, - .highlight .kp, - .highlight .kr, - .highlight .kv { - color: #aa759f; - } - - .highlight .kc { - color: #d28445; - } - - .highlight .kt { - color: #d28445; - } - - .highlight .kd { - color: #d28445; - } - - .highlight .s, - .highlight .sb, - .highlight .sc, - .highlight .dl, - .highlight .sd, - .highlight .s2, - .highlight .sh, - .highlight .sx, - .highlight .s1 { - color: #90a959; - } - - .highlight .sa { - color: #aa759f; - } - - .highlight .sr { - color: #75b5aa; - } - - .highlight .si { - color: #b76d45; - } - - .highlight .se { - color: #b76d45; - } - - .highlight .nn { - color: #f4bf75; - } - - .highlight .nc { - color: #f4bf75; - } - - .highlight .no { - color: #f4bf75; - } - - .highlight .na { - color: #6a9fb5; - } - - .highlight .m, - .highlight .mb, - .highlight .mf, - .highlight .mh, - .highlight .mi, - .highlight .il, - .highlight .mo, - .highlight .mx { - color: #90a959; - } - - .highlight .ss { - color: #90a959; - } -} diff --git a/_sass/colors/syntax-light.scss b/_sass/colors/syntax-light.scss deleted file mode 100644 index 6562c76..0000000 --- a/_sass/colors/syntax-light.scss +++ /dev/null @@ -1,214 +0,0 @@ -/* - * The syntax light mode code snippet colors. - */ - -@mixin light-syntax { - /* --- custom light colors --- */ - --language-border-color: #ececec; - --highlight-bg-color: #f6f8fa; - --highlighter-rouge-color: #3f596f; - --highlight-lineno-color: #9e9e9e; - --inline-code-bg: #f6f6f7; - --code-color: #3a3a3a; - --code-header-text-color: #a3a3a3; - --code-header-muted-color: #e5e5e5; - --code-header-icon-color: #c9c8c8; - --clipboard-checked-color: #43c743; - - [class^='prompt-'] { - --inline-code-bg: #fbfafa; - } - - /* --- Syntax highlight theme from `rougify style github` --- */ - - .highlight table td { - padding: 5px; - } - - .highlight table pre { - margin: 0; - } - - .highlight, - .highlight .w { - color: #24292f; - background-color: #f6f8fa; - } - - .highlight .k, - .highlight .kd, - .highlight .kn, - .highlight .kp, - .highlight .kr, - .highlight .kt, - .highlight .kv { - color: #cf222e; - } - - .highlight .gr { - color: #f6f8fa; - } - - .highlight .gd { - color: #82071e; - background-color: #ffebe9; - } - - .highlight .nb { - color: #953800; - } - - .highlight .nc { - color: #953800; - } - - .highlight .no { - color: #953800; - } - - .highlight .nn { - color: #953800; - } - - .highlight .sr { - color: #116329; - } - - .highlight .na { - color: #116329; - } - - .highlight .nt { - color: #116329; - } - - .highlight .gi { - color: #116329; - background-color: #dafbe1; - } - - .highlight .kc { - color: #0550ae; - } - - .highlight .l, - .highlight .ld, - .highlight .m, - .highlight .mb, - .highlight .mf, - .highlight .mh, - .highlight .mi, - .highlight .il, - .highlight .mo, - .highlight .mx { - color: #0550ae; - } - - .highlight .sb { - color: #0550ae; - } - - .highlight .bp { - color: #0550ae; - } - - .highlight .ne { - color: #0550ae; - } - - .highlight .nl { - color: #0550ae; - } - - .highlight .py { - color: #0550ae; - } - - .highlight .nv, - .highlight .vc, - .highlight .vg, - .highlight .vi, - .highlight .vm { - color: #0550ae; - } - - .highlight .o, - .highlight .ow { - color: #0550ae; - } - - .highlight .gh { - color: #0550ae; - font-weight: bold; - } - - .highlight .gu { - color: #0550ae; - font-weight: bold; - } - - .highlight .s, - .highlight .sa, - .highlight .sc, - .highlight .dl, - .highlight .sd, - .highlight .s2, - .highlight .se, - .highlight .sh, - .highlight .sx, - .highlight .s1, - .highlight .ss { - color: #0a3069; - } - - .highlight .nd { - color: #8250df; - } - - .highlight .nf, - .highlight .fm { - color: #8250df; - } - - .highlight .err { - color: #f6f8fa; - background-color: #82071e; - } - - .highlight .c, - .highlight .ch, - .highlight .cd, - .highlight .cm, - .highlight .cp, - .highlight .cpf, - .highlight .c1, - .highlight .cs { - color: #68717a; - } - - .highlight .gl { - color: #68717a; - } - - .highlight .gt { - color: #68717a; - } - - .highlight .ni { - color: #24292f; - } - - .highlight .si { - color: #24292f; - } - - .highlight .ge { - color: #24292f; - font-style: italic; - } - - .highlight .gs { - color: #24292f; - font-weight: bold; - } -} /* light-syntax */ diff --git a/_sass/colors/typography-dark.scss b/_sass/colors/typography-dark.scss deleted file mode 100644 index 2142d33..0000000 --- a/_sass/colors/typography-dark.scss +++ /dev/null @@ -1,150 +0,0 @@ -/* - * The main dark mode styles - */ - -@mixin dark-scheme { - /* Framework color */ - --main-bg: rgb(27, 27, 30); - --mask-bg: rgb(68, 69, 70); - --main-border-color: rgb(44, 45, 45); - - /* Common color */ - --text-color: rgb(175, 176, 177); - --text-muted-color: #868686; - --heading-color: #cccccc; - --label-color: #a7a7a7; - --blockquote-border-color: rgb(66, 66, 66); - --blockquote-text-color: #868686; - --link-color: rgb(138, 180, 248); - --link-underline-color: rgb(82, 108, 150); - --button-bg: #1e1e1e; - --btn-border-color: #2e2f31; - --btn-backtotop-color: var(--text-color); - --btn-backtotop-border-color: #212122; - --btn-box-shadow: var(--main-bg); - --card-header-bg: #292929; - --checkbox-color: rgb(118, 120, 121); - --checkbox-checked-color: var(--link-color); - --img-bg: radial-gradient(circle, rgb(22, 22, 24) 0%, rgb(32, 32, 32) 100%); - --shimmer-bg: linear-gradient( - 90deg, - rgba(255, 255, 255, 0) 0%, - rgba(58, 55, 55, 0.4) 50%, - rgba(255, 255, 255, 0) 100% - ); - - /* Sidebar */ - --site-title-color: #717070; - --site-subtitle-color: #868686; - --sidebar-bg: #1e1e1e; - --sidebar-border-color: #292929; - --sidebar-muted-color: #868686; - --sidebar-active-color: rgb(255, 255, 255, 0.95); - --sidebar-hover-bg: #262626; - --sidebar-btn-bg: #232328; - --sidebar-btn-color: #787878; - --avatar-border-color: rgb(206, 206, 206, 0.9); - - /* Topbar */ - --topbar-bg: rgb(27, 27, 30, 0.64); - --topbar-text-color: var(--text-color); - --search-border-color: rgb(55, 55, 55); - --search-icon-color: rgb(100, 102, 105); - --input-focus-border-color: rgb(112, 114, 115); - - /* Home page */ - --post-list-text-color: rgb(175, 176, 177); - --btn-patinator-text-color: var(--text-color); - --btn-paginator-hover-color: #2e2e2e; - - /* Posts */ - --toc-highlight: rgb(116, 178, 243); - --tag-hover: rgb(43, 56, 62); - --tb-odd-bg: #252526; /* odd rows of the posts' table */ - --tb-even-bg: rgb(31, 31, 34); /* even rows of the posts' table */ - --tb-border-color: var(--tb-odd-bg); - --footnote-target-bg: rgb(63, 81, 181); - --btn-share-color: #6c757d; - --btn-share-hover-color: #bfc1ca; - --card-bg: #1e1e1e; - --card-hovor-bg: #464d51; - --card-shadow: rgb(21, 21, 21, 0.72) 0 6px 18px 0, - rgb(137, 135, 135, 0.24) 0 0 0 1px; - --kbd-wrap-color: #6a6a6a; - --kbd-text-color: #d3d3d3; - --kbd-bg-color: #242424; - --prompt-text-color: rgb(216, 212, 212, 0.75); - --prompt-tip-bg: rgb(22, 60, 36, 0.64); - --prompt-tip-icon-color: rgb(15, 164, 15, 0.81); - --prompt-info-bg: rgb(7, 59, 104, 0.8); - --prompt-info-icon-color: #0075d1; - --prompt-warning-bg: rgb(90, 69, 3, 0.88); - --prompt-warning-icon-color: rgb(255, 165, 0, 0.8); - --prompt-danger-bg: rgb(86, 28, 8, 0.8); - --prompt-danger-icon-color: #cd0202; - - /* tags */ - --tag-border: rgb(59, 79, 88); - --tag-shadow: rgb(32, 33, 33); - --dash-color: rgb(63, 65, 68); - --search-tag-bg: #292828; - - /* categories */ - --categories-border: rgb(64, 66, 69, 0.5); - --categories-hover-bg: rgb(73, 75, 76); - --categories-icon-hover-color: white; - - /* archives */ - --timeline-node-bg: rgb(150, 152, 156); - --timeline-color: rgb(63, 65, 68); - --timeline-year-dot-color: var(--timeline-color); - - .light { - display: none; - } - - hr { - border-color: var(--main-border-color); - } - - /* categories */ - .categories.card, - .list-group-item { - background-color: var(--card-bg); - } - - .categories { - .card-header { - background-color: var(--card-header-bg); - } - - .list-group-item { - border-left: none; - border-right: none; - padding-left: 2rem; - border-color: var(--categories-border); - - &:last-child { - border-bottom-color: var(--card-bg); - } - } - } - - #archives li:nth-child(odd) { - background-image: linear-gradient( - to left, - rgb(26, 26, 30), - rgb(39, 39, 45), - rgb(39, 39, 45), - rgb(39, 39, 45), - rgb(26, 26, 30) - ); - } - - color-scheme: dark; - - /* stylelint-disable-next-line selector-id-pattern */ - #disqus_thread { - color-scheme: none; - } -} /* dark-scheme */ diff --git a/_sass/colors/typography-light.scss b/_sass/colors/typography-light.scss deleted file mode 100644 index f8c3891..0000000 --- a/_sass/colors/typography-light.scss +++ /dev/null @@ -1,110 +0,0 @@ -/* - * The syntax light mode typography colors - */ - -@mixin light-scheme { - /* Framework color */ - --main-bg: white; - --mask-bg: #c1c3c5; - --main-border-color: #f3f3f3; - - /* Common color */ - --text-color: #34343c; - --text-muted-color: #757575; - --heading-color: #2a2a2a; - --label-color: #585858; - --blockquote-border-color: #eeeeee; - --blockquote-text-color: #757575; - --link-color: #0056b2; - --link-underline-color: #dee2e6; - --button-bg: #ffffff; - --btn-border-color: #e9ecef; - --btn-backtotop-color: #686868; - --btn-backtotop-border-color: #f1f1f1; - --btn-box-shadow: #eaeaea; - --checkbox-color: #c5c5c5; - --checkbox-checked-color: #07a8f7; - --img-bg: radial-gradient( - circle, - rgb(255, 255, 255) 0%, - rgb(239, 239, 239) 100% - ); - --shimmer-bg: linear-gradient( - 90deg, - rgba(250, 250, 250, 0) 0%, - rgba(232, 230, 230, 1) 50%, - rgba(250, 250, 250, 0) 100% - ); - - /* Sidebar */ - --site-title-color: rgb(113, 113, 113); - --site-subtitle-color: #717171; - --sidebar-bg: #f6f8fa; - --sidebar-border-color: #efefef; - --sidebar-muted-color: #545454; - --sidebar-active-color: #1d1d1d; - --sidebar-hover-bg: rgb(223, 233, 241, 0.64); - --sidebar-btn-bg: white; - --sidebar-btn-color: #8e8e8e; - --avatar-border-color: white; - - /* Topbar */ - --topbar-bg: rgb(255, 255, 255, 0.7); - --topbar-text-color: rgb(78, 78, 78); - --search-border-color: rgb(240, 240, 240); - --search-icon-color: #c2c6cc; - --input-focus-border-color: #b8b8b8; - - /* Home page */ - --post-list-text-color: dimgray; - --btn-patinator-text-color: #555555; - --btn-paginator-hover-color: var(--sidebar-bg); - - /* Posts */ - --toc-highlight: #0550ae; - --btn-share-hover-color: var(--link-color); - --card-bg: white; - --card-hovor-bg: #e2e2e2; - --card-shadow: rgb(104, 104, 104, 0.05) 0 2px 6px 0, - rgba(211, 209, 209, 0.15) 0 0 0 1px; - --footnote-target-bg: lightcyan; - --tb-odd-bg: #fbfcfd; - --tb-border-color: #eaeaea; - --dash-color: silver; - --kbd-wrap-color: #bdbdbd; - --kbd-text-color: var(--text-color); - --kbd-bg-color: white; - --prompt-text-color: rgb(46, 46, 46, 0.77); - --prompt-tip-bg: rgb(123, 247, 144, 0.2); - --prompt-tip-icon-color: #03b303; - --prompt-info-bg: #e1f5fe; - --prompt-info-icon-color: #0070cb; - --prompt-warning-bg: rgb(255, 243, 205); - --prompt-warning-icon-color: #ef9c03; - --prompt-danger-bg: rgb(248, 215, 218, 0.56); - --prompt-danger-icon-color: #df3c30; - - /* Tags */ - --tag-border: #dee2e6; - --tag-shadow: var(--btn-border-color); - --tag-hover: rgb(222, 226, 230); - --search-tag-bg: #f8f9fa; - - [class^='prompt-'] { - --link-underline-color: rgb(219, 216, 216); - } - - .dark { - display: none; - } - - /* Categories */ - --categories-border: rgba(0, 0, 0, 0.125); - --categories-hover-bg: var(--btn-border-color); - --categories-icon-hover-color: darkslategray; - - /* Archive */ - --timeline-color: rgba(0, 0, 0, 0.075); - --timeline-node-bg: #c2c6cc; - --timeline-year-dot-color: #ffffff; -} /* light-scheme */ diff --git a/_sass/layout/archives.scss b/_sass/layout/archives.scss deleted file mode 100644 index 3a2e86b..0000000 --- a/_sass/layout/archives.scss +++ /dev/null @@ -1,144 +0,0 @@ -/* - Style for Archives -*/ - -#archives { - letter-spacing: 0.03rem; - - $timeline-width: 4px; - - %timeline { - content: ''; - width: $timeline-width; - position: relative; - float: left; - background-color: var(--timeline-color); - } - - .year { - height: 3.5rem; - font-size: 1.5rem; - position: relative; - left: 2px; - margin-left: -$timeline-width; - - &::before { - @extend %timeline; - - height: 72px; - left: 79px; - bottom: 16px; - } - - &:first-child::before { - @extend %timeline; - - height: 32px; - top: 24px; - } - - /* Year dot */ - &::after { - content: ''; - display: inline-block; - position: relative; - border-radius: 50%; - width: 12px; - height: 12px; - left: 21.5px; - border: 3px solid; - background-color: var(--timeline-year-dot-color); - border-color: var(--timeline-node-bg); - box-shadow: 0 0 2px 0 #c2c6cc; - z-index: 1; - } - } - - ul { - li { - font-size: 1.1rem; - line-height: 3rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - - &:nth-child(odd) { - background-color: var(--main-bg, #ffffff); - background-image: linear-gradient( - to left, - #ffffff, - #fbfbfb, - #fbfbfb, - #fbfbfb, - #ffffff - ); - } - - &::before { - @extend %timeline; - - top: 0; - left: 77px; - height: 3.1rem; - } - } - - &:last-child li:last-child::before { - height: 1.5rem; - } - } /* #archives ul */ - - .date { - white-space: nowrap; - display: inline-block; - position: relative; - right: 0.5rem; - - &.month { - width: 1.4rem; - text-align: center; - } - - &.day { - font-size: 85%; - font-family: Lato, sans-serif; - } - } - - a { - /* post title in Archvies */ - margin-left: 2.5rem; - position: relative; - top: 0.1rem; - - &:hover { - border-bottom: none; - } - - &::before { - /* the dot before post title */ - content: ''; - display: inline-block; - position: relative; - border-radius: 50%; - width: 8px; - height: 8px; - float: left; - top: 1.35rem; - left: 71px; - background-color: var(--timeline-node-bg); - box-shadow: 0 0 3px 0 #c2c6cc; - z-index: 1; - } - } -} /* #archives */ - -@media all and (max-width: 576px) { - #archives { - margin-top: -1rem; - - ul { - letter-spacing: 0; - } - } -} diff --git a/_sass/layout/categories.scss b/_sass/layout/categories.scss deleted file mode 100644 index 330d3d3..0000000 --- a/_sass/layout/categories.scss +++ /dev/null @@ -1,83 +0,0 @@ -/* - Style for Tab Categories -*/ - -%category-icon-color { - color: gray; -} - -.categories { - margin-bottom: 2rem; - border-color: var(--categories-border); - - &.card, - .list-group { - @extend %rounded; - } - - .card-header { - $radius: calc($base-radius - 1px); - - padding: 0.75rem; - border-radius: $radius; - border-bottom: 0; - - &.hide-border-bottom { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - } - } - - i { - @extend %category-icon-color; - - font-size: 86%; /* fontawesome icons */ - } - - .list-group-item { - border-left: none; - border-right: none; - padding-left: 2rem; - - &:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; - } - - &:last-child { - border-bottom: 0; - } - } -} /* .categories */ - -.category-trigger { - width: 1.7rem; - height: 1.7rem; - border-radius: 50%; - text-align: center; - color: #6c757d !important; - - i { - position: relative; - height: 0.7rem; - width: 1rem; - transition: transform 300ms ease; - } - - &:hover { - i { - color: var(--categories-icon-hover-color); - } - } -} - -/* only works on desktop */ -@media (hover: hover) { - .category-trigger:hover { - background-color: var(--categories-hover-bg); - } -} - -.rotate { - transform: rotate(-90deg); -} diff --git a/_sass/layout/category-tag.scss b/_sass/layout/category-tag.scss deleted file mode 100644 index 9e43a91..0000000 --- a/_sass/layout/category-tag.scss +++ /dev/null @@ -1,72 +0,0 @@ -/* - Style for page Category and Tag -*/ - -.dash { - margin: 0 0.5rem 0.6rem 0.5rem; - border-bottom: 2px dotted var(--dash-color); -} - -#page-category, -#page-tag { - ul > li { - line-height: 1.5rem; - padding: 0.6rem 0; - - /* dot */ - &::before { - background: #999999; - width: 5px; - height: 5px; - border-radius: 50%; - display: block; - content: ''; - position: relative; - top: 0.6rem; - margin-right: 0.5rem; - } - - /* post's title */ - > a { - @extend %no-bottom-border; - - font-size: 1.1rem; - } - } -} - -/* tag icon */ -#page-tag h1 > i { - font-size: 1.2rem; -} - -#page-category h1 > i { - font-size: 1.25rem; -} - -#page-category, -#page-tag, -#access-lastmod { - a:hover { - @extend %link-hover; - - margin-bottom: -1px; /* Avoid jumping */ - } -} - -@media all and (max-width: 576px) { - #page-category, - #page-tag { - ul > li { - &::before { - margin: 0 0.5rem; - } - - > a { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - } - } -} diff --git a/_sass/layout/home.scss b/_sass/layout/home.scss deleted file mode 100644 index 7f9fd2e..0000000 --- a/_sass/layout/home.scss +++ /dev/null @@ -1,189 +0,0 @@ -/* - Style for Homepage -*/ - -#post-list { - margin-top: 2rem; - - .card-wrapper { - &:hover { - text-decoration: none; - } - - &:not(:last-child) { - margin-bottom: 1.25rem; - } - } - - .card { - border: 0; - background: none; - - %img-radius { - border-radius: $base-radius $base-radius 0 0; - } - - .preview-img { - @extend %img-radius; - - img { - @extend %img-radius; - } - } - - .card-body { - height: 100%; - padding: 1rem; - - .card-title { - @extend %text-clip; - - color: var(--heading-color) !important; - font-size: 1.25rem; - } - - %muted { - color: var(--text-muted-color) !important; - } - - .card-text.content { - @extend %muted; - - p { - @extend %text-clip; - - line-height: 1.5; - margin: 0; - } - } - - .post-meta { - @extend %muted; - - i { - &:not(:first-child) { - margin-left: 1.5rem; - } - } - - em { - @extend %normal-font-style; - - color: inherit; - } - - > div:first-child { - display: block; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - } - } - } -} /* #post-list */ - -.pagination { - color: var(--text-color); - font-family: Lato, sans-serif; - justify-content: space-evenly; - - a:hover { - text-decoration: none; - } - - .page-item { - .page-link { - color: var(--btn-patinator-text-color); - padding: 0 0.6rem; - display: -webkit-box; - -webkit-box-pack: center; - -webkit-box-align: center; - border-radius: 0.5rem; - border: 0; - background-color: inherit; - } - - &.active { - .page-link { - background-color: var(--btn-paginator-hover-color); - } - } - - &:not(.active) { - .page-link { - &:hover { - box-shadow: inset var(--btn-border-color) 0 0 0 1px; - } - } - } - - &.disabled { - cursor: not-allowed; - - .page-link { - color: rgba(108, 117, 125, 0.57); - } - } - } /* .page-item */ -} /* .pagination */ - -/* Tablet */ -@media all and (min-width: 768px) { - %img-radius { - border-radius: 0 $base-radius $base-radius 0; - } - - #post-list { - .card { - .card-body { - padding: 1.75rem 1.75rem 1.25rem 1.75rem; - - .card-text { - display: inherit !important; - } - - .post-meta { - i { - &:not(:first-child) { - margin-left: 1.75rem; - } - } - } - } - } - } -} - -/* Hide SideBar and TOC */ -@media all and (max-width: 830px) { - .pagination { - .page-item { - &:not(:first-child):not(:last-child) { - display: none; - } - } - } -} - -/* Sidebar is visible */ -@media all and (min-width: 831px) { - #post-list { - margin-top: 2.5rem; - } - - .pagination { - font-size: 0.85rem; - justify-content: center; - - .page-item { - &:not(:last-child) { - margin-right: 0.7rem; - } - } - - .page-index { - display: none; - } - } /* .pagination */ -} diff --git a/_sass/layout/post.scss b/_sass/layout/post.scss deleted file mode 100644 index 955c958..0000000 --- a/_sass/layout/post.scss +++ /dev/null @@ -1,375 +0,0 @@ -/* - Post-specific style -*/ - -@mixin btn-sharing-color($light-color, $important: false) { - @if $important { - color: var(--btn-share-color, $light-color) !important; - } @else { - color: var(--btn-share-color, $light-color); - } -} - -%btn-post-nav { - width: 50%; - position: relative; - border-color: var(--btn-border-color); -} - -@mixin dot($pl: 0.25rem, $pr: 0.25rem) { - content: '\2022'; - padding-left: $pl; - padding-right: $pr; -} - -%text-color { - color: var(--text-color); -} - -h1 + .post-meta { - > span + span::before { - @include dot; - } - - em, - time { - color: var(--text-color); - } - - em { - a { - color: inherit; - } - } -} - -.post-tail-wrapper { - margin-top: 6rem; - border-bottom: 1px double var(--main-border-color); - font-size: 0.85rem; - - .post-tail-bottom a { - color: inherit; - } - - .license-wrapper { - line-height: 1.2rem; - - > a { - @extend %text-highlight; - - &:hover { - @extend %link-hover; - } - } - - span:last-child { - font-size: 0.85rem; - } - } /* .license-wrapper */ - - .post-meta a:not(:hover) { - @extend %link-underline; - } - - .share-wrapper { - vertical-align: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - .share-icons { - font-size: 1.2rem; - - > * { - margin-left: 0.25rem; - - &:hover { - i { - @extend %btn-share-hovor; - } - } - } - - button { - position: relative; - bottom: 2px; - padding: 0; - - @extend %cursor-pointer; - } - - a :hover { - text-decoration: none; - } - - .fa-square-x-twitter { - @include btn-sharing-color(black); - } - - .fa-facebook-square { - @include btn-sharing-color(rgb(66, 95, 156)); - } - - .fa-telegram { - @include btn-sharing-color(rgb(39, 159, 217)); - } - - .fa-linkedin { - @include btn-sharing-color(rgb(0, 119, 181)); - } - - .fa-weibo { - @include btn-sharing-color(rgb(229, 20, 43)); - } - } /* .share-icons */ - - .fas.fa-link { - @include btn-sharing-color(rgb(171, 171, 171)); - } - } /* .share-wrapper */ -} - -.post-tags { - line-height: 2rem; - - .post-tag { - &:hover { - @extend %link-hover; - @extend %tag-hover; - @extend %no-bottom-border; - } - } -} - -.post-navigation { - .btn { - @extend %btn-post-nav; - - &:not(:hover) { - color: var(--link-color); - } - - &:hover { - &:not(.disabled)::before { - color: whitesmoke; - } - } - - &.disabled { - @extend %btn-post-nav; - - pointer-events: auto; - cursor: not-allowed; - background: none; - color: gray; - } - - &.btn-outline-primary.disabled:focus { - box-shadow: none; - } - - &::before { - color: var(--text-muted-color); - font-size: 0.65rem; - text-transform: uppercase; - content: attr(aria-label); - } - - &:first-child { - border-radius: $base-radius 0 0 $base-radius; - left: 0.5px; - } - - &:last-child { - border-radius: 0 $base-radius $base-radius 0; - right: 0.5px; - } - } - - p { - font-size: 1.1rem; - line-height: 1.5rem; - margin-top: 0.3rem; - white-space: normal; - } -} /* .post-navigation */ - -@media (hover: hover) { - .post-navigation { - .btn, - .btn::before { - transition: all 0.35s ease-in-out; - } - } -} - -@-webkit-keyframes fade-up { - from { - opacity: 0; - position: relative; - top: 2rem; - } - - to { - opacity: 1; - position: relative; - top: 0; - } -} - -@keyframes fade-up { - from { - opacity: 0; - position: relative; - top: 2rem; - } - - to { - opacity: 1; - position: relative; - top: 0; - } -} - -#toc-wrapper { - border-left: 1px solid rgba(158, 158, 158, 0.17); - position: -webkit-sticky; - position: sticky; - top: 4rem; - transition: top 0.2s ease-in-out; - -webkit-animation: fade-up 0.8s; - animation: fade-up 0.8s; - - ul { - list-style: none; - font-size: 0.85rem; - line-height: 1.25; - padding-left: 0; - - li { - &:not(:last-child) { - margin: 0.4rem 0; - } - - a { - padding: 0.2rem 0 0.2rem 1.25rem; - } - } - - /* Overwrite TOC plugin style */ - - .toc-link { - display: block; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - - &:hover { - color: var(--toc-highlight); - text-decoration: none; - } - - &::before { - display: none; - } - } - - .is-active-link { - color: var(--toc-highlight) !important; - font-weight: 600; - - &::before { - display: inline-block; - width: 1px; - left: -1px; - height: 1.25rem; - background-color: var(--toc-highlight) !important; - } - } - - ul { - padding-left: 0.75rem; - } - } -} - -/* --- Related Posts --- */ - -#related-posts { - > h3 { - @include label(1.1rem, 600); - } - - time { - @extend %normal-font-style; - - color: var(--text-muted-color); - } - - p { - font-size: 0.9rem; - margin-bottom: 0.5rem; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - } - - .card { - h4 { - @extend %text-color; - @extend %text-clip; - } - } -} - -/* stylelint-disable-next-line selector-id-pattern */ -#disqus_thread { - min-height: 8.5rem; -} - -.utterances { - max-width: 100%; -} - -%btn-share-hovor { - color: var(--btn-share-hover-color) !important; -} - -.share-label { - @include label(inherit, 400, inherit); - - &::after { - content: ':'; - } -} - -@media all and (max-width: 576px) { - .post-tail-bottom { - flex-wrap: wrap-reverse !important; - - > div:first-child { - width: 100%; - margin-top: 1rem; - } - } -} - -@media all and (max-width: 768px) { - .content > p > img { - max-width: calc(100% + 1rem); - } -} - -/* Hide SideBar and TOC */ -@media all and (max-width: 849px) { - .post-navigation { - padding-left: 0; - padding-right: 0; - margin-left: -0.5rem; - margin-right: -0.5rem; - } -} diff --git a/_sass/layout/tags.scss b/_sass/layout/tags.scss deleted file mode 100644 index 4cf5d3b..0000000 --- a/_sass/layout/tags.scss +++ /dev/null @@ -1,19 +0,0 @@ -/* - Styles for Tab Tags -*/ - -.tag { - border-radius: 0.7em; - padding: 6px 8px 7px; - margin-right: 0.8rem; - line-height: 3rem; - letter-spacing: 0; - border: 1px solid var(--tag-border) !important; - box-shadow: 0 0 3px 0 var(--tag-shadow); - - span { - margin-left: 0.6em; - font-size: 0.7em; - font-family: Oswald, sans-serif; - } -} diff --git a/_sass/main.scss b/_sass/main.scss deleted file mode 100644 index 1c2311d..0000000 --- a/_sass/main.scss +++ /dev/null @@ -1,13 +0,0 @@ -@import 'colors/typography-light'; -@import 'colors/typography-dark'; -@import 'addon/variables'; -@import 'variables-hook'; -@import 'addon/module'; -@import 'addon/syntax'; -@import 'addon/commons'; -@import 'layout/home'; -@import 'layout/post'; -@import 'layout/tags'; -@import 'layout/archives'; -@import 'layout/categories'; -@import 'layout/category-tag'; diff --git a/_sass/variables-hook.scss b/_sass/variables-hook.scss deleted file mode 100644 index f27e0eb..0000000 --- a/_sass/variables-hook.scss +++ /dev/null @@ -1,3 +0,0 @@ -/* - Appending custom SCSS variables will override the default ones in `_sass/addon/variables.scsss` -*/ diff --git a/_tabs/about.md b/_tabs/about.md index 52c5bd8..7056363 100644 --- a/_tabs/about.md +++ b/_tabs/about.md @@ -1,7 +1,7 @@ --- # The default layout is 'page' icon: fas fa-info-circle -img_path: "/assets/img/about-tab" +media_subpath: "/assets/img/about-tab" order: 4 --- diff --git a/assets/404.html b/assets/404.html index 5b46cc8..3fcfba8 100644 --- a/assets/404.html +++ b/assets/404.html @@ -11,4 +11,4 @@ {% include lang.html %} -

{{ site.data.locales[lang].not_found.statment }}

+

{{ site.data.locales[lang].not_found.statement }}

\ No newline at end of file diff --git a/assets/css/jekyll-theme-chirpy.scss b/assets/css/jekyll-theme-chirpy.scss deleted file mode 100644 index 1280b9e..0000000 --- a/assets/css/jekyll-theme-chirpy.scss +++ /dev/null @@ -1,6 +0,0 @@ ---- ---- - -@import 'main'; - -/* append your custom style below */ diff --git a/assets/feed.xml b/assets/feed.xml deleted file mode 100644 index a244a56..0000000 --- a/assets/feed.xml +++ /dev/null @@ -1,61 +0,0 @@ ---- -layout: compress -permalink: /feed.xml -# Atom Feed, reference: https://validator.w3.org/feed/docs/atom.html ---- - -{% capture source %} - - {{ "/" | absolute_url }} - {{ site.title }} - {{ site.description }} - {{ site.time | date_to_xmlschema }} - - {{ site.social.name }} - {{ "/" | absolute_url }} - - - - Jekyll - © {{ 'now' | date: '%Y' }} {{ site.social.name }} - {{ site.baseurl }}/assets/img/favicons/favicon.ico - {{ site.baseurl }}/assets/img/favicons/favicon-96x96.png - -{% for post in site.posts limit: 5 %} - {% assign post_absolute_url = post.url | absolute_url %} - - {{ post.title }} - - {{ post.date | date_to_xmlschema }} - {% if post.last_modified_at %} - {{ post.last_modified_at | date_to_xmlschema }} - {% else %} - {{ post.date | date_to_xmlschema }} - {% endif %} - {{ post_absolute_url }} - - - {{ post.author | default: site.social.name }} - - - {% if post.categories %} - {% for category in post.categories %} - - {% endfor %} - {% endif %} - - {% if post.summary %} - {{ post.summary | strip }} - {% else %} - - {% include no-linenos.html content=post.content %} - {{ content | strip_html | truncate: 400 }} - - {% endif %} - - -{% endfor %} - -{% endcapture %} -{{ source | replace: '&', '&' }} diff --git a/assets/img/dev-container-demo.gif b/assets/img/dev-container-demo.gif new file mode 100755 index 0000000..ec43061 Binary files /dev/null and b/assets/img/dev-container-demo.gif differ diff --git a/assets/js/data/search.json b/assets/js/data/search.json deleted file mode 100644 index 2601ed0..0000000 --- a/assets/js/data/search.json +++ /dev/null @@ -1,20 +0,0 @@ ---- -layout: compress -swcache: true ---- - -[ - {% for post in site.posts %} - { - "title": {{ post.title | jsonify }}, - "url": {{ post.url | relative_url | jsonify }}, - "categories": {{ post.categories | join: ', ' | jsonify }}, - "tags": {{ post.tags | join: ', ' | jsonify }}, - "date": "{{ post.date }}", - {% include no-linenos.html content=post.content %} - {% assign _content = content | strip_html | strip_newlines %} - "snippet": {{ _content | truncate: 200 | jsonify }}, - "content": {{ _content | jsonify }} - }{% unless forloop.last %},{% endunless %} - {% endfor %} -] diff --git a/assets/js/data/swcache.js b/assets/js/data/swcache.js deleted file mode 100644 index ed5d40e..0000000 --- a/assets/js/data/swcache.js +++ /dev/null @@ -1,49 +0,0 @@ ---- -layout: compress -# The list to be cached by PWA ---- - -const resource = [ - /* --- CSS --- */ - '{{ "/assets/css/:THEME.css" | replace: ':THEME', site.theme | relative_url }}', - - /* --- PWA --- */ - '{{ "/app.js" | relative_url }}', - '{{ "/sw.js" | relative_url }}', - - /* --- HTML --- */ - '{{ "/index.html" | relative_url }}', - '{{ "/404.html" | relative_url }}', - - {% for tab in site.tabs %} - '{{ tab.url | relative_url }}', - {% endfor %} - - /* --- Favicons & compressed JS --- */ - {% assign cache_list = site.static_files | where: 'swcache', true %} - {% for file in cache_list %} - '{{ file.path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%} - {% endfor %} -]; - -/* The request url with below domain will be cached */ -const allowedDomains = [ - {% if site.google_analytics.id != empty and site.google_analytics.id %} - 'www.googletagmanager.com', - 'www.google-analytics.com', - {% endif %} - - '{{ site.url | split: "//" | last }}', - - {% if site.img_cdn contains '//' and site.img_cdn %} - '{{ site.img_cdn | split: '//' | last | split: '/' | first }}', - {% endif %} - - 'fonts.gstatic.com', - 'fonts.googleapis.com', - 'cdn.jsdelivr.net', - 'polyfill.io' -]; - -/* Requests that include the following path will be banned */ -const denyUrls = []; diff --git a/assets/js/pwa/app.js b/assets/js/pwa/app.js deleted file mode 100644 index c798fe2..0000000 --- a/assets/js/pwa/app.js +++ /dev/null @@ -1,47 +0,0 @@ ---- -layout: compress -permalink: '/app.js' ---- - -const $notification = $('#notification'); -const $btnRefresh = $('#notification .toast-body>button'); - -if ('serviceWorker' in navigator) { - /* Registering Service Worker */ - navigator.serviceWorker.register('{{ "/sw.js" | relative_url }}') - .then(registration => { - - /* in case the user ignores the notification */ - if (registration.waiting) { - $notification.toast('show'); - } - - registration.addEventListener('updatefound', () => { - registration.installing.addEventListener('statechange', () => { - if (registration.waiting) { - if (navigator.serviceWorker.controller) { - $notification.toast('show'); - } - } - }); - }); - - $btnRefresh.click(() => { - if (registration.waiting) { - registration.waiting.postMessage('SKIP_WAITING'); - } - $notification.toast('hide'); - }); - }); - - let refreshing = false; - - /* Detect controller change and refresh all the opened tabs */ - navigator.serviceWorker.addEventListener('controllerchange', () => { - if (!refreshing) { - window.location.reload(); - refreshing = true; - } - }); -} - diff --git a/assets/js/pwa/sw.js b/assets/js/pwa/sw.js deleted file mode 100644 index 7e37234..0000000 --- a/assets/js/pwa/sw.js +++ /dev/null @@ -1,89 +0,0 @@ ---- -layout: compress -permalink: '/sw.js' -# PWA service worker ---- - -self.importScripts('{{ "/assets/js/data/swcache.js" | relative_url }}'); - -const cacheName = 'chirpy-{{ "now" | date: "%s" }}'; - -function verifyDomain(url) { - for (const domain of allowedDomains) { - const regex = RegExp(`^http(s)?:\/\/${domain}\/`); - if (regex.test(url)) { - return true; - } - } - - return false; -} - -function isExcluded(url) { - for (const item of denyUrls) { - if (url === item) { - return true; - } - } - return false; -} - -self.addEventListener('install', (event) => { - event.waitUntil( - caches.open(cacheName).then((cache) => { - return cache.addAll(resource); - }) - ); -}); - -self.addEventListener('activate', (event) => { - event.waitUntil( - caches.keys().then((keyList) => { - return Promise.all( - keyList.map((key) => { - if (key !== cacheName) { - return caches.delete(key); - } - }) - ); - }) - ); -}); - -self.addEventListener('message', (event) => { - if (event.data === 'SKIP_WAITING') { - self.skipWaiting(); - } -}); - -self.addEventListener('fetch', (event) => { - event.respondWith( - caches.match(event.request).then((response) => { - if (response) { - return response; - } - - return fetch(event.request).then((response) => { - const url = event.request.url; - - if ( - event.request.method !== 'GET' || - !verifyDomain(url) || - isExcluded(url) - ) { - return response; - } - - /* see: */ - let responseToCache = response.clone(); - - caches.open(cacheName).then((cache) => { - /* console.log('[sw] Caching new resource: ' + event.request.url); */ - cache.put(event.request, responseToCache); - }); - - return response; - }); - }) - ); -}); diff --git a/assets/js/pwa/unregister.js b/assets/js/pwa/unregister.js deleted file mode 100644 index bd91150..0000000 --- a/assets/js/pwa/unregister.js +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: compress -permalink: '/unregister.js' ---- - -if ('serviceWorker' in navigator) { - navigator.serviceWorker.getRegistrations().then((registrations) => { - for (let reg of registrations) { - reg.unregister(); - } - }); -} diff --git a/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to docs/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 59% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md index 3b23875..bf84c01 100644 --- a/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,122 +1,157 @@ # Welcome to CONTRIBUTING.md -Hey there, fellow Developer !!!... I am happy to see and hyped about making your *, probably,* first contribution to this open-source repo. I heartily welcome you to your journey in open source contribution. I hope you have fun learning and teaching at the same time. For the **Notebook**, most of the contribution will be related to content writing like blogs, tips & tricks, tech updates, various documentation, etc. +Hey there, fellow Developer !!!... We're happy to see and hyped about making your, *probably,* first contribution to this open-source repo. We heartily welcome you to your journey in open source contribution. We hope you have fun learning and teaching at the same time. For the **Notebook**, most of the contribution will be related to content writing like blogs, tips & tricks, tech updates, various documentation, etc. ## Setting up Environment -Before you even start working on your content writing, make sure you've got the right environment installed to build the project locally. As this project is based on Jekyll[^1] framework that is built upon `Ruby`. We need `Ruby`, `Bundler`, and `jekyll` frameworks to build and test within local systems. The installation process is different from platform to platform, so make sure you follow the instructions properly. +Before you even start working on your content writing, make sure you've got the right environment installed to build the project locally. As this project is based on Jekyll[^1] framework with Chirpy theme, you can refer to the [offical documentation by Chirpy theme](https://chirpy.cotes.page/posts/getting-started/ "goto chirpy-theme docs") or you can follow the following instruction which are derived from the official docs... -### For Ubuntu: +### Dev Container -If you're using a Linux distribution - **Ubuntu**, then follow these steps: +To setup environment using **Dev Container**, follow the instruction -- Install the `Ruby` and other prerequisites using the following command: -```bash -sudo apt-get install ruby-full build-essential zlib1g-dev -y -``` -> [!NOTE] -> Avoid installing RubyGems packages (called gems) as the root user. Instead, set up a gem installation directory for your user account. The following commands will add environment variables to your `~/.bashrc`{: .file-path} file to configure the gem installation path: -```bash -echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc -echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc -echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc -source ~/.bashrc -``` +- Install Docker using [Docker Desktop](https://www.docker.com/products/docker-desktop/ "go download docker desktop"). +- Download and Install [VS Code](https://code.visualstudio.com/ "go download vs code"). +- Open VS Code and install [Dev Container extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers "go install dev-container extension") from the extensions tab. +Well that's it... You got the all the things are ready and all you gotta do is reopen the project file by clicking Reopen in container, just as shown below... -- Now use the following command, to check whether `Ruby` has properly installed and its PATH has been set properly. -```bash -ruby -v -``` +![Dev Container Demo](/assets/img/dev-container-demo.gif) -- Finally, install Jekyll and Bundler: -```bash -gem install jekyll bundler -``` +Dev container does all the heavy lifting for you and creates a container and setup the required environment for you. Now, you can write your blog within this dev container and then commit and push your changes though the shell of the container. -> [!IMPORTANT] -> For Other Linux Distros, check the offical [Jekyll](https://jekyllrb.com/docs/installation/other-linux/ "visit offical jekyll page for other linux installation") webpage. Also make sure, you have installed `bundler` along with jekyll using the following command: -```bash -gem install bundler -``` +> [!NOTE] +> If you're doing this for the first time, it might take a while depending on your system specs. -- Use the following command to check whether the `bundler` and jekyll framework are installed properly or not. -```bash -bundle info --path jekyll-theme-chirpy -``` +### For Windows: -- Now, your system is ready to build and use the project locally. +The recommended way to setup environment for this project is through [Dev Container](#dev-container), but you can also install all the dependecies natively if you want **(native installation is NOT recommended)**. -### For Windows: +
+

Native Installation (Not Recommended)

+
+ +You can setup the required environment by installing dependencies manually. This is quite tedious process compare to [Dev Containers](#dev-container "goto dev container installation") method and it would be more difficult to debug the issue caused during installation *(if there was an issue during installation)*. With that being said, let's see how you setup required environment by natively installing dependencies... -For Windows users, setting up the environment is a bit more involved: +> [!TIP] +> You can checkout [Jekyll Docs](https://jekyllrb.com/docs/installation/ "goto jekyll docs") for more details regarding installation. - Start by downloading and installing the `Ruby` using [RubyInstaller](https://rubyinstaller.org/downloads/ "Download RubyInstaller"), and choose the latest one with Devkit with default options. -- At the end of the installation, You'll get CMD asking you to enter options between 1-3. Enter 3 as input, then you can enter 2 if you want to update `MYSYS2` but that's totally optional. After all the installation is done, press enter to close the CMD prompt. +- Run `ridk install` on command prompt, If the installer doesn't prompt you the following image at the end of the installation...
-![prompt-img](assets/img/contribute-to-notebook/cmd-prompt-img.png) +![prompt-img](/assets/img/contribute-to-notebook/cmd-prompt-img.png)
-- Open a new command prompt window from the start menu, Use the following command to check whether `Ruby` has been properly installed and its `PATH`` has been set properly. +- Go ahead and select MSYS2 and MINGW development toolchain option by pressing `3` + Enter. + +- Open a new command prompt window from the start menu, Use the following command to check whether `Ruby` has been properly installed and its `PATH` has been set properly. ```powershell ruby -v ``` - Now use the following command to install `Jekyll` and `Bundler`: ```powershell -gem install jekyll bundler +gem install jekyll bundler jekyll-theme-chirpy ``` - Use the following command to check whether the `bundler` and jekyll framework are installed properly or not. -```bash +```powershell bundle info --path jekyll-theme-chirpy ``` - Now, your system is ready to build and use the project locally. + +
+
+ + +### For Unix-based system: + +For all Unix-based system, native installation is more preferrable and recommended but you can still use [Dev Containers](#dev-container "goto dev container installation") if you want. In this section, we will discuss the native installation method... + +> [!IMPORTANT] +> Install Jekyll environment based on distro-based installation specified in the [Jekyll Docs](https://jekyllrb.com/docs/installation/ "goto jekyll docs"). + +Just for sake of simplicity, we'll take a look at install in Ubuntu *(as it's widely used)* + +- Run important updates using package manager. +```bash +sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y +``` + +- Install required dependecies using package manager. +```bash +sudo apt install -y ruby-full build-essential zlib1g-dev +``` + +> [!TIP] +> Avoid installing RubyGems packages (called gems) as the root user. Instead, set up a gem installation directory for your user account. + +- Adding required environmental variable. +```bash +echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc +echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc +echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc +source ~/.bashrc +``` + +- Let's verify if `ruby` is installed properly or not. +```bash +ruby -v +``` + +- Installing Jekyll frame along with Chirpy theme. +```bash +gem install jekyll bundler jekyll-theme-chirpy +``` + +- That's it, you have required environment for running the project locally. + ### For MacOS: -If you're on MacOS, follow these steps: +If you're using MacOS, then you can either choose to go with [Dev Containers](#dev-container "goto dev container installation") or proceed with native installation. But since, MacOS is based upon Unix-based system, it's more preferrable to go for native installation. With that being said, let's see how we can setup environment in MacOS systems, + +- Install Homebrew package manager. You can find more about Homebrew at [brew.sh](https://brew.sh "goto homebrew official page"). +```bash +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` > [!ALERT] -> Ensure you have the [Homebrew](https://brew.sh/ "Install Homebrew") package manager installed. If you're facing any issues while setting up the project in MacOS, check out the [Trobleshooting post](https://github.com/Grow-with-Open-Source/Notebook/discussions/3#discussioncomment-7151280) within the [Help Request](https://github.com/Grow-with-Open-Source/Notebook/discussions/3 "Goto Help Request Discussion") discussion. +> If you're facing any issues while setting up the project in MacOS, check out the [Trobleshooting post](https://github.com/Grow-with-Open-Source/Notebook/discussions/3#discussioncomment-7151280) within the [Help Request](https://github.com/Grow-with-Open-Source/Notebook/discussions/3 "Goto Help Request Discussion") discussion. -- Start by installing `chruby` and `ruby-install` with Homebrew: +- Install required dependecies ```bash -brew install chruby ruby-install xz +brew install chruby ruby-install ``` - Install the latest stable version of `Ruby` _(supported by Jekyll[^jekyll-offical-website])_: ```bash -ruby-install ruby 3.1.3 +ruby-install ruby 3.4.1 ``` -- This will take a few minutes, and once it’s done, configure your shell to automatically use chruby: +- Configuring shell to use `ruby`. ```bash echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc -echo "chruby ruby-3.1.3" >> ~/.zshrc # run 'chruby' to see actual version +echo "chruby ruby-3.4.1" >> ~/.zshrc +source ~/.zshrc ``` > [!NOTE] -> If you’re using Bash, replace `.zshrc` with `.bash_profile`. If you’re not sure, read this external guide to [find out which shell you’re using](https://www.moncefbelyamani.com/which-shell-am-i-using-how-can-i-switch/ "find you shell"). +> If you're default shell is `bash`, then replace `.zshrc` with `.bash_profile` or `.bashrc`. If you’re not sure, read this external guide to [find out which shell you’re using](https://www.moncefbelyamani.com/which-shell-am-i-using-how-can-i-switch/ "find you shell"). -- Quit and relaunch Terminal, then check that everything is working: +- Check if `ruby` is installed properly or not. ```bash ruby -v ``` -- After installing Ruby with chruby, install the latest Jekyll & bundler gem: -```bash -gem install bundler jekyll -``` - -- Use the following command to check whether the `bundler` and jekyll framework are installed properly or not. +- Installing Jekyll frame along with Chirpy theme. ```bash -bundle info --path jekyll-theme-chirpy +gem install bundler jekyll jekyll-theme-chirpy ``` - Now, your system is ready to build and use the project locally. @@ -187,11 +222,11 @@ shamith_watchdogs:
-- It is highly recommended to use the images through CDN links. But if for some reason you are unable to do so, then store them in a new folder that is named after your post and save that folder within **`assets/img`** directory as **`assets/img//`**. Try avoid the process of *storing images within `assets/img` directory as it reflects the size of the project. +- It's recommended to use the images through CDN links. But if for some reason you are unable to do so, then store them in a new folder that is named after your post and save that folder within **`assets/img`** directory as **`assets/img//`**. Try avoid the process of *storing images within `assets/img` directory as it reflects the size of the project. - Place your content writing files within the **`_posts`** directory, following the naming convention **`YYYY-MM-DD-file-name.md`**, e.g., `2023-09-27-welcome-to-notebook.md`. **Use lowercase letters and separate words with a single dash.** -- Each and every content writing file should contain the following meta-data *(or)* configuration for the project to be successfully built: +- Each and every content writing file should contain the following `Front Matter` for the project to be successfully built: ```md --- title: @@ -199,7 +234,7 @@ date: YYYY-MM-DD HH:MM:SS +/-TTTT categories: [<main_categories>, <sub_categories_1>, ..., <sub_categories_n>] tags: [<tag_1>, ..., <tag_n>] author: <respective_author_key_value> -img_path: "/assets/img/<your_img_directory_name>/" <!--(or) respective CDN link --> +media_subpath: "/assets/img/<your_img_directory_name>" <!--(or) respective CDN link --> image: path: <name_of_the_img_for_page_cover> alt: <alternative_text> @@ -219,7 +254,7 @@ date: 2023-09-21 20:34:00 +0530 categories: [Welcome, Guide] tags: [introduction] author: shamith_watchdogs -img_path: "/assets/img/welcome-page/" +media_subpath: "/assets/img/welcome-page" image: path: "welcome-img.jpg" alt: "Welcome Page" @@ -232,9 +267,9 @@ image: > [!IMPORTANT] > - Note that the `+/-TTTT` in the `date` section refers the **UTC offset**. You can find your **UTC offset** value by searching for your country in the [list of UTC](https://en.wikipedia.org/wiki/List_of_UTC_offsets "Goto List of UTC offsets"). And if you're from India, you can use the above UTC offset from the example. > - If there is more than one person/author working on a single post, then use `authors` attribute instead of `author`. Also, the input for the `authors` attribute will be a list of unique_key_value representing the authors. -> - It's complete optional to have `img_path` and `image` attribute. Use them if and only if, your post requires any images. -> - If your post is using images and you have set the `img_path`, then you can directly access the images just by using their name. -> - The `image` attribute will act as the page cover or thumbnail for your post. It's up to you to add a page-cover or not. +> - It's complete optional to have `media_subpath` and `image` attribute. Use them if and only if, your post requires any images. +> - If your post is using images, then you can make use of `media_subpath` to reduce the redundant path. But specify the path, you can use only the name of image to place it on your blog instead of giving whole path which would be redundant. +> - The `image` attribute will act as the page cover or thumbnail for your post. It's up to you to add a page-cover or not. Note that if you specified a path using `media_subpath`, then you can specify the image name used for page-cover without of full path. These are important instructions and guidelines you need to follow to create a successful post without any issues. @@ -275,7 +310,7 @@ git commit -m "<related-short-message>" - **Step 8:** Now, proceed with your content writing using markdown syntax and also using additional features of Chirpy theme[^2]. -- **Step 9:** If you have any images, try adding CDN links to the source containing all the images. If not, you can create a new directory using your posts name *(separated with dashes -)* within the `assets/img/` as `assets/img/<your-post-name>`. And also mention the CDN or directory path in `img_path` attribute as [mention above](#instructions-and-guidelines). +- **Step 9:** If you have any images, try adding CDN links to the source containing all the images. If not, you can create a new directory using your posts name *(separated with dashes -)* within the `assets/img/` as `assets/img/<your-post-name>`. And also mention the CDN or directory path in `media_subpath` attribute as [mention above](#instructions-and-guidelines). - **Step 10 (optional):** After you are done with your post *(don't forget to come with each and every change)*, if you want you can add a page-cover (or) thumbnail to your post. Just mention the image name within the sub-attribute `path` of the main attribute `image`. diff --git a/tools/run.sh b/tools/run.sh new file mode 100755 index 0000000..0efc452 --- /dev/null +++ b/tools/run.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Run jekyll serve and then launch the site + +prod=false +command="bundle exec jekyll s -l" +host="127.0.0.1" + +help() { + echo "Usage:" + echo + echo " bash /path/to/run [options]" + echo + echo "Options:" + echo " -H, --host [HOST] Host to bind to." + echo " -p, --production Run Jekyll in 'production' mode." + echo " -h, --help Print this help information." +} + +while (($#)); do + opt="$1" + case $opt in + -H | --host) + host="$2" + shift 2 + ;; + -p | --production) + prod=true + shift + ;; + -h | --help) + help + exit 0 + ;; + *) + echo -e "> Unknown option: '$opt'\n" + help + exit 1 + ;; + esac +done + +command="$command -H $host" + +if $prod; then + command="JEKYLL_ENV=production $command" +fi + +if [ -e /proc/1/cgroup ] && grep -q docker /proc/1/cgroup; then + command="$command --force_polling" +fi + +echo -e "\n> $command\n" +eval "$command" diff --git a/tools/test.sh b/tools/test.sh new file mode 100755 index 0000000..331de1c --- /dev/null +++ b/tools/test.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +# +# Build and test the site content +# +# Requirement: html-proofer, jekyll +# +# Usage: See help information + +set -eu + +SITE_DIR="_site" + +_config="_config.yml" + +_baseurl="" + +help() { + echo "Build and test the site content" + echo + echo "Usage:" + echo + echo " bash $0 [options]" + echo + echo "Options:" + echo ' -c, --config "<config_a[,config_b[...]]>" Specify config file(s)' + echo " -h, --help Print this information." +} + +read_baseurl() { + if [[ $_config == *","* ]]; then + # multiple config + IFS="," + read -ra config_array <<<"$_config" + + # reverse loop the config files + for ((i = ${#config_array[@]} - 1; i >= 0; i--)); do + _tmp_baseurl="$(grep '^baseurl:' "${config_array[i]}" | sed "s/.*: *//;s/['\"]//g;s/#.*//")" + + if [[ -n $_tmp_baseurl ]]; then + _baseurl="$_tmp_baseurl" + break + fi + done + + else + # single config + _baseurl="$(grep '^baseurl:' "$_config" | sed "s/.*: *//;s/['\"]//g;s/#.*//")" + fi +} + +main() { + # clean up + if [[ -d $SITE_DIR ]]; then + rm -rf "$SITE_DIR" + fi + + read_baseurl + + # build + JEKYLL_ENV=production bundle exec jekyll b \ + -d "$SITE_DIR$_baseurl" -c "$_config" + + # test + bundle exec htmlproofer "$SITE_DIR" \ + --disable-external \ + --ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" +} + +while (($#)); do + opt="$1" + case $opt in + -c | --config) + _config="$2" + shift + shift + ;; + -h | --help) + help + exit 0 + ;; + *) + # unknown option + help + exit 1 + ;; + esac +done + +main