diff --git a/.gitignore b/.gitignore index 1b7c454..ba6ce9a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,24 +9,30 @@ ehthumbs.db Thumbs.db nohup.out - +# Python files # +###################### .python-version .env .venv .ipynb_checkpoints *.log -uploads/ + +# Editor files # +###################### .idea +.vscode - -# templates files # +# Node files # ###################### node_modules/ dist/ -public/ npm-debug.log* yarn-debug.log* yarn-error.log* package-lock.json -db.json + +# Other files # +###################### +public/ +db.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 5173ab1..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing - -Thanks for your interest on contributing to reference 👍👍, it's people like you that make [QuickRef.ME](https://quickref.me) such a amazing site 🎉🎉. Feel free to [submit issues](https://github.com/Fechin/reference/issues/new?assignee=Fechin) and enhancement requests. - -A `{filename}.md` file will be processed into a cheat sheet, let's create or edit a markdown file: - -#### Front Matter -```markdown ---- -title: QuickRef -date: 2020-11-25 18:28:43 -icon: icon-style -background: bg-emerald-600 -tags: -categories: - - Other -intro: This is a reference of styles that you can use on quickref cheatsheets! ---- -``` -Just need `title` and `intro`, and ignore other options. I will complete it if it can be released. - -#### CSS classes -QuickRefs uses [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs) and supports adding classes via its syntax. Also, there is a reference of styles that you can use on `quickref.me` cheat sheets: https://quickref.me/quickref - - -At last, It's a good practice to refer to the source code of the existing cheat sheet! diff --git a/README.md b/README.md index 7fcc9ae..8bb7fa8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,16 @@ # Reference -Share quick reference cheat sheet for developers. -If you see a cheatsheet here is not fit, you can fix it or provide a better cheatsheet by submitting a PR. +[![love](https://badgen.net/badge/make with/love/pink)](#) +[![License](https://badgen.net/badge/license/MIT/blue)](https://github.com/Fechin/reference/blob/main/LICENSE) +[![License](https://badgen.net/github/stars/Fechin/reference)](#) +[![License](https://badgen.net/github/forks/Fechin/reference)](#) +[![License](https://badgen.net/github/contributors/Fechin/reference)](#) + + + +**Reference** is a collection of **cheatsheets** contributed by open source angels. It shares a quick reference cheat sheet for developers in a beautiful layout. + +We're happy to see your best skill cheat sheets in **Reference**, If you see a cheatsheet here is not fit, you can fix it or provide a better cheatsheet by submitting a PR. ## Live Demo @@ -11,9 +20,61 @@ Read the cheatsheet gracefully https://quickref.me +## Directory structure +``` +. +├── source +│ ├── _posts # Source file for cheatsheet +│ │ ├── bash.md +│ │ ├── chmod.md +│ │ ├── ... +│ └── widget # Widget that can be referenced +│ └── chmod.html +├── public # Static files for distribution +├── _config.yml +├── gulpfile.js +├── package.json +├── postcss.config.js +├── tailwind.config.js +└── themes + └── coo # Hexo's theme +``` + ## Contributing -See [the contribution guide](https://github.com/Fechin/reference/blob/main/CONTRIBUTING.md) for ways to get started. +Thanks for your interest on contributing to reference 👍👍, it's people like you that make [QuickRef.ME](https://quickref.me) such a amazing site 🎉🎉. Feel free to [submit issues](https://github.com/Fechin/reference/issues/new?assignee=Fechin) and enhancement requests. + + +#### Development setup + +1. Clone Github repo `git clone https://github.com/Fechin/reference.git` +2. Install `npm` package manager (Read [installation guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)) +3. Run `npm install` in the root folder to install dependencies. +4. Run `npm run dev` to start a dev server. This serves the project and live reloads when any files are changed, then visit http://127.0.0.1:4000 preview. +5. Send us pull request and chill. + +A `source/_posts/{filename}.md` file will be processed into a cheat sheet, let's create or edit a markdown file: + +#### Front Matter +```markdown +--- +title: QuickRef +date: 2020-11-25 18:28:43 +icon: icon-style +background: bg-emerald-600 +tags: +categories: +- Other + intro: This is a reference of styles that you can use on quickref cheatsheets! +--- +``` +Just need `title` and `intro`, and ignore other options. I will complete it if it can be released. + +#### CSS classes +QuickRefs uses [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs) and supports adding classes via its syntax. Also, there is a reference of styles that you can use on `quickref.me` cheat sheets: https://quickref.me/quickref + + +At last, It's a good practice to refer to the source code of the existing cheat sheet! diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..d2ffa24 --- /dev/null +++ b/_config.yml @@ -0,0 +1,160 @@ +# Hexo Configuration +## Docs: https://hexo.io/docs/configuration.html +## Source: https://github.com/hexojs/hexo/ + +# Site +title: QuickRef.ME +subtitle: 'Quick Reference Cheat Sheet' +description: 'Share quick reference and cheat sheet for developers' +keywords: reference,cheatsheet,code table,snippets,linux +author: QuickRef.ME +language: en +timezone: '' + +# URL +## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' +url: https://quickref.me +root: / +permalink: :name.html +permalink_defaults: +pretty_urls: + trailing_index: false # Set to false to remove trailing 'index.html' from permalinks + trailing_html: false # Set to false to remove trailing '.html' from permalinks + +# Directory +source_dir: source +public_dir: public +#tag_dir: tag +archive_dir: archives +#category_dir: node +#code_dir: downloads/code +i18n_dir: :lang +skip_render: + - "assets/**/*" + - "_posts/README.md" + - "_posts/CONTRIBUTING.md" + +# Writing +new_post_name: :title.md # File name of new posts +default_layout: post +titlecase: false # Transform title into titlecase +external_link: + enable: true # Open external links in new tab + field: site # Apply to the whole site + exclude: '' +filename_case: 1 +render_drafts: false +post_asset_folder: false +relative_link: false +future: true +highlight: + enable: false + +# Home page setting +# path: Root path for your blogs index page. (default = '') +# per_page: Posts displayed per page. (0 = disable pagination) +# order_by: Posts order. (Order by date descending by default) +index_generator: + path: '' + per_page: 0 + order_by: -date + +# Category & Tag +default_category: uncategorized +category_map: +tag_map: + +# Metadata elements +## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta +meta_generator: false + +# Date / Time format +## Hexo uses Moment.js to parse and display date +## You can customize the date format as defined in +## http://momentjs.com/docs/#/displaying/format/ +date_format: YYYY-MM-DD +time_format: HH:mm:ss +## Use post's date for updated date unless set in front-matter +updated_option: 'date' + +# Pagination +## Set per_page to 0 to disable pagination +per_page: 10 +pagination_dir: page + +# Include / Exclude file(s) +## include:/exclude: options only apply to the 'source/' folder +include: +exclude: + - ".github" +ignore: + +# Extensions +## Plugins: https://hexo.io/plugins/ +## Themes: https://hexo.io/themes/ +theme: coo + +nofollow: + enable: true + field: site + exclude: + - 'exclude1.com' + +excerpt: + depth: 2 + excerpt_excludes: [] + more_excludes: [] + hideWholePostExcerpts: true + + +# Deployment +## Docs: https://hexo.io/docs/deployment.html +deploy: +# - type: cjh_google_url_submitter + - type: cjh_bing_url_submitter + - type: cjh_baidu_url_submitter + +# hexo-server configuration +server: + # Solve the problem that occasional real-time refresh is invalid and long articles are truncated + compress: true + +# https://github.com/hexojs/hexo-generator-sitemap#options +sitemap: + path: sitemap.xml + tags: false + categories: false + +# hexo-related-popular-posts +# https://github.com/tea3/hexo-related-popular-posts/wiki/More-Settings#popular-posts +popularPosts: + googleAnalyticsAPI: + clientId: 122889019292-92h297ceb29qnv9ulvgabad6q5kgv0an.apps.googleusercontent.com + serviceEmail: quickref-service@decent-courage-275204.iam.gserviceaccount.com + key: google-services-private-key.pem + viewId: 242826463 + dateRange: 30 # (Optional) The period you want to get by Google Analytics page view. Default = 30 + expiresDate: 10 # (optional) Expiration date of cache file. Default = 10 + # cache: # (Deprecated) This options is Deprecated > v0.1.3 + # path: hexo-related-popular-posts-ga-cached.json # (Deprecated) This options is Deprecated > v0.1.3 + # expiresDate: 10 # (Deprecated) This options is Deprecated > v0.1.3 + + +# Markdown-it configuration +## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki +markdown: + render: + html: true + xhtmlOut: false + breaks: false + linkify: false + typographer: false + quotes: '“”‘’' + anchors: + level: 2 + collisionSuffix: '' + permalink: true + permalinkClass: h-anchor + permalinkSymbol: '#' + case: 1 + separator: '-' diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..1539b72 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,37 @@ +const gulp = require('gulp'); +const htmlmin = require('gulp-htmlmin'); +const htmlclean = require('gulp-htmlclean'); +const version = require('gulp-version-number'); +const terser = require('gulp-terser'); + +// Compress js files +gulp.task('js', function () { + return gulp.src(['./public/js/main.js']) + .pipe(terser({ + compress: true + })) + .pipe(gulp.dest('./public/js')); +}); + + +// Build html files +gulp.task('html', function () { + return gulp.src('./public/**/*.html') + .pipe(htmlclean()) + .pipe(htmlmin({ + removeComments: true, + minifyJS: true, + minifyCSS: true, + minifyURLs: true, + })) + .pipe(version({ + 'append': { + 'key': '_v', + 'cover': 1, + 'to': ['css', 'js', 'png', 'jpg', 'woff2'] + } + })) + .pipe(gulp.dest('./public')); +}); + +gulp.task('default', gulp.parallel('js', 'html')); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..110af21 --- /dev/null +++ b/package.json @@ -0,0 +1,76 @@ +{ + "name": "QuickRef.ME", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "run-p dev:*", + "dev:hexo": "npx hexo clean && npx hexo server", + "dev:css": "npx postcss themes/coo/source/css/style.tailwindcss -o themes/coo/source/css/style.css --watch", + "build": "run-s build:*", + "build:clean": "npx hexo clean", + "build:css": "npx postcss themes/coo/source/css/style.tailwindcss -o themes/coo/source/css/style.css", + "build:generate": "npx hexo generate", + "build:cache": "npm cache clean --force", + "build:gulp": "npx gulp --max-old-space-size=4096" + }, + "hexo": { + "version": "5.4.2" + }, + "dependencies": { + "eslint": "^8.27.0", + "gulp": "^4.0.2", + "gulp-cli": "^2.3.0", + "gulp-ext-replace": "^0.3.0", + "gulp-htmlclean": "^2.7.22", + "gulp-htmlmin": "^5.0.1", + "gulp-minify-css": "^1.2.4", + "gulp-postcss": "^9.0.1", + "gulp-uglify-es": "^3.0.0", + "gulp-version-number": "^0.2.4", + "hexo": "^5.4.0", + "hexo-browsersync": "^0.3.0", + "hexo-cli": "^4.3.0", + "hexo-excerpt": "^1.2.1", + "hexo-filter-nofollow": "^2.0.2", + "hexo-generator-index": "^2.0.0", + "hexo-generator-sitemap": "^2.2.0", + "hexo-log": "^3.0.0", + "hexo-pagination": "^2.0.0", + "hexo-related-popular-posts": "^5.0.1", + "hexo-renderer-ejs": "^2.0.0", + "hexo-renderer-markdown-it": "^5.0.0", + "hexo-renderer-stylus": "^2.0.1", + "hexo-server": "^2.0.0", + "markdown-it-abbr": "^1.0.4", + "markdown-it-anchor": "^8.4.1", + "markdown-it-attrs": "^4.1.0", + "markdown-it-checkbox": "^1.1.0", + "markdown-it-emoji": "^2.0.0", + "markdown-it-footnote": "^3.0.3", + "markdown-it-highlight-lines": "^1.0.2", + "markdown-it-highlightjs": "^3.5.0", + "markdown-it-ins": "^3.0.1", + "markdown-it-multimd-table": "^4.1.1", + "markdown-it-shortcode-tag": "^1.1.0", + "markdown-it-sub": "^1.0.0", + "markdown-it-sup": "^1.0.0", + "markdown-it-task-lists": "^2.1.1" + }, + "devDependencies": { + "autoprefixer": "^10.4.0", + "gulp-clean-css": "^4.3.0", + "gulp-filesize": "^0.0.6", + "gulp-javascript-obfuscator": "^1.1.6", + "gulp-replace": "^1.1.3", + "gulp-rev": "^9.0.0", + "gulp-terser": "^2.1.0", + "npm-run-all": "^4.1.5", + "postcss": "^8.4.4", + "postcss-cli": "^9.1.0", + "postcss-import": "^14.0.2", + "postcss-minify": "^1.1.0", + "sync-request": "^6.1.0", + "tailwindcss": "^3.0.1", + "tailwindcss-cli": "^0.1.2" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..dff409f --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,8 @@ +module.exports = { + plugins: { + 'postcss-import': {path: 'themes/coo/source/css'}, + 'tailwindcss': {config: './tailwind.config.js'}, + 'autoprefixer': {}, + 'postcss-minify':{}, + } +}; \ No newline at end of file diff --git a/scaffolds/draft.md b/scaffolds/draft.md new file mode 100644 index 0000000..2945745 --- /dev/null +++ b/scaffolds/draft.md @@ -0,0 +1,6 @@ +--- +title: {{ title }} +date: {{ date }} +categories: +tags: +--- diff --git a/scaffolds/page.md b/scaffolds/page.md new file mode 100644 index 0000000..f01ba3c --- /dev/null +++ b/scaffolds/page.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +date: {{ date }} +--- diff --git a/scaffolds/post.md b/scaffolds/post.md new file mode 100644 index 0000000..648dba7 --- /dev/null +++ b/scaffolds/post.md @@ -0,0 +1,16 @@ +--- +title: {{ title }} +date: {{ date }} +icon: icon-{{ title }} +background: bg-blue-400 +tags: + - +categories: + - +intro: +--- + + + + + diff --git a/scaffolds/table.md b/scaffolds/table.md new file mode 100644 index 0000000..2945745 --- /dev/null +++ b/scaffolds/table.md @@ -0,0 +1,6 @@ +--- +title: {{ title }} +date: {{ date }} +categories: +tags: +--- diff --git a/aspect-ratio.md b/source/_posts/aspect-ratio.md similarity index 100% rename from aspect-ratio.md rename to source/_posts/aspect-ratio.md diff --git a/awk.md b/source/_posts/awk.md similarity index 100% rename from awk.md rename to source/_posts/awk.md diff --git a/bash.md b/source/_posts/bash.md similarity index 100% rename from bash.md rename to source/_posts/bash.md diff --git a/chmod.md b/source/_posts/chmod.md similarity index 100% rename from chmod.md rename to source/_posts/chmod.md diff --git a/cpp.md b/source/_posts/cpp.md similarity index 100% rename from cpp.md rename to source/_posts/cpp.md diff --git a/cron.md b/source/_posts/cron.md similarity index 100% rename from cron.md rename to source/_posts/cron.md diff --git a/cs.md b/source/_posts/cs.md similarity index 100% rename from cs.md rename to source/_posts/cs.md diff --git a/css.md b/source/_posts/css.md similarity index 100% rename from css.md rename to source/_posts/css.md diff --git a/dart.md b/source/_posts/dart.md similarity index 100% rename from dart.md rename to source/_posts/dart.md diff --git a/docker.md b/source/_posts/docker.md similarity index 100% rename from docker.md rename to source/_posts/docker.md diff --git a/emacs.md b/source/_posts/emacs.md similarity index 100% rename from emacs.md rename to source/_posts/emacs.md diff --git a/emmet.md b/source/_posts/emmet.md similarity index 100% rename from emmet.md rename to source/_posts/emmet.md diff --git a/emoji.md b/source/_posts/emoji.md similarity index 100% rename from emoji.md rename to source/_posts/emoji.md diff --git a/find.md b/source/_posts/find.md similarity index 100% rename from find.md rename to source/_posts/find.md diff --git a/git.md b/source/_posts/git.md similarity index 100% rename from git.md rename to source/_posts/git.md diff --git a/golang.md b/source/_posts/golang.md similarity index 100% rename from golang.md rename to source/_posts/golang.md diff --git a/graphql.md b/source/_posts/graphql.md similarity index 100% rename from graphql.md rename to source/_posts/graphql.md diff --git a/grep.md b/source/_posts/grep.md similarity index 100% rename from grep.md rename to source/_posts/grep.md diff --git a/html-char.md b/source/_posts/html-char.md similarity index 100% rename from html-char.md rename to source/_posts/html-char.md diff --git a/html.md b/source/_posts/html.md similarity index 100% rename from html.md rename to source/_posts/html.md diff --git a/http-status-code.md b/source/_posts/http-status-code.md similarity index 100% rename from http-status-code.md rename to source/_posts/http-status-code.md diff --git a/idea.md b/source/_posts/idea.md similarity index 100% rename from idea.md rename to source/_posts/idea.md diff --git a/iso-639-1.md b/source/_posts/iso-639-1.md similarity index 100% rename from iso-639-1.md rename to source/_posts/iso-639-1.md diff --git a/java.md b/source/_posts/java.md similarity index 100% rename from java.md rename to source/_posts/java.md diff --git a/javascript.md b/source/_posts/javascript.md similarity index 100% rename from javascript.md rename to source/_posts/javascript.md diff --git a/jquery.md b/source/_posts/jquery.md similarity index 100% rename from jquery.md rename to source/_posts/jquery.md diff --git a/json.md b/source/_posts/json.md similarity index 100% rename from json.md rename to source/_posts/json.md diff --git a/laravel.md b/source/_posts/laravel.md similarity index 100% rename from laravel.md rename to source/_posts/laravel.md diff --git a/lsof.md b/source/_posts/lsof.md similarity index 100% rename from lsof.md rename to source/_posts/lsof.md diff --git a/markdown.md b/source/_posts/markdown.md similarity index 100% rename from markdown.md rename to source/_posts/markdown.md diff --git a/mime.md b/source/_posts/mime.md similarity index 100% rename from mime.md rename to source/_posts/mime.md diff --git a/mitmproxy.md b/source/_posts/mitmproxy.md similarity index 100% rename from mitmproxy.md rename to source/_posts/mitmproxy.md diff --git a/mysql.md b/source/_posts/mysql.md similarity index 100% rename from mysql.md rename to source/_posts/mysql.md diff --git a/nc.md b/source/_posts/nc.md similarity index 100% rename from nc.md rename to source/_posts/nc.md diff --git a/neo4j.md b/source/_posts/neo4j.md similarity index 100% rename from neo4j.md rename to source/_posts/neo4j.md diff --git a/netstat.md b/source/_posts/netstat.md similarity index 100% rename from netstat.md rename to source/_posts/netstat.md diff --git a/note/javascript/array/cast-a-value-as-an-array.md b/source/_posts/note/javascript/array/cast-a-value-as-an-array.md similarity index 100% rename from note/javascript/array/cast-a-value-as-an-array.md rename to source/_posts/note/javascript/array/cast-a-value-as-an-array.md diff --git a/note/javascript/array/check-if-an-array-is-empty.md b/source/_posts/note/javascript/array/check-if-an-array-is-empty.md similarity index 100% rename from note/javascript/array/check-if-an-array-is-empty.md rename to source/_posts/note/javascript/array/check-if-an-array-is-empty.md diff --git a/note/javascript/array/clone-an-array.md b/source/_posts/note/javascript/array/clone-an-array.md similarity index 100% rename from note/javascript/array/clone-an-array.md rename to source/_posts/note/javascript/array/clone-an-array.md diff --git a/note/javascript/array/compare-two-arrays-regardless-of-order.md b/source/_posts/note/javascript/array/compare-two-arrays-regardless-of-order.md similarity index 100% rename from note/javascript/array/compare-two-arrays-regardless-of-order.md rename to source/_posts/note/javascript/array/compare-two-arrays-regardless-of-order.md diff --git a/note/javascript/array/compare-two-arrays.md b/source/_posts/note/javascript/array/compare-two-arrays.md similarity index 100% rename from note/javascript/array/compare-two-arrays.md rename to source/_posts/note/javascript/array/compare-two-arrays.md diff --git a/note/javascript/array/convert-an-array-of-objects-to-a-single-object.md b/source/_posts/note/javascript/array/convert-an-array-of-objects-to-a-single-object.md similarity index 100% rename from note/javascript/array/convert-an-array-of-objects-to-a-single-object.md rename to source/_posts/note/javascript/array/convert-an-array-of-objects-to-a-single-object.md diff --git a/note/javascript/array/convert-an-array-of-strings-to-numbers.md b/source/_posts/note/javascript/array/convert-an-array-of-strings-to-numbers.md similarity index 100% rename from note/javascript/array/convert-an-array-of-strings-to-numbers.md rename to source/_posts/note/javascript/array/convert-an-array-of-strings-to-numbers.md diff --git a/note/javascript/array/count-by-the-properties-of-an-array-of-objects.md b/source/_posts/note/javascript/array/count-by-the-properties-of-an-array-of-objects.md similarity index 100% rename from note/javascript/array/count-by-the-properties-of-an-array-of-objects.md rename to source/_posts/note/javascript/array/count-by-the-properties-of-an-array-of-objects.md diff --git a/note/javascript/array/count-the-occurrences-of-a-value-in-an-array.md b/source/_posts/note/javascript/array/count-the-occurrences-of-a-value-in-an-array.md similarity index 100% rename from note/javascript/array/count-the-occurrences-of-a-value-in-an-array.md rename to source/_posts/note/javascript/array/count-the-occurrences-of-a-value-in-an-array.md diff --git a/note/javascript/array/count-the-occurrences-of-array-elements.md b/source/_posts/note/javascript/array/count-the-occurrences-of-array-elements.md similarity index 100% rename from note/javascript/array/count-the-occurrences-of-array-elements.md rename to source/_posts/note/javascript/array/count-the-occurrences-of-array-elements.md diff --git a/note/javascript/array/create-an-array-of-cumulative-sum.md b/source/_posts/note/javascript/array/create-an-array-of-cumulative-sum.md similarity index 100% rename from note/javascript/array/create-an-array-of-cumulative-sum.md rename to source/_posts/note/javascript/array/create-an-array-of-cumulative-sum.md diff --git a/note/javascript/array/create-an-array-of-numbers-in-the-given-range.md b/source/_posts/note/javascript/array/create-an-array-of-numbers-in-the-given-range.md similarity index 100% rename from note/javascript/array/create-an-array-of-numbers-in-the-given-range.md rename to source/_posts/note/javascript/array/create-an-array-of-numbers-in-the-given-range.md diff --git a/note/javascript/array/create-cartesian-product.md b/source/_posts/note/javascript/array/create-cartesian-product.md similarity index 100% rename from note/javascript/array/create-cartesian-product.md rename to source/_posts/note/javascript/array/create-cartesian-product.md diff --git a/note/javascript/array/empty-an-array.md b/source/_posts/note/javascript/array/empty-an-array.md similarity index 100% rename from note/javascript/array/empty-an-array.md rename to source/_posts/note/javascript/array/empty-an-array.md diff --git a/note/javascript/array/find-the-closest-number-from-an-array.md b/source/_posts/note/javascript/array/find-the-closest-number-from-an-array.md similarity index 100% rename from note/javascript/array/find-the-closest-number-from-an-array.md rename to source/_posts/note/javascript/array/find-the-closest-number-from-an-array.md diff --git a/note/javascript/array/find-the-index-of-the-last-matching-item-of-an-array.md b/source/_posts/note/javascript/array/find-the-index-of-the-last-matching-item-of-an-array.md similarity index 100% rename from note/javascript/array/find-the-index-of-the-last-matching-item-of-an-array.md rename to source/_posts/note/javascript/array/find-the-index-of-the-last-matching-item-of-an-array.md diff --git a/note/javascript/array/find-the-index-of-the-maximum-item-of-an-array.md b/source/_posts/note/javascript/array/find-the-index-of-the-maximum-item-of-an-array.md similarity index 100% rename from note/javascript/array/find-the-index-of-the-maximum-item-of-an-array.md rename to source/_posts/note/javascript/array/find-the-index-of-the-maximum-item-of-an-array.md diff --git a/note/javascript/array/find-the-index-of-the-minimum-item-of-an-array.md b/source/_posts/note/javascript/array/find-the-index-of-the-minimum-item-of-an-array.md similarity index 100% rename from note/javascript/array/find-the-index-of-the-minimum-item-of-an-array.md rename to source/_posts/note/javascript/array/find-the-index-of-the-minimum-item-of-an-array.md diff --git a/note/javascript/array/find-the-length-of-the-longest-string-in-an-array.md b/source/_posts/note/javascript/array/find-the-length-of-the-longest-string-in-an-array.md similarity index 100% rename from note/javascript/array/find-the-length-of-the-longest-string-in-an-array.md rename to source/_posts/note/javascript/array/find-the-length-of-the-longest-string-in-an-array.md diff --git a/note/javascript/array/find-the-maximum-item-of-an-array-by-given-key.md b/source/_posts/note/javascript/array/find-the-maximum-item-of-an-array-by-given-key.md similarity index 100% rename from note/javascript/array/find-the-maximum-item-of-an-array-by-given-key.md rename to source/_posts/note/javascript/array/find-the-maximum-item-of-an-array-by-given-key.md diff --git a/note/javascript/array/find-the-maximum-item-of-an-array.md b/source/_posts/note/javascript/array/find-the-maximum-item-of-an-array.md similarity index 100% rename from note/javascript/array/find-the-maximum-item-of-an-array.md rename to source/_posts/note/javascript/array/find-the-maximum-item-of-an-array.md diff --git a/note/javascript/array/find-the-minimum-item-of-an-array-by-given-key.md b/source/_posts/note/javascript/array/find-the-minimum-item-of-an-array-by-given-key.md similarity index 100% rename from note/javascript/array/find-the-minimum-item-of-an-array-by-given-key.md rename to source/_posts/note/javascript/array/find-the-minimum-item-of-an-array-by-given-key.md diff --git a/note/javascript/array/find-the-minimum-item-of-an-array.md b/source/_posts/note/javascript/array/find-the-minimum-item-of-an-array.md similarity index 100% rename from note/javascript/array/find-the-minimum-item-of-an-array.md rename to source/_posts/note/javascript/array/find-the-minimum-item-of-an-array.md diff --git a/note/javascript/array/flatten-an-array.md b/source/_posts/note/javascript/array/flatten-an-array.md similarity index 100% rename from note/javascript/array/flatten-an-array.md rename to source/_posts/note/javascript/array/flatten-an-array.md diff --git a/note/javascript/array/get-all-arrays-of-consecutive-elements.md b/source/_posts/note/javascript/array/get-all-arrays-of-consecutive-elements.md similarity index 100% rename from note/javascript/array/get-all-arrays-of-consecutive-elements.md rename to source/_posts/note/javascript/array/get-all-arrays-of-consecutive-elements.md diff --git a/note/javascript/array/get-all-nth-items-of-an-array.md b/source/_posts/note/javascript/array/get-all-nth-items-of-an-array.md similarity index 100% rename from note/javascript/array/get-all-nth-items-of-an-array.md rename to source/_posts/note/javascript/array/get-all-nth-items-of-an-array.md diff --git a/note/javascript/array/get-all-subsets-of-an-array.md b/source/_posts/note/javascript/array/get-all-subsets-of-an-array.md similarity index 100% rename from note/javascript/array/get-all-subsets-of-an-array.md rename to source/_posts/note/javascript/array/get-all-subsets-of-an-array.md diff --git a/note/javascript/array/get-indices-of-a-value-in-an-array.md b/source/_posts/note/javascript/array/get-indices-of-a-value-in-an-array.md similarity index 100% rename from note/javascript/array/get-indices-of-a-value-in-an-array.md rename to source/_posts/note/javascript/array/get-indices-of-a-value-in-an-array.md diff --git a/note/javascript/array/get-the-average-of-an-array.md b/source/_posts/note/javascript/array/get-the-average-of-an-array.md similarity index 100% rename from note/javascript/array/get-the-average-of-an-array.md rename to source/_posts/note/javascript/array/get-the-average-of-an-array.md diff --git a/note/javascript/array/get-the-intersection-of-arrays.md b/source/_posts/note/javascript/array/get-the-intersection-of-arrays.md similarity index 100% rename from note/javascript/array/get-the-intersection-of-arrays.md rename to source/_posts/note/javascript/array/get-the-intersection-of-arrays.md diff --git a/note/javascript/array/get-the-rank-of-an-array-of-numbers.md b/source/_posts/note/javascript/array/get-the-rank-of-an-array-of-numbers.md similarity index 100% rename from note/javascript/array/get-the-rank-of-an-array-of-numbers.md rename to source/_posts/note/javascript/array/get-the-rank-of-an-array-of-numbers.md diff --git a/note/javascript/array/get-the-sum-of-an-array-of-numbers.md b/source/_posts/note/javascript/array/get-the-sum-of-an-array-of-numbers.md similarity index 100% rename from note/javascript/array/get-the-sum-of-an-array-of-numbers.md rename to source/_posts/note/javascript/array/get-the-sum-of-an-array-of-numbers.md diff --git a/note/javascript/array/get-the-unique-values-of-an-array.md b/source/_posts/note/javascript/array/get-the-unique-values-of-an-array.md similarity index 100% rename from note/javascript/array/get-the-unique-values-of-an-array.md rename to source/_posts/note/javascript/array/get-the-unique-values-of-an-array.md diff --git a/note/javascript/array/get-union-of-arrays.md b/source/_posts/note/javascript/array/get-union-of-arrays.md similarity index 100% rename from note/javascript/array/get-union-of-arrays.md rename to source/_posts/note/javascript/array/get-union-of-arrays.md diff --git a/note/javascript/array/group-an-array-of-objects-by-a-key.md b/source/_posts/note/javascript/array/group-an-array-of-objects-by-a-key.md similarity index 100% rename from note/javascript/array/group-an-array-of-objects-by-a-key.md rename to source/_posts/note/javascript/array/group-an-array-of-objects-by-a-key.md diff --git a/note/javascript/array/merge-two-arrays.md b/source/_posts/note/javascript/array/merge-two-arrays.md similarity index 100% rename from note/javascript/array/merge-two-arrays.md rename to source/_posts/note/javascript/array/merge-two-arrays.md diff --git a/note/javascript/array/partition-an-array-based-on-a-condition.md b/source/_posts/note/javascript/array/partition-an-array-based-on-a-condition.md similarity index 100% rename from note/javascript/array/partition-an-array-based-on-a-condition.md rename to source/_posts/note/javascript/array/partition-an-array-based-on-a-condition.md diff --git a/note/javascript/array/remove-duplicate-values-in-an-array.md b/source/_posts/note/javascript/array/remove-duplicate-values-in-an-array.md similarity index 100% rename from note/javascript/array/remove-duplicate-values-in-an-array.md rename to source/_posts/note/javascript/array/remove-duplicate-values-in-an-array.md diff --git a/note/javascript/array/remove-falsy-values-from-array.md b/source/_posts/note/javascript/array/remove-falsy-values-from-array.md similarity index 100% rename from note/javascript/array/remove-falsy-values-from-array.md rename to source/_posts/note/javascript/array/remove-falsy-values-from-array.md diff --git a/note/javascript/array/repeat-an-array.md b/source/_posts/note/javascript/array/repeat-an-array.md similarity index 100% rename from note/javascript/array/repeat-an-array.md rename to source/_posts/note/javascript/array/repeat-an-array.md diff --git a/note/javascript/array/shuffle-an-array.md b/source/_posts/note/javascript/array/shuffle-an-array.md similarity index 100% rename from note/javascript/array/shuffle-an-array.md rename to source/_posts/note/javascript/array/shuffle-an-array.md diff --git a/note/javascript/array/sort-an-array-of-items-by-given-key.md b/source/_posts/note/javascript/array/sort-an-array-of-items-by-given-key.md similarity index 100% rename from note/javascript/array/sort-an-array-of-items-by-given-key.md rename to source/_posts/note/javascript/array/sort-an-array-of-items-by-given-key.md diff --git a/note/javascript/array/sort-an-array-of-numbers.md b/source/_posts/note/javascript/array/sort-an-array-of-numbers.md similarity index 100% rename from note/javascript/array/sort-an-array-of-numbers.md rename to source/_posts/note/javascript/array/sort-an-array-of-numbers.md diff --git a/note/javascript/array/split-an-array-into-chunks.md b/source/_posts/note/javascript/array/split-an-array-into-chunks.md similarity index 100% rename from note/javascript/array/split-an-array-into-chunks.md rename to source/_posts/note/javascript/array/split-an-array-into-chunks.md diff --git a/note/javascript/array/swap-the-rows-and-columns-of-a-matrix.md b/source/_posts/note/javascript/array/swap-the-rows-and-columns-of-a-matrix.md similarity index 100% rename from note/javascript/array/swap-the-rows-and-columns-of-a-matrix.md rename to source/_posts/note/javascript/array/swap-the-rows-and-columns-of-a-matrix.md diff --git a/note/javascript/array/swap-two-array-items.md b/source/_posts/note/javascript/array/swap-two-array-items.md similarity index 100% rename from note/javascript/array/swap-two-array-items.md rename to source/_posts/note/javascript/array/swap-two-array-items.md diff --git a/note/javascript/array/unzip-an-array-of-arrays.md b/source/_posts/note/javascript/array/unzip-an-array-of-arrays.md similarity index 100% rename from note/javascript/array/unzip-an-array-of-arrays.md rename to source/_posts/note/javascript/array/unzip-an-array-of-arrays.md diff --git a/note/javascript/array/zip-multiple-arrays.md b/source/_posts/note/javascript/array/zip-multiple-arrays.md similarity index 100% rename from note/javascript/array/zip-multiple-arrays.md rename to source/_posts/note/javascript/array/zip-multiple-arrays.md diff --git a/note/javascript/date-time/add-am-pm-suffix-to-an-hour.md b/source/_posts/note/javascript/date-time/add-am-pm-suffix-to-an-hour.md similarity index 100% rename from note/javascript/date-time/add-am-pm-suffix-to-an-hour.md rename to source/_posts/note/javascript/date-time/add-am-pm-suffix-to-an-hour.md diff --git a/note/javascript/date-time/calculate-the-number-of-difference-days-between-two-dates.md b/source/_posts/note/javascript/date-time/calculate-the-number-of-difference-days-between-two-dates.md similarity index 100% rename from note/javascript/date-time/calculate-the-number-of-difference-days-between-two-dates.md rename to source/_posts/note/javascript/date-time/calculate-the-number-of-difference-days-between-two-dates.md diff --git a/note/javascript/date-time/calculate-the-number-of-months-between-two-dates.md b/source/_posts/note/javascript/date-time/calculate-the-number-of-months-between-two-dates.md similarity index 100% rename from note/javascript/date-time/calculate-the-number-of-months-between-two-dates.md rename to source/_posts/note/javascript/date-time/calculate-the-number-of-months-between-two-dates.md diff --git a/note/javascript/date-time/compare-two-dates.md b/source/_posts/note/javascript/date-time/compare-two-dates.md similarity index 100% rename from note/javascript/date-time/compare-two-dates.md rename to source/_posts/note/javascript/date-time/compare-two-dates.md diff --git a/note/javascript/date-time/convert-a-date-to-yyyy-mm-dd-format.md b/source/_posts/note/javascript/date-time/convert-a-date-to-yyyy-mm-dd-format.md similarity index 100% rename from note/javascript/date-time/convert-a-date-to-yyyy-mm-dd-format.md rename to source/_posts/note/javascript/date-time/convert-a-date-to-yyyy-mm-dd-format.md diff --git a/note/javascript/date-time/convert-seconds-to-hh-mm-ss-format.md b/source/_posts/note/javascript/date-time/convert-seconds-to-hh-mm-ss-format.md similarity index 100% rename from note/javascript/date-time/convert-seconds-to-hh-mm-ss-format.md rename to source/_posts/note/javascript/date-time/convert-seconds-to-hh-mm-ss-format.md diff --git a/note/javascript/date-time/extract-year-month-day-hour-minute-second-and-millisecond-from-a-date.md b/source/_posts/note/javascript/date-time/extract-year-month-day-hour-minute-second-and-millisecond-from-a-date.md similarity index 100% rename from note/javascript/date-time/extract-year-month-day-hour-minute-second-and-millisecond-from-a-date.md rename to source/_posts/note/javascript/date-time/extract-year-month-day-hour-minute-second-and-millisecond-from-a-date.md diff --git a/note/javascript/date-time/format-a-date-for-the-given-locale.md b/source/_posts/note/javascript/date-time/format-a-date-for-the-given-locale.md similarity index 100% rename from note/javascript/date-time/format-a-date-for-the-given-locale.md rename to source/_posts/note/javascript/date-time/format-a-date-for-the-given-locale.md diff --git a/note/javascript/date-time/get-the-current-quarter-of-a-date.md b/source/_posts/note/javascript/date-time/get-the-current-quarter-of-a-date.md similarity index 100% rename from note/javascript/date-time/get-the-current-quarter-of-a-date.md rename to source/_posts/note/javascript/date-time/get-the-current-quarter-of-a-date.md diff --git a/note/javascript/date-time/get-the-current-timestamp-in-seconds.md b/source/_posts/note/javascript/date-time/get-the-current-timestamp-in-seconds.md similarity index 100% rename from note/javascript/date-time/get-the-current-timestamp-in-seconds.md rename to source/_posts/note/javascript/date-time/get-the-current-timestamp-in-seconds.md diff --git a/note/javascript/date-time/get-the-day-of-the-year-from-a-date.md b/source/_posts/note/javascript/date-time/get-the-day-of-the-year-from-a-date.md similarity index 100% rename from note/javascript/date-time/get-the-day-of-the-year-from-a-date.md rename to source/_posts/note/javascript/date-time/get-the-day-of-the-year-from-a-date.md diff --git a/note/javascript/date-time/get-the-first-date-in-the-month-of-a-date.md b/source/_posts/note/javascript/date-time/get-the-first-date-in-the-month-of-a-date.md similarity index 100% rename from note/javascript/date-time/get-the-first-date-in-the-month-of-a-date.md rename to source/_posts/note/javascript/date-time/get-the-first-date-in-the-month-of-a-date.md diff --git a/note/javascript/date-time/get-the-last-date-in-the-month-of-a-date.md b/source/_posts/note/javascript/date-time/get-the-last-date-in-the-month-of-a-date.md similarity index 100% rename from note/javascript/date-time/get-the-last-date-in-the-month-of-a-date.md rename to source/_posts/note/javascript/date-time/get-the-last-date-in-the-month-of-a-date.md diff --git a/note/javascript/date-time/get-the-month-name-of-a-date.md b/source/_posts/note/javascript/date-time/get-the-month-name-of-a-date.md similarity index 100% rename from note/javascript/date-time/get-the-month-name-of-a-date.md rename to source/_posts/note/javascript/date-time/get-the-month-name-of-a-date.md diff --git a/note/javascript/date-time/get-the-number-of-days-in-given-month.md b/source/_posts/note/javascript/date-time/get-the-number-of-days-in-given-month.md similarity index 100% rename from note/javascript/date-time/get-the-number-of-days-in-given-month.md rename to source/_posts/note/javascript/date-time/get-the-number-of-days-in-given-month.md diff --git a/note/javascript/date-time/get-the-timezone-string.md b/source/_posts/note/javascript/date-time/get-the-timezone-string.md similarity index 100% rename from note/javascript/date-time/get-the-timezone-string.md rename to source/_posts/note/javascript/date-time/get-the-timezone-string.md diff --git a/note/javascript/date-time/get-the-tomorrow-date.md b/source/_posts/note/javascript/date-time/get-the-tomorrow-date.md similarity index 100% rename from note/javascript/date-time/get-the-tomorrow-date.md rename to source/_posts/note/javascript/date-time/get-the-tomorrow-date.md diff --git a/note/javascript/date-time/get-the-total-number-of-days-in-a-year.md b/source/_posts/note/javascript/date-time/get-the-total-number-of-days-in-a-year.md similarity index 100% rename from note/javascript/date-time/get-the-total-number-of-days-in-a-year.md rename to source/_posts/note/javascript/date-time/get-the-total-number-of-days-in-a-year.md diff --git a/note/javascript/date-time/get-the-weekday-of-a-date.md b/source/_posts/note/javascript/date-time/get-the-weekday-of-a-date.md similarity index 100% rename from note/javascript/date-time/get-the-weekday-of-a-date.md rename to source/_posts/note/javascript/date-time/get-the-weekday-of-a-date.md diff --git a/note/javascript/date-time/get-the-yesterday-date.md b/source/_posts/note/javascript/date-time/get-the-yesterday-date.md similarity index 100% rename from note/javascript/date-time/get-the-yesterday-date.md rename to source/_posts/note/javascript/date-time/get-the-yesterday-date.md diff --git a/note/javascript/date-time/initialize-the-current-date-but-set-time-to-midnight.md b/source/_posts/note/javascript/date-time/initialize-the-current-date-but-set-time-to-midnight.md similarity index 100% rename from note/javascript/date-time/initialize-the-current-date-but-set-time-to-midnight.md rename to source/_posts/note/javascript/date-time/initialize-the-current-date-but-set-time-to-midnight.md diff --git a/note/javascript/date-time/sort-an-array-of-dates.md b/source/_posts/note/javascript/date-time/sort-an-array-of-dates.md similarity index 100% rename from note/javascript/date-time/sort-an-array-of-dates.md rename to source/_posts/note/javascript/date-time/sort-an-array-of-dates.md diff --git a/note/javascript/dom/check-if-an-element-is-a-descendant-of-another.md b/source/_posts/note/javascript/dom/check-if-an-element-is-a-descendant-of-another.md similarity index 100% rename from note/javascript/dom/check-if-an-element-is-a-descendant-of-another.md rename to source/_posts/note/javascript/dom/check-if-an-element-is-a-descendant-of-another.md diff --git a/note/javascript/dom/check-if-an-element-is-focused.md b/source/_posts/note/javascript/dom/check-if-an-element-is-focused.md similarity index 100% rename from note/javascript/dom/check-if-an-element-is-focused.md rename to source/_posts/note/javascript/dom/check-if-an-element-is-focused.md diff --git a/note/javascript/dom/check-if-the-touch-events-are-supported.md b/source/_posts/note/javascript/dom/check-if-the-touch-events-are-supported.md similarity index 100% rename from note/javascript/dom/check-if-the-touch-events-are-supported.md rename to source/_posts/note/javascript/dom/check-if-the-touch-events-are-supported.md diff --git a/note/javascript/dom/check-if-user-scrolls-to-the-bottom-of-the-page.md b/source/_posts/note/javascript/dom/check-if-user-scrolls-to-the-bottom-of-the-page.md similarity index 100% rename from note/javascript/dom/check-if-user-scrolls-to-the-bottom-of-the-page.md rename to source/_posts/note/javascript/dom/check-if-user-scrolls-to-the-bottom-of-the-page.md diff --git a/note/javascript/dom/detect-internet-explorer-browser.md b/source/_posts/note/javascript/dom/detect-internet-explorer-browser.md similarity index 100% rename from note/javascript/dom/detect-internet-explorer-browser.md rename to source/_posts/note/javascript/dom/detect-internet-explorer-browser.md diff --git a/note/javascript/dom/detect-macos-browser.md b/source/_posts/note/javascript/dom/detect-macos-browser.md similarity index 100% rename from note/javascript/dom/detect-macos-browser.md rename to source/_posts/note/javascript/dom/detect-macos-browser.md diff --git a/note/javascript/dom/get-all-siblings-of-an-element.md b/source/_posts/note/javascript/dom/get-all-siblings-of-an-element.md similarity index 100% rename from note/javascript/dom/get-all-siblings-of-an-element.md rename to source/_posts/note/javascript/dom/get-all-siblings-of-an-element.md diff --git a/note/javascript/dom/get-the-position-of-an-element-relative-to-the-document.md b/source/_posts/note/javascript/dom/get-the-position-of-an-element-relative-to-the-document.md similarity index 100% rename from note/javascript/dom/get-the-position-of-an-element-relative-to-the-document.md rename to source/_posts/note/javascript/dom/get-the-position-of-an-element-relative-to-the-document.md diff --git a/note/javascript/dom/get-the-selected-text.md b/source/_posts/note/javascript/dom/get-the-selected-text.md similarity index 100% rename from note/javascript/dom/get-the-selected-text.md rename to source/_posts/note/javascript/dom/get-the-selected-text.md diff --git a/note/javascript/dom/go-back-to-the-previous-page.md b/source/_posts/note/javascript/dom/go-back-to-the-previous-page.md similarity index 100% rename from note/javascript/dom/go-back-to-the-previous-page.md rename to source/_posts/note/javascript/dom/go-back-to-the-previous-page.md diff --git a/note/javascript/dom/hide-an-element.md b/source/_posts/note/javascript/dom/hide-an-element.md similarity index 100% rename from note/javascript/dom/hide-an-element.md rename to source/_posts/note/javascript/dom/hide-an-element.md diff --git a/note/javascript/dom/insert-an-element-after-other-one.md b/source/_posts/note/javascript/dom/insert-an-element-after-other-one.md similarity index 100% rename from note/javascript/dom/insert-an-element-after-other-one.md rename to source/_posts/note/javascript/dom/insert-an-element-after-other-one.md diff --git a/note/javascript/dom/insert-an-element-before-other-one.md b/source/_posts/note/javascript/dom/insert-an-element-before-other-one.md similarity index 100% rename from note/javascript/dom/insert-an-element-before-other-one.md rename to source/_posts/note/javascript/dom/insert-an-element-before-other-one.md diff --git a/note/javascript/dom/insert-given-html-after-an-element.md b/source/_posts/note/javascript/dom/insert-given-html-after-an-element.md similarity index 100% rename from note/javascript/dom/insert-given-html-after-an-element.md rename to source/_posts/note/javascript/dom/insert-given-html-after-an-element.md diff --git a/note/javascript/dom/insert-given-html-before-an-element.md b/source/_posts/note/javascript/dom/insert-given-html-before-an-element.md similarity index 100% rename from note/javascript/dom/insert-given-html-before-an-element.md rename to source/_posts/note/javascript/dom/insert-given-html-before-an-element.md diff --git a/note/javascript/dom/redirect-to-another-page.md b/source/_posts/note/javascript/dom/redirect-to-another-page.md similarity index 100% rename from note/javascript/dom/redirect-to-another-page.md rename to source/_posts/note/javascript/dom/redirect-to-another-page.md diff --git a/note/javascript/dom/reload-the-current-page.md b/source/_posts/note/javascript/dom/reload-the-current-page.md similarity index 100% rename from note/javascript/dom/reload-the-current-page.md rename to source/_posts/note/javascript/dom/reload-the-current-page.md diff --git a/note/javascript/dom/replace-an-element.md b/source/_posts/note/javascript/dom/replace-an-element.md similarity index 100% rename from note/javascript/dom/replace-an-element.md rename to source/_posts/note/javascript/dom/replace-an-element.md diff --git a/note/javascript/dom/scroll-to-top-of-the-page.md b/source/_posts/note/javascript/dom/scroll-to-top-of-the-page.md similarity index 100% rename from note/javascript/dom/scroll-to-top-of-the-page.md rename to source/_posts/note/javascript/dom/scroll-to-top-of-the-page.md diff --git a/note/javascript/dom/serialize-form-data.md b/source/_posts/note/javascript/dom/serialize-form-data.md similarity index 100% rename from note/javascript/dom/serialize-form-data.md rename to source/_posts/note/javascript/dom/serialize-form-data.md diff --git a/note/javascript/dom/show-an-element.md b/source/_posts/note/javascript/dom/show-an-element.md similarity index 100% rename from note/javascript/dom/show-an-element.md rename to source/_posts/note/javascript/dom/show-an-element.md diff --git a/note/javascript/dom/strip-html-from-a-given-text.md b/source/_posts/note/javascript/dom/strip-html-from-a-given-text.md similarity index 100% rename from note/javascript/dom/strip-html-from-a-given-text.md rename to source/_posts/note/javascript/dom/strip-html-from-a-given-text.md diff --git a/note/javascript/dom/toggle-an-element.md b/source/_posts/note/javascript/dom/toggle-an-element.md similarity index 100% rename from note/javascript/dom/toggle-an-element.md rename to source/_posts/note/javascript/dom/toggle-an-element.md diff --git a/note/javascript/function/box-handler.md b/source/_posts/note/javascript/function/box-handler.md similarity index 100% rename from note/javascript/function/box-handler.md rename to source/_posts/note/javascript/function/box-handler.md diff --git a/note/javascript/function/check-if-a-value-is-a-function.md b/source/_posts/note/javascript/function/check-if-a-value-is-a-function.md similarity index 100% rename from note/javascript/function/check-if-a-value-is-a-function.md rename to source/_posts/note/javascript/function/check-if-a-value-is-a-function.md diff --git a/note/javascript/function/check-if-a-value-is-a-generator-function.md b/source/_posts/note/javascript/function/check-if-a-value-is-a-generator-function.md similarity index 100% rename from note/javascript/function/check-if-a-value-is-a-generator-function.md rename to source/_posts/note/javascript/function/check-if-a-value-is-a-generator-function.md diff --git a/note/javascript/function/check-if-a-value-is-an-async-function.md b/source/_posts/note/javascript/function/check-if-a-value-is-an-async-function.md similarity index 100% rename from note/javascript/function/check-if-a-value-is-an-async-function.md rename to source/_posts/note/javascript/function/check-if-a-value-is-an-async-function.md diff --git a/note/javascript/function/compose-functions-from-left-to-right.md b/source/_posts/note/javascript/function/compose-functions-from-left-to-right.md similarity index 100% rename from note/javascript/function/compose-functions-from-left-to-right.md rename to source/_posts/note/javascript/function/compose-functions-from-left-to-right.md diff --git a/note/javascript/function/compose-functions.md b/source/_posts/note/javascript/function/compose-functions.md similarity index 100% rename from note/javascript/function/compose-functions.md rename to source/_posts/note/javascript/function/compose-functions.md diff --git a/note/javascript/function/create-a-function-that-accepts-a-single-argument.md b/source/_posts/note/javascript/function/create-a-function-that-accepts-a-single-argument.md similarity index 100% rename from note/javascript/function/create-a-function-that-accepts-a-single-argument.md rename to source/_posts/note/javascript/function/create-a-function-that-accepts-a-single-argument.md diff --git a/note/javascript/function/create-an-empty-function.md b/source/_posts/note/javascript/function/create-an-empty-function.md similarity index 100% rename from note/javascript/function/create-an-empty-function.md rename to source/_posts/note/javascript/function/create-an-empty-function.md diff --git a/note/javascript/function/curry-a-function.md b/source/_posts/note/javascript/function/curry-a-function.md similarity index 100% rename from note/javascript/function/curry-a-function.md rename to source/_posts/note/javascript/function/curry-a-function.md diff --git a/note/javascript/function/delay-the-evaluation-of-a-function.md b/source/_posts/note/javascript/function/delay-the-evaluation-of-a-function.md similarity index 100% rename from note/javascript/function/delay-the-evaluation-of-a-function.md rename to source/_posts/note/javascript/function/delay-the-evaluation-of-a-function.md diff --git a/note/javascript/function/execute-a-function-once.md b/source/_posts/note/javascript/function/execute-a-function-once.md similarity index 100% rename from note/javascript/function/execute-a-function-once.md rename to source/_posts/note/javascript/function/execute-a-function-once.md diff --git a/note/javascript/function/flip-the-arguments-of-a-function.md b/source/_posts/note/javascript/function/flip-the-arguments-of-a-function.md similarity index 100% rename from note/javascript/function/flip-the-arguments-of-a-function.md rename to source/_posts/note/javascript/function/flip-the-arguments-of-a-function.md diff --git a/note/javascript/function/identity-function.md b/source/_posts/note/javascript/function/identity-function.md similarity index 100% rename from note/javascript/function/identity-function.md rename to source/_posts/note/javascript/function/identity-function.md diff --git a/note/javascript/function/logical-xor-operator.md b/source/_posts/note/javascript/function/logical-xor-operator.md similarity index 100% rename from note/javascript/function/logical-xor-operator.md rename to source/_posts/note/javascript/function/logical-xor-operator.md diff --git a/note/javascript/function/memoize-a-function.md b/source/_posts/note/javascript/function/memoize-a-function.md similarity index 100% rename from note/javascript/function/memoize-a-function.md rename to source/_posts/note/javascript/function/memoize-a-function.md diff --git a/note/javascript/function/partially-apply-a-function.md b/source/_posts/note/javascript/function/partially-apply-a-function.md similarity index 100% rename from note/javascript/function/partially-apply-a-function.md rename to source/_posts/note/javascript/function/partially-apply-a-function.md diff --git a/note/javascript/function/uncurry-a-function.md b/source/_posts/note/javascript/function/uncurry-a-function.md similarity index 100% rename from note/javascript/function/uncurry-a-function.md rename to source/_posts/note/javascript/function/uncurry-a-function.md diff --git a/note/javascript/math/calculate-the-angle-of-a-line-defined-by-two-points.md b/source/_posts/note/javascript/math/calculate-the-angle-of-a-line-defined-by-two-points.md similarity index 100% rename from note/javascript/math/calculate-the-angle-of-a-line-defined-by-two-points.md rename to source/_posts/note/javascript/math/calculate-the-angle-of-a-line-defined-by-two-points.md diff --git a/note/javascript/math/calculate-the-distance-between-two-points.md b/source/_posts/note/javascript/math/calculate-the-distance-between-two-points.md similarity index 100% rename from note/javascript/math/calculate-the-distance-between-two-points.md rename to source/_posts/note/javascript/math/calculate-the-distance-between-two-points.md diff --git a/note/javascript/math/calculate-the-linear-interpolation-between-two-numbers.md b/source/_posts/note/javascript/math/calculate-the-linear-interpolation-between-two-numbers.md similarity index 100% rename from note/javascript/math/calculate-the-linear-interpolation-between-two-numbers.md rename to source/_posts/note/javascript/math/calculate-the-linear-interpolation-between-two-numbers.md diff --git a/note/javascript/math/calculate-the-midpoint-between-two-points.md b/source/_posts/note/javascript/math/calculate-the-midpoint-between-two-points.md similarity index 100% rename from note/javascript/math/calculate-the-midpoint-between-two-points.md rename to source/_posts/note/javascript/math/calculate-the-midpoint-between-two-points.md diff --git a/note/javascript/math/check-if-a-point-is-inside-a-rectangle.md b/source/_posts/note/javascript/math/check-if-a-point-is-inside-a-rectangle.md similarity index 100% rename from note/javascript/math/check-if-a-point-is-inside-a-rectangle.md rename to source/_posts/note/javascript/math/check-if-a-point-is-inside-a-rectangle.md diff --git a/note/javascript/math/check-if-a-rectangle-contains-other-one.md b/source/_posts/note/javascript/math/check-if-a-rectangle-contains-other-one.md similarity index 100% rename from note/javascript/math/check-if-a-rectangle-contains-other-one.md rename to source/_posts/note/javascript/math/check-if-a-rectangle-contains-other-one.md diff --git a/note/javascript/math/check-if-a-rectangle-overlaps-other-one.md b/source/_posts/note/javascript/math/check-if-a-rectangle-overlaps-other-one.md similarity index 100% rename from note/javascript/math/check-if-a-rectangle-overlaps-other-one.md rename to source/_posts/note/javascript/math/check-if-a-rectangle-overlaps-other-one.md diff --git a/note/javascript/math/convert-degrees-to-radians.md b/source/_posts/note/javascript/math/convert-degrees-to-radians.md similarity index 100% rename from note/javascript/math/convert-degrees-to-radians.md rename to source/_posts/note/javascript/math/convert-degrees-to-radians.md diff --git a/note/javascript/math/convert-radians-to-degrees.md b/source/_posts/note/javascript/math/convert-radians-to-degrees.md similarity index 100% rename from note/javascript/math/convert-radians-to-degrees.md rename to source/_posts/note/javascript/math/convert-radians-to-degrees.md diff --git a/note/javascript/math/normalize-the-ratio-of-a-number-in-a-range.md b/source/_posts/note/javascript/math/normalize-the-ratio-of-a-number-in-a-range.md similarity index 100% rename from note/javascript/math/normalize-the-ratio-of-a-number-in-a-range.md rename to source/_posts/note/javascript/math/normalize-the-ratio-of-a-number-in-a-range.md diff --git a/note/javascript/math/round-a-number-to-the-nearest-multiple-of-a-given-value.md b/source/_posts/note/javascript/math/round-a-number-to-the-nearest-multiple-of-a-given-value.md similarity index 100% rename from note/javascript/math/round-a-number-to-the-nearest-multiple-of-a-given-value.md rename to source/_posts/note/javascript/math/round-a-number-to-the-nearest-multiple-of-a-given-value.md diff --git a/note/javascript/misc/check-if-the-code-is-running-in-node-js.md b/source/_posts/note/javascript/misc/check-if-the-code-is-running-in-node-js.md similarity index 100% rename from note/javascript/misc/check-if-the-code-is-running-in-node-js.md rename to source/_posts/note/javascript/misc/check-if-the-code-is-running-in-node-js.md diff --git a/note/javascript/misc/check-if-the-code-is-running-in-the-browser.md b/source/_posts/note/javascript/misc/check-if-the-code-is-running-in-the-browser.md similarity index 100% rename from note/javascript/misc/check-if-the-code-is-running-in-the-browser.md rename to source/_posts/note/javascript/misc/check-if-the-code-is-running-in-the-browser.md diff --git a/note/javascript/misc/clear-all-cookies.md b/source/_posts/note/javascript/misc/clear-all-cookies.md similarity index 100% rename from note/javascript/misc/clear-all-cookies.md rename to source/_posts/note/javascript/misc/clear-all-cookies.md diff --git a/note/javascript/misc/convert-3-digits-color-to-6-digits-color.md b/source/_posts/note/javascript/misc/convert-3-digits-color-to-6-digits-color.md similarity index 100% rename from note/javascript/misc/convert-3-digits-color-to-6-digits-color.md rename to source/_posts/note/javascript/misc/convert-3-digits-color-to-6-digits-color.md diff --git a/note/javascript/misc/convert-celsius-to-fahrenheit.md b/source/_posts/note/javascript/misc/convert-celsius-to-fahrenheit.md similarity index 100% rename from note/javascript/misc/convert-celsius-to-fahrenheit.md rename to source/_posts/note/javascript/misc/convert-celsius-to-fahrenheit.md diff --git a/note/javascript/misc/convert-cookie-to-object.md b/source/_posts/note/javascript/misc/convert-cookie-to-object.md similarity index 100% rename from note/javascript/misc/convert-cookie-to-object.md rename to source/_posts/note/javascript/misc/convert-cookie-to-object.md diff --git a/note/javascript/misc/convert-fahrenheit-to-celsius.md b/source/_posts/note/javascript/misc/convert-fahrenheit-to-celsius.md similarity index 100% rename from note/javascript/misc/convert-fahrenheit-to-celsius.md rename to source/_posts/note/javascript/misc/convert-fahrenheit-to-celsius.md diff --git a/note/javascript/misc/convert-hex-to-rgb.md b/source/_posts/note/javascript/misc/convert-hex-to-rgb.md similarity index 100% rename from note/javascript/misc/convert-hex-to-rgb.md rename to source/_posts/note/javascript/misc/convert-hex-to-rgb.md diff --git a/note/javascript/misc/convert-rgb-color-to-hex.md b/source/_posts/note/javascript/misc/convert-rgb-color-to-hex.md similarity index 100% rename from note/javascript/misc/convert-rgb-color-to-hex.md rename to source/_posts/note/javascript/misc/convert-rgb-color-to-hex.md diff --git a/note/javascript/misc/convert-url-parameters-to-object.md b/source/_posts/note/javascript/misc/convert-url-parameters-to-object.md similarity index 100% rename from note/javascript/misc/convert-url-parameters-to-object.md rename to source/_posts/note/javascript/misc/convert-url-parameters-to-object.md diff --git a/note/javascript/misc/decode-a-jwt-token.md b/source/_posts/note/javascript/misc/decode-a-jwt-token.md similarity index 100% rename from note/javascript/misc/decode-a-jwt-token.md rename to source/_posts/note/javascript/misc/decode-a-jwt-token.md diff --git a/note/javascript/misc/detect-dark-mode.md b/source/_posts/note/javascript/misc/detect-dark-mode.md similarity index 100% rename from note/javascript/misc/detect-dark-mode.md rename to source/_posts/note/javascript/misc/detect-dark-mode.md diff --git a/note/javascript/misc/easing-functions.md b/source/_posts/note/javascript/misc/easing-functions.md similarity index 100% rename from note/javascript/misc/easing-functions.md rename to source/_posts/note/javascript/misc/easing-functions.md diff --git a/note/javascript/misc/emulate-a-dice-throw.md b/source/_posts/note/javascript/misc/emulate-a-dice-throw.md similarity index 100% rename from note/javascript/misc/emulate-a-dice-throw.md rename to source/_posts/note/javascript/misc/emulate-a-dice-throw.md diff --git a/note/javascript/misc/encode-a-url.md b/source/_posts/note/javascript/misc/encode-a-url.md similarity index 100% rename from note/javascript/misc/encode-a-url.md rename to source/_posts/note/javascript/misc/encode-a-url.md diff --git a/note/javascript/misc/generate-an-unique-and-increment-id.md b/source/_posts/note/javascript/misc/generate-an-unique-and-increment-id.md similarity index 100% rename from note/javascript/misc/generate-an-unique-and-increment-id.md rename to source/_posts/note/javascript/misc/generate-an-unique-and-increment-id.md diff --git a/note/javascript/misc/get-the-first-defined-and-non-null-argument.md b/source/_posts/note/javascript/misc/get-the-first-defined-and-non-null-argument.md similarity index 100% rename from note/javascript/misc/get-the-first-defined-and-non-null-argument.md rename to source/_posts/note/javascript/misc/get-the-first-defined-and-non-null-argument.md diff --git a/note/javascript/misc/get-the-value-of-a-cookie.md b/source/_posts/note/javascript/misc/get-the-value-of-a-cookie.md similarity index 100% rename from note/javascript/misc/get-the-value-of-a-cookie.md rename to source/_posts/note/javascript/misc/get-the-value-of-a-cookie.md diff --git a/note/javascript/misc/get-the-value-of-a-param-from-a-url.md b/source/_posts/note/javascript/misc/get-the-value-of-a-param-from-a-url.md similarity index 100% rename from note/javascript/misc/get-the-value-of-a-param-from-a-url.md rename to source/_posts/note/javascript/misc/get-the-value-of-a-param-from-a-url.md diff --git a/note/javascript/misc/get-type-of-a-variable-in-string.md b/source/_posts/note/javascript/misc/get-type-of-a-variable-in-string.md similarity index 100% rename from note/javascript/misc/get-type-of-a-variable-in-string.md rename to source/_posts/note/javascript/misc/get-type-of-a-variable-in-string.md diff --git a/note/javascript/misc/redirect-the-page-to-https-if-it-is-in-http.md b/source/_posts/note/javascript/misc/redirect-the-page-to-https-if-it-is-in-http.md similarity index 100% rename from note/javascript/misc/redirect-the-page-to-https-if-it-is-in-http.md rename to source/_posts/note/javascript/misc/redirect-the-page-to-https-if-it-is-in-http.md diff --git a/note/javascript/misc/run-promises-in-sequence.md b/source/_posts/note/javascript/misc/run-promises-in-sequence.md similarity index 100% rename from note/javascript/misc/run-promises-in-sequence.md rename to source/_posts/note/javascript/misc/run-promises-in-sequence.md diff --git a/note/javascript/misc/swap-two-variables.md b/source/_posts/note/javascript/misc/swap-two-variables.md similarity index 100% rename from note/javascript/misc/swap-two-variables.md rename to source/_posts/note/javascript/misc/swap-two-variables.md diff --git a/note/javascript/misc/wait-for-an-amount-of-time.md b/source/_posts/note/javascript/misc/wait-for-an-amount-of-time.md similarity index 100% rename from note/javascript/misc/wait-for-an-amount-of-time.md rename to source/_posts/note/javascript/misc/wait-for-an-amount-of-time.md diff --git a/note/javascript/number/add-an-ordinal-suffix-to-a-number.md b/source/_posts/note/javascript/number/add-an-ordinal-suffix-to-a-number.md similarity index 100% rename from note/javascript/number/add-an-ordinal-suffix-to-a-number.md rename to source/_posts/note/javascript/number/add-an-ordinal-suffix-to-a-number.md diff --git a/note/javascript/number/calculate-fibonacci-numbers.md b/source/_posts/note/javascript/number/calculate-fibonacci-numbers.md similarity index 100% rename from note/javascript/number/calculate-fibonacci-numbers.md rename to source/_posts/note/javascript/number/calculate-fibonacci-numbers.md diff --git a/note/javascript/number/calculate-the-average-of-arguments.md b/source/_posts/note/javascript/number/calculate-the-average-of-arguments.md similarity index 100% rename from note/javascript/number/calculate-the-average-of-arguments.md rename to source/_posts/note/javascript/number/calculate-the-average-of-arguments.md diff --git a/note/javascript/number/calculate-the-division-of-arguments.md b/source/_posts/note/javascript/number/calculate-the-division-of-arguments.md similarity index 100% rename from note/javascript/number/calculate-the-division-of-arguments.md rename to source/_posts/note/javascript/number/calculate-the-division-of-arguments.md diff --git a/note/javascript/number/calculate-the-factorial-of-a-number.md b/source/_posts/note/javascript/number/calculate-the-factorial-of-a-number.md similarity index 100% rename from note/javascript/number/calculate-the-factorial-of-a-number.md rename to source/_posts/note/javascript/number/calculate-the-factorial-of-a-number.md diff --git a/note/javascript/number/calculate-the-mod-of-collection-index.md b/source/_posts/note/javascript/number/calculate-the-mod-of-collection-index.md similarity index 100% rename from note/javascript/number/calculate-the-mod-of-collection-index.md rename to source/_posts/note/javascript/number/calculate-the-mod-of-collection-index.md diff --git a/note/javascript/number/calculate-the-remainder-of-division-of-arguments.md b/source/_posts/note/javascript/number/calculate-the-remainder-of-division-of-arguments.md similarity index 100% rename from note/javascript/number/calculate-the-remainder-of-division-of-arguments.md rename to source/_posts/note/javascript/number/calculate-the-remainder-of-division-of-arguments.md diff --git a/note/javascript/number/calculate-the-sum-of-arguments.md b/source/_posts/note/javascript/number/calculate-the-sum-of-arguments.md similarity index 100% rename from note/javascript/number/calculate-the-sum-of-arguments.md rename to source/_posts/note/javascript/number/calculate-the-sum-of-arguments.md diff --git a/note/javascript/number/clamp-a-number-between-two-values.md b/source/_posts/note/javascript/number/clamp-a-number-between-two-values.md similarity index 100% rename from note/javascript/number/clamp-a-number-between-two-values.md rename to source/_posts/note/javascript/number/clamp-a-number-between-two-values.md diff --git a/note/javascript/number/compute-the-greatest-common-divisor-between-two-numbers.md b/source/_posts/note/javascript/number/compute-the-greatest-common-divisor-between-two-numbers.md similarity index 100% rename from note/javascript/number/compute-the-greatest-common-divisor-between-two-numbers.md rename to source/_posts/note/javascript/number/compute-the-greatest-common-divisor-between-two-numbers.md diff --git a/note/javascript/number/convert-a-number-to-equivalent-characters.md b/source/_posts/note/javascript/number/convert-a-number-to-equivalent-characters.md similarity index 100% rename from note/javascript/number/convert-a-number-to-equivalent-characters.md rename to source/_posts/note/javascript/number/convert-a-number-to-equivalent-characters.md diff --git a/note/javascript/number/convert-a-string-to-number.md b/source/_posts/note/javascript/number/convert-a-string-to-number.md similarity index 100% rename from note/javascript/number/convert-a-string-to-number.md rename to source/_posts/note/javascript/number/convert-a-string-to-number.md diff --git a/note/javascript/number/convert-decimal-to-binary-recursively.md b/source/_posts/note/javascript/number/convert-decimal-to-binary-recursively.md similarity index 100% rename from note/javascript/number/convert-decimal-to-binary-recursively.md rename to source/_posts/note/javascript/number/convert-decimal-to-binary-recursively.md diff --git a/note/javascript/number/get-the-arrays-of-digits-from-a-number.md b/source/_posts/note/javascript/number/get-the-arrays-of-digits-from-a-number.md similarity index 100% rename from note/javascript/number/get-the-arrays-of-digits-from-a-number.md rename to source/_posts/note/javascript/number/get-the-arrays-of-digits-from-a-number.md diff --git a/note/javascript/number/multiply-arguments.md b/source/_posts/note/javascript/number/multiply-arguments.md similarity index 100% rename from note/javascript/number/multiply-arguments.md rename to source/_posts/note/javascript/number/multiply-arguments.md diff --git a/note/javascript/number/prefix-an-integer-with-zeros.md b/source/_posts/note/javascript/number/prefix-an-integer-with-zeros.md similarity index 100% rename from note/javascript/number/prefix-an-integer-with-zeros.md rename to source/_posts/note/javascript/number/prefix-an-integer-with-zeros.md diff --git a/note/javascript/number/round-a-number-to-a-given-number-of-digits.md b/source/_posts/note/javascript/number/round-a-number-to-a-given-number-of-digits.md similarity index 100% rename from note/javascript/number/round-a-number-to-a-given-number-of-digits.md rename to source/_posts/note/javascript/number/round-a-number-to-a-given-number-of-digits.md diff --git a/note/javascript/number/subtract-arguments.md b/source/_posts/note/javascript/number/subtract-arguments.md similarity index 100% rename from note/javascript/number/subtract-arguments.md rename to source/_posts/note/javascript/number/subtract-arguments.md diff --git a/note/javascript/number/truncate-a-number-at-decimal.md b/source/_posts/note/javascript/number/truncate-a-number-at-decimal.md similarity index 100% rename from note/javascript/number/truncate-a-number-at-decimal.md rename to source/_posts/note/javascript/number/truncate-a-number-at-decimal.md diff --git a/note/javascript/number/truncate-a-number-to-a-given-number-of-decimal-places-without-rounding.md b/source/_posts/note/javascript/number/truncate-a-number-to-a-given-number-of-decimal-places-without-rounding.md similarity index 100% rename from note/javascript/number/truncate-a-number-to-a-given-number-of-decimal-places-without-rounding.md rename to source/_posts/note/javascript/number/truncate-a-number-to-a-given-number-of-decimal-places-without-rounding.md diff --git a/note/javascript/object/check-if-multiple-objects-are-equal.md b/source/_posts/note/javascript/object/check-if-multiple-objects-are-equal.md similarity index 100% rename from note/javascript/object/check-if-multiple-objects-are-equal.md rename to source/_posts/note/javascript/object/check-if-multiple-objects-are-equal.md diff --git a/note/javascript/object/create-an-empty-map-that-does-not-have-properties.md b/source/_posts/note/javascript/object/create-an-empty-map-that-does-not-have-properties.md similarity index 100% rename from note/javascript/object/create-an-empty-map-that-does-not-have-properties.md rename to source/_posts/note/javascript/object/create-an-empty-map-that-does-not-have-properties.md diff --git a/note/javascript/object/create-an-object-from-the-pairs-of-key-and-value.md b/source/_posts/note/javascript/object/create-an-object-from-the-pairs-of-key-and-value.md similarity index 100% rename from note/javascript/object/create-an-object-from-the-pairs-of-key-and-value.md rename to source/_posts/note/javascript/object/create-an-object-from-the-pairs-of-key-and-value.md diff --git a/note/javascript/object/extract-values-of-a-property-from-an-array-of-objects.md b/source/_posts/note/javascript/object/extract-values-of-a-property-from-an-array-of-objects.md similarity index 100% rename from note/javascript/object/extract-values-of-a-property-from-an-array-of-objects.md rename to source/_posts/note/javascript/object/extract-values-of-a-property-from-an-array-of-objects.md diff --git a/note/javascript/object/get-the-value-at-given-path-of-an-object.md b/source/_posts/note/javascript/object/get-the-value-at-given-path-of-an-object.md similarity index 100% rename from note/javascript/object/get-the-value-at-given-path-of-an-object.md rename to source/_posts/note/javascript/object/get-the-value-at-given-path-of-an-object.md diff --git a/note/javascript/object/immutably-rename-object-keys.md b/source/_posts/note/javascript/object/immutably-rename-object-keys.md similarity index 100% rename from note/javascript/object/immutably-rename-object-keys.md rename to source/_posts/note/javascript/object/immutably-rename-object-keys.md diff --git a/note/javascript/object/invert-keys-and-values-of-an-object.md b/source/_posts/note/javascript/object/invert-keys-and-values-of-an-object.md similarity index 100% rename from note/javascript/object/invert-keys-and-values-of-an-object.md rename to source/_posts/note/javascript/object/invert-keys-and-values-of-an-object.md diff --git a/note/javascript/object/omit-a-subset-of-properties-from-an-object.md b/source/_posts/note/javascript/object/omit-a-subset-of-properties-from-an-object.md similarity index 100% rename from note/javascript/object/omit-a-subset-of-properties-from-an-object.md rename to source/_posts/note/javascript/object/omit-a-subset-of-properties-from-an-object.md diff --git a/note/javascript/object/pick-a-subset-of-properties-of-an-object.md b/source/_posts/note/javascript/object/pick-a-subset-of-properties-of-an-object.md similarity index 100% rename from note/javascript/object/pick-a-subset-of-properties-of-an-object.md rename to source/_posts/note/javascript/object/pick-a-subset-of-properties-of-an-object.md diff --git a/note/javascript/object/remove-all-null-and-undefined-properties-from-an-object.md b/source/_posts/note/javascript/object/remove-all-null-and-undefined-properties-from-an-object.md similarity index 100% rename from note/javascript/object/remove-all-null-and-undefined-properties-from-an-object.md rename to source/_posts/note/javascript/object/remove-all-null-and-undefined-properties-from-an-object.md diff --git a/note/javascript/object/shallow-copy-an-object.md b/source/_posts/note/javascript/object/shallow-copy-an-object.md similarity index 100% rename from note/javascript/object/shallow-copy-an-object.md rename to source/_posts/note/javascript/object/shallow-copy-an-object.md diff --git a/note/javascript/object/sort-an-object-by-its-properties.md b/source/_posts/note/javascript/object/sort-an-object-by-its-properties.md similarity index 100% rename from note/javascript/object/sort-an-object-by-its-properties.md rename to source/_posts/note/javascript/object/sort-an-object-by-its-properties.md diff --git a/note/javascript/random/generate-a-random-boolean.md b/source/_posts/note/javascript/random/generate-a-random-boolean.md similarity index 100% rename from note/javascript/random/generate-a-random-boolean.md rename to source/_posts/note/javascript/random/generate-a-random-boolean.md diff --git a/note/javascript/random/generate-a-random-floating-point-number-in-given-range.md b/source/_posts/note/javascript/random/generate-a-random-floating-point-number-in-given-range.md similarity index 100% rename from note/javascript/random/generate-a-random-floating-point-number-in-given-range.md rename to source/_posts/note/javascript/random/generate-a-random-floating-point-number-in-given-range.md diff --git a/note/javascript/random/generate-a-random-hex-color.md b/source/_posts/note/javascript/random/generate-a-random-hex-color.md similarity index 100% rename from note/javascript/random/generate-a-random-hex-color.md rename to source/_posts/note/javascript/random/generate-a-random-hex-color.md diff --git a/note/javascript/random/generate-a-random-integer-in-given-range.md b/source/_posts/note/javascript/random/generate-a-random-integer-in-given-range.md similarity index 100% rename from note/javascript/random/generate-a-random-integer-in-given-range.md rename to source/_posts/note/javascript/random/generate-a-random-integer-in-given-range.md diff --git a/note/javascript/random/generate-a-random-ip-address.md b/source/_posts/note/javascript/random/generate-a-random-ip-address.md similarity index 100% rename from note/javascript/random/generate-a-random-ip-address.md rename to source/_posts/note/javascript/random/generate-a-random-ip-address.md diff --git a/note/javascript/random/generate-a-random-sign.md b/source/_posts/note/javascript/random/generate-a-random-sign.md similarity index 100% rename from note/javascript/random/generate-a-random-sign.md rename to source/_posts/note/javascript/random/generate-a-random-sign.md diff --git a/note/javascript/random/generate-a-random-string-from-given-characters.md b/source/_posts/note/javascript/random/generate-a-random-string-from-given-characters.md similarity index 100% rename from note/javascript/random/generate-a-random-string-from-given-characters.md rename to source/_posts/note/javascript/random/generate-a-random-string-from-given-characters.md diff --git a/note/javascript/random/generate-a-random-string-using-node-crypto-module.md b/source/_posts/note/javascript/random/generate-a-random-string-using-node-crypto-module.md similarity index 100% rename from note/javascript/random/generate-a-random-string-using-node-crypto-module.md rename to source/_posts/note/javascript/random/generate-a-random-string-using-node-crypto-module.md diff --git a/note/javascript/random/generate-a-random-string-with-given-length.md b/source/_posts/note/javascript/random/generate-a-random-string-with-given-length.md similarity index 100% rename from note/javascript/random/generate-a-random-string-with-given-length.md rename to source/_posts/note/javascript/random/generate-a-random-string-with-given-length.md diff --git a/note/javascript/random/generate-a-random-uuid.md b/source/_posts/note/javascript/random/generate-a-random-uuid.md similarity index 100% rename from note/javascript/random/generate-a-random-uuid.md rename to source/_posts/note/javascript/random/generate-a-random-uuid.md diff --git a/note/javascript/random/generate-an-array-of-random-integers-in-a-given-range.md b/source/_posts/note/javascript/random/generate-an-array-of-random-integers-in-a-given-range.md similarity index 100% rename from note/javascript/random/generate-an-array-of-random-integers-in-a-given-range.md rename to source/_posts/note/javascript/random/generate-an-array-of-random-integers-in-a-given-range.md diff --git a/note/javascript/random/get-a-random-item-and-remove-it-from-an-array.md b/source/_posts/note/javascript/random/get-a-random-item-and-remove-it-from-an-array.md similarity index 100% rename from note/javascript/random/get-a-random-item-and-remove-it-from-an-array.md rename to source/_posts/note/javascript/random/get-a-random-item-and-remove-it-from-an-array.md diff --git a/note/javascript/random/get-a-random-item-from-an-array.md b/source/_posts/note/javascript/random/get-a-random-item-from-an-array.md similarity index 100% rename from note/javascript/random/get-a-random-item-from-an-array.md rename to source/_posts/note/javascript/random/get-a-random-item-from-an-array.md diff --git a/note/javascript/random/get-random-items-of-an-array.md b/source/_posts/note/javascript/random/get-random-items-of-an-array.md similarity index 100% rename from note/javascript/random/get-random-items-of-an-array.md rename to source/_posts/note/javascript/random/get-random-items-of-an-array.md diff --git a/note/javascript/random/pick-a-random-property-of-an-object.md b/source/_posts/note/javascript/random/pick-a-random-property-of-an-object.md similarity index 100% rename from note/javascript/random/pick-a-random-property-of-an-object.md rename to source/_posts/note/javascript/random/pick-a-random-property-of-an-object.md diff --git a/note/javascript/random/pick-random-lines-from-a-text-document.md b/source/_posts/note/javascript/random/pick-random-lines-from-a-text-document.md similarity index 100% rename from note/javascript/random/pick-random-lines-from-a-text-document.md rename to source/_posts/note/javascript/random/pick-random-lines-from-a-text-document.md diff --git a/note/javascript/string/capitalize-a-string.md b/source/_posts/note/javascript/string/capitalize-a-string.md similarity index 100% rename from note/javascript/string/capitalize-a-string.md rename to source/_posts/note/javascript/string/capitalize-a-string.md diff --git a/note/javascript/string/check-if-a-path-is-relative.md b/source/_posts/note/javascript/string/check-if-a-path-is-relative.md similarity index 100% rename from note/javascript/string/check-if-a-path-is-relative.md rename to source/_posts/note/javascript/string/check-if-a-path-is-relative.md diff --git a/note/javascript/string/check-if-a-string-consists-of-a-repeated-character-sequence.md b/source/_posts/note/javascript/string/check-if-a-string-consists-of-a-repeated-character-sequence.md similarity index 100% rename from note/javascript/string/check-if-a-string-consists-of-a-repeated-character-sequence.md rename to source/_posts/note/javascript/string/check-if-a-string-consists-of-a-repeated-character-sequence.md diff --git a/note/javascript/string/check-if-a-string-is-a-palindrome.md b/source/_posts/note/javascript/string/check-if-a-string-is-a-palindrome.md similarity index 100% rename from note/javascript/string/check-if-a-string-is-a-palindrome.md rename to source/_posts/note/javascript/string/check-if-a-string-is-a-palindrome.md diff --git a/note/javascript/string/check-if-a-url-is-absolute.md b/source/_posts/note/javascript/string/check-if-a-url-is-absolute.md similarity index 100% rename from note/javascript/string/check-if-a-url-is-absolute.md rename to source/_posts/note/javascript/string/check-if-a-url-is-absolute.md diff --git a/note/javascript/string/check-if-two-strings-are-anagram.md b/source/_posts/note/javascript/string/check-if-two-strings-are-anagram.md similarity index 100% rename from note/javascript/string/check-if-two-strings-are-anagram.md rename to source/_posts/note/javascript/string/check-if-two-strings-are-anagram.md diff --git a/note/javascript/string/convert-a-letter-to-associate-emoji.md b/source/_posts/note/javascript/string/convert-a-letter-to-associate-emoji.md similarity index 100% rename from note/javascript/string/convert-a-letter-to-associate-emoji.md rename to source/_posts/note/javascript/string/convert-a-letter-to-associate-emoji.md diff --git a/note/javascript/string/convert-a-string-to-camel-case.md b/source/_posts/note/javascript/string/convert-a-string-to-camel-case.md similarity index 100% rename from note/javascript/string/convert-a-string-to-camel-case.md rename to source/_posts/note/javascript/string/convert-a-string-to-camel-case.md diff --git a/note/javascript/string/convert-a-string-to-pascal-case.md b/source/_posts/note/javascript/string/convert-a-string-to-pascal-case.md similarity index 100% rename from note/javascript/string/convert-a-string-to-pascal-case.md rename to source/_posts/note/javascript/string/convert-a-string-to-pascal-case.md diff --git a/note/javascript/string/convert-a-string-to-url-slug.md b/source/_posts/note/javascript/string/convert-a-string-to-url-slug.md similarity index 100% rename from note/javascript/string/convert-a-string-to-url-slug.md rename to source/_posts/note/javascript/string/convert-a-string-to-url-slug.md diff --git a/note/javascript/string/convert-a-windows-file-path-to-unix-path.md b/source/_posts/note/javascript/string/convert-a-windows-file-path-to-unix-path.md similarity index 100% rename from note/javascript/string/convert-a-windows-file-path-to-unix-path.md rename to source/_posts/note/javascript/string/convert-a-windows-file-path-to-unix-path.md diff --git a/note/javascript/string/convert-camel-case-to-kebab-case-and-vice-versa.md b/source/_posts/note/javascript/string/convert-camel-case-to-kebab-case-and-vice-versa.md similarity index 100% rename from note/javascript/string/convert-camel-case-to-kebab-case-and-vice-versa.md rename to source/_posts/note/javascript/string/convert-camel-case-to-kebab-case-and-vice-versa.md diff --git a/note/javascript/string/convert-snake-case-to-camel-case.md b/source/_posts/note/javascript/string/convert-snake-case-to-camel-case.md similarity index 100% rename from note/javascript/string/convert-snake-case-to-camel-case.md rename to source/_posts/note/javascript/string/convert-snake-case-to-camel-case.md diff --git a/note/javascript/string/convert-the-name-of-an-excel-column-to-number.md b/source/_posts/note/javascript/string/convert-the-name-of-an-excel-column-to-number.md similarity index 100% rename from note/javascript/string/convert-the-name-of-an-excel-column-to-number.md rename to source/_posts/note/javascript/string/convert-the-name-of-an-excel-column-to-number.md diff --git a/note/javascript/string/count-the-number-of-words-in-a-string.md b/source/_posts/note/javascript/string/count-the-number-of-words-in-a-string.md similarity index 100% rename from note/javascript/string/count-the-number-of-words-in-a-string.md rename to source/_posts/note/javascript/string/count-the-number-of-words-in-a-string.md diff --git a/note/javascript/string/count-the-occurrences-of-a-character-in-a-string.md b/source/_posts/note/javascript/string/count-the-occurrences-of-a-character-in-a-string.md similarity index 100% rename from note/javascript/string/count-the-occurrences-of-a-character-in-a-string.md rename to source/_posts/note/javascript/string/count-the-occurrences-of-a-character-in-a-string.md diff --git a/note/javascript/string/decapitalize-a-string.md b/source/_posts/note/javascript/string/decapitalize-a-string.md similarity index 100% rename from note/javascript/string/decapitalize-a-string.md rename to source/_posts/note/javascript/string/decapitalize-a-string.md diff --git a/note/javascript/string/escape-html-special-characters.md b/source/_posts/note/javascript/string/escape-html-special-characters.md similarity index 100% rename from note/javascript/string/escape-html-special-characters.md rename to source/_posts/note/javascript/string/escape-html-special-characters.md diff --git a/note/javascript/string/generate-a-hash-of-a-string.md b/source/_posts/note/javascript/string/generate-a-hash-of-a-string.md similarity index 100% rename from note/javascript/string/generate-a-hash-of-a-string.md rename to source/_posts/note/javascript/string/generate-a-hash-of-a-string.md diff --git a/note/javascript/string/get-the-base-url-without-any-parameters.md b/source/_posts/note/javascript/string/get-the-base-url-without-any-parameters.md similarity index 100% rename from note/javascript/string/get-the-base-url-without-any-parameters.md rename to source/_posts/note/javascript/string/get-the-base-url-without-any-parameters.md diff --git a/note/javascript/string/get-the-file-extension-from-a-file-name.md b/source/_posts/note/javascript/string/get-the-file-extension-from-a-file-name.md similarity index 100% rename from note/javascript/string/get-the-file-extension-from-a-file-name.md rename to source/_posts/note/javascript/string/get-the-file-extension-from-a-file-name.md diff --git a/note/javascript/string/get-the-file-name-from-a-url.md b/source/_posts/note/javascript/string/get-the-file-name-from-a-url.md similarity index 100% rename from note/javascript/string/get-the-file-name-from-a-url.md rename to source/_posts/note/javascript/string/get-the-file-name-from-a-url.md diff --git a/note/javascript/string/get-the-length-of-a-string-in-bytes.md b/source/_posts/note/javascript/string/get-the-length-of-a-string-in-bytes.md similarity index 100% rename from note/javascript/string/get-the-length-of-a-string-in-bytes.md rename to source/_posts/note/javascript/string/get-the-length-of-a-string-in-bytes.md diff --git a/note/javascript/string/get-the-number-of-a-character-in-a-string.md b/source/_posts/note/javascript/string/get-the-number-of-a-character-in-a-string.md similarity index 100% rename from note/javascript/string/get-the-number-of-a-character-in-a-string.md rename to source/_posts/note/javascript/string/get-the-number-of-a-character-in-a-string.md diff --git a/note/javascript/string/make-the-first-character-of-a-string-lowercase.md b/source/_posts/note/javascript/string/make-the-first-character-of-a-string-lowercase.md similarity index 100% rename from note/javascript/string/make-the-first-character-of-a-string-lowercase.md rename to source/_posts/note/javascript/string/make-the-first-character-of-a-string-lowercase.md diff --git a/note/javascript/string/normalize-file-path-slashes.md b/source/_posts/note/javascript/string/normalize-file-path-slashes.md similarity index 100% rename from note/javascript/string/normalize-file-path-slashes.md rename to source/_posts/note/javascript/string/normalize-file-path-slashes.md diff --git a/note/javascript/string/prepend-a-line-number-to-each-line-of-a-text-document.md b/source/_posts/note/javascript/string/prepend-a-line-number-to-each-line-of-a-text-document.md similarity index 100% rename from note/javascript/string/prepend-a-line-number-to-each-line-of-a-text-document.md rename to source/_posts/note/javascript/string/prepend-a-line-number-to-each-line-of-a-text-document.md diff --git a/note/javascript/string/remove-duplicate-lines-of-a-text-document.md b/source/_posts/note/javascript/string/remove-duplicate-lines-of-a-text-document.md similarity index 100% rename from note/javascript/string/remove-duplicate-lines-of-a-text-document.md rename to source/_posts/note/javascript/string/remove-duplicate-lines-of-a-text-document.md diff --git a/note/javascript/string/remove-empty-lines-of-a-text-document.md b/source/_posts/note/javascript/string/remove-empty-lines-of-a-text-document.md similarity index 100% rename from note/javascript/string/remove-empty-lines-of-a-text-document.md rename to source/_posts/note/javascript/string/remove-empty-lines-of-a-text-document.md diff --git a/note/javascript/string/remove-spaces-from-a-string.md b/source/_posts/note/javascript/string/remove-spaces-from-a-string.md similarity index 100% rename from note/javascript/string/remove-spaces-from-a-string.md rename to source/_posts/note/javascript/string/remove-spaces-from-a-string.md diff --git a/note/javascript/string/repeat-a-string.md b/source/_posts/note/javascript/string/repeat-a-string.md similarity index 100% rename from note/javascript/string/repeat-a-string.md rename to source/_posts/note/javascript/string/repeat-a-string.md diff --git a/note/javascript/string/replace-all-line-breaks-with-br-elements.md b/source/_posts/note/javascript/string/replace-all-line-breaks-with-br-elements.md similarity index 100% rename from note/javascript/string/replace-all-line-breaks-with-br-elements.md rename to source/_posts/note/javascript/string/replace-all-line-breaks-with-br-elements.md diff --git a/note/javascript/string/replace-all-tab-characters-with-spaces.md b/source/_posts/note/javascript/string/replace-all-tab-characters-with-spaces.md similarity index 100% rename from note/javascript/string/replace-all-tab-characters-with-spaces.md rename to source/_posts/note/javascript/string/replace-all-tab-characters-with-spaces.md diff --git a/note/javascript/string/replace-multiple-spaces-with-a-single-space.md b/source/_posts/note/javascript/string/replace-multiple-spaces-with-a-single-space.md similarity index 100% rename from note/javascript/string/replace-multiple-spaces-with-a-single-space.md rename to source/_posts/note/javascript/string/replace-multiple-spaces-with-a-single-space.md diff --git a/note/javascript/string/replace-the-first-given-number-of-characters-of-a-string-with-another-character.md b/source/_posts/note/javascript/string/replace-the-first-given-number-of-characters-of-a-string-with-another-character.md similarity index 100% rename from note/javascript/string/replace-the-first-given-number-of-characters-of-a-string-with-another-character.md rename to source/_posts/note/javascript/string/replace-the-first-given-number-of-characters-of-a-string-with-another-character.md diff --git a/note/javascript/string/reverse-a-string.md b/source/_posts/note/javascript/string/reverse-a-string.md similarity index 100% rename from note/javascript/string/reverse-a-string.md rename to source/_posts/note/javascript/string/reverse-a-string.md diff --git a/note/javascript/string/reverse-the-order-of-lines-of-a-text.md b/source/_posts/note/javascript/string/reverse-the-order-of-lines-of-a-text.md similarity index 100% rename from note/javascript/string/reverse-the-order-of-lines-of-a-text.md rename to source/_posts/note/javascript/string/reverse-the-order-of-lines-of-a-text.md diff --git a/note/javascript/string/sort-lines-of-a-text-document-in-the-alphabetical-order.md b/source/_posts/note/javascript/string/sort-lines-of-a-text-document-in-the-alphabetical-order.md similarity index 100% rename from note/javascript/string/sort-lines-of-a-text-document-in-the-alphabetical-order.md rename to source/_posts/note/javascript/string/sort-lines-of-a-text-document-in-the-alphabetical-order.md diff --git a/note/javascript/string/sort-the-characters-of-a-string-in-the-alphabetical-order.md b/source/_posts/note/javascript/string/sort-the-characters-of-a-string-in-the-alphabetical-order.md similarity index 100% rename from note/javascript/string/sort-the-characters-of-a-string-in-the-alphabetical-order.md rename to source/_posts/note/javascript/string/sort-the-characters-of-a-string-in-the-alphabetical-order.md diff --git a/note/javascript/string/strip-ansi-codes-from-a-string.md b/source/_posts/note/javascript/string/strip-ansi-codes-from-a-string.md similarity index 100% rename from note/javascript/string/strip-ansi-codes-from-a-string.md rename to source/_posts/note/javascript/string/strip-ansi-codes-from-a-string.md diff --git a/note/javascript/string/swap-case-of-characters-in-a-string.md b/source/_posts/note/javascript/string/swap-case-of-characters-in-a-string.md similarity index 100% rename from note/javascript/string/swap-case-of-characters-in-a-string.md rename to source/_posts/note/javascript/string/swap-case-of-characters-in-a-string.md diff --git a/note/javascript/string/trim-slashes-at-the-beginning-and-the-end-of-a-string.md b/source/_posts/note/javascript/string/trim-slashes-at-the-beginning-and-the-end-of-a-string.md similarity index 100% rename from note/javascript/string/trim-slashes-at-the-beginning-and-the-end-of-a-string.md rename to source/_posts/note/javascript/string/trim-slashes-at-the-beginning-and-the-end-of-a-string.md diff --git a/note/javascript/string/trim-some-character.md b/source/_posts/note/javascript/string/trim-some-character.md similarity index 100% rename from note/javascript/string/trim-some-character.md rename to source/_posts/note/javascript/string/trim-some-character.md diff --git a/note/javascript/string/trim-the-file-extension-from-a-file-name.md b/source/_posts/note/javascript/string/trim-the-file-extension-from-a-file-name.md similarity index 100% rename from note/javascript/string/trim-the-file-extension-from-a-file-name.md rename to source/_posts/note/javascript/string/trim-the-file-extension-from-a-file-name.md diff --git a/note/javascript/string/truncate-a-string-at-full-words.md b/source/_posts/note/javascript/string/truncate-a-string-at-full-words.md similarity index 100% rename from note/javascript/string/truncate-a-string-at-full-words.md rename to source/_posts/note/javascript/string/truncate-a-string-at-full-words.md diff --git a/note/javascript/string/unescape-html-special-characters.md b/source/_posts/note/javascript/string/unescape-html-special-characters.md similarity index 100% rename from note/javascript/string/unescape-html-special-characters.md rename to source/_posts/note/javascript/string/unescape-html-special-characters.md diff --git a/note/javascript/string/uppercase-the-first-character-of-each-word-in-a-string.md b/source/_posts/note/javascript/string/uppercase-the-first-character-of-each-word-in-a-string.md similarity index 100% rename from note/javascript/string/uppercase-the-first-character-of-each-word-in-a-string.md rename to source/_posts/note/javascript/string/uppercase-the-first-character-of-each-word-in-a-string.md diff --git a/note/javascript/validator/check-if-a-date-is-a-weekday.md b/source/_posts/note/javascript/validator/check-if-a-date-is-a-weekday.md similarity index 100% rename from note/javascript/validator/check-if-a-date-is-a-weekday.md rename to source/_posts/note/javascript/validator/check-if-a-date-is-a-weekday.md diff --git a/note/javascript/validator/check-if-a-date-is-a-weekend.md b/source/_posts/note/javascript/validator/check-if-a-date-is-a-weekend.md similarity index 100% rename from note/javascript/validator/check-if-a-date-is-a-weekend.md rename to source/_posts/note/javascript/validator/check-if-a-date-is-a-weekend.md diff --git a/note/javascript/validator/check-if-a-date-is-between-two-dates.md b/source/_posts/note/javascript/validator/check-if-a-date-is-between-two-dates.md similarity index 100% rename from note/javascript/validator/check-if-a-date-is-between-two-dates.md rename to source/_posts/note/javascript/validator/check-if-a-date-is-between-two-dates.md diff --git a/note/javascript/validator/check-if-a-date-is-today.md b/source/_posts/note/javascript/validator/check-if-a-date-is-today.md similarity index 100% rename from note/javascript/validator/check-if-a-date-is-today.md rename to source/_posts/note/javascript/validator/check-if-a-date-is-today.md diff --git a/note/javascript/validator/check-if-a-date-occurs-in-the-current-year.md b/source/_posts/note/javascript/validator/check-if-a-date-occurs-in-the-current-year.md similarity index 100% rename from note/javascript/validator/check-if-a-date-occurs-in-the-current-year.md rename to source/_posts/note/javascript/validator/check-if-a-date-occurs-in-the-current-year.md diff --git a/note/javascript/validator/check-if-a-flat-array-has-duplicate-values.md b/source/_posts/note/javascript/validator/check-if-a-flat-array-has-duplicate-values.md similarity index 100% rename from note/javascript/validator/check-if-a-flat-array-has-duplicate-values.md rename to source/_posts/note/javascript/validator/check-if-a-flat-array-has-duplicate-values.md diff --git a/note/javascript/validator/check-if-a-given-integer-is-a-prime-number.md b/source/_posts/note/javascript/validator/check-if-a-given-integer-is-a-prime-number.md similarity index 100% rename from note/javascript/validator/check-if-a-given-integer-is-a-prime-number.md rename to source/_posts/note/javascript/validator/check-if-a-given-integer-is-a-prime-number.md diff --git a/note/javascript/validator/check-if-a-number-is-a-power-of-2.md b/source/_posts/note/javascript/validator/check-if-a-number-is-a-power-of-2.md similarity index 100% rename from note/javascript/validator/check-if-a-number-is-a-power-of-2.md rename to source/_posts/note/javascript/validator/check-if-a-number-is-a-power-of-2.md diff --git a/note/javascript/validator/check-if-a-number-is-even.md b/source/_posts/note/javascript/validator/check-if-a-number-is-even.md similarity index 100% rename from note/javascript/validator/check-if-a-number-is-even.md rename to source/_posts/note/javascript/validator/check-if-a-number-is-even.md diff --git a/note/javascript/validator/check-if-a-number-is-in-a-given-range.md b/source/_posts/note/javascript/validator/check-if-a-number-is-in-a-given-range.md similarity index 100% rename from note/javascript/validator/check-if-a-number-is-in-a-given-range.md rename to source/_posts/note/javascript/validator/check-if-a-number-is-in-a-given-range.md diff --git a/note/javascript/validator/check-if-a-number-is-negative.md b/source/_posts/note/javascript/validator/check-if-a-number-is-negative.md similarity index 100% rename from note/javascript/validator/check-if-a-number-is-negative.md rename to source/_posts/note/javascript/validator/check-if-a-number-is-negative.md diff --git a/note/javascript/validator/check-if-a-number-is-odd.md b/source/_posts/note/javascript/validator/check-if-a-number-is-odd.md similarity index 100% rename from note/javascript/validator/check-if-a-number-is-odd.md rename to source/_posts/note/javascript/validator/check-if-a-number-is-odd.md diff --git a/note/javascript/validator/check-if-a-number-is-positive.md b/source/_posts/note/javascript/validator/check-if-a-number-is-positive.md similarity index 100% rename from note/javascript/validator/check-if-a-number-is-positive.md rename to source/_posts/note/javascript/validator/check-if-a-number-is-positive.md diff --git a/note/javascript/validator/check-if-a-string-contains-lower-case-characters.md b/source/_posts/note/javascript/validator/check-if-a-string-contains-lower-case-characters.md similarity index 100% rename from note/javascript/validator/check-if-a-string-contains-lower-case-characters.md rename to source/_posts/note/javascript/validator/check-if-a-string-contains-lower-case-characters.md diff --git a/note/javascript/validator/check-if-a-string-contains-only-ascii-characters.md b/source/_posts/note/javascript/validator/check-if-a-string-contains-only-ascii-characters.md similarity index 100% rename from note/javascript/validator/check-if-a-string-contains-only-ascii-characters.md rename to source/_posts/note/javascript/validator/check-if-a-string-contains-only-ascii-characters.md diff --git a/note/javascript/validator/check-if-a-string-contains-only-digits.md b/source/_posts/note/javascript/validator/check-if-a-string-contains-only-digits.md similarity index 100% rename from note/javascript/validator/check-if-a-string-contains-only-digits.md rename to source/_posts/note/javascript/validator/check-if-a-string-contains-only-digits.md diff --git a/note/javascript/validator/check-if-a-string-contains-only-letters-and-numbers.md b/source/_posts/note/javascript/validator/check-if-a-string-contains-only-letters-and-numbers.md similarity index 100% rename from note/javascript/validator/check-if-a-string-contains-only-letters-and-numbers.md rename to source/_posts/note/javascript/validator/check-if-a-string-contains-only-letters-and-numbers.md diff --git a/note/javascript/validator/check-if-a-string-contains-only-letters.md b/source/_posts/note/javascript/validator/check-if-a-string-contains-only-letters.md similarity index 100% rename from note/javascript/validator/check-if-a-string-contains-only-letters.md rename to source/_posts/note/javascript/validator/check-if-a-string-contains-only-letters.md diff --git a/note/javascript/validator/check-if-a-string-contains-upper-case-characters.md b/source/_posts/note/javascript/validator/check-if-a-string-contains-upper-case-characters.md similarity index 100% rename from note/javascript/validator/check-if-a-string-contains-upper-case-characters.md rename to source/_posts/note/javascript/validator/check-if-a-string-contains-upper-case-characters.md diff --git a/note/javascript/validator/check-if-a-string-contains-whitespace.md b/source/_posts/note/javascript/validator/check-if-a-string-contains-whitespace.md similarity index 100% rename from note/javascript/validator/check-if-a-string-contains-whitespace.md rename to source/_posts/note/javascript/validator/check-if-a-string-contains-whitespace.md diff --git a/note/javascript/validator/check-if-a-string-is-a-hexadecimal-color.md b/source/_posts/note/javascript/validator/check-if-a-string-is-a-hexadecimal-color.md similarity index 100% rename from note/javascript/validator/check-if-a-string-is-a-hexadecimal-color.md rename to source/_posts/note/javascript/validator/check-if-a-string-is-a-hexadecimal-color.md diff --git a/note/javascript/validator/check-if-a-string-is-a-hexadecimal-number.md b/source/_posts/note/javascript/validator/check-if-a-string-is-a-hexadecimal-number.md similarity index 100% rename from note/javascript/validator/check-if-a-string-is-a-hexadecimal-number.md rename to source/_posts/note/javascript/validator/check-if-a-string-is-a-hexadecimal-number.md diff --git a/note/javascript/validator/check-if-a-string-is-a-mongo-db-object-id.md b/source/_posts/note/javascript/validator/check-if-a-string-is-a-mongo-db-object-id.md similarity index 100% rename from note/javascript/validator/check-if-a-string-is-a-mongo-db-object-id.md rename to source/_posts/note/javascript/validator/check-if-a-string-is-a-mongo-db-object-id.md diff --git a/note/javascript/validator/check-if-a-string-is-an-octal-number.md b/source/_posts/note/javascript/validator/check-if-a-string-is-an-octal-number.md similarity index 100% rename from note/javascript/validator/check-if-a-string-is-an-octal-number.md rename to source/_posts/note/javascript/validator/check-if-a-string-is-an-octal-number.md diff --git a/note/javascript/validator/check-if-a-string-is-lower-case.md b/source/_posts/note/javascript/validator/check-if-a-string-is-lower-case.md similarity index 100% rename from note/javascript/validator/check-if-a-string-is-lower-case.md rename to source/_posts/note/javascript/validator/check-if-a-string-is-lower-case.md diff --git a/note/javascript/validator/check-if-a-string-is-upper-case.md b/source/_posts/note/javascript/validator/check-if-a-string-is-upper-case.md similarity index 100% rename from note/javascript/validator/check-if-a-string-is-upper-case.md rename to source/_posts/note/javascript/validator/check-if-a-string-is-upper-case.md diff --git a/note/javascript/validator/check-if-a-value-is-a-business-identifier-code.md b/source/_posts/note/javascript/validator/check-if-a-value-is-a-business-identifier-code.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-a-business-identifier-code.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-a-business-identifier-code.md diff --git a/note/javascript/validator/check-if-a-value-is-a-number.md b/source/_posts/note/javascript/validator/check-if-a-value-is-a-number.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-a-number.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-a-number.md diff --git a/note/javascript/validator/check-if-a-value-is-a-plain-object.md b/source/_posts/note/javascript/validator/check-if-a-value-is-a-plain-object.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-a-plain-object.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-a-plain-object.md diff --git a/note/javascript/validator/check-if-a-value-is-a-regular-expression.md b/source/_posts/note/javascript/validator/check-if-a-value-is-a-regular-expression.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-a-regular-expression.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-a-regular-expression.md diff --git a/note/javascript/validator/check-if-a-value-is-a-string.md b/source/_posts/note/javascript/validator/check-if-a-value-is-a-string.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-a-string.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-a-string.md diff --git a/note/javascript/validator/check-if-a-value-is-an-object.md b/source/_posts/note/javascript/validator/check-if-a-value-is-an-object.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-an-object.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-an-object.md diff --git a/note/javascript/validator/check-if-a-value-is-base32-encoded.md b/source/_posts/note/javascript/validator/check-if-a-value-is-base32-encoded.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-base32-encoded.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-base32-encoded.md diff --git a/note/javascript/validator/check-if-a-value-is-base58-encoded.md b/source/_posts/note/javascript/validator/check-if-a-value-is-base58-encoded.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-base58-encoded.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-base58-encoded.md diff --git a/note/javascript/validator/check-if-a-value-is-base64-encoded.md b/source/_posts/note/javascript/validator/check-if-a-value-is-base64-encoded.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-base64-encoded.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-base64-encoded.md diff --git a/note/javascript/validator/check-if-a-value-is-nil.md b/source/_posts/note/javascript/validator/check-if-a-value-is-nil.md similarity index 100% rename from note/javascript/validator/check-if-a-value-is-nil.md rename to source/_posts/note/javascript/validator/check-if-a-value-is-nil.md diff --git a/note/javascript/validator/check-if-a-year-is-leap-year.md b/source/_posts/note/javascript/validator/check-if-a-year-is-leap-year.md similarity index 100% rename from note/javascript/validator/check-if-a-year-is-leap-year.md rename to source/_posts/note/javascript/validator/check-if-a-year-is-leap-year.md diff --git a/note/javascript/validator/check-if-all-array-elements-are-equal-to-a-given-value.md b/source/_posts/note/javascript/validator/check-if-all-array-elements-are-equal-to-a-given-value.md similarity index 100% rename from note/javascript/validator/check-if-all-array-elements-are-equal-to-a-given-value.md rename to source/_posts/note/javascript/validator/check-if-all-array-elements-are-equal-to-a-given-value.md diff --git a/note/javascript/validator/check-if-all-items-in-an-array-are-equal.md b/source/_posts/note/javascript/validator/check-if-all-items-in-an-array-are-equal.md similarity index 100% rename from note/javascript/validator/check-if-all-items-in-an-array-are-equal.md rename to source/_posts/note/javascript/validator/check-if-all-items-in-an-array-are-equal.md diff --git a/note/javascript/validator/check-if-an-array-contains-a-value-matching-some-criterias.md b/source/_posts/note/javascript/validator/check-if-an-array-contains-a-value-matching-some-criterias.md similarity index 100% rename from note/javascript/validator/check-if-an-array-contains-a-value-matching-some-criterias.md rename to source/_posts/note/javascript/validator/check-if-an-array-contains-a-value-matching-some-criterias.md diff --git a/note/javascript/validator/check-if-an-array-is-not-empty.md b/source/_posts/note/javascript/validator/check-if-an-array-is-not-empty.md similarity index 100% rename from note/javascript/validator/check-if-an-array-is-not-empty.md rename to source/_posts/note/javascript/validator/check-if-an-array-is-not-empty.md diff --git a/note/javascript/validator/check-if-an-array-is-subset-of-other-array.md b/source/_posts/note/javascript/validator/check-if-an-array-is-subset-of-other-array.md similarity index 100% rename from note/javascript/validator/check-if-an-array-is-subset-of-other-array.md rename to source/_posts/note/javascript/validator/check-if-an-array-is-subset-of-other-array.md diff --git a/note/javascript/validator/check-if-an-object-is-a-promise.md b/source/_posts/note/javascript/validator/check-if-an-object-is-a-promise.md similarity index 100% rename from note/javascript/validator/check-if-an-object-is-a-promise.md rename to source/_posts/note/javascript/validator/check-if-an-object-is-a-promise.md diff --git a/note/javascript/validator/check-if-an-object-is-an-array.md b/source/_posts/note/javascript/validator/check-if-an-object-is-an-array.md similarity index 100% rename from note/javascript/validator/check-if-an-object-is-an-array.md rename to source/_posts/note/javascript/validator/check-if-an-object-is-an-array.md diff --git a/note/javascript/validator/check-if-an-object-is-empty.md b/source/_posts/note/javascript/validator/check-if-an-object-is-empty.md similarity index 100% rename from note/javascript/validator/check-if-an-object-is-empty.md rename to source/_posts/note/javascript/validator/check-if-an-object-is-empty.md diff --git a/note/javascript/validator/validate-a-gregorian-date.md b/source/_posts/note/javascript/validator/validate-a-gregorian-date.md similarity index 100% rename from note/javascript/validator/validate-a-gregorian-date.md rename to source/_posts/note/javascript/validator/validate-a-gregorian-date.md diff --git a/numpy.md b/source/_posts/numpy.md similarity index 100% rename from numpy.md rename to source/_posts/numpy.md diff --git a/php.md b/source/_posts/php.md similarity index 100% rename from php.md rename to source/_posts/php.md diff --git a/postgres.md b/source/_posts/postgres.md similarity index 100% rename from postgres.md rename to source/_posts/postgres.md diff --git a/python.md b/source/_posts/python.md similarity index 100% rename from python.md rename to source/_posts/python.md diff --git a/quickref.md b/source/_posts/quickref.md similarity index 100% rename from quickref.md rename to source/_posts/quickref.md diff --git a/redis.md b/source/_posts/redis.md similarity index 100% rename from redis.md rename to source/_posts/redis.md diff --git a/regex.md b/source/_posts/regex.md similarity index 100% rename from regex.md rename to source/_posts/regex.md diff --git a/resolutions.md b/source/_posts/resolutions.md similarity index 100% rename from resolutions.md rename to source/_posts/resolutions.md diff --git a/rust.md b/source/_posts/rust.md similarity index 94% rename from rust.md rename to source/_posts/rust.md index a1c6ba1..7975836 100644 --- a/rust.md +++ b/source/_posts/rust.md @@ -1,821 +1,821 @@ ---- -title: Rust -date: 2022-01-01 11:51:44 -icon: icon-rust -background: bg-black -tags: -categories: - - Programming -intro: | - The Rust quick reference cheat sheet that aims at providing help on writing basic syntax and methods. ---- - - -Getting Started {.cols-3} ---------------- - -### Hello_World.rs - -```rust -fn main() { - println!("Hello, World!"); -} -``` -#### Compiling and Running -```shell -$ rustc Hello_World.rs -$ ./Hello_World -Hello, World! -``` - -### Primitive types - -| | | -|---------------------------|----------------------------------| -| `bool` | Boolean (`true` _/_ `false`) | -| `char` | character | -| `f32`, `f64` | 32-bits, 64-bits floats | -| `i64`, `i32`, `i16`, `i8` | signed 16- ... integers | -| `u64`, `u32`, `u16`, `u8` | unsigned 16-bits, ... integers | -| `isize` | pointer-sized signed integers | -| `usize` | pointer-sized unsigned integers | - -See: [Rust Types](#rust-types) - - -### Formatting {.row-span-2} - -```rust {.wrap} -// Single Placeholder -println!("{}", 1); - -// Multiple Placeholder -println!("{} {}", 1, 3); - -// Positional Arguments -println!("{0} is {1} {2}, also {0} is a {3} programming language", "Rust", "cool", "language", "safe"); - -// Named Arguments -println!("{country} is a diverse nation with unity.", country = "India"); - -// Placeholder traits :b for binary, :0x is for hex and :o is octal -println!("Let us print 76 is binary which is {:b} , and hex equivalent is {:0x} and octal equivalent is {:o}", 76, 76, 76); - -// Debug Trait -println!("Print whatever we want to here using debug trait {:?}", (76, 'A', 90)); - -// New Format Strings in 1.58 -let x = "world"; -println!("Hello {x}!"); -``` - - -### Printing Styles - -```rust -// Prints the output -print!("Hello World\n"); - -// Appends a new line after printing -println!("Appending a new line"); - -// Prints as an error -eprint!("This is an error\n"); - -// Prints as an error with new line -eprintln!("This is an error with new line"); -``` - - -### Variables - -```rust -// Initializing and declaring a variable -let some_variable = "This_is_a_variable"; - -// Making a variable mutable -let mut mutable_variable = "Mutable"; - -// Assigning multiple variables -let (name, age) = ("ElementalX", 20); - -// (Global) constant -const SCREAMING_SNAKE_CASE:i64 = 9; -``` - - - -### Comments - -```rust -// Line Comments -/*.............Block Comments */ -/// Outer doc comments -//! Inner doc comments -``` -See: [Comment](https://doc.rust-lang.org/reference/comments.html) - - - -### Functions - -```rust -fn test(){ - println!("This is a function!"); -} - -fn main(){ - test(); -} -``` -See: [Functions](#rust-functions) - - - - -Rust Types {.cols-3} --------------- - - -### Integer - -```rust -let mut a: u32 = 8; -let b: u64 = 877; -let c: i64 = 8999; -let d = -90; -``` - - -### Floating-Point - -```rust -let mut sixty_bit_float: f64 = 89.90; -let thirty_two_bit_float: f32 = 7.90; -let just_a_float = 69.69; -``` - - -### Boolean - -```rust {.wrap} -let true_val: bool = true; -let false_val: bool = false; -let just_a_bool = true; -let is_true = 8 < 5; // => false -``` - - -### Character - -```rust -let first_letter_of_alphabet = 'a'; -let explicit_char: char = 'F'; -let implicit_char = '8'; -let emoji = "\u{1f600}"; // => 😀 -``` - - -### String Literal - -```rust {.wrap} -let community_name = "AXIAL"; -let no_of_members: &str = "ten"; - -println!("The name of the community is {community_name} and it has {no_of_members} members"); -``` -See: [Strings](#rust-strings) - - -### Arrays - -```rust -┌─────┬─────┬─────┬─────┬─────┬─────┐ -| 92 | 97 | 98 | 99 | 98 | 94 | -└─────┴─────┴─────┴─────┴─────┴─────┘ - 0 1 2 3 4 5 -``` ----- - -```rust -let array: [i64; 6] = [92,97,98,99,98,94]; -``` - - - -### Multi-Dimensional Array {.row-span-2} - -```rust - j0 j1 j2 j3 j4 j5 - ┌────┬────┬────┬────┬────┬────┐ -i0 | 1 | 2 | 3 | 4 | 5 | 6 | - ├────┼────┼────┼────┼────┼────┤ -i1 | 6 | 5 | 4 | 3 | 2 | 1 | - └────┴────┴────┴────┴────┴────┘ -``` ----- - -```rust -let array: [[i64; 6] ;2] = [ - [1,2,3,4,5,6], - [6,5,4,3,2,1]]; -``` - -### Mutable Array - -```rust -let mut array: [i32 ; 3] = [2,6,10]; - -array[1] = 4; -array[2] = 6; -``` -Use the `mut` keyword to make it mutable. - - - -### Slices - -```rust -let mut array: [ i64; 4] = [1,2,3,4]; -let mut slices: &[i64] = &array[0..3] // Lower range is inclusive and upper range is exclusive - -println!("The elements of the slices are : {slices:?}"); -``` - - -### Vectors - -```rust -let some_vector = vec![1,2,3,4,5]; -``` -A vector is declared using the `vec!` macro. - - -### Tuples - -```rust -let tuple = (1, 'A' , "Cool", 78, true); -``` - - - -Rust Strings {.cols-3} --------------- - -### String Literal - -```rust -let cs:&str = "cheat sheet"; - -// => Share cheat sheet for developers -println!("Share {cs} for developers"); -``` - - -### String Object - -```rust -// Creating an empty string object -let my_string = String::new; - -// Converting to a string object -let S_string = a_string.to_string() - -// Creating an initialized string object -let lang = String::from("Rust"); -println!("First language is {lang}"); - ``` - -### .capacity() - - ```rust -let rand = String::from("Random String"); -rand.capacity() // => 13 -``` -Calculates the capacity of the string in bytes. - - -### .contains() - -```rust -let name = String::from("ElementalX"); -name.contains("Element") // => true -``` -Checks if the substring is contained inside the original string or not. - - -### Pushing a single character - -```rust -let mut half_text = String::from("Hal"); -half_text.push('f'); // => Half -``` - - -### Pushing an entire String - -```rust -let mut hi = String::from("Hey there..."); -hi.push_str("How are you doing??"); - -// => Hey there...How are you doing?? -println!("{hi}"); -``` - - - -Rust Operators {.cols-3} ------------ - - -### Comparison Operators - -| | | -|----------|----------------------------------| -| `e == f` | `e` is equal to `f` | -| `e != f` | `e` is NOT equal to `f` | -| `e < f` | `e` is less than `f` | -| `e > f` | `e` is greater `f` | -| `e <= f` | `e` is less than or equal to `f` | -| `e >= f` | `e` is greater or equal to `f` | - ---------- - -```rust -let (e, f) = (1, 100); - -let greater = f > e; // => true -let less = f < e; // => false -let greater_equal = f >= e; // => true -let less_equal = e <= f; // => true -let equal_to = e == f; // => false -let not_equal_to = e != f; // => true -``` - - -### Arithmetic Operators - -| | | -|----------|--------------------------------------------| -| `a + b` | `a` is added to `b` | -| `a - b` | `b` is subtracted from `a` | -| `a / b` | `a` is divided by `b` | -| `a % b` | Gets remainder of `a` by dividing with `b` | -| `a * b` | `a` is multiplied with `b` | - ------- - -```rust {.wrap} -let (a, b) = (4, 5); - -let sum: i32 = a + b; // => 9 -let subtractions: i32 = a - b; // => -1 -let multiplication: i32 = a * b; // => 20 -let division: i32 = a / b; // => 0 -let modulus: i32 = a % b; // => 4 -``` - - - - -### Bitwise Operators - -| Operator | Description | -|----------|-------------------------| -| `g & h` | Binary AND | -| `g | h` | Binary OR | -| `g ^ h` | Binary XOR | -| `g ~ h` | Binary one's complement | -| `g << h` | Binary shift left | -| `g >> h` | Binary shift right | - ------ - -```rust {.wrap} -let (g, h) = (0x1, 0x2); - -let bitwise_and = g & h; // => 0 -let bitwise_or = g | h; // => 3 -let bitwise_xor = g ^ h; // => 3 -let right_shift = g >> 2; // => 0 -let left_shift = h << 4; // => 32 -``` - - - -### Logical Operators - -| Example | Meaning | -|----------------|------------------------| -| `c && d` | Both are true _(AND)_ | -| `c || d` | Either is true _(OR)_ | -| `!c` | `c` is false _(NOT)_ | - ------- - -```rust -let (c, d) = (true, false); - -let and = c && d; // => false -let or = c || d; // => true -let not = !c; // => false -``` - - -### Compound Assignment Operator - -```rust -let mut k = 9; -let mut l = k; -``` - ----- - -| Operator | Description | -|-----------|-----------------------------------------| -| `k += l` | Add a value and assign, then k=9 | -| `k -= l` | Substrate a value and assign, then k=18 | -| `k /= l` | Divide a value and assign, then k=9 | -| `k *= l` | Multiply a value and assign, then k=81 | -| `k |= l` | Bitwise OR and assign, then k=89 | - - - - - -Rust Flow Control {.cols-3} --------------- - -### If Expression - -```rust -let case1: i32 = 81; -let case2: i32 = 82; - -if case1 < case2 { - println!("case1 is greater than case2"); -} -``` - -### If...Else Expression - -```rust -let case3 = 8; -let case4 = 9; - -if case3 >= case4 { - println!("case3 is better than case4"); -} else { - println!("case4 is greater than case3"); -} -``` - - - -### If...Else...if...Else Expression - -```rust -let foo = 12; -let bar = 13; - -if foo == bar { - println!("foo is equal to bar"); -} else if foo < bar { - println!("foo less than bar"); -} else if foo != bar { - println!("foo is not equal to bar"); -} else { - println!("Nothing"); -} -``` - - -### If...Let Expression {.row-span-3} - -```rust -let mut arr1:[i64 ; 3] = [1,2,3]; -if let[1,2,_] = arr1{ - println!("Works with array"); -} - -let mut arr2:[&str; 2] = ["one", "two"]; -if let["Apple", _] = arr2{ - println!("Works with str array too"); -} -``` ----- -```rust -let tuple_1 = ("India", 7, 90, 90.432); -if let(_, 7, 9, 78.99) = tuple_1{ - println!("Works with tuples too"); -} - -let tuple_2 = ( 9, 7, 89, 12, "Okay"); -if let(9, 7,89, 12, blank) = tuple_2 { - println!("Everything {blank} mate?"); -} - -let tuple_3 = (89, 90, "Yes"); -if let(9, 89, "Yes") = tuple_3{ - println!("Pattern did match"); -} -else { - println!("Pattern did not match"); -} -``` - -### Match Expression {.row-span-3} - -```rust -let day_of_week = 2; - match day_of_week { - 1 => { - println!("Its Monday my dudes"); - }, - 2 => { - println!("It's Tuesday my dudes"); - }, - 3 => { - println!("It's Wednesday my dudes"); - }, - 4 => { - println!("It's Thursday my dudes"); - }, - 5 => { - println!("It's Friday my dudes"); - }, - 6 => { - println!("It's Saturday my dudes"); - }, - 7 => { - println!("It's Sunday my dudes"); - }, - _ => { - println!("Default!") - } - }; -} -``` - - -### Nested...If Expression - -```rust -let nested_conditions = 89; -if nested_conditions == 89 { - let just_a_value = 98; - if just_a_value >= 97 { - println!("Greater than 97"); - } -} -``` - - -### For Loop - -```rust -for mut i in 0..15 { - i-=1; - println!("The value of i is : {i}"); -} -``` - - - -### While Loop - -```rust -let mut check = 0; -while check < 11{ - println!("Check is : {check}"); - check+=1; - println!("After incrementing: {check}"); - - if check == 10{ - break; // stop while - } -} -``` - - -### Loop keyword - -```rust -loop { - println!("hello world forever!"); -} -``` -The infinite loop indicated. - -### Break Statement - -```rust -let mut i = 1; -loop { - println!("i is {i}"); - if i > 100 { - break; - } - i *= 2; -} -``` - - -### Continue Statement - -```rust -for (v, c) in (0..10+1).enumerate(){ - println!("The {c} number loop"); - if v == 9{ - println!("Here we go continue?"); - continue; - } - println!{"The value of v is : {v}"}; -} -``` - - - -Rust Functions {.cols-3} --------------- - - -### Basic function - -```rust - -fn print_message(){ - println!("Hello, QuickRef.ME!"); -} - -fn main(){ - //Invoking a function in Rust. - print_message(); -} -``` - -### Pass by Value - -```rust -fn main() -{ - let x:u32 = 10; - let y:u32 = 20; - - // => 200 - println!("Calc: {}", cal_rect(x, y)); -} -fn cal_rect(x:u32, y:u32) -> u32 -{ - x * y -} -``` - -### Pass by Reference - -```rust -fn main(){ - let mut by_ref = 3; // => 3 - power_of_three(&mut by_ref); - println!("{by_ref}"); // => 9 -} - -fn power_of_three(by_ref: &mut i32){ - // de-referencing is important - *by_ref = *by_ref * *by_ref; - println!("{by_ref}"); // => 9 -} -``` - - - -### Returns - -```rust {.wrap} -fn main(){ - let (mut radius, mut pi) = (3.0, 3.14); - let(area, _perimeter) = calculate ( - &mut radius, - &mut pi - ); - println!("The area and the perimeter of the circle are: {area} & {_perimeter}"); -} - -fn calculate(radius : &mut f64, pi: &mut f64) -> (f64, f64){ - let perimeter = 2.0 * *pi * *radius; - let area = *pi * *radius * *radius; - return (area, perimeter); -} -``` - -### Arrays as Arguments - -```rust -fn main(){ - let mut array: [i32 ; 5] = [1,2,3,4,6]; - print_arrays(array); - println!("The elements: {array:?}"); -} - -fn print_arrays(mut array:[i32; 5]) { - array[0] = 89; - array[1] = 90; - array[2] = 91; - array[3] = 92; - array[4] = 93; - println!("The elements: {array:?}"); -} -``` - -### Returning Arrays - -```rust - -fn main(){ - let mut arr:[i32; 5] = [2,4,6,8,10]; - multiply(arr); - println!("The array is : {:?}", multiply(arr)); -} - -fn multiply (mut arr: [i32 ; 5]) -> [i32 ; 5]{ - arr[2] = 90; - for mut i in 0..5 { - arr[i] = arr[i] * arr[2]; - } - return arr; -} -``` - - - - -Misc {.cols-3} --------------- - - -### Type Casting - -```rust -let a_int = 90; // int -// int to float -let mut type_cast = (a_int as f64); -``` ------- -```rust -let orginal: char = 'I'; -// char to int => 73 -let type_casted: i64 = orginal as i64; -``` - -To perform type-casting in Rust one must use the `as` keyword. - - - - -### Borrowing - -```rust -let mut foo = 4; -let mut borrowed_foo = &foo; -println!("{borrowed_foo}"); -``` ------- -```rust -let mut bar = 3; -let mut mutable_borrowed_bar = &mut bar; -println!("{mutable_borrowed_bar}"); -``` - -Here borrowed value borrows the value from value one using `&` operator. - - - -### De-referencing - -```rust -let mut borrow = 10; -let deref = &mut borrow; - -println!("{}", *deref); -``` - -De-referencing in rust can be done using the `*` operator - - -### Variable Scope -```rust -{ - // The scope limited to this braces - let a_number = 1; -} -println!("{a_number}"); -``` -This will produce error as the scope of the variable `a_number` ends at the braces - - -Also see --------- - -- [The Rust Document](https://doc.rust-lang.org/book/ch00-00-introduction.html) _(doc.rust-lang.org)_ -- [The Rust Reference](https://doc.rust-lang.org/reference/introduction.html) _(doc.rust-lang.org)_ -- [Rust Cheatsheet](https://phaiax.github.io/rust-cheatsheet/) _(phaiax.github.io)_ +--- +title: Rust +date: 2022-01-01 11:51:44 +icon: icon-rust +background: bg-black +tags: +categories: + - Programming +intro: | + The Rust quick reference cheat sheet that aims at providing help on writing basic syntax and methods. +--- + + +Getting Started {.cols-3} +--------------- + +### Hello_World.rs + +```rust +fn main() { + println!("Hello, World!"); +} +``` +#### Compiling and Running +```shell +$ rustc Hello_World.rs +$ ./Hello_World +Hello, World! +``` + +### Primitive types + +| | | +|---------------------------|----------------------------------| +| `bool` | Boolean (`true` _/_ `false`) | +| `char` | character | +| `f32`, `f64` | 32-bits, 64-bits floats | +| `i64`, `i32`, `i16`, `i8` | signed 16- ... integers | +| `u64`, `u32`, `u16`, `u8` | unsigned 16-bits, ... integers | +| `isize` | pointer-sized signed integers | +| `usize` | pointer-sized unsigned integers | + +See: [Rust Types](#rust-types) + + +### Formatting {.row-span-2} + +```rust {.wrap} +// Single Placeholder +println!("{}", 1); + +// Multiple Placeholder +println!("{} {}", 1, 3); + +// Positional Arguments +println!("{0} is {1} {2}, also {0} is a {3} programming language", "Rust", "cool", "language", "safe"); + +// Named Arguments +println!("{country} is a diverse nation with unity.", country = "India"); + +// Placeholder traits :b for binary, :0x is for hex and :o is octal +println!("Let us print 76 is binary which is {:b} , and hex equivalent is {:0x} and octal equivalent is {:o}", 76, 76, 76); + +// Debug Trait +println!("Print whatever we want to here using debug trait {:?}", (76, 'A', 90)); + +// New Format Strings in 1.58 +let x = "world"; +println!("Hello {x}!"); +``` + + +### Printing Styles + +```rust +// Prints the output +print!("Hello World\n"); + +// Appends a new line after printing +println!("Appending a new line"); + +// Prints as an error +eprint!("This is an error\n"); + +// Prints as an error with new line +eprintln!("This is an error with new line"); +``` + + +### Variables + +```rust +// Initializing and declaring a variable +let some_variable = "This_is_a_variable"; + +// Making a variable mutable +let mut mutable_variable = "Mutable"; + +// Assigning multiple variables +let (name, age) = ("ElementalX", 20); + +// (Global) constant +const SCREAMING_SNAKE_CASE:i64 = 9; +``` + + + +### Comments + +```rust +// Line Comments +/*.............Block Comments */ +/// Outer doc comments +//! Inner doc comments +``` +See: [Comment](https://doc.rust-lang.org/reference/comments.html) + + + +### Functions + +```rust +fn test(){ + println!("This is a function!"); +} + +fn main(){ + test(); +} +``` +See: [Functions](#rust-functions) + + + + +Rust Types {.cols-3} +-------------- + + +### Integer + +```rust +let mut a: u32 = 8; +let b: u64 = 877; +let c: i64 = 8999; +let d = -90; +``` + + +### Floating-Point + +```rust +let mut sixty_bit_float: f64 = 89.90; +let thirty_two_bit_float: f32 = 7.90; +let just_a_float = 69.69; +``` + + +### Boolean + +```rust {.wrap} +let true_val: bool = true; +let false_val: bool = false; +let just_a_bool = true; +let is_true = 8 < 5; // => false +``` + + +### Character + +```rust +let first_letter_of_alphabet = 'a'; +let explicit_char: char = 'F'; +let implicit_char = '8'; +let emoji = "\u{1f600}"; // => 😀 +``` + + +### String Literal + +```rust {.wrap} +let community_name = "AXIAL"; +let no_of_members: &str = "ten"; + +println!("The name of the community is {community_name} and it has {no_of_members} members"); +``` +See: [Strings](#rust-strings) + + +### Arrays + +```rust +┌─────┬─────┬─────┬─────┬─────┬─────┐ +| 92 | 97 | 98 | 99 | 98 | 94 | +└─────┴─────┴─────┴─────┴─────┴─────┘ + 0 1 2 3 4 5 +``` +---- + +```rust +let array: [i64; 6] = [92,97,98,99,98,94]; +``` + + + +### Multi-Dimensional Array {.row-span-2} + +```rust + j0 j1 j2 j3 j4 j5 + ┌────┬────┬────┬────┬────┬────┐ +i0 | 1 | 2 | 3 | 4 | 5 | 6 | + ├────┼────┼────┼────┼────┼────┤ +i1 | 6 | 5 | 4 | 3 | 2 | 1 | + └────┴────┴────┴────┴────┴────┘ +``` +---- + +```rust +let array: [[i64; 6] ;2] = [ + [1,2,3,4,5,6], + [6,5,4,3,2,1]]; +``` + +### Mutable Array + +```rust +let mut array: [i32 ; 3] = [2,6,10]; + +array[1] = 4; +array[2] = 6; +``` +Use the `mut` keyword to make it mutable. + + + +### Slices + +```rust +let mut array: [ i64; 4] = [1,2,3,4]; +let mut slices: &[i64] = &array[0..3] // Lower range is inclusive and upper range is exclusive + +println!("The elements of the slices are : {slices:?}"); +``` + + +### Vectors + +```rust +let some_vector = vec![1,2,3,4,5]; +``` +A vector is declared using the `vec!` macro. + + +### Tuples + +```rust +let tuple = (1, 'A' , "Cool", 78, true); +``` + + + +Rust Strings {.cols-3} +-------------- + +### String Literal + +```rust +let cs:&str = "cheat sheet"; + +// => Share cheat sheet for developers +println!("Share {cs} for developers"); +``` + + +### String Object + +```rust +// Creating an empty string object +let my_string = String::new; + +// Converting to a string object +let S_string = a_string.to_string() + +// Creating an initialized string object +let lang = String::from("Rust"); +println!("First language is {lang}"); + ``` + +### .capacity() + + ```rust +let rand = String::from("Random String"); +rand.capacity() // => 13 +``` +Calculates the capacity of the string in bytes. + + +### .contains() + +```rust +let name = String::from("ElementalX"); +name.contains("Element") // => true +``` +Checks if the substring is contained inside the original string or not. + + +### Pushing a single character + +```rust +let mut half_text = String::from("Hal"); +half_text.push('f'); // => Half +``` + + +### Pushing an entire String + +```rust +let mut hi = String::from("Hey there..."); +hi.push_str("How are you doing??"); + +// => Hey there...How are you doing?? +println!("{hi}"); +``` + + + +Rust Operators {.cols-3} +----------- + + +### Comparison Operators + +| | | +|----------|----------------------------------| +| `e == f` | `e` is equal to `f` | +| `e != f` | `e` is NOT equal to `f` | +| `e < f` | `e` is less than `f` | +| `e > f` | `e` is greater `f` | +| `e <= f` | `e` is less than or equal to `f` | +| `e >= f` | `e` is greater or equal to `f` | + +--------- + +```rust +let (e, f) = (1, 100); + +let greater = f > e; // => true +let less = f < e; // => false +let greater_equal = f >= e; // => true +let less_equal = e <= f; // => true +let equal_to = e == f; // => false +let not_equal_to = e != f; // => true +``` + + +### Arithmetic Operators + +| | | +|----------|--------------------------------------------| +| `a + b` | `a` is added to `b` | +| `a - b` | `b` is subtracted from `a` | +| `a / b` | `a` is divided by `b` | +| `a % b` | Gets remainder of `a` by dividing with `b` | +| `a * b` | `a` is multiplied with `b` | + +------ + +```rust {.wrap} +let (a, b) = (4, 5); + +let sum: i32 = a + b; // => 9 +let subtractions: i32 = a - b; // => -1 +let multiplication: i32 = a * b; // => 20 +let division: i32 = a / b; // => 0 +let modulus: i32 = a % b; // => 4 +``` + + + + +### Bitwise Operators + +| Operator | Description | +|----------|-------------------------| +| `g & h` | Binary AND | +| `g | h` | Binary OR | +| `g ^ h` | Binary XOR | +| `g ~ h` | Binary one's complement | +| `g << h` | Binary shift left | +| `g >> h` | Binary shift right | + +----- + +```rust {.wrap} +let (g, h) = (0x1, 0x2); + +let bitwise_and = g & h; // => 0 +let bitwise_or = g | h; // => 3 +let bitwise_xor = g ^ h; // => 3 +let right_shift = g >> 2; // => 0 +let left_shift = h << 4; // => 32 +``` + + + +### Logical Operators + +| Example | Meaning | +|----------------|------------------------| +| `c && d` | Both are true _(AND)_ | +| `c || d` | Either is true _(OR)_ | +| `!c` | `c` is false _(NOT)_ | + +------ + +```rust +let (c, d) = (true, false); + +let and = c && d; // => false +let or = c || d; // => true +let not = !c; // => false +``` + + +### Compound Assignment Operator + +```rust +let mut k = 9; +let mut l = k; +``` + +---- + +| Operator | Description | +|-----------|-----------------------------------------| +| `k += l` | Add a value and assign, then k=9 | +| `k -= l` | Substrate a value and assign, then k=18 | +| `k /= l` | Divide a value and assign, then k=9 | +| `k *= l` | Multiply a value and assign, then k=81 | +| `k |= l` | Bitwise OR and assign, then k=89 | + + + + + +Rust Flow Control {.cols-3} +-------------- + +### If Expression + +```rust +let case1: i32 = 81; +let case2: i32 = 82; + +if case1 < case2 { + println!("case1 is greater than case2"); +} +``` + +### If...Else Expression + +```rust +let case3 = 8; +let case4 = 9; + +if case3 >= case4 { + println!("case3 is better than case4"); +} else { + println!("case4 is greater than case3"); +} +``` + + + +### If...Else...if...Else Expression + +```rust +let foo = 12; +let bar = 13; + +if foo == bar { + println!("foo is equal to bar"); +} else if foo < bar { + println!("foo less than bar"); +} else if foo != bar { + println!("foo is not equal to bar"); +} else { + println!("Nothing"); +} +``` + + +### If...Let Expression {.row-span-3} + +```rust +let mut arr1:[i64 ; 3] = [1,2,3]; +if let[1,2,_] = arr1{ + println!("Works with array"); +} + +let mut arr2:[&str; 2] = ["one", "two"]; +if let["Apple", _] = arr2{ + println!("Works with str array too"); +} +``` +---- +```rust +let tuple_1 = ("India", 7, 90, 90.432); +if let(_, 7, 9, 78.99) = tuple_1{ + println!("Works with tuples too"); +} + +let tuple_2 = ( 9, 7, 89, 12, "Okay"); +if let(9, 7,89, 12, blank) = tuple_2 { + println!("Everything {blank} mate?"); +} + +let tuple_3 = (89, 90, "Yes"); +if let(9, 89, "Yes") = tuple_3{ + println!("Pattern did match"); +} +else { + println!("Pattern did not match"); +} +``` + +### Match Expression {.row-span-3} + +```rust +let day_of_week = 2; + match day_of_week { + 1 => { + println!("Its Monday my dudes"); + }, + 2 => { + println!("It's Tuesday my dudes"); + }, + 3 => { + println!("It's Wednesday my dudes"); + }, + 4 => { + println!("It's Thursday my dudes"); + }, + 5 => { + println!("It's Friday my dudes"); + }, + 6 => { + println!("It's Saturday my dudes"); + }, + 7 => { + println!("It's Sunday my dudes"); + }, + _ => { + println!("Default!") + } + }; +} +``` + + +### Nested...If Expression + +```rust +let nested_conditions = 89; +if nested_conditions == 89 { + let just_a_value = 98; + if just_a_value >= 97 { + println!("Greater than 97"); + } +} +``` + + +### For Loop + +```rust +for mut i in 0..15 { + i-=1; + println!("The value of i is : {i}"); +} +``` + + + +### While Loop + +```rust +let mut check = 0; +while check < 11{ + println!("Check is : {check}"); + check+=1; + println!("After incrementing: {check}"); + + if check == 10{ + break; // stop while + } +} +``` + + +### Loop keyword + +```rust +loop { + println!("hello world forever!"); +} +``` +The infinite loop indicated. + +### Break Statement + +```rust +let mut i = 1; +loop { + println!("i is {i}"); + if i > 100 { + break; + } + i *= 2; +} +``` + + +### Continue Statement + +```rust +for (v, c) in (0..10+1).enumerate(){ + println!("The {c} number loop"); + if v == 9{ + println!("Here we go continue?"); + continue; + } + println!{"The value of v is : {v}"}; +} +``` + + + +Rust Functions {.cols-3} +-------------- + + +### Basic function + +```rust + +fn print_message(){ + println!("Hello, QuickRef.ME!"); +} + +fn main(){ + //Invoking a function in Rust. + print_message(); +} +``` + +### Pass by Value + +```rust +fn main() +{ + let x:u32 = 10; + let y:u32 = 20; + + // => 200 + println!("Calc: {}", cal_rect(x, y)); +} +fn cal_rect(x:u32, y:u32) -> u32 +{ + x * y +} +``` + +### Pass by Reference + +```rust +fn main(){ + let mut by_ref = 3; // => 3 + power_of_three(&mut by_ref); + println!("{by_ref}"); // => 9 +} + +fn power_of_three(by_ref: &mut i32){ + // de-referencing is important + *by_ref = *by_ref * *by_ref; + println!("{by_ref}"); // => 9 +} +``` + + + +### Returns + +```rust {.wrap} +fn main(){ + let (mut radius, mut pi) = (3.0, 3.14); + let(area, _perimeter) = calculate ( + &mut radius, + &mut pi + ); + println!("The area and the perimeter of the circle are: {area} & {_perimeter}"); +} + +fn calculate(radius : &mut f64, pi: &mut f64) -> (f64, f64){ + let perimeter = 2.0 * *pi * *radius; + let area = *pi * *radius * *radius; + return (area, perimeter); +} +``` + +### Arrays as Arguments + +```rust +fn main(){ + let mut array: [i32 ; 5] = [1,2,3,4,6]; + print_arrays(array); + println!("The elements: {array:?}"); +} + +fn print_arrays(mut array:[i32; 5]) { + array[0] = 89; + array[1] = 90; + array[2] = 91; + array[3] = 92; + array[4] = 93; + println!("The elements: {array:?}"); +} +``` + +### Returning Arrays + +```rust + +fn main(){ + let mut arr:[i32; 5] = [2,4,6,8,10]; + multiply(arr); + println!("The array is : {:?}", multiply(arr)); +} + +fn multiply (mut arr: [i32 ; 5]) -> [i32 ; 5]{ + arr[2] = 90; + for mut i in 0..5 { + arr[i] = arr[i] * arr[2]; + } + return arr; +} +``` + + + + +Misc {.cols-3} +-------------- + + +### Type Casting + +```rust +let a_int = 90; // int +// int to float +let mut type_cast = (a_int as f64); +``` +------ +```rust +let orginal: char = 'I'; +// char to int => 73 +let type_casted: i64 = orginal as i64; +``` + +To perform type-casting in Rust one must use the `as` keyword. + + + + +### Borrowing + +```rust +let mut foo = 4; +let mut borrowed_foo = &foo; +println!("{borrowed_foo}"); +``` +------ +```rust +let mut bar = 3; +let mut mutable_borrowed_bar = &mut bar; +println!("{mutable_borrowed_bar}"); +``` + +Here borrowed value borrows the value from value one using `&` operator. + + + +### De-referencing + +```rust +let mut borrow = 10; +let deref = &mut borrow; + +println!("{}", *deref); +``` + +De-referencing in rust can be done using the `*` operator + + +### Variable Scope +```rust +{ + // The scope limited to this braces + let a_number = 1; +} +println!("{a_number}"); +``` +This will produce error as the scope of the variable `a_number` ends at the braces + + +Also see +-------- + +- [The Rust Document](https://doc.rust-lang.org/book/ch00-00-introduction.html) _(doc.rust-lang.org)_ +- [The Rust Reference](https://doc.rust-lang.org/reference/introduction.html) _(doc.rust-lang.org)_ +- [Rust Cheatsheet](https://phaiax.github.io/rust-cheatsheet/) _(phaiax.github.io)_ diff --git a/sass.md b/source/_posts/sass.md similarity index 100% rename from sass.md rename to source/_posts/sass.md diff --git a/screen.md b/source/_posts/screen.md similarity index 100% rename from screen.md rename to source/_posts/screen.md diff --git a/sed.md b/source/_posts/sed.md similarity index 100% rename from sed.md rename to source/_posts/sed.md diff --git a/ssh.md b/source/_posts/ssh.md similarity index 100% rename from ssh.md rename to source/_posts/ssh.md diff --git a/tmux.md b/source/_posts/tmux.md similarity index 100% rename from tmux.md rename to source/_posts/tmux.md diff --git a/toml.md b/source/_posts/toml.md similarity index 100% rename from toml.md rename to source/_posts/toml.md diff --git a/vim.md b/source/_posts/vim.md similarity index 100% rename from vim.md rename to source/_posts/vim.md diff --git a/vscode.md b/source/_posts/vscode.md similarity index 100% rename from vscode.md rename to source/_posts/vscode.md diff --git a/webstorm.md b/source/_posts/webstorm.md similarity index 100% rename from webstorm.md rename to source/_posts/webstorm.md diff --git a/xpath.md b/source/_posts/xpath.md similarity index 100% rename from xpath.md rename to source/_posts/xpath.md diff --git a/yaml.md b/source/_posts/yaml.md similarity index 100% rename from yaml.md rename to source/_posts/yaml.md diff --git a/source/about/index.md b/source/about/index.md new file mode 100644 index 0000000..97a21cb --- /dev/null +++ b/source/about/index.md @@ -0,0 +1,6 @@ +--- +title: About +date: 2020-03-26 20:45:53 +--- + +Coming soon~ diff --git a/source/assets/image/awk-preview.png b/source/assets/image/awk-preview.png new file mode 100644 index 0000000..f2a2aa2 Binary files /dev/null and b/source/assets/image/awk-preview.png differ diff --git a/source/assets/image/bash-preview.png b/source/assets/image/bash-preview.png new file mode 100644 index 0000000..a137342 Binary files /dev/null and b/source/assets/image/bash-preview.png differ diff --git a/source/assets/image/chmod-preview.png b/source/assets/image/chmod-preview.png new file mode 100644 index 0000000..27f3561 Binary files /dev/null and b/source/assets/image/chmod-preview.png differ diff --git a/source/assets/image/cpp-preview.png b/source/assets/image/cpp-preview.png new file mode 100644 index 0000000..c5fcfe2 Binary files /dev/null and b/source/assets/image/cpp-preview.png differ diff --git a/source/assets/image/cron-preview.png b/source/assets/image/cron-preview.png new file mode 100644 index 0000000..330eb10 Binary files /dev/null and b/source/assets/image/cron-preview.png differ diff --git a/source/assets/image/css-preview.png b/source/assets/image/css-preview.png new file mode 100644 index 0000000..31a098e Binary files /dev/null and b/source/assets/image/css-preview.png differ diff --git a/source/assets/image/dart-preview.png b/source/assets/image/dart-preview.png new file mode 100644 index 0000000..35684ce Binary files /dev/null and b/source/assets/image/dart-preview.png differ diff --git a/source/assets/image/docker-preview.png b/source/assets/image/docker-preview.png new file mode 100644 index 0000000..15ddbc4 Binary files /dev/null and b/source/assets/image/docker-preview.png differ diff --git a/source/assets/image/emacs-preview.png b/source/assets/image/emacs-preview.png new file mode 100644 index 0000000..fa086f3 Binary files /dev/null and b/source/assets/image/emacs-preview.png differ diff --git a/source/assets/image/emmet-preview.png b/source/assets/image/emmet-preview.png new file mode 100644 index 0000000..8b1917b Binary files /dev/null and b/source/assets/image/emmet-preview.png differ diff --git a/source/assets/image/emoji-preview.png b/source/assets/image/emoji-preview.png new file mode 100644 index 0000000..635581b Binary files /dev/null and b/source/assets/image/emoji-preview.png differ diff --git a/source/assets/image/find-preview.png b/source/assets/image/find-preview.png new file mode 100644 index 0000000..b2c0689 Binary files /dev/null and b/source/assets/image/find-preview.png differ diff --git a/source/assets/image/git-preview.png b/source/assets/image/git-preview.png new file mode 100644 index 0000000..465b5cc Binary files /dev/null and b/source/assets/image/git-preview.png differ diff --git a/source/assets/image/golang-preview.png b/source/assets/image/golang-preview.png new file mode 100644 index 0000000..cc3e0a2 Binary files /dev/null and b/source/assets/image/golang-preview.png differ diff --git a/source/assets/image/graphql-preview.png b/source/assets/image/graphql-preview.png new file mode 100644 index 0000000..9ccf71e Binary files /dev/null and b/source/assets/image/graphql-preview.png differ diff --git a/source/assets/image/grep-preview.png b/source/assets/image/grep-preview.png new file mode 100644 index 0000000..5c27bba Binary files /dev/null and b/source/assets/image/grep-preview.png differ diff --git a/source/assets/image/html-preview.png b/source/assets/image/html-preview.png new file mode 100644 index 0000000..f101b0e Binary files /dev/null and b/source/assets/image/html-preview.png differ diff --git a/source/assets/image/http-status-code-preview.png b/source/assets/image/http-status-code-preview.png new file mode 100644 index 0000000..9454272 Binary files /dev/null and b/source/assets/image/http-status-code-preview.png differ diff --git a/source/assets/image/idea-preview.png b/source/assets/image/idea-preview.png new file mode 100644 index 0000000..471fe84 Binary files /dev/null and b/source/assets/image/idea-preview.png differ diff --git a/source/assets/image/java-preview.png b/source/assets/image/java-preview.png new file mode 100644 index 0000000..9f1ebd5 Binary files /dev/null and b/source/assets/image/java-preview.png differ diff --git a/source/assets/image/javascript-preview.png b/source/assets/image/javascript-preview.png new file mode 100644 index 0000000..e1e6e61 Binary files /dev/null and b/source/assets/image/javascript-preview.png differ diff --git a/source/assets/image/jquery-preview.png b/source/assets/image/jquery-preview.png new file mode 100644 index 0000000..927201b Binary files /dev/null and b/source/assets/image/jquery-preview.png differ diff --git a/source/assets/image/json-preview.png b/source/assets/image/json-preview.png new file mode 100644 index 0000000..e957a78 Binary files /dev/null and b/source/assets/image/json-preview.png differ diff --git a/source/assets/image/laravel-preview.png b/source/assets/image/laravel-preview.png new file mode 100644 index 0000000..722f3b5 Binary files /dev/null and b/source/assets/image/laravel-preview.png differ diff --git a/source/assets/image/lsof-preview.png b/source/assets/image/lsof-preview.png new file mode 100644 index 0000000..1e58e2c Binary files /dev/null and b/source/assets/image/lsof-preview.png differ diff --git a/source/assets/image/markdown-preview.png b/source/assets/image/markdown-preview.png new file mode 100644 index 0000000..79520eb Binary files /dev/null and b/source/assets/image/markdown-preview.png differ diff --git a/source/assets/image/mime-preview.png b/source/assets/image/mime-preview.png new file mode 100644 index 0000000..1502d02 Binary files /dev/null and b/source/assets/image/mime-preview.png differ diff --git a/source/assets/image/mitmproxy-preview.png b/source/assets/image/mitmproxy-preview.png new file mode 100644 index 0000000..0a8e100 Binary files /dev/null and b/source/assets/image/mitmproxy-preview.png differ diff --git a/source/assets/image/mysql-preview.png b/source/assets/image/mysql-preview.png new file mode 100644 index 0000000..362668b Binary files /dev/null and b/source/assets/image/mysql-preview.png differ diff --git a/source/assets/image/nc-preview.png b/source/assets/image/nc-preview.png new file mode 100644 index 0000000..42c5e22 Binary files /dev/null and b/source/assets/image/nc-preview.png differ diff --git a/source/assets/image/neo4j-preview.png b/source/assets/image/neo4j-preview.png new file mode 100644 index 0000000..bde55ac Binary files /dev/null and b/source/assets/image/neo4j-preview.png differ diff --git a/source/assets/image/netstat-preview.png b/source/assets/image/netstat-preview.png new file mode 100644 index 0000000..42c5e22 Binary files /dev/null and b/source/assets/image/netstat-preview.png differ diff --git a/source/assets/image/numpy-preview.png b/source/assets/image/numpy-preview.png new file mode 100644 index 0000000..cbb03a6 Binary files /dev/null and b/source/assets/image/numpy-preview.png differ diff --git a/source/assets/image/php-preview.png b/source/assets/image/php-preview.png new file mode 100644 index 0000000..b4a1ee2 Binary files /dev/null and b/source/assets/image/php-preview.png differ diff --git a/source/assets/image/postgres-preview.png b/source/assets/image/postgres-preview.png new file mode 100644 index 0000000..3452e44 Binary files /dev/null and b/source/assets/image/postgres-preview.png differ diff --git a/source/assets/image/preview.png b/source/assets/image/preview.png new file mode 100755 index 0000000..1220011 Binary files /dev/null and b/source/assets/image/preview.png differ diff --git a/source/assets/image/python-preview.png b/source/assets/image/python-preview.png new file mode 100644 index 0000000..f23f3e7 Binary files /dev/null and b/source/assets/image/python-preview.png differ diff --git a/source/assets/image/quickref-preview.png b/source/assets/image/quickref-preview.png new file mode 100644 index 0000000..734fde4 Binary files /dev/null and b/source/assets/image/quickref-preview.png differ diff --git a/source/assets/image/redis-preview.png b/source/assets/image/redis-preview.png new file mode 100644 index 0000000..b5c1675 Binary files /dev/null and b/source/assets/image/redis-preview.png differ diff --git a/source/assets/image/regex-preview.png b/source/assets/image/regex-preview.png new file mode 100644 index 0000000..deaba49 Binary files /dev/null and b/source/assets/image/regex-preview.png differ diff --git a/source/assets/image/resolutions-preview.png b/source/assets/image/resolutions-preview.png new file mode 100644 index 0000000..9253cef Binary files /dev/null and b/source/assets/image/resolutions-preview.png differ diff --git a/source/assets/image/sass-preview.png b/source/assets/image/sass-preview.png new file mode 100644 index 0000000..3d58f34 Binary files /dev/null and b/source/assets/image/sass-preview.png differ diff --git a/source/assets/image/screen-preview.png b/source/assets/image/screen-preview.png new file mode 100644 index 0000000..7548ab2 Binary files /dev/null and b/source/assets/image/screen-preview.png differ diff --git a/source/assets/image/sed-preview.png b/source/assets/image/sed-preview.png new file mode 100644 index 0000000..2f39cd9 Binary files /dev/null and b/source/assets/image/sed-preview.png differ diff --git a/source/assets/image/ssh-preview.png b/source/assets/image/ssh-preview.png new file mode 100644 index 0000000..b71fcb8 Binary files /dev/null and b/source/assets/image/ssh-preview.png differ diff --git a/source/assets/image/tmux-preview.png b/source/assets/image/tmux-preview.png new file mode 100644 index 0000000..6f38282 Binary files /dev/null and b/source/assets/image/tmux-preview.png differ diff --git a/source/assets/image/toml-preview.png b/source/assets/image/toml-preview.png new file mode 100644 index 0000000..a4db1a9 Binary files /dev/null and b/source/assets/image/toml-preview.png differ diff --git a/source/assets/image/vim-preview.png b/source/assets/image/vim-preview.png new file mode 100644 index 0000000..ddab650 Binary files /dev/null and b/source/assets/image/vim-preview.png differ diff --git a/source/assets/image/webstorm-preview.png b/source/assets/image/webstorm-preview.png new file mode 100644 index 0000000..df7f422 Binary files /dev/null and b/source/assets/image/webstorm-preview.png differ diff --git a/source/assets/image/xpath-preview.png b/source/assets/image/xpath-preview.png new file mode 100644 index 0000000..a0191d5 Binary files /dev/null and b/source/assets/image/xpath-preview.png differ diff --git a/source/assets/image/yaml-preview.png b/source/assets/image/yaml-preview.png new file mode 100644 index 0000000..407ad7b Binary files /dev/null and b/source/assets/image/yaml-preview.png differ diff --git a/source/assets/page/oops.htm b/source/assets/page/oops.htm new file mode 100644 index 0000000..b5307fb --- /dev/null +++ b/source/assets/page/oops.htm @@ -0,0 +1,171 @@ + + + + + + + 404 Page NotFound + + + + +
+
+
+
+
+
+
+

oops!

+

Error 404 : Page Not Found

+
go back +
+
+ + diff --git a/source/ga_analytics_tops.json b/source/ga_analytics_tops.json new file mode 100644 index 0000000..5384628 --- /dev/null +++ b/source/ga_analytics_tops.json @@ -0,0 +1,62 @@ +[ + { + "icon": "icon-python", + "title": "Python", + "path": "python.html", + "background": "bg-[#436b97]" + }, + { + "icon": "icon-vim", + "title": "Vim", + "path": "vim.html", + "background": "bg-[#46933f]" + }, + { + "icon": "icon-javascript", + "title": "JavaScript", + "path": "javascript.html", + "background": "bg-[#ebd94e]" + }, + { + "icon": "icon-bash", + "title": "Bash", + "path": "bash.html", + "background": "bg-[#3e4548]" + }, + { + "icon": "icon-regex", + "title": "RegEX", + "path": "regex.html", + "background": "bg-[#e56d2d]" + }, + { + "icon": "icon-sed", + "title": "Sed", + "path": "sed.html", + "background": "bg-red-400" + }, + { + "icon": "icon-golang", + "title": "Golang", + "path": "golang.html", + "background": "bg-[#4ba4cc]" + }, + { + "icon": "icon-html", + "title": "HTML", + "path": "html.html", + "background": "bg-[#cc5534]" + }, + { + "icon": "icon-java", + "title": "Java", + "path": "java.html", + "background": "bg-[#d33731]" + }, + { + "icon": "icon-postgres", + "title": "PostgreSQL", + "path": "postgres.html", + "background": "bg-[#3d6488]" + } +] \ No newline at end of file diff --git a/source/notes/index.md b/source/notes/index.md new file mode 100644 index 0000000..0c92342 --- /dev/null +++ b/source/notes/index.md @@ -0,0 +1,5 @@ +--- +title: List all notes +layout: notes +date: 2021-09-02 18:03:45 +--- diff --git a/source/privacy/index.md b/source/privacy/index.md new file mode 100644 index 0000000..36488b4 --- /dev/null +++ b/source/privacy/index.md @@ -0,0 +1,5 @@ +--- +title: Privacy policy +date: 2020-03-26 20:46:04 +--- +Coming soon~ diff --git a/source/robots.txt b/source/robots.txt new file mode 100644 index 0000000..6368bf6 --- /dev/null +++ b/source/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://quickref.me/sitemap.xml diff --git a/source/sponsor/index.md b/source/sponsor/index.md new file mode 100644 index 0000000..ac6b6b5 --- /dev/null +++ b/source/sponsor/index.md @@ -0,0 +1,65 @@ +--- +title: Sponsor +date: 2021-12-11 14:37:13 +intro: | + We appreciate your help in order to pay for the hosting fees and ensuring I can spend enough time to create and optimize the cheatsheet webpage. +--- + +Sponsor {.cols-3} +--------------- + + + +### Become a sponsor + +
+ + + via PayPal + +
+
+ + + Buy me a coffee + +
+ + + + +### Support with Crypto {.col-span-2} + +
+

I'm a crypto enthusiast, and these are just a few wallet addresses. If you'd like, I can send you an address to a token or asset of your choice. I'm always happy to receive and learn about a new one!

+
+ + 3AJidvmhz8Soe4fnMU3HV8hZRm261PraAj +
+
+ + 0x38415CEb0215b69cF67f6750cf69c2c9b609873a +
+
+ Request more... +
+
+ +### Sponsors {.col-span-3} + + +| Name | Amount | Message | +|-----------------|---------|-----------------------------------------------------------------------------------| +| Benjamin Schröer| $ 9.34 | Thanks for quickref.me! | +| Fabian Barajas | $ 10.00 | | +| [Anonymous] | $ 5.00 | | +| [Anonymous] | $ 20.00 | Your page is the best reference I've ever come across and I'm sharing it with everyone I know. Thanks so much for creating it! | +| Tony Qu | $ 20.00 | Thanks Man ! This looks nice. :-) | +| [Anonymous] | $ 25.00 | As a newcomer to Python, this looks incredibly useful. Thanks for your hard work! | +| VimNewbie | $ 10.00 | Awesome and elegant... fantastic job! | +| Dave Hanson | $ 50.00 | Nice.. great work... | +| Alexander | $ 40.00 | - | +| Frpsi17 | $ 10.00 | I think I just found the greatest site for cheatsheets,Thanks | +| [Anonymous] | $ 5.00 | Awesome! Thank you! | + + diff --git a/source/widget/chmod.html b/source/widget/chmod.html new file mode 100644 index 0000000..67053c5 --- /dev/null +++ b/source/widget/chmod.html @@ -0,0 +1,300 @@ +
+
+

Permissions:

+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UserGroupOther
Read
Write
Execute
+ + + + \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..448d5c3 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,23 @@ +module.exports = { + darkMode: 'class', // or 'media' or 'class' + plugins: [], + theme: { + boxShadow: { + /* Customized */ + DEFAULT: '0 6px 8px rgba(102, 119, 136, 0.03), 0 1px 2px rgba(102, 119, 136, 0.3)', + md: '0 4px 6px -1px rgba(102, 119, 136, 0.05), 0 2px 4px -1px rgba(102, 119, 136, 0.35)', + + /* Default */ + sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)', + lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)', + xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)', + '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)', + '3xl': '0 35px 60px -15px rgba(0, 0, 0, 0.3)', + inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)', + none: 'none', + } + }, + content: { + files: ['**/*.{ejs,md}', '**/widget/*.html', '**/js/main.js'], + } +}; \ No newline at end of file diff --git a/themes/coo/_config.yml b/themes/coo/_config.yml new file mode 100644 index 0000000..8a7f7a0 --- /dev/null +++ b/themes/coo/_config.yml @@ -0,0 +1,43 @@ +# Limit on the number of recent articles +recent_posts_limits: 4 + +# The categories and order displayed on the home page +index_categories: + - Programming + - Toolkit + - Linux Command + - IDE + - Python + - Database + - Other + +# Home recommended posts +index_recommends: + - bash + - python + - javascript + - golang + - vim + - regex + - awk + - markdown + + +# Related popular posts +# Dependencies: https://github.com/tea3/hexo-related-popular-posts +related_posts: + enable: true + title: Related + params: + maxCount: 4 + #PPMixingRate: 0.0 + #isDate: false + #isImage: false + #isExcerpt: false + +top_posts: + enable: true + title: Top + params: + maxCount: 4 + PPMixingRate: 1.0 diff --git a/themes/coo/languages/default.yml b/themes/coo/languages/default.yml new file mode 100644 index 0000000..db3af1c --- /dev/null +++ b/themes/coo/languages/default.yml @@ -0,0 +1,28 @@ +categories: Categories +search: Search +tags: Tags +tagcloud: Tag Cloud +prev: "Prev: %s" +next: "Next: %s" +comment: Comments +archive_a: Archives +archive_b: "Archives: %s" +page: Page %d +recent_posts: Recent Posts +blogroll: Links +returntop: Return to top +readmore: READ MORE +floatmenu: Menu + +menu: + home: Home + archives: Archives + category: Categories + search: Search +current_page: Current page +page_name: + categories: (Categories) + tags: (Tags) + archives: (Archives) +go_back_home: Go back home +no_title: No title diff --git a/themes/coo/layout/_partial/comment.ejs b/themes/coo/layout/_partial/comment.ejs new file mode 100644 index 0000000..0160d12 --- /dev/null +++ b/themes/coo/layout/_partial/comment.ejs @@ -0,0 +1,27 @@ +<% +var pageId = page.path; +var pageUrl = page.permalink; +var pageTitle = page.title; +%> + +<% if (theme.disqus_shortname && page.comments){ %> +
+
+ + +
+<% } %> diff --git a/themes/coo/layout/_partial/footer.ejs b/themes/coo/layout/_partial/footer.ejs new file mode 100644 index 0000000..8751778 --- /dev/null +++ b/themes/coo/layout/_partial/footer.ejs @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/themes/coo/layout/_partial/head.ejs b/themes/coo/layout/_partial/head.ejs new file mode 100644 index 0000000..3d5c514 --- /dev/null +++ b/themes/coo/layout/_partial/head.ejs @@ -0,0 +1,57 @@ + + + + + + + + + + <%- page_title() %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%- css('css/style.css') %> + + + diff --git a/themes/coo/layout/_partial/header.ejs b/themes/coo/layout/_partial/header.ejs new file mode 100644 index 0000000..a61008c --- /dev/null +++ b/themes/coo/layout/_partial/header.ejs @@ -0,0 +1,52 @@ +<% let postPage = (page['layout'] === 'post' || page._isNotePagination || page['layout'] === 'note') ? true : false; %> +
+
+
+ <%- partial('index/logo', {icon: true}) %> +
+ + + + + <% if (postPage) { %> + + + + <% } %> + + " target="_blank"> + + + " target="_blank"> + + +
+
+
+
\ No newline at end of file diff --git a/themes/coo/layout/_partial/index/card.ejs b/themes/coo/layout/_partial/index/card.ejs new file mode 100644 index 0000000..4ab5867 --- /dev/null +++ b/themes/coo/layout/_partial/index/card.ejs @@ -0,0 +1,6 @@ + +
+ +

<%- title %>

+
+
diff --git a/themes/coo/layout/_partial/index/hero.ejs b/themes/coo/layout/_partial/index/hero.ejs new file mode 100644 index 0000000..213155f --- /dev/null +++ b/themes/coo/layout/_partial/index/hero.ejs @@ -0,0 +1,8 @@ +
+
+

Quick Reference

+

+ Here are some cheatsheets and quick references contributed by open source angels. +

+
+
diff --git a/themes/coo/layout/_partial/index/logo.ejs b/themes/coo/layout/_partial/index/logo.ejs new file mode 100644 index 0000000..1a2db43 --- /dev/null +++ b/themes/coo/layout/_partial/index/logo.ejs @@ -0,0 +1,13 @@ + + <% if (icon) { %> + + <% } %> + QuickRef.ME + +<% if (page.layout == "note" || page._isNotePagination){ %> + +<% } %> diff --git a/themes/coo/layout/_partial/index/recommend.ejs b/themes/coo/layout/_partial/index/recommend.ejs new file mode 100644 index 0000000..fef03ac --- /dev/null +++ b/themes/coo/layout/_partial/index/recommend.ejs @@ -0,0 +1,11 @@ +
+ <% theme.index_recommends.forEach(function (filePath) { %> + <% let post = site.posts.findOne({slug: filePath}); %> + +
+ +

<%= post.title %>

+
+
+ <% }); %> +
\ No newline at end of file diff --git a/themes/coo/layout/_partial/index/request.ejs b/themes/coo/layout/_partial/index/request.ejs new file mode 100644 index 0000000..ad33114 --- /dev/null +++ b/themes/coo/layout/_partial/index/request.ejs @@ -0,0 +1,23 @@ +
+
+ +
+

See something missing?

+

+ The above list does not see what you want? Are you looking for some cheatsheets or references, or you + have + some snippet cheatsheets to share, it's a best chance to do it! +

+ +
+
+
\ No newline at end of file diff --git a/themes/coo/layout/_partial/note/header.ejs b/themes/coo/layout/_partial/note/header.ejs new file mode 100644 index 0000000..ae0eacf --- /dev/null +++ b/themes/coo/layout/_partial/note/header.ejs @@ -0,0 +1,5 @@ +
+
+ <%- partial('_partial/index/logo', {icon: true}) %> +
+
\ No newline at end of file diff --git a/themes/coo/layout/_partial/note/tags.ejs b/themes/coo/layout/_partial/note/tags.ejs new file mode 100644 index 0000000..e47ea97 --- /dev/null +++ b/themes/coo/layout/_partial/note/tags.ejs @@ -0,0 +1,9 @@ +<% if (page.tags && page.tags.length){ %> + +<% } %> \ No newline at end of file diff --git a/themes/coo/layout/_partial/note/title.ejs b/themes/coo/layout/_partial/note/title.ejs new file mode 100644 index 0000000..567e190 --- /dev/null +++ b/themes/coo/layout/_partial/note/title.ejs @@ -0,0 +1,14 @@ +<% if (index) { %> + <% if (post.link) { %> + + <% } else if (post.title) { %> + <%= post.title %> + <% } else { %> + Untitled + <% } %> +<% } else { %> +

+ <%= post.title %> +

+<% } %> + diff --git a/themes/coo/layout/_partial/pagination.ejs b/themes/coo/layout/_partial/pagination.ejs new file mode 100644 index 0000000..ed2b15a --- /dev/null +++ b/themes/coo/layout/_partial/pagination.ejs @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/themes/coo/layout/_partial/post/category.ejs b/themes/coo/layout/_partial/post/category.ejs new file mode 100644 index 0000000..7710892 --- /dev/null +++ b/themes/coo/layout/_partial/post/category.ejs @@ -0,0 +1,10 @@ +<% if (page.categories && page.categories.length > 0){ %> + <% + var cats = []; + page.categories.forEach(function (cat) { + cats.push('' + cat.name + ''); + }); + %> + + <%- cats.join('') %> +<% } %> diff --git a/themes/coo/layout/_partial/post/editbar.ejs b/themes/coo/layout/_partial/post/editbar.ejs new file mode 100644 index 0000000..65fc93b --- /dev/null +++ b/themes/coo/layout/_partial/post/editbar.ejs @@ -0,0 +1,72 @@ + \ No newline at end of file diff --git a/themes/coo/layout/_partial/post/popular.ejs b/themes/coo/layout/_partial/post/popular.ejs new file mode 100644 index 0000000..cc20a0d --- /dev/null +++ b/themes/coo/layout/_partial/post/popular.ejs @@ -0,0 +1,14 @@ +<% +let posts = popular_posts_json(theme.related_posts.params, page).json; +let title = theme.related_posts.title; +if (posts.length === 0) { + posts = topPosts(); + title = theme.top_posts.title; +} +%> +

<%= title %> Cheatsheet

+
+ <% posts.forEach(function (post){ %> + <%- partial('_partial/post/popular_card', {post: post}) %> + <% }); %> +
diff --git a/themes/coo/layout/_partial/post/popular_card.ejs b/themes/coo/layout/_partial/post/popular_card.ejs new file mode 100644 index 0000000..c646eb8 --- /dev/null +++ b/themes/coo/layout/_partial/post/popular_card.ejs @@ -0,0 +1,9 @@ + +
+

<%= post.title %> + Cheatsheet +

+

Quick Reference

+
+
\ No newline at end of file diff --git a/themes/coo/layout/_partial/post/prevnext.ejs b/themes/coo/layout/_partial/post/prevnext.ejs new file mode 100644 index 0000000..8aca2f0 --- /dev/null +++ b/themes/coo/layout/_partial/post/prevnext.ejs @@ -0,0 +1,15 @@ +<% if (page.prev) { %> +

+ +

+<% } %> + +<% if (page.next) { %> +

+ +

+<% } %> diff --git a/themes/coo/layout/_partial/post/recent.ejs b/themes/coo/layout/_partial/post/recent.ejs new file mode 100644 index 0000000..94bf2fb --- /dev/null +++ b/themes/coo/layout/_partial/post/recent.ejs @@ -0,0 +1,6 @@ +

Recent Cheatsheet

+
+ <% site.posts.sort('date', -1).filter(post => post.layout !== "note").limit(theme.recent_posts_limits).each(function(post){ %> + <%- partial('_partial/post/popular_card', {post: post}) %> + <% }) %> +
diff --git a/themes/coo/layout/_partial/post/tag.ejs b/themes/coo/layout/_partial/post/tag.ejs new file mode 100644 index 0000000..38bf434 --- /dev/null +++ b/themes/coo/layout/_partial/post/tag.ejs @@ -0,0 +1,7 @@ +<% if (page.tags && page.tags.length > 0){ %> +
+ <% page.tags.forEach(function(tag) { %> + <%= tag.name %> + <% }); %> +
+<% } %> diff --git a/themes/coo/layout/_partial/post/title.ejs b/themes/coo/layout/_partial/post/title.ejs new file mode 100644 index 0000000..9da0a47 --- /dev/null +++ b/themes/coo/layout/_partial/post/title.ejs @@ -0,0 +1,13 @@ +<% if (page.link){ %> + <% if (page.title){ %> +

<%= page.title || __('no_title') %>

+ <% } else { %> +

<%= page.link || __('no_title') %>

+ <% } %> +<% } else { %> + <% if (false){ %> +

<%= page.title || __('no_title') %>

+ <% } else { %> +

<%= page.title || __('no_title') %>

+ <% } %> +<% } %> diff --git a/themes/coo/layout/_partial/scripts.ejs b/themes/coo/layout/_partial/scripts.ejs new file mode 100644 index 0000000..e85ad64 --- /dev/null +++ b/themes/coo/layout/_partial/scripts.ejs @@ -0,0 +1,16 @@ +<%- js('js/main.js') %> + +<% if (is_post() && page.plugins != undefined && page.plugins.includes("tooltip") ){ %> + + + +<% } %> \ No newline at end of file diff --git a/themes/coo/layout/_partial/search.ejs b/themes/coo/layout/_partial/search.ejs new file mode 100644 index 0000000..f29dd7e --- /dev/null +++ b/themes/coo/layout/_partial/search.ejs @@ -0,0 +1,41 @@ + \ No newline at end of file diff --git a/themes/coo/layout/_partial/seo.ejs b/themes/coo/layout/_partial/seo.ejs new file mode 100644 index 0000000..408b985 --- /dev/null +++ b/themes/coo/layout/_partial/seo.ejs @@ -0,0 +1,77 @@ + + + + + \ No newline at end of file diff --git a/themes/coo/layout/_partial/share.ejs b/themes/coo/layout/_partial/share.ejs new file mode 100644 index 0000000..29887df --- /dev/null +++ b/themes/coo/layout/_partial/share.ejs @@ -0,0 +1,11 @@ + + " target="_blank"> + " target="_blank"> + " target="_blank"> + " target="_blank"> + " target="_blank"> + \ No newline at end of file diff --git a/themes/coo/layout/_partial/sidebar.ejs b/themes/coo/layout/_partial/sidebar.ejs new file mode 100644 index 0000000..b96fd31 --- /dev/null +++ b/themes/coo/layout/_partial/sidebar.ejs @@ -0,0 +1,61 @@ + + + + + + + + + + + +
+
+
+

Popular

+ +
+ +
+
+<% let posts = popular_posts_json({maxCount: 10}, page).json; %> +<% if (posts.length > 0) { %> +
+
+
+

Related Posts

+ +
+ +
+
+<% } %> diff --git a/themes/coo/layout/archive.ejs b/themes/coo/layout/archive.ejs new file mode 100644 index 0000000..e69de29 diff --git a/themes/coo/layout/index.ejs b/themes/coo/layout/index.ejs new file mode 100644 index 0000000..4145d0c --- /dev/null +++ b/themes/coo/layout/index.ejs @@ -0,0 +1,25 @@ +<%- partial('_partial/index/hero') %> +
+
+ <%- partial('_partial/index/recommend') %> +
+ <% theme.index_categories.forEach(function (category) { %> +

<%- category %>

+
+
+
+
+ <% site.categories.findOne({name: category}).posts.sort('-date').map(function(post){ %> + <%- partial('_partial/index/card', { + url: ext_url_for(post.path), + title: post.title, + icon: post.icon == undefined ? 'icon-style' : post.icon, + background: post.background == undefined ? 'bg-emerald-500' : post.background + }) %> + <% }) %> +
+ <% }); %> +
+
+
+<%- partial('_partial/index/request') %> diff --git a/themes/coo/layout/layout.ejs b/themes/coo/layout/layout.ejs new file mode 100644 index 0000000..673aaed --- /dev/null +++ b/themes/coo/layout/layout.ejs @@ -0,0 +1,12 @@ + + +<%- partial('_partial/head') %> + +<%- partial('_partial/header') %> +<%- body %> +<%- partial('_partial/search') %> +<%- partial('_partial/footer') %> +
+ +<%- partial('_partial/scripts') %> + diff --git a/themes/coo/layout/note.ejs b/themes/coo/layout/note.ejs new file mode 100644 index 0000000..1bf9529 --- /dev/null +++ b/themes/coo/layout/note.ejs @@ -0,0 +1,20 @@ +
+
+
+

<%- page.title %>

+ <%- partial('_partial/note/tags') %> +
+ + <%- page.content %> + +
+
+
+
+ <%- partial('_partial/share', {extra: "mx-auto"}) %> +
+
+
+ <%- partial('_partial/sidebar') %> +
+
\ No newline at end of file diff --git a/themes/coo/layout/notes.ejs b/themes/coo/layout/notes.ejs new file mode 100644 index 0000000..e1be28e --- /dev/null +++ b/themes/coo/layout/notes.ejs @@ -0,0 +1,24 @@ +
+
+ <% page.posts.each(function(post) { %> +
+
+ Sep 9, 2021 + JavaScript +
+
+ <%= post.title %> +

<%- post.excerpt %>

+
+
+ Read more +
+
+ <% }); %> + <%- partial('_partial/pagination', {extra: "mt-14 mb-6 text-center"}) %> +
+
+ <%- partial('_partial/sidebar') %> +
+
\ No newline at end of file diff --git a/themes/coo/layout/page.ejs b/themes/coo/layout/page.ejs new file mode 100644 index 0000000..37e5057 --- /dev/null +++ b/themes/coo/layout/page.ejs @@ -0,0 +1,15 @@ +
+
+
+

+ <%- page.title %> +

+
<%- page.intro != null ? markdown(page.intro) : "" %>
+
+
+
+ + <%- page.content %> + +
+
diff --git a/themes/coo/layout/post.ejs b/themes/coo/layout/post.ejs new file mode 100644 index 0000000..e063ec1 --- /dev/null +++ b/themes/coo/layout/post.ejs @@ -0,0 +1,17 @@ +
+
+
+

+ <%- page.title %> + +

+
<%- page.intro != null ? markdown(page.intro) : "" %>
+
+
+
+ + + <%- page.content %> + +
+
diff --git a/themes/coo/scripts/add_field.js b/themes/coo/scripts/add_field.js new file mode 100644 index 0000000..22c012c --- /dev/null +++ b/themes/coo/scripts/add_field.js @@ -0,0 +1,51 @@ +const h2_re = /

#<\/a>(.*)<\/h2>/gm; +const h3_re = /

#<\/a>(.*)<\/h3>/gm; + + +hexo.extend.filter.register("after_post_render", function (data) { + let h2_m; + let h2_list = []; + while ((h2_m = h2_re.exec(data.content)) !== null) { + h2_list.push({ + anchor: h2_m[1].trim(), + title: h2_m[2].trim(), + start: h2_m.index + }) + } + + let h3_list = []; + for (let i = 0; i < h2_list.length; i++) { + let start = h2_list[i].start; + let end = data.content.length; + let next = h2_list[i + 1]; + if (next !== undefined) { + end = next.start; + } + const h2_section = data.content.substring(start, end); + let h3_m; + let h3_items = []; + while ((h3_m = h3_re.exec(h2_section)) !== null) { + h3_items.push({ + anchor: h3_m[1].trim(), + title: h3_m[2].trim() + }); + } + h2_list[i] = h2_list[i]; + h3_list.push(h3_items); + } + + let cards = [] + for (let i = 0; i < h2_list.length; i++) { + if (h3_list[i].length === 0) { + continue; + } + delete h2_list[i]['start']; + cards.push({ + h2: h2_list[i], + h3: h3_list[i] + }); + } + + data.sections = cards; + return data; +}); diff --git a/themes/coo/scripts/github.js b/themes/coo/scripts/github.js new file mode 100644 index 0000000..8293128 --- /dev/null +++ b/themes/coo/scripts/github.js @@ -0,0 +1,12 @@ +hexo.extend.helper.register("request_cheatsheet", function () { + return `https://github.com/Fechin/reference/issues/new?title=Cheatsheet+request%3A+&labels=request&template=cheatsheet-request.md&assignee=Fechin`; +}); + +hexo.extend.helper.register("contributing", function () { + return `https://github.com/Fechin/reference/blob/main/README.md#contributing`; +}); + + +hexo.extend.helper.register("edit_page", function () { + return `https://github.com/Fechin/reference/blob/main/source/_posts/${this.page.slug}.md` +}); \ No newline at end of file diff --git a/themes/coo/scripts/markdown_plugin.js b/themes/coo/scripts/markdown_plugin.js new file mode 100644 index 0000000..37282c7 --- /dev/null +++ b/themes/coo/scripts/markdown_plugin.js @@ -0,0 +1,172 @@ +const fs = require('fs'); +const path = require('path'); + +hexo.extend.filter.register('markdown-it:renderer', function (md) { + md.use(require('markdown-it-abbr'), {}); + md.use(require('markdown-it-footnote'), {}); + md.use(require('markdown-it-ins'), {}); + md.use(require('markdown-it-sub'), {}); + md.use(require('markdown-it-sup'), {}); + md.use(require('markdown-it-task-lists'), {}); + md.use(require('markdown-it-emoji'), {}); + md.use(require('markdown-it-attrs'), {}); + md.use(require('markdown-it-highlightjs'), {}); + md.use(require('markdown-it-checkbox'), {}); + md.use(require('markdown-it-multimd-table'), { + multiline: false, + rowspan: true, + headerless: false, + }); + md.use(require('markdown-it-shortcode-tag'), { + widget: { + render: function (attrs, env) { + let widgetPath = path.resolve(`./source/widget/${attrs.name}.html`); + if (fs.existsSync(widgetPath)) { + return fs.readFileSync(widgetPath, 'utf8').trim(); + } else { + let error = `Error: ${attrs.name} widget not Found!`; + console.log(error); + return error; + } + } + } + }); + headerSections(md, { + h2: { + wrapperClass: 'h2-wrap', + innerClass: 'h3-wrap-list', + }, + h3: { + wrapperClass: 'h3-wrap', + innerClass: 'section', + }, + tagName: "div" + }); +}); + +function headerSections(md, options) { + const opts = Object.assign({}, options); + + function addSections(state) { + let tokens = []; // output + let Token = state.Token; + let sections = []; + let nestedLevel = 0; + + function openTag(token, parser, classOptName) { + let t = new Token(parser, opts.tagName, 1); + t.block = true; + const cls = token && opts[token.tag] && opts[token.tag][classOptName]; + t.attrs = appendClass(token.attrs, cls); + return t; + } + + function closeTag(parser) { + let t = new Token(parser, opts.tagName, -1); + t.block = true; + return t; + } + + function closeSections(section) { + while (last(sections) && section.header <= last(sections).header) { + sections.pop(); + tokens.push(closeTag('section_inner_close')); + tokens.push(closeTag('section_wrapper_close')); + } + } + + function closeSectionsToCurrentNesting(nesting) { + while (last(sections) && nesting < last(sections).nesting) { + sections.pop(); + tokens.push(closeTag('section_inner_close')); + tokens.push(closeTag('section_wrapper_close')); + } + } + + function closeAllSections() { + while (sections.pop()) { + tokens.push(closeTag('section_inner_close')); + tokens.push(closeTag('section_wrapper_close')); + } + } + + for (let i = 0, l = state.tokens.length; i < l; i++) { + let token = state.tokens[i]; + + // record level of nesting + if (token.type.search('heading') !== 0) { + nestedLevel += token.nesting; + } + if (last(sections) && nestedLevel < last(sections).nesting) { + closeSectionsToCurrentNesting(nestedLevel); + } + + // add sections before headers + let expect = opts.hasOwnProperty(token.tag); + if (token.type === 'heading_open') { + let section = { + header: headingLevel(token.tag), + nesting: nestedLevel + }; + if (last(sections) && section.header <= last(sections).header && expect) { + closeSections(section); + } + if (expect) { + tokens.push(openTag(token, 'section_wrapper_open', 'wrapperClass')); + if (token.attrIndex('id') !== -1) { + // remove ID from token + token.attrs.splice(token.attrIndex('id'), 1); + } + sections.push(section); + + // The attribute has been placed in section_open, + // clear the attribute of the header tag + token.attrs = []; + } + + tokens.push(token); + } else if (token.type === 'heading_close') { // add inner section after headers + tokens.push(token); + if (expect) { + tokens.push(openTag(token, 'section_inner_open', 'innerClass')); + } + } else { + tokens.push(token); + } + + } // end for every token + closeAllSections(); + + state.tokens = tokens; + } + + function appendClass(attrs, cls) { + if (cls == null) { + return attrs; + } + if (attrs == null) { + attrs = []; + } + let appended = false; + attrs.forEach(function (x, i) { + if (x[0] === "class") { + x[1] = cls + " " + x[1]; + appended = true; + } + }); + if (!appended) { + attrs.push(["class", cls.trim()]) + } + return attrs; + } + + function headingLevel(header) { + return parseInt(header.charAt(1)); + } + + function last(arr) { + return arr.slice(-1)[0]; + } + + md.core.ruler.push('header_sections', addSections); +} \ No newline at end of file diff --git a/themes/coo/scripts/merge_configs.js b/themes/coo/scripts/merge_configs.js new file mode 100644 index 0000000..ab8c0ea --- /dev/null +++ b/themes/coo/scripts/merge_configs.js @@ -0,0 +1,8 @@ +/** + * Merge all `theme_config.*` options from main Hexo config into hexo.theme.config. + * This fixes an issue with hexo-renderer-stylus, which otherwise ignores these + * configuration overrides. + */ +hexo.on('generateBefore', function () { + hexo.theme.config = Object.assign({}, hexo.theme.config, hexo.config.theme_config); +}); diff --git a/themes/coo/scripts/pagination_generator.js b/themes/coo/scripts/pagination_generator.js new file mode 100644 index 0000000..7529e47 --- /dev/null +++ b/themes/coo/scripts/pagination_generator.js @@ -0,0 +1,14 @@ +let pagination = require("hexo-pagination"); + +hexo.extend.generator.register("notes-pagination", function (locals) { + let config = this.config; + let posts = locals.posts.filter(post => post.layout === "note").sort("-date"); + return pagination("notes", posts, { + perPage: config.per_page, + layout: ['notes'], + format: "%d/", + data: { + _isNotePagination: true + } + }); +}); \ No newline at end of file diff --git a/themes/coo/scripts/search_generator.js b/themes/coo/scripts/search_generator.js new file mode 100644 index 0000000..6446d3a --- /dev/null +++ b/themes/coo/scripts/search_generator.js @@ -0,0 +1,45 @@ +hexo.extend.generator.register('json', function (locals) { + + let searchName = "search.json"; + let datas = locals.posts.sort('-date') || []; + + let res = [] + let index = 0 + + datas.each(function (data) { + if (data.indexing !== undefined && !data.indexing) return; + if (data.layout === "note") return; + let temp_data = {} + + temp_data.index = index; + temp_data.title = data.title; + temp_data.path = data.permalink.replace(hexo.config.url, ""); + temp_data.icon = data.icon; + temp_data.background = data.background; + temp_data.intro = data.intro; + + // categories + temp_data.categories = []; + if (data.categories && data.categories.length > 0) { + data.categories.forEach(function (category) { + temp_data.categories.push(category.name); + }); + } + + // tags + temp_data.tags = []; + if (data.tags && data.tags.length > 0) { + data.tags.forEach(function (tag) { + temp_data.tags.push(tag.name); + }); + } + // sections + temp_data.sections = data.sections; + + res[index] = temp_data; + index += 1; + }); + + let json = JSON.stringify(res); + return {path: searchName, data: json}; +}); \ No newline at end of file diff --git a/themes/coo/scripts/seo.js b/themes/coo/scripts/seo.js new file mode 100644 index 0000000..0bc90f3 --- /dev/null +++ b/themes/coo/scripts/seo.js @@ -0,0 +1,74 @@ +const fs = require('fs'); +const path = require('path'); + +hexo.extend.helper.register("page_title", function () { + let title = ""; + if (this.is_home()) { + title = `${this.config.title} - ${this.config.subtitle}`; + } else if (this.page.layout === "note") { + title = `${this.page.title} - ${this.config.title}`; + } else if (this.is_page()) { + title = `${this.page.title} - ${this.config.title}`; + } else if (this.is_post()) { + title = this.page.title; + let hasCommand = this.page.categories.findOne({name: "Linux Command"}); + if (hasCommand) { + title += " Command"; + } + title = `${title} Cheat Sheet & Quick Reference`; + } else if (this.page._isNotePagination) { + title = `Page ${this.page.current} of Notes - ${this.config.title}` + } + return title; +}); + +hexo.extend.helper.register("page_description", function () { + let description; + if (this.is_home()) { + description = this.config.description; + } else if (this.page != null && this.page.intro != null) { + description = this.strip_html(this.markdown(this.page.intro)).substring(0, 110); + } else { + description = this.strip_html(this.page.content).substring(0, 130); + } + description = description.replace(/[\r\n\s\s+]+/g, " "); + return description; +}); + + +hexo.extend.helper.register("page_keywords", function () { + let keywords = this.config.keywords; + if (this.page.tags && this.page.tags.each) { + this.page.tags.each(function (tag) { + keywords += ("," + tag.name); + }); + } + return keywords; +}); + +hexo.extend.helper.register("page_image", function () { + let homePng = "preview.png"; + let postPng = ""; + if (this.is_post()) { + postPng = `${this.page.slug}-preview.png`; + } + + let version = (Math.random() + 1).toString(36).substring(7); + let imageURL; + + // Check file exists + let postPath = path.resolve("./", "source/assets/image/", postPng); + if (fs.existsSync(postPath)) { + // Generate image url + imageURL = `${this.config.url}/assets/image/${postPng}?v=${version}`; + } else { + // console.warn(`Warning: ${postPath} not Found!`); + imageURL = `${this.config.url}/assets/image/${homePng}?v=${version}`; + } + return imageURL; +}); + +hexo.extend.helper.register("ext_url_for", function (url) { + url = this.url_for(url); + return url.replace(/(\/index)?\.html$/, ""); +}); \ No newline at end of file diff --git a/themes/coo/scripts/share.js b/themes/coo/scripts/share.js new file mode 100644 index 0000000..f21d7ee --- /dev/null +++ b/themes/coo/scripts/share.js @@ -0,0 +1,29 @@ +const {encodeURL} = require('hexo-util'); + +hexo.extend.helper.register("share_link", function (type) { + let title = this.page_title(); + let description = this.page_description(); + let url = this.ext_url_for(this.url); + let link = ""; + switch (type) { + case "facebook": + link = `https://facebook.com/sharer/sharer.php?u=${url}`; + break; + case "twitter": + link = `https://twitter.com/intent/tweet/?text=${description}&url=${url}`; + break; + case "linkedin": + link = `https://www.linkedin.com/shareArticle?url=${url}&title=${title}&summary=${description}`; + break; + case "reddit": + link = `https://reddit.com/submit/?url=${url}&resubmit=true&title=${description}`; + break; + case "pinterest": + link = `https://pinterest.com/pin/create/button/?url=${url}&description=${description}`; + break; + case "mail": + link = `mailto:?subject=${title}&body=\n${description}\n\n${url}`; + break; + } + return encodeURL(link); +}); \ No newline at end of file diff --git a/themes/coo/scripts/top_generator.js b/themes/coo/scripts/top_generator.js new file mode 100644 index 0000000..eebdc7f --- /dev/null +++ b/themes/coo/scripts/top_generator.js @@ -0,0 +1,15 @@ +const path = require('path'); +const fs = require('hexo-fs'); + +const outputFile = path.resolve("./", "source/ga_analytics_tops.json") +const cache = new Map(); + +hexo.extend.helper.register("topPosts", function (maximum = 4) { + let posts = cache.get(outputFile); + if (!posts) { + let content = fs.readFileSync(outputFile); + posts = JSON.parse(content); + cache.set(outputFile, posts); + } + return posts.slice(0, maximum); +}); diff --git a/themes/coo/source/css/components/bsa_carbon.css b/themes/coo/source/css/components/bsa_carbon.css new file mode 100644 index 0000000..d13eec8 --- /dev/null +++ b/themes/coo/source/css/components/bsa_carbon.css @@ -0,0 +1,69 @@ +#carbonads { + display: flex; + position: fixed; + bottom: 60px; + right: 20px; + max-width: 330px; + background-color: hsl(0, 0%, 98%); + box-shadow: 0 6px 8px rgba(102, 119, 136, 0.03), 0 1px 2px rgba(102, 119, 136, 0.3); + animation: scale-up-center 0.4s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; + @apply dark:bg-slate-800 rounded-lg z-30 dark:shadow-3xl; +} + +#carbonads > span { + display: block; + position: relative; + padding: 10px; + background-color: #fff; + @apply dark:bg-slate-800 rounded-lg; +} + +#carbonads .carbon-wrap { + display: flex; +} + +#carbonads .carbon-img { + margin-right: 10px; + line-height: 1; +} + +#carbonads .carbon-img > img{ + @apply rounded-lg; +} + +#carbonads .carbon-text { + margin-bottom: 12px; + font-size: 12px; + line-height: 1.45; + text-decoration: none; + color: #637381; + @apply dark:text-slate-300; +} + +#carbonads .carbon-poweredby { + position: absolute; + bottom: 10px; + left: 152px; + + font-size: 8px; + font-weight: 500; + line-height: 1; + text-decoration: none; + letter-spacing: .5px; + text-transform: uppercase; + color: #c5cdd0; + @apply dark:text-slate-600; +} + +@keyframes scale-up-center { + 0% { + opacity: 0; + -webkit-transform: scale(0.9); + transform: scale(0.9); + } + 100% { + opacity: 1; + -webkit-transform: scale(1); + transform: scale(1); + } +} \ No newline at end of file diff --git a/themes/coo/source/css/components/bsa_custom.css b/themes/coo/source/css/components/bsa_custom.css new file mode 100644 index 0000000..a3a91ac --- /dev/null +++ b/themes/coo/source/css/components/bsa_custom.css @@ -0,0 +1,51 @@ +/** + // template: `` + */ + +#bsa_custom { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; + font-size: 12px; +} + +#bsa_custom .native-fixed { + box-shadow: inset 0 1px 0 hsla(0, 0%, 0%, 0.075); + position: fixed; + inset: auto 0 0 0; + display: flex; + justify-content: center; + align-items: center; + z-index: 10; + @apply bg-emerald-500 dark:bg-slate-700; +} + +#bsa_custom a { + text-decoration: none; + display: flex; + justify-content: center; + align-items: center; + padding: 1.75ex 2ch; + color: #ffffff; +} + +#bsa_custom .native-sponsor { + border-radius: 0.5ex; + margin-right: 1ch; + line-height: 1; + padding: 1ex 1ch; + font-weight: 600; + font-size: 0.75em; + text-transform: uppercase; + color: #2db67c; + @apply bg-white dark:bg-slate-900; +} + +#bsa_custom .native-text { + font-size: 1em; + line-height: 1.3; +} diff --git a/themes/coo/source/css/components/bsa_custom_right_card.css b/themes/coo/source/css/components/bsa_custom_right_card.css new file mode 100644 index 0000000..fd34227 --- /dev/null +++ b/themes/coo/source/css/components/bsa_custom_right_card.css @@ -0,0 +1,28 @@ +/** + Utils.externalLibrary(Utils.LIBRARY.bsa).then(() => { + let closeBtnHTML = ''; + if (typeof _bsa !== 'undefined' && _bsa) { + const bsa_custom_div = document.createElement("div"); + bsa_custom_div["className"] = "flex fixed right-6 bottom-16 z-30" + bsa_custom_div["id"] = "bsa_custom" + bsa_custom_div["style"] = "max-width:330px;" + document.body.appendChild(bsa_custom_div); + // _bsa.init('custom', 'CVADC53U', 'placement:demo', { + _bsa.init('custom', 'CESILKQI', 'placement:quickrefme', { + target: '#bsa_custom', + template: ` +
+
+ ads via Carbon +
+
+

##description##

+

Sponsored by ##company##

+
+
+ ${closeBtnHTML} +
` + }); + } + }); + */ \ No newline at end of file diff --git a/themes/coo/source/css/components/code.css b/themes/coo/source/css/components/code.css new file mode 100644 index 0000000..8d846c1 --- /dev/null +++ b/themes/coo/source/css/components/code.css @@ -0,0 +1,58 @@ +code { + @apply text-emerald-600; + @apply dark:text-slate-300; +} + +pre { + line-height: 1.5; + @apply p-4 overflow-hidden overflow-x-auto bg-white; + @apply dark:bg-slate-800; +} + +.mdLayout pre + p:not(:last-child) { + @apply border-t border-slate-200; + @apply dark:border-slate-700/50; +} + +/* When there is only one pre code block, the scroll bar is displayed at the bottom */ +pre:only-child { + @apply h-full; +} + +pre > code { + color: #345; + padding: 0!important; + background: transparent; + overflow: visible; +} + +pre > code.wrap { + @apply break-words whitespace-pre-wrap !important; +} + +.mdLayout .line-highlight { + transform: translate3d(0, 2px, 0); + background: linear-gradient(to right, rgba(20, 175, 131, 0.05) 25%, transparent); +} + +.mdLayout .line-highlight[data-end] { + margin-top: 0; +} + +.mdLayout .line-highlight::before, .mdLayout .line-highlight::after { + display: none; +} + +.mdLayout code.hljs { + background: transparent; +} + + +.note-content pre { + padding: 6px 0 !important; +} + +.note-content pre code { + padding: 1rem !important; +} + diff --git a/themes/coo/source/css/components/common.css b/themes/coo/source/css/components/common.css new file mode 100644 index 0000000..0fd4ec9 --- /dev/null +++ b/themes/coo/source/css/components/common.css @@ -0,0 +1,11 @@ +a.underline { + text-decoration: none; + background-image: linear-gradient(transparent, transparent 6px, #34495e 6px, #34495e); + background-position: bottom; + background-size: 100% 6px; + background-repeat: repeat-x; +} + +a.underline:hover { + background-image: linear-gradient(transparent, transparent 4px, #1d1d1d 4px, #1D1D1DFF); +} \ No newline at end of file diff --git a/themes/coo/source/css/components/custom_tag.css b/themes/coo/source/css/components/custom_tag.css new file mode 100644 index 0000000..e96bcaf --- /dev/null +++ b/themes/coo/source/css/components/custom_tag.css @@ -0,0 +1,15 @@ +yel { + @apply text-amber-600; +} + +red { + @apply text-red-600; +} + +pur { + @apply text-purple-600; +} + +blu { + @apply text-blue-600; +} \ No newline at end of file diff --git a/themes/coo/source/css/components/layout_list.css b/themes/coo/source/css/components/layout_list.css new file mode 100644 index 0000000..46fdc78 --- /dev/null +++ b/themes/coo/source/css/components/layout_list.css @@ -0,0 +1,96 @@ +.mdLayout .h3-wrap > .section ul > li { + padding: 9px; + padding-left: 26px; + position: relative; + border-bottom: solid 1px #ececec94; + @apply dark:border-slate-700/50; +} + +.mdLayout .h3-wrap > .section ul > li > p { + margin: 0; + padding: 0; +} + +.mdLayout .h3-wrap > .section ul:not(.style-none) > li::before { + content: ''; + position: absolute; + display: inline-block; + width: 4px; + height: 4px; + background: #556677; + border-radius: 50%; + left: 14px; + top: 18px; +} + +.mdLayout .h3-wrap > .section ul.style-round > li { + padding-left: 30px; +} + +.mdLayout .h3-wrap > .section ul.style-round > li::before{ + content: ""; + top: 16px; + @apply inline-block w-2 h-2 bg-white border border-2 border-emerald-600 rounded-full; +} + + + + + + +.mdLayout .h3-wrap > .section > ul.style-timeline { + counter-reset: stepCount; + margin-top:1rem; +} + +.mdLayout .h3-wrap > .section > ul.style-timeline > li { + padding-top: 0; + padding-bottom: 1.5rem; + border-left: 2px solid #48c78e; + position: relative; + padding-left: 30px; + margin-left: 30px; + border-bottom: 0px; + @apply dark:border-slate-600; +} + + +.mdLayout .h3-wrap > .section > ul.style-timeline > li:last-child { + padding-bottom: 0.8rem; +} + + +.mdLayout .h3-wrap > .section > ul.style-timeline > li > :not(:first-child) { + padding: 0px; + margin-top: 1rem; +} + +.mdLayout .h3-wrap > .section > ul.style-timeline > li::before { + counter-increment: stepCount; + content: counter(stepCount); + left: -14px; + border: 2px solid #48c78e; + @apply absolute rounded-lg w-6 h-6 top-0 text-center bg-white text-sm; + @apply dark:border-slate-600 dark:bg-slate-800; +} + + +.mdLayout .h3-wrap > .section > ul.style-timeline > li:first-child::before { + background: #48c78e; + color:white; +} + + +.mdLayout .h3-wrap > .section > ul.style-timeline > li:last-child{ + border-image: linear-gradient(to bottom, #48c78e, rgba(0, 0, 0, 0)) 1 100%; +} + + +.mdLayout .h3-wrap > .section > ul.style-timeline > li > h4 { + color: #2a2839; + font-family: "Poppins", sans-serif; + font-weight: 500; + @apply dark:text-slate-300; +} + + diff --git a/themes/coo/source/css/components/layout_note.css b/themes/coo/source/css/components/layout_note.css new file mode 100644 index 0000000..f1f4a5a --- /dev/null +++ b/themes/coo/source/css/components/layout_note.css @@ -0,0 +1,148 @@ +.note-content ul > li { + @apply py-2.5 md:px-2.5; + position: relative; +} + +.note-content ul > li:first-child{ + @apply pt-5; +} + +.note-content { + color: #34495e; + font-display: swap; + font-size: 18px; + font-family: source sans pro, open sans, helvetica neue, Arial, sans-serif; + line-height: 1.8; + /*@apply dark:text-slate-300;*/ +} + +.note-width { + max-width: 46rem; +} + +.note-content { + min-height: 100%; + overflow-wrap: break-word +} + +.note-content ul, .note-content ol { + margin: 2px 0 16px +} + +.note-content p { + margin: 4px 0; + hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto +} + +.node-item pre, .node-item pre > code, +.note-content pre, .note-content pre > code{ + @apply bg-[#f6f6f6] rounded-lg mt-3; + @apply dark:bg-slate-800; +} + +.note-content a { + color: #0366d6; + text-decoration: none; + background-image: linear-gradient(transparent, transparent 6px, #34495e 6px, #34495e); + background-position: bottom; + background-size: 100% 6px; + background-repeat: repeat-x +} + +.note-content a:hover { + background-image: linear-gradient(transparent, transparent 4px, #2bbc8a 4px, #2bbc8a) +} + +.note-content h2 { + font-weight: 500; + font-size: 1.5rem; + margin: 24px 0 2px 0; +} + +.note-content h3 { + font-weight: 400; + font-size: 1.3rem; + margin: 24px 0 2px 0; +} + + +.note-content img, .note-content video { + display: block; + margin: auto; + max-width: 100%; + height: auto +} + +.note-content blockquote { + border-left: 3px solid #2bbc8a; + border-left-width: 6px; + background-color: #f8f8f8; + padding: 15px 20px; + margin-left: -1rem; + margin-right: -1rem; +} + +.note-content blockquote p { + margin: 0 +} + +.note-content blockquote footer { + margin: 0; + color: #8c8c8c; + font-size: 11px +} + +.note-content blockquote footer a { + background-image: linear-gradient(transparent, transparent 5px, #8c8c8c 5px, #8c8c8c); + color: #8c8c8c +} + +.note-content blockquote footer a:hover { + background-image: linear-gradient(transparent, transparent 4px, #a3a3a3 4px, #a3a3a3); + color: #a3a3a3 +} + +.note-content blockquote footer cite:before { + padding: 0 .5em; + content: "—" +} + + +.note-content .h-anchor { + display: none; +} + +.note-content ul.popular-posts > li { + @apply py-2.5 ; + position: relative; + border-bottom: solid 1px #ececec94; +} + +.note-content ul.popular-posts > li:first-child{ + @apply pt-5; +} + + +/* tags style */ +.post-tags-list { + margin-top: 20px; + margin-bottom: 30px; + display: table; +} + +.post-tags-list-item { + float: left; + font-size: 12px; + margin-right: 10px; + background: rgba(102, 128, 153, 0.075); + border-radius: 4px; + padding: 2px 5px; + color: rgba(44, 63, 81, 0.5); +} + +.post-tags-list-link { + cursor: default; +} \ No newline at end of file diff --git a/themes/coo/source/css/components/layout_paragraph.css b/themes/coo/source/css/components/layout_paragraph.css new file mode 100644 index 0000000..e69de29 diff --git a/themes/coo/source/css/components/layout_table.css b/themes/coo/source/css/components/layout_table.css new file mode 100644 index 0000000..00759e7 --- /dev/null +++ b/themes/coo/source/css/components/layout_table.css @@ -0,0 +1,114 @@ +.mdLayout table { + width: 100%; +} + +.mdLayout .section > table:last-child::after { + content: ''; + @apply block h-2; +} + +.mdLayout table tr + tr { + border-top: solid 1px #ececec94; + @apply dark:border-slate-700/50; +} + +.mdLayout table tbody + tbody { + border-top: solid 1px rgb(135 137 139 / 30%); +} + +.mdLayout table td, .mdLayout table th { + padding: 9px 14px; + text-align: left; +} + +.mdLayout table tr th:last-child, .mdLayout table tr td:last-child { + text-align: right; +} + +.mdLayout table td[rowspan] { + vertical-align: middle !important; +} + +.mdLayout table td[colspan] { + text-align: center !important; +} + +.mdLayout table td:first-child { + white-space: nowrap; +} + +.mdLayout table td:first-child > code { + @apply text-emerald-600; +} + +.mdLayout table a, .mdLayout table a:visited { + color: #35a; + text-decoration: none; +} + +.mdLayout table td:first-child > code ~ em { + font-size: 11px; + font-style: normal; + color: #556677; +} + +.mdLayout table thead { + display: none; +} + +.mdLayout table thead th { + font-weight: normal; + @apply text-emerald-500; +} + + +.mdLayout table.shortcuts td:not(:last-child) > code, .mdLayout ul.shortcuts > li > code, kbd { + letter-spacing: 0.075rem; + /*margin: 0px 0.1em;*/ + padding: 0.1em 0.54em; + border: 1px solid rgb(204, 204, 204); + line-height: 1.6; + font-family: Arial,Helvetica,sans-serif; + font-size: 12px; + display: inline-block; + box-shadow: 0px 1px 0px rgb(0 0 0 / 20%), inset 0px 0px 0px 2px #ffffff; + background-color: rgb(247, 247, 247); + -moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset; + -webkit-box-shadow: 0 1px 0px rgb(0 0 0 / 20%), 0 0 0 2px #ffffff inset; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + /*text-shadow: 0 1px 0 #fff;*/ + color: #303835; + @apply dark:shadow-slate-500 dark:border-slate-700 dark:bg-slate-700/50 dark:text-slate-300 dark:shadow-none; +} + + +.mdLayout table.left-text tr th, .mdLayout table.left-text tr td, .mdLayout table.left-text tr td:last-child { + text-align: left; +} + +.mdLayout table.center-text tr th, .mdLayout table.center-text tr td, .mdLayout table.center-text tr td:last-child { + text-align: center; +} + +.mdLayout table.show-header thead { + display: table-header-group; + border-bottom: solid 1px rgba(85, 102, 119, 0.3); +} + +.mdLayout table.bold-first tr > td:first-child { + font-weight: bold; +} + +.mdLayout table.plus-first tr > td:first-child { + @apply text-2xl; +} + +.mdLayout table.no-wrap td, .mdLayout table.no-wrap th { + white-space: nowrap; +} + +.mdLayout table td em { + opacity: 0.6; + @apply dark:opacity-90; +} diff --git a/themes/coo/source/css/components/pagination.css b/themes/coo/source/css/components/pagination.css new file mode 100644 index 0000000..f54eeb4 --- /dev/null +++ b/themes/coo/source/css/components/pagination.css @@ -0,0 +1,15 @@ +.pagination .prev, +.pagination .next, +.pagination .page-number { + @apply shadow px-3 py-2.5 mx-1 font-medium text-slate-700 bg-white rounded-md hover:bg-emerald-500 hover:text-white; + @apply dark:text-slate-300 dark:bg-slate-800; +} + +.pagination .space { + @apply px-3 py-2.5 mx-1 font-medium text-slate-700; + @apply dark:text-slate-300; +} + +.pagination .page-number.current { + @apply bg-emerald-500 text-white; +} \ No newline at end of file diff --git a/themes/coo/source/css/components/search.css b/themes/coo/source/css/components/search.css new file mode 100644 index 0000000..582e55d --- /dev/null +++ b/themes/coo/source/css/components/search.css @@ -0,0 +1,50 @@ +#mysearch em { + @apply not-italic text-emerald-500; +} + +.text-color-inherit { + color: inherit +} + +@media (min-width: 1200px) { + .xl\:max-h-832 { + max-height: 800px + } +} + +#mysearch-list li.inactive { + @apply border-slate-200; +} + +#mysearch-list li.inactive > a.link { + @apply text-slate-900 bg-transparent; +} + +#mysearch-list li.inactive .icon-enter { + @apply hidden; +} + +#mysearch-list li.inactive i.icon, #mysearch-list li.inactive .sub-intro { + @apply text-slate-400; +} + +#mysearch-list li.active { + @apply border-transparent z-10 shadow-sm; +} + +#mysearch-list li.active > a { + @apply text-white bg-emerald-500 shadow; +} + +#mysearch-list li.active em { + color: inherit; + @apply underline; +} + +#mysearch-list li.active .icon-enter { + @apply block; +} + +#mysearch-list li.active i.icon, #mysearch-list li.active .sub-intro { + @apply text-white; +} \ No newline at end of file diff --git a/themes/coo/source/css/highlightjs/arduino-light.min.css b/themes/coo/source/css/highlightjs/arduino-light.min.css new file mode 100644 index 0000000..cadb130 --- /dev/null +++ b/themes/coo/source/css/highlightjs/arduino-light.min.css @@ -0,0 +1 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#434f54}.hljs-subst{color:#434f54}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-name,.hljs-selector-tag{color:#00979d}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-literal{color:#d35400}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#00979d}.hljs-deletion,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#005c5f}.hljs-comment{color:rgba(149,165,166,.8)}.hljs-meta .hljs-keyword{color:#728e00}.hljs-meta{color:#434f54}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-function{color:#728e00}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-number{color:#8a7b52} \ No newline at end of file diff --git a/themes/coo/source/css/highlightjs/humanoid-light.min.css b/themes/coo/source/css/highlightjs/humanoid-light.min.css new file mode 100644 index 0000000..a37ab6f --- /dev/null +++ b/themes/coo/source/css/highlightjs/humanoid-light.min.css @@ -0,0 +1,7 @@ +/*! + Theme: Humanoid light + Author: Thomas (tasmo) Friese + License: ~ MIT (or more permissive) [via base16-schemes-source] + Maintainer: @highlightjs/core-team + Version: 2021.05.0 +*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#232629;background:#f8f8f2}.hljs ::selection{color:#deded8}.hljs-comment{color:#c0c0bd}.hljs-tag{color:#60615d}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#232629}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#b0151a}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#ff3d00}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#ffb627}.hljs-strong{font-weight:700;color:#ffb627}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#388e3c}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#008e8e}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#0082c9}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#700f98}.hljs-emphasis{color:#700f98;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#b27701}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} \ No newline at end of file diff --git a/themes/coo/source/css/highlightjs/monokai.min.css b/themes/coo/source/css/highlightjs/monokai.min.css new file mode 100644 index 0000000..448d85d --- /dev/null +++ b/themes/coo/source/css/highlightjs/monokai.min.css @@ -0,0 +1 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#272822;color:#ddd}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-strong,.hljs-tag{color:#f92672}.hljs-code{color:#66d9ef}.hljs-attribute,.hljs-link,.hljs-regexp,.hljs-symbol{color:#bf79db}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-emphasis,.hljs-section,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#a6e22e}.hljs-class .hljs-title,.hljs-title.class_{color:#fff}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#75715e}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-title,.hljs-type{font-weight:700} \ No newline at end of file diff --git a/themes/coo/source/css/highlightjs/stackoverflow-light.min.css b/themes/coo/source/css/highlightjs/stackoverflow-light.min.css new file mode 100644 index 0000000..c36d63d --- /dev/null +++ b/themes/coo/source/css/highlightjs/stackoverflow-light.min.css @@ -0,0 +1,13 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: StackOverflow Light + Description: Light theme as used on stackoverflow.com + Author: stackoverflow.com + Maintainer: @Hirse + Website: https://github.com/StackExchange/Stacks + License: MIT + Updated: 2021-05-15 + + Updated for @stackoverflow/stacks v0.64.0 + Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less + Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less +*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} \ No newline at end of file diff --git a/themes/coo/source/css/style.css b/themes/coo/source/css/style.css new file mode 100644 index 0000000..16f0d56 --- /dev/null +++ b/themes/coo/source/css/style.css @@ -0,0 +1,14 @@ +/*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com +*/*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::before,::after{--tw-content:''}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type='search']{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder, textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role="button"]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x:;--tw-pan-y:;--tw-pinch-zoom:;--tw-scroll-snap-strictness:proximity;--tw-ordinal:;--tw-slashed-zero:;--tw-numeric-figure:;--tw-numeric-spacing:;--tw-numeric-fraction:;--tw-ring-inset:;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur:;--tw-brightness:;--tw-contrast:;--tw-grayscale:;--tw-hue-rotate:;--tw-invert:;--tw-saturate:;--tw-sepia:;--tw-drop-shadow:;--tw-backdrop-blur:;--tw-backdrop-brightness:;--tw-backdrop-contrast:;--tw-backdrop-grayscale:;--tw-backdrop-hue-rotate:;--tw-backdrop-invert:;--tw-backdrop-opacity:;--tw-backdrop-saturate:;--tw-backdrop-sepia:}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0px;right:0px;bottom:0px;left:0px}.-top-6{top:-1.5rem}.-right-4{right:-1rem}.bottom-full{bottom:100%}.-left-2{left:-0.5rem}.left-0{left:0px}.top-full{top:100%}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-10{z-index:10}.z-50{z-index:50}.order-last{order:9999}.order-first{order:-9999}.col-span-full{grid-column:1/-1}.col-span-2{grid-column:span 2/span 2}.col-span-5{grid-column:span 5/span 5}.col-span-3{grid-column:span 3/span 3}.col-span-1{grid-column:span 1/span 1}.col-span-12{grid-column:span 12/span 12}.row-span-full{grid-row:1/-1}.row-span-2{grid-row:span 2/span 2}.row-span-3{grid-row:span 3/span 3}.row-span-4{grid-row:span 4/span 4}.row-span-5{grid-row:span 5/span 5}.row-span-6{grid-row:span 6/span 6}.row-span-1{grid-row:span 1/span 1}.clear-none{clear:none}.m-3{margin:0.75rem}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.my-auto{margin-top:auto;margin-bottom:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.-mx-8{margin-left:-2rem;margin-right:-2rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mx-3{margin-left:0.75rem;margin-right:0.75rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:0.25rem;margin-right:0.25rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mt-3{margin-top:0.75rem}.mt-auto{margin-top:auto}.mb-auto{margin-bottom:auto}.mt-4{margin-top:1rem}.mt-2{margin-top:0.5rem}.ml-3{margin-left:0.75rem}.mr-2{margin-right:0.5rem}.mt-8{margin-top:2rem}.mb-3{margin-bottom:0.75rem}.mt-10{margin-top:2.5rem}.mt-6{margin-top:1.5rem}.mt-12{margin-top:3rem}.mb-2{margin-bottom:0.5rem}.mb-6{margin-bottom:1.5rem}.mt-14{margin-top:3.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.-mb-10{margin-bottom:-2.5rem}.mt-5{margin-top:1.25rem}.ml-1{margin-left:0.25rem}.mt-1{margin-top:0.25rem}.mr-1{margin-right:0.25rem}.mr-3{margin-right:0.75rem}.ml-4{margin-left:1rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.ml-8{margin-left:2rem}.mb-20{margin-bottom:5rem}.ml-2{margin-left:0.5rem}.mb-1{margin-bottom:0.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:0.25rem}.h-full{height:100%}.h-8{height:2rem}.h-16{height:4rem}.h-10{height:2.5rem}.h-3{height:0.75rem}.h-5{height:1.25rem}.h-2{height:0.5rem}.w-full{width:100%}.w-3\/5{width:60%}.w-1\/3{width:33.333333%}.w-24{width:6rem}.w-8{width:2rem}.w-14{width:3.5rem}.w-px{width:1px}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-prose{max-width:65ch}.max-w-none{max-width:none}.max-w-4xl{max-width:56rem}.max-w-xs{max-width:20rem}.max-w-sm{max-width:24rem}.flex-none{flex:none}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(0.4,0,0.6,1) infinite}.cursor-help{cursor:help}.cursor-text{cursor:text}.cursor-wait{cursor:wait}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-flow-dense{grid-auto-flow:dense}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.place-content-baseline{place-content:baseline}.place-items-baseline{place-items:baseline}.content-baseline{align-content:baseline}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-6{gap:1.5rem}.gap-2{gap:0.5rem}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse:1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.self-center{align-self:center}.self-baseline{align-self:baseline}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-y-auto{overflow-y:auto}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:0.25rem}.rounded-md{border-radius:0.375rem}.rounded-xl{border-radius:0.75rem}.rounded-lg{border-radius:0.5rem}.rounded-full{border-radius:9999px}.rounded-none{border-radius:0px}.rounded-tl-lg{border-top-left-radius:0.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-t{border-top-width:1px}.border-b{border-bottom-width:1px}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity))}.bg-\[\#3e4548\]{--tw-bg-opacity:1;background-color:rgb(62 69 72/var(--tw-bg-opacity))}.bg-\[\#6d94c7\]{--tw-bg-opacity:1;background-color:rgb(109 148 199/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-\[\#8c4c8a\]{--tw-bg-opacity:1;background-color:rgb(140 76 138/var(--tw-bg-opacity))}.bg-\[\#3473b5\]{--tw-bg-opacity:1;background-color:rgb(52 115 181/var(--tw-bg-opacity))}.bg-\[\#58aee9\]{--tw-bg-opacity:1;background-color:rgb(88 174 233/var(--tw-bg-opacity))}.bg-\[\#488fdf\]{--tw-bg-opacity:1;background-color:rgb(72 143 223/var(--tw-bg-opacity))}.bg-\[\#7752a9\]{--tw-bg-opacity:1;background-color:rgb(119 82 169/var(--tw-bg-opacity))}.bg-\[\#95c844\]{--tw-bg-opacity:1;background-color:rgb(149 200 68/var(--tw-bg-opacity))}.bg-\[\#ebbe46\]{--tw-bg-opacity:1;background-color:rgb(235 190 70/var(--tw-bg-opacity))}.bg-\[\#d7593e\]{--tw-bg-opacity:1;background-color:rgb(215 89 62/var(--tw-bg-opacity))}.bg-\[\#4ba4cc\]{--tw-bg-opacity:1;background-color:rgb(75 164 204/var(--tw-bg-opacity))}.bg-\[\#cc44a2\]{--tw-bg-opacity:1;background-color:rgb(204 68 162/var(--tw-bg-opacity))}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity))}.bg-\[\#cc5534\]{--tw-bg-opacity:1;background-color:rgb(204 85 52/var(--tw-bg-opacity))}.bg-\[\#3b7dc0\]{--tw-bg-opacity:1;background-color:rgb(59 125 192/var(--tw-bg-opacity))}.bg-\[\#d33731\]{--tw-bg-opacity:1;background-color:rgb(211 55 49/var(--tw-bg-opacity))}.bg-\[\#ebd94e\]{--tw-bg-opacity:1;background-color:rgb(235 217 78/var(--tw-bg-opacity))}.bg-\[\#2c63a2\]{--tw-bg-opacity:1;background-color:rgb(44 99 162/var(--tw-bg-opacity))}.bg-\[\#646464\]{--tw-bg-opacity:1;background-color:rgb(100 100 100/var(--tw-bg-opacity))}.bg-\[\#e44230\]{--tw-bg-opacity:1;background-color:rgb(228 66 48/var(--tw-bg-opacity))}.bg-\[\#6319bf\]{--tw-bg-opacity:1;background-color:rgb(99 25 191/var(--tw-bg-opacity))}.bg-\[\#d86138\]{--tw-bg-opacity:1;background-color:rgb(216 97 56/var(--tw-bg-opacity))}.bg-\[\#2a6387\]{--tw-bg-opacity:1;background-color:rgb(42 99 135/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.bg-\[\#3b85ef\]{--tw-bg-opacity:1;background-color:rgb(59 133 239/var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.bg-\[\#4f6fc3\]{--tw-bg-opacity:1;background-color:rgb(79 111 195/var(--tw-bg-opacity))}.bg-\[\#7477a9\]{--tw-bg-opacity:1;background-color:rgb(116 119 169/var(--tw-bg-opacity))}.bg-\[\#3d6488\]{--tw-bg-opacity:1;background-color:rgb(61 100 136/var(--tw-bg-opacity))}.bg-\[\#436b97\]{--tw-bg-opacity:1;background-color:rgb(67 107 151/var(--tw-bg-opacity))}.bg-\[\#c13b2c\]{--tw-bg-opacity:1;background-color:rgb(193 59 44/var(--tw-bg-opacity))}.bg-\[\#e56d2d\]{--tw-bg-opacity:1;background-color:rgb(229 109 45/var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-\[\#ba6993\]{--tw-bg-opacity:1;background-color:rgb(186 105 147/var(--tw-bg-opacity))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.bg-\[\#848484\]{--tw-bg-opacity:1;background-color:rgb(132 132 132/var(--tw-bg-opacity))}.bg-\[\#46933f\]{--tw-bg-opacity:1;background-color:rgb(70 147 63/var(--tw-bg-opacity))}.bg-\[\#5ba3e6\]{--tw-bg-opacity:1;background-color:rgb(91 163 230/var(--tw-bg-opacity))}.bg-\[\#77aeeb\]{--tw-bg-opacity:1;background-color:rgb(119 174 235/var(--tw-bg-opacity))}.bg-\[\#b42e28\]{--tw-bg-opacity:1;background-color:rgb(180 46 40/var(--tw-bg-opacity))}.bg-\[\#2f6eb4\]{--tw-bg-opacity:1;background-color:rgb(47 110 180/var(--tw-bg-opacity))}.bg-\[\#90d4b7\]{--tw-bg-opacity:1;background-color:rgb(144 212 183/var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-\[\#4a66ad\]{--tw-bg-opacity:1;background-color:rgb(74 102 173/var(--tw-bg-opacity))}.bg-\[\#4d9feb\]{--tw-bg-opacity:1;background-color:rgb(77 159 235/var(--tw-bg-opacity))}.bg-slate-600\/80{background-color:rgb(71 85 105/0.8)}.bg-transparent{background-color:transparent}.bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-none{background-image:none}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-pink-500{--tw-gradient-from:#ec4899;--tw-gradient-to:rgb(236 72 153/0);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-300{--tw-gradient-from:#6ee7b7;--tw-gradient-to:rgb(110 231 183/0);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-violet-400{--tw-gradient-to:rgb(167 139 250/0);--tw-gradient-stops:var(--tw-gradient-from),#a78bfa,var(--tw-gradient-to)}.to-blue-400{--tw-gradient-to:#60a5fa}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.bg-auto{background-size:auto}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.fill-none{fill:none}.fill-current{fill:currentColor}.stroke-none{stroke:none}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-2{padding:0.5rem}.p-0\.5{padding:0.125rem}.p-0{padding:0px}.p-3{padding:0.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:0.75rem;padding-bottom:0.75rem}.py-1\.5{padding-top:0.375rem;padding-bottom:0.375rem}.py-1{padding-top:0.25rem;padding-bottom:0.25rem}.px-2{padding-left:0.5rem;padding-right:0.5rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.px-3{padding-left:0.75rem;padding-right:0.75rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-0\.5{padding-top:0.125rem;padding-bottom:0.125rem}.px-1\.5{padding-left:0.375rem;padding-right:0.375rem}.py-0{padding-top:0px;padding-bottom:0px}.px-1{padding-left:0.25rem;padding-right:0.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-12{padding-top:3rem;padding-bottom:3rem}.pb-5{padding-bottom:1.25rem}.pt-4{padding-top:1rem}.pb-8{padding-bottom:2rem}.pt-1{padding-top:0.25rem}.pb-4{padding-bottom:1rem}.pt-2{padding-top:0.5rem}.pt-14{padding-top:3.5rem}.pl-2{padding-left:0.5rem}.text-center{text-align:center}.text-right{text-align:right}.text-start{text-align:start}.text-end{text-align:end}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.text-6xl{font-size:3.75rem;line-height:1}.text-5xl{font-size:3rem;line-height:1}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:0.75rem;line-height:1rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.font-thin{font-weight:100}.font-extralight{font-weight:200}.font-semibold{font-weight:600}.font-medium{font-weight:500}.font-light{font-weight:300}.font-bold{font-weight:700}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.not-italic{font-style:normal}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-5{line-height:1.25rem}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:0.025em}.tracking-normal{letter-spacing:0em}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.decoration-pink-500{text-decoration-color:#ec4899}.placeholder-slate-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(148 163 184/var(--tw-placeholder-opacity))}.placeholder-slate-400::placeholder{--tw-placeholder-opacity:1;color:rgb(148 163 184/var(--tw-placeholder-opacity))}.placeholder-opacity-80::-moz-placeholder{--tw-placeholder-opacity:0.8}.placeholder-opacity-80::placeholder{--tw-placeholder-opacity:0.8}.opacity-75{opacity:0.75}.opacity-0{opacity:0}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.shadow{--tw-shadow:0 6px 8px rgba(102,119,136,0.03),0 1px 2px rgba(102,119,136,0.3);--tw-shadow-colored:0 6px 8px var(--tw-shadow-color),0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3xl{--tw-shadow:0 35px 60px -15px rgba(0,0,0,0.3);--tw-shadow-colored:0 35px 60px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.06);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-black{outline-color:#000}.outline-white{outline-color:#fff}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-offset-0{--tw-ring-offset-width:0px}.blur-none{--tw-blur:blur(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-0{--tw-blur:blur(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms}.duration-200{transition-duration:200ms}.duration-100{transition-duration:100ms}.duration-700{transition-duration:700ms}.ease-in-out{transition-timing-function:cubic-bezier(0.4,0,0.2,1)}.ease-in{transition-timing-function:cubic-bezier(0.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,0.2,1)}.\[github\:simonepri\]{github:simonepri}.\[gh\:pidusage\]{gh:pidusage}.\[gh\:ps-tree\]{gh:ps-tree}.\[gh\:ps-tree-um\]{gh:ps-tree-um}.\[k1\:7\]{k1:7}.\[before\:date\]{before:date}.\[after\:date\]{after:date}.\[r\:KNOWS\]{r:KNOWS}.\[r\:LOVES\]{r:LOVES}.\[k\:KNOWS\]{k:KNOWS}.\[r\:HAS_PET\|BROUGHT_PET\]{r:HAS PET|BROUGHT PET}.\[l\:LIKED\]{l:LIKED}.\[-5\:-1\]{-5:-1}.\[start\:end\]{start:end}.\[-5\:-2\]{-5:-2}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: StackOverflow Light + Description: Light theme as used on stackoverflow.com + Author: stackoverflow.com + Maintainer: @Hirse + Website: https://github.com/StackExchange/Stacks + License: MIT + Updated: 2021-05-15 + + Updated for @stackoverflow/stacks v0.64.0 + Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less + Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less +*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.mdLayout table{width:100%}.mdLayout .section>table:last-child::after{content:'';display:block;height:0.5rem}.mdLayout table tr+tr{border-top:solid 1px #ececec94}.dark .mdLayout table tr+tr{border-color:rgb(51 65 85/0.5)}.mdLayout table tbody+tbody{border-top:solid 1px rgb(135 137 139/30%)}.mdLayout table td,.mdLayout table th{padding:9px 14px;text-align:left}.mdLayout table tr th:last-child,.mdLayout table tr td:last-child{text-align:right}.mdLayout table td[rowspan]{vertical-align:middle !important}.mdLayout table td[colspan]{text-align:center !important}.mdLayout table td:first-child{white-space:nowrap}.mdLayout table td:first-child>code{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.mdLayout table a,.mdLayout table a:visited{color:#35a;text-decoration:none}.mdLayout table td:first-child>code~em{font-size:11px;font-style:normal;color:#556677}.mdLayout table thead{display:none}.mdLayout table thead th{font-weight:normal;--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.mdLayout table.shortcuts td:not(:last-child)>code,.mdLayout ul.shortcuts>li>code,kbd{letter-spacing:0.075rem;padding:0.1em 0.54em;border:1px solid rgb(204,204,204);line-height:1.6;font-family:Arial,Helvetica,sans-serif;font-size:12px;display:inline-block;box-shadow:0px 1px 0px rgb(0 0 0/20%),inset 0px 0px 0px 2px #ffffff;background-color:rgb(247,247,247);-moz-box-shadow:0 1px 0px rgba(0,0,0,0.2),0 0 0 2px #ffffff inset;-webkit-box-shadow:0 1px 0px rgb(0 0 0/20%),0 0 0 2px #ffffff inset;-moz-border-radius:3px;-webkit-border-radius:3px;color:#303835}.dark .mdLayout table.shortcuts td:not(:last-child)>code,.dark .mdLayout ul.shortcuts>li>code,.dark kbd{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity));background-color:rgb(51 65 85/0.5);--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-shadow-color:#64748b;--tw-shadow:var(--tw-shadow-colored)}.mdLayout table.left-text tr th,.mdLayout table.left-text tr td,.mdLayout table.left-text tr td:last-child{text-align:left}.mdLayout table.center-text tr th,.mdLayout table.center-text tr td,.mdLayout table.center-text tr td:last-child{text-align:center}.mdLayout table.show-header thead{display:table-header-group;border-bottom:solid 1px rgba(85,102,119,0.3)}.mdLayout table.bold-first tr>td:first-child{font-weight:bold}.mdLayout table.plus-first tr>td:first-child{font-size:1.5rem;line-height:2rem}.mdLayout table.no-wrap td,.mdLayout table.no-wrap th{white-space:nowrap}.mdLayout table td em{opacity:0.6}.dark .mdLayout table td em{opacity:0.9}.mdLayout .h3-wrap>.section ul>li{padding:9px;padding-left:26px;position:relative;border-bottom:solid 1px #ececec94}.dark .mdLayout .h3-wrap>.section ul>li{border-color:rgb(51 65 85/0.5)}.mdLayout .h3-wrap>.section ul>li>p{margin:0;padding:0}.mdLayout .h3-wrap>.section ul:not(.style-none)>li::before{content:'';position:absolute;display:inline-block;width:4px;height:4px;background:#556677;border-radius:50%;left:14px;top:18px}.mdLayout .h3-wrap>.section ul.style-round>li{padding-left:30px}.mdLayout .h3-wrap>.section ul.style-round>li::before{content:"";top:16px;display:inline-block;height:0.5rem;width:0.5rem;border-radius:9999px;border-width:2px;--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.mdLayout .h3-wrap>.section>ul.style-timeline{counter-reset:stepCount;margin-top:1rem}.mdLayout .h3-wrap>.section>ul.style-timeline>li{padding-top:0;padding-bottom:1.5rem;border-left:2px solid #48c78e;position:relative;padding-left:30px;margin-left:30px;border-bottom:0px}.dark .mdLayout .h3-wrap>.section>ul.style-timeline>li{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.mdLayout .h3-wrap>.section>ul.style-timeline>li:last-child{padding-bottom:0.8rem}.mdLayout .h3-wrap>.section>ul.style-timeline>li>:not(:first-child){padding:0px;margin-top:1rem}.mdLayout .h3-wrap>.section>ul.style-timeline>li::before{counter-increment:stepCount;content:counter(stepCount);left:-14px;border:2px solid #48c78e;position:absolute;top:0px;height:1.5rem;width:1.5rem;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));text-align:center;font-size:0.875rem;line-height:1.25rem}.dark .mdLayout .h3-wrap>.section>ul.style-timeline>li::before{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.mdLayout .h3-wrap>.section>ul.style-timeline>li:first-child::before{background:#48c78e;color:white}.mdLayout .h3-wrap>.section>ul.style-timeline>li:last-child{-o-border-image:linear-gradient(to bottom,#48c78e,rgba(0,0,0,0)) 1 100%;border-image:linear-gradient(to bottom,#48c78e,rgba(0,0,0,0)) 1 100%}.mdLayout .h3-wrap>.section>ul.style-timeline>li>h4{color:#2a2839;font-family:"Poppins",sans-serif;font-weight:500}.dark .mdLayout .h3-wrap>.section>ul.style-timeline>li>h4{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.note-content ul>li{padding-top:0.625rem;padding-bottom:0.625rem}@media (min-width:768px){.note-content ul>li{padding-left:0.625rem;padding-right:0.625rem}}.note-content ul>li{position:relative}.note-content ul>li:first-child{padding-top:1.25rem}.note-content{color:#34495e;font-display:swap;font-size:18px;font-family:source sans pro,open sans,helvetica neue,Arial,sans-serif;line-height:1.8}.note-width{max-width:46rem}.note-content{min-height:100%;overflow-wrap:break-word}.note-content ul,.note-content ol{margin:2px 0 16px}.note-content p{margin:4px 0;hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-webkit-hyphens:auto}.node-item pre,.node-item pre>code,.note-content pre,.note-content pre>code{margin-top:0.75rem;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(246 246 246/var(--tw-bg-opacity))}.dark .node-item pre,.dark .node-item pre>code,.dark .note-content pre,.dark .note-content pre>code{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.note-content a{color:#0366d6;text-decoration:none;background-image:linear-gradient(transparent,transparent 6px,#34495e 6px,#34495e);background-position:bottom;background-size:100% 6px;background-repeat:repeat-x}.note-content a:hover{background-image:linear-gradient(transparent,transparent 4px,#2bbc8a 4px,#2bbc8a)}.note-content h2{font-weight:500;font-size:1.5rem;margin:24px 0 2px 0}.note-content h3{font-weight:400;font-size:1.3rem;margin:24px 0 2px 0}.note-content img,.note-content video{display:block;margin:auto;max-width:100%;height:auto}.note-content blockquote{border-left:3px solid #2bbc8a;border-left-width:6px;background-color:#f8f8f8;padding:15px 20px;margin-left:-1rem;margin-right:-1rem}.note-content blockquote p{margin:0}.note-content blockquote footer{margin:0;color:#8c8c8c;font-size:11px}.note-content blockquote footer a{background-image:linear-gradient(transparent,transparent 5px,#8c8c8c 5px,#8c8c8c);color:#8c8c8c}.note-content blockquote footer a:hover{background-image:linear-gradient(transparent,transparent 4px,#a3a3a3 4px,#a3a3a3);color:#a3a3a3}.note-content blockquote footer cite:before{padding:0 .5em;content:"—"}.note-content .h-anchor{display:none}.note-content ul.popular-posts>li{padding-top:0.625rem;padding-bottom:0.625rem;position:relative;border-bottom:solid 1px #ececec94}.note-content ul.popular-posts>li:first-child{padding-top:1.25rem}.post-tags-list{margin-top:20px;margin-bottom:30px;display:table}.post-tags-list-item{float:left;font-size:12px;margin-right:10px;background:rgba(102,128,153,0.075);border-radius:4px;padding:2px 5px;color:rgba(44,63,81,0.5)}.post-tags-list-link{cursor:default}yel{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}red{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}pur{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}blu{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}code{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.dark code{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}pre{line-height:1.5;overflow:hidden;overflow-x:auto;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:1rem}.dark pre{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.mdLayout pre+p:not(:last-child){border-top-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.dark .mdLayout pre+p:not(:last-child){border-color:rgb(51 65 85/0.5)}pre:only-child{height:100%}pre>code{color:#345;padding:0 !important;background:transparent;overflow:visible}pre>code.wrap{white-space:pre-wrap !important;overflow-wrap:break-word !important}.mdLayout .line-highlight{transform:translate3d(0,2px,0);background:linear-gradient(to right,rgba(20,175,131,0.05) 25%,transparent)}.mdLayout .line-highlight[data-end]{margin-top:0}.mdLayout .line-highlight::before,.mdLayout .line-highlight::after{display:none}.mdLayout code.hljs{background:transparent}.note-content pre{padding:6px 0 !important}.note-content pre code{padding:1rem !important}#mysearch em{font-style:normal;--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.text-color-inherit{color:inherit}@media (min-width:1200px){.xl\:max-h-832{max-height:800px}}#mysearch-list li.inactive{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}#mysearch-list li.inactive>a.link{background-color:transparent;--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}#mysearch-list li.inactive .icon-enter{display:none}#mysearch-list li.inactive i.icon,#mysearch-list li.inactive .sub-intro{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}#mysearch-list li.active{z-index:10;border-color:transparent;--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#mysearch-list li.active>a{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 6px 8px rgba(102,119,136,0.03),0 1px 2px rgba(102,119,136,0.3);--tw-shadow-colored:0 6px 8px var(--tw-shadow-color),0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#mysearch-list li.active em{color:inherit;text-decoration-line:underline}a#mysearch-list li.active em{text-decoration:none;background-image:linear-gradient(transparent,transparent 6px,#34495e 6px,#34495e);background-position:bottom;background-size:100% 6px;background-repeat:repeat-x}a#mysearch-list li.active em:hover{background-image:linear-gradient(transparent,transparent 4px,#1d1d1d 4px,#1D1D1DFF)}#mysearch-list li.active .icon-enter{display:block}#mysearch-list li.active i.icon,#mysearch-list li.active .sub-intro{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.pagination .prev,.pagination .next,.pagination .page-number{margin-left:0.25rem;margin-right:0.25rem;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding-left:0.75rem;padding-right:0.75rem;padding-top:0.625rem;padding-bottom:0.625rem;font-weight:500;--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity));--tw-shadow:0 6px 8px rgba(102,119,136,0.03),0 1px 2px rgba(102,119,136,0.3);--tw-shadow-colored:0 6px 8px var(--tw-shadow-color),0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pagination .prev:hover,.pagination .next:hover,.pagination .page-number:hover{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark .pagination .prev,.dark .pagination .next,.dark .pagination .page-number{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.pagination .space{margin-left:0.25rem;margin-right:0.25rem;padding-left:0.75rem;padding-right:0.75rem;padding-top:0.625rem;padding-bottom:0.625rem;font-weight:500;--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.dark .pagination .space{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.pagination .page-number.current{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}a.underline{text-decoration:none;background-image:linear-gradient(transparent,transparent 6px,#34495e 6px,#34495e);background-position:bottom;background-size:100% 6px;background-repeat:repeat-x}a.underline:hover{background-image:linear-gradient(transparent,transparent 4px,#1d1d1d 4px,#1D1D1DFF)}#carbonads{display:flex;position:fixed;bottom:60px;right:20px;max-width:330px;background-color:hsl(0,0%,98%);box-shadow:0 6px 8px rgba(102,119,136,0.03),0 1px 2px rgba(102,119,136,0.3);animation:scale-up-center 0.4s cubic-bezier(0.390,0.575,0.565,1.000) both;z-index:30;border-radius:0.5rem}.dark #carbonads{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity));--tw-shadow:0 35px 60px -15px rgba(0,0,0,0.3);--tw-shadow-colored:0 35px 60px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#carbonads>span{display:block;position:relative;padding:10px;background-color:#fff;border-radius:0.5rem}.dark #carbonads>span{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}#carbonads .carbon-wrap{display:flex}#carbonads .carbon-img{margin-right:10px;line-height:1}#carbonads .carbon-img>img{border-radius:0.5rem}#carbonads .carbon-text{margin-bottom:12px;font-size:12px;line-height:1.45;text-decoration:none;color:#637381}.dark #carbonads .carbon-text{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}#carbonads .carbon-poweredby{position:absolute;bottom:10px;left:152px;font-size:8px;font-weight:500;line-height:1;text-decoration:none;letter-spacing:.5px;text-transform:uppercase;color:#c5cdd0}.dark #carbonads .carbon-poweredby{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}@keyframes scale-up-center{0%{opacity:0;transform:scale(0.9)}100%{opacity:1;transform:scale(1)}}#bsa_custom{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif;font-size:12px}#bsa_custom .native-fixed{box-shadow:inset 0 1px 0 hsla(0,0%,0%,0.075);position:fixed;inset:auto 0 0 0;display:flex;justify-content:center;align-items:center;z-index:10;--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.dark #bsa_custom .native-fixed{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}#bsa_custom a{text-decoration:none;display:flex;justify-content:center;align-items:center;padding:1.75ex 2ch;color:#ffffff}#bsa_custom .native-sponsor{border-radius:0.5ex;margin-right:1ch;line-height:1;padding:1ex 1ch;font-weight:600;font-size:0.75em;text-transform:uppercase;color:#2db67c;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.dark #bsa_custom .native-sponsor{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}#bsa_custom .native-text{font-size:1em;line-height:1.3}html{-webkit-tap-highlight-color:transparent}html.scrollbar{scroll-behavior:smooth;scroll-padding-top:20px}.max-container{max-width:1320px;margin-left:auto;margin-right:auto;padding:0.75rem}.header-button{margin-left:0.25rem;display:inline-flex;align-items:center;border-radius:9999px;border-width:0px;--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity));padding:0.75rem;font-weight:500;--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:200ms}.header-button:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity));--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.header-button:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width:1024px){.header-button{padding-left:1.5rem;padding-right:1.5rem;padding-top:0.5rem;padding-bottom:0.5rem}}.header-button>i{font-size:1.25rem;line-height:1.25rem}@media (min-width:1024px){.header-button>i{margin-right:0.5rem;font-size:1rem;line-height:1.5rem}}.home .card{display:flex;cursor:pointer;align-items:center;border-radius:0.5rem;--tw-bg-opacity:0.6;padding:1rem;--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity));--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark .home .card{--tw-bg-opacity:0.5;--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.home .card:hover{--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity));--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.home .card>i{font-size:1.875rem;line-height:2.25rem}.home .card>p{margin-left:0.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.875rem;line-height:1.25rem}.home .domain{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.mdLayout{color:#345;display:flex;flex-direction:column}.mdLayout>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(3.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3.5rem * var(--tw-space-y-reverse))}.mdLayout h3 a.h-anchor,.mdLayout h4 a.h-anchor,.mdLayout h5 a.h-anchor{display:none}.mdLayout .h2-wrap:first-child:not(.show)>h2{}.mdLayout .h2-wrap>h2{padding-right:0.5rem;--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.dark .mdLayout .h2-wrap>h2{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.mdLayout .h2-wrap>h2>a.h-anchor{padding-right:0.5rem;--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.mdLayout .h2-wrap>h2>a.h-anchor:hover{cursor:pointer;--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity));text-decoration-line:none}.mdLayout .h2-wrap>.h3-wrap-list{display:flex;flex-direction:column}@media (min-width:1024px){.mdLayout .h2-wrap>.h3-wrap-list{display:grid;gap:1.75rem}.mdLayout .h2-wrap.cols-1>.h3-wrap-list{grid-template-columns:repeat(1,minmax(0,1fr))}.mdLayout .h2-wrap.cols-2>.h3-wrap-list{grid-template-columns:repeat(2,minmax(0,1fr))}.mdLayout .h2-wrap.cols-3>.h3-wrap-list{grid-template-columns:repeat(3,minmax(0,1fr))}.mdLayout .h2-wrap.cols-4>.h3-wrap-list{grid-template-columns:repeat(4,minmax(0,1fr))}.mdLayout .h2-wrap.cols-5>.h3-wrap-list{grid-template-columns:repeat(5,minmax(0,1fr))}.mdLayout .h2-wrap.cols-6>.h3-wrap-list{grid-template-columns:repeat(6,minmax(0,1fr))}.mdLayout .h2-wrap.cols-7>.h3-wrap-list{grid-template-columns:repeat(7,minmax(0,1fr))}.mdLayout .h2-wrap.cols-8>.h3-wrap-list{grid-template-columns:repeat(8,minmax(0,1fr))}.mdLayout .h2-wrap.cols-9>.h3-wrap-list{grid-template-columns:repeat(9,minmax(0,1fr))}.mdLayout .h2-wrap.cols-10>.h3-wrap-list{grid-template-columns:repeat(10,minmax(0,1fr))}.mdLayout .h2-wrap.cols-11>.h3-wrap-list{grid-template-columns:repeat(11,minmax(0,1fr))}.mdLayout .h2-wrap.cols-12>.h3-wrap-list{grid-template-columns:repeat(12,minmax(0,1fr))}}.mdLayout .h3-wrap-list{font-size:0.925rem;line-height:1.325rem}.mdLayout .h3-wrap ul,.h3-wrap ol,.h3-wrap dl{margin-top:0.5rem;margin-bottom:0.5rem;display:grid;list-style-position:outside;grid-template-columns:repeat(1,minmax(0,1fr))}.mdLayout .h3-wrap .cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.mdLayout .h3-wrap .cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.mdLayout .h3-wrap .cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.mdLayout .h3-wrap .cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.mdLayout .h3-wrap .cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.mdLayout .h3-wrap .cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.mdLayout .h3-wrap .cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.mdLayout .h3-wrap .cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.mdLayout .h3-wrap .cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.mdLayout .h3-wrap .cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.mdLayout .h3-wrap .cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.mdLayout .h3-wrap .cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.mdLayout .h3-wrap{position:relative;margin-bottom:1rem;display:flex;flex-direction:column;overflow:hidden;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding-top:1.5rem;--tw-shadow:0 6px 8px rgba(102,119,136,0.03),0 1px 2px rgba(102,119,136,0.3);--tw-shadow-colored:0 6px 8px var(--tw-shadow-color),0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:1024px){.mdLayout .h3-wrap{margin-bottom:0px}}.dark .mdLayout .h3-wrap{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.mdLayout .h3-wrap hr{--tw-text-opacity:1 !important;color:rgb(226 232 240/var(--tw-text-opacity)) !important}.dark .mdLayout .h3-wrap hr{color:rgb(51 65 85/0.5) !important}.mdLayout .h3-wrap.boxed{box-shadow:0 0 0 1.6pt #10b981;transition:box-shadow 0.5s ease-in-out}.mdLayout .h3-wrap.primary.boxed{box-shadow:0 0 0 1.6pt #f04444}.mdLayout .h3-wrap.secondary.boxed{box-shadow:0 0 0 1.6pt #eaa13b}.mdLayout .h3-wrap>h3{position:absolute;right:0px;top:0px;z-index:10;border-bottom-left-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity));padding-left:0.75rem;padding-right:0.75rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;letter-spacing:0.05em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark .mdLayout .h3-wrap>h3{--tw-bg-opacity:0.7;--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.mdLayout .h3-wrap.secondary,.h3-wrap.primary{--tw-shadow:0 4px 6px -1px rgba(102,119,136,0.05),0 2px 4px -1px rgba(102,119,136,0.35);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mdLayout .h3-wrap.secondary>h3{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity))}.mdLayout .h3-wrap.primary>h3{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.mdLayout .h3-wrap>.section{z-index:0;display:flex;height:100%;width:100%;flex-direction:column}.mdLayout .h3-wrap>.section>p{background:#f8f9fa;color:#345;margin:0px;width:100%;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem}.dark .mdLayout .h3-wrap>.section>p{background-color:rgb(15 23 42/0.3);--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.mdLayout .h3-wrap>.section>p:first-child:before,.h3-wrap>.section>h4:first-child:before{content:'-';color:#f8f9fa;background:#f8f9fa;line-height:1.75rem;top:-4px;position:absolute;left:0px;width:100%}.dark .mdLayout .h3-wrap>.section>p:first-child:before,.dark .h3-wrap>.section>h4:first-child:before{background-color:rgb(15 23 42/0.3);color:rgb(30 41 59/0)}.mdLayout .h3-wrap>.section>p:last-child{margin-top:auto}.mdLayout .h3-wrap>.section>h4{margin:0px;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity));padding-left:1rem;padding-right:1rem;padding-top:0.25rem;padding-bottom:0.25rem;text-align:center;--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.dark .mdLayout .h3-wrap>.section>h4{border-color:rgb(51 65 85/0.5);background-color:rgb(51 65 85/0.3);--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.mdLayout .h3-wrap>.section p a,.mdLayout .h3-wrap>.section p a:visited,.intro p a,.intro p a:visited{color:#345;text-decoration:none;border-bottom:solid 1px rgba(85,102,119,0.18)}.dark .mdLayout .h3-wrap>.section p a,.dark .mdLayout .h3-wrap>.section p a:visited,.dark .intro p a,.dark .intro p a:visited{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.mdLayout .h3-wrap>.section p a:hover,.mdLayout .h3-wrap>.section p a:visited:hover,.intro p a:hover,.intro p a:visited:hover{text-decoration-line:underline;text-decoration-color:#10b981;text-decoration-thickness:1px;text-underline-offset:2px}.mdLayout .h3-wrap>.section p a:hover,.intro p a:hover{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.mdLayout.mdLayout a+em{opacity:0.5}.dark .mdLayout.mdLayout a+em{opacity:0.8}.mdLayout h2{margin:0;padding:0;margin-bottom:24px;margin-top:64px;position:relative;font-size:30px;line-height:1.2;font-weight:200;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;margin-top:0}@media (max-width:768px){.mdLayout h2{margin-bottom:8px;margin-top:32px}}@media (max-width:480px){.mdLayout h2{margin-bottom:8px;margin-top:32px}}.mdLayout a,.mdLayout a:visited{color:#1959a2;text-decoration:none;background-image:linear-gradient(transparent,transparent 6px,#34495e 6px,#34495e);background-position:bottom;background-size:100% 6px;background-repeat:repeat-x}.dark .mdLayout a,.dark .mdLayout a:visited{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}.mdLayout a:hover,.mdLayout a:visited:hover{text-decoration-line:underline;text-decoration-color:#10b981;text-decoration-thickness:2px;text-underline-offset:4px}.mdLayout em,.mdLayout sup,.mdLayout sub{font-style:normal;color:#556677}.mdLayout iframe{border:0;margin:0;width:100%}.local-anchor{margin-left:-.9em;margin-right:.1em;padding:0 .1em}.mdLayout .local-anchor,.mdLayout .local-anchor:visited{color:#556677;text-decoration:inherit;opacity:.5}.mdLayout .local-anchor:target,.mdLayout :target>.local-anchor{opacity:1;--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.mdLayout .local-anchor:hover,.mdLayout .local-anchor:focus{opacity:1;text-decoration:inherit;--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.mdLayout.mdLayout img{max-width:100%}.mdLayout.mdLayout p.link-arrow>a{box-shadow:none;text-decoration:none;margin-left:-1.25rem;margin-right:-1.25rem;margin-top:-0.75rem;margin-bottom:-0.75rem;display:block;border-width:0px;padding:0.75rem;text-align:center;--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.mdLayout.mdLayout p.link-arrow>a:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity))}.mdLayout.mdLayout p.link-arrow>a:visited{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.mdLayout.mdLayout p.link-arrow>a::before{content:'';display:inline-block;vertical-align:middle;background:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22rgb(255%2C255%2C255)%22%20d%3D%22M85%20277.375h259.704L225.002%20397.077%20256%20427l171-171L256%2085l-29.922%2029.924%20118.626%20119.7H85v42.75z%22%2F%3E%3C%2Fsvg%3E") center center/16px 16px no-repeat;margin-right:16px;width:32px;height:32px;line-height:32px;border-radius:50%;--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.mdLayout.mdLayout p.link-arrow>a::before,.mdLayout.mdLayout p.link-arrow>a:visited::before{color:rgb(52 211 153/var(--tw-text-opacity));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.mdLayout.mdLayout p.link-arrow>a:hover,.mdLayout.mdLayout p.link-arrow>a:focus{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.mdLayout.mdLayout p.link-arrow>a:hover::before,.mdLayout.mdLayout p.link-arrow>a:focus::before{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.hover\:bg-slate-500:hover{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.hover\:bg-emerald-500:hover{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.hover\:bg-emerald-600:hover{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity))}.hover\:bg-slate-400:hover{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.hover\:from-pink-700:hover{--tw-gradient-from:#be185d;--tw-gradient-to:rgb(190 24 93/0);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\:from-emerald-400:hover{--tw-gradient-from:#34d399;--tw-gradient-to:rgb(52 211 153/0);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\:via-violet-600:hover{--tw-gradient-to:rgb(124 58 237/0);--tw-gradient-stops:var(--tw-gradient-from),#7c3aed,var(--tw-gradient-to)}.hover\:to-blue-500:hover{--tw-gradient-to:#3b82f6}.hover\:text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}.hover\:text-slate-50:hover{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 10px 10px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow:hover{--tw-shadow:0 6px 8px rgba(102,119,136,0.03),0 1px 2px rgba(102,119,136,0.3);--tw-shadow-colored:0 6px 8px var(--tw-shadow-color),0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-emerald-500:focus{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity))}.focus\:text-slate-900:focus{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.group:hover .group-hover\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.dark .dark\:border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}.dark .dark\:bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.dark .dark\:bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.dark .dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark .dark\:bg-slate-900\/90{background-color:rgb(15 23 42/0.9)}.dark .dark\:bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.dark .dark\:bg-slate-400\/20{background-color:rgb(148 163 184/0.2)}.dark .dark\:bg-opacity-80{--tw-bg-opacity:0.8}.dark .dark\:text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.dark .dark\:text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.dark .dark\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark .dark\:text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.dark .dark\:opacity-70{opacity:0.7}.dark .dark\:shadow-3xl{--tw-shadow:0 35px 60px -15px rgba(0,0,0,0.3);--tw-shadow-colored:0 35px 60px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark .dark\:hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark .dark\:hover\:text-slate-100:hover{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.dark .dark\:hover\:text-slate-300:hover{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.dark .group:hover .dark\:group-hover\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}@media (min-width:640px){.sm\:ml-auto{margin-left:auto}.sm\:mt-0{margin-top:0px}.sm\:flex-row{flex-direction:row}.sm\:justify-start{justify-content:flex-start}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width:768px){.md\:mx-8{margin-left:2rem;margin-right:2rem}.md\:mt-20{margin-top:5rem}.md\:mt-14{margin-top:3.5rem}.md\:mt-0{margin-top:0px}.md\:ml-auto{margin-left:auto}.md\:mr-2{margin-right:0.5rem}.md\:ml-2{margin-left:0.5rem}.md\:ml-4{margin-left:1rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:h-12{height:3rem}.md\:w-4\/12{width:33.333333%}.md\:w-8\/12{width:66.666667%}.md\:w-1\/2{width:50%}.md\:w-12{width:3rem}.md\:flex-grow{flex-grow:1}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-between{justify-content:space-between}.md\:gap-8{gap:2rem}.md\:gap-4{gap:1rem}.md\:self-auto{align-self:auto}.md\:border-l{border-left-width:1px}.md\:bg-transparent{background-color:transparent}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:py-0{padding-top:0px;padding-bottom:0px}.md\:px-10{padding-left:2.5rem;padding-right:2.5rem}.md\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.md\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}.md\:py-3{padding-top:0.75rem;padding-bottom:0.75rem}.md\:px-3{padding-left:0.75rem;padding-right:0.75rem}.md\:px-0{padding-left:0px;padding-right:0px}.md\:pr-4{padding-right:1rem}.md\:pl-4{padding-left:1rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.md\:hover\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.md\:hover\:opacity-80:hover{opacity:0.8}.dark .md\:dark\:bg-transparent{background-color:transparent}.dark .md\:dark\:hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}}@media (min-width:1024px){.lg\:ml-4{margin-left:1rem}.lg\:block{display:block}.lg\:w-2\/3{width:66.666667%}.lg\:w-8\/12{width:66.666667%}.lg\:w-3\/5{width:60%}.lg\:w-1\/2{width:50%}.lg\:w-3\/4{width:75%}.lg\:max-w-screen-lg{max-width:1024px}.lg\:items-start{align-items:flex-start}.lg\:rounded-lg{border-radius:0.5rem}.lg\:rounded-br-lg{border-bottom-right-radius:0.5rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:pt-16{padding-top:4rem}.lg\:pb-20{padding-bottom:5rem}.lg\:hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}}@media (min-width:1280px){.xl\:mt-2{margin-top:0.5rem}} diff --git a/themes/coo/source/css/style.tailwindcss b/themes/coo/source/css/style.tailwindcss new file mode 100644 index 0000000..49874e0 --- /dev/null +++ b/themes/coo/source/css/style.tailwindcss @@ -0,0 +1,346 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; + + +/* Custom Components */ +@import "highlightjs/stackoverflow-light.min.css"; +@import "components/layout_table.css"; +@import "components/layout_list.css"; +@import "components/layout_note.css"; +@import "components/custom_tag.css"; +@import "components/code.css"; +@import "components/search.css"; +@import "components/pagination.css"; +@import "components/common.css"; +@import "components/bsa_carbon.css"; +@import "components/bsa_custom.css"; + + +html { + /* https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color */ + -webkit-tap-highlight-color: transparent; +} + +html.scrollbar { + scroll-behavior: smooth; + scroll-padding-top: 20px; +} + +.max-container { + max-width: 1320px; + @apply mx-auto p-3; +} + +.header-button { + @apply inline-flex items-center bg-slate-200 text-slate-600 transition duration-200 rounded-full border-0 p-3 ml-1 font-medium; + @apply hover:bg-slate-300 hover:text-slate-700 hover:shadow-lg; + @apply lg:px-6 lg:py-2 focus:outline-none; +} + +.header-button > i { + @apply text-xl leading-5; + @apply lg:text-base lg:mr-2; +} + +.home .card { + @apply p-4 flex items-center rounded-lg shadow-sm cursor-pointer text-slate-800 bg-opacity-60; + @apply dark:text-slate-300 dark:bg-opacity-50; + @apply hover:text-slate-100 hover:bg-opacity-100 hover:shadow-lg; +} + +.home .card > i { + @apply text-3xl; +} + +.home .card > p { + @apply text-sm ml-2 truncate; +} + +.home .domain { + @apply text-slate-100; +} + +/*************************Cheat sheet start****************************/ +.mdLayout { + color: #345; + @apply flex flex-col space-y-14; +} + +.mdLayout h3 a.h-anchor, .mdLayout h4 a.h-anchor, .mdLayout h5 a.h-anchor { + @apply hidden; +} + +/** H2 Wrap **/ + +.mdLayout .h2-wrap:first-child:not(.show) > h2 { + /* @apply invisible; */ +} + +.mdLayout .h2-wrap > h2 { + @apply text-emerald-500 pr-2; + @apply dark:text-slate-300; +} + +.mdLayout .h2-wrap > h2 > a.h-anchor { + @apply text-emerald-500 pr-2; +} + +.mdLayout .h2-wrap > h2 > a.h-anchor:hover { + @apply text-emerald-600 no-underline cursor-pointer; +} + +/** Grid layout. */ +.mdLayout .h2-wrap > .h3-wrap-list { @apply flex flex-col lg:grid lg:gap-7; } +.mdLayout .h2-wrap.cols-1 > .h3-wrap-list { @apply lg:grid-cols-1; } +.mdLayout .h2-wrap.cols-2 > .h3-wrap-list { @apply lg:grid-cols-2; } +.mdLayout .h2-wrap.cols-3 > .h3-wrap-list { @apply lg:grid-cols-3; } +.mdLayout .h2-wrap.cols-4 > .h3-wrap-list { @apply lg:grid-cols-4; } +.mdLayout .h2-wrap.cols-5 > .h3-wrap-list { @apply lg:grid-cols-5; } +.mdLayout .h2-wrap.cols-6 > .h3-wrap-list { @apply lg:grid-cols-6; } +.mdLayout .h2-wrap.cols-7 > .h3-wrap-list { @apply lg:grid-cols-7; } +.mdLayout .h2-wrap.cols-8 > .h3-wrap-list { @apply lg:grid-cols-8; } +.mdLayout .h2-wrap.cols-9 > .h3-wrap-list { @apply lg:grid-cols-9; } +.mdLayout .h2-wrap.cols-10 > .h3-wrap-list { @apply lg:grid-cols-10; } +.mdLayout .h2-wrap.cols-11 > .h3-wrap-list { @apply lg:grid-cols-11; } +.mdLayout .h2-wrap.cols-12 > .h3-wrap-list { @apply lg:grid-cols-12; } + + +/** H3 Wrap **/ +.mdLayout .h3-wrap-list { + font-size: 0.925rem; + line-height: 1.325rem; +} + + +/** List Layout in h3-wrap **/ +.mdLayout .h3-wrap ul,.h3-wrap ol,.h3-wrap dl { @apply my-2 grid grid-cols-1 list-outside; } +.mdLayout .h3-wrap .cols-1 { @apply grid-cols-1; } +.mdLayout .h3-wrap .cols-2 { @apply grid-cols-2; } +.mdLayout .h3-wrap .cols-3 { @apply grid-cols-3; } +.mdLayout .h3-wrap .cols-4 { @apply grid-cols-4; } +.mdLayout .h3-wrap .cols-5 { @apply grid-cols-5; } +.mdLayout .h3-wrap .cols-6 { @apply grid-cols-6; } +.mdLayout .h3-wrap .cols-7 { @apply grid-cols-7; } +.mdLayout .h3-wrap .cols-8 { @apply grid-cols-8; } +.mdLayout .h3-wrap .cols-9 { @apply grid-cols-9; } +.mdLayout .h3-wrap .cols-10 { @apply grid-cols-10; } +.mdLayout .h3-wrap .cols-11 { @apply grid-cols-11; } +.mdLayout .h3-wrap .cols-12 { @apply grid-cols-12; } + + +.mdLayout .h3-wrap { + @apply bg-white pt-6 mb-4 rounded-lg shadow flex flex-col relative overflow-hidden; + @apply lg:mb-0; + @apply dark:bg-slate-800 dark:text-slate-300; +} + +.mdLayout .h3-wrap hr { + @apply text-slate-200 !important; + @apply dark:text-slate-700/50 !important; +} + +.mdLayout .h3-wrap.boxed { + box-shadow: 0 0 0 1.6pt #10b981; + transition: box-shadow 0.5s ease-in-out; +} + +.mdLayout .h3-wrap.primary.boxed { + box-shadow: 0 0 0 1.6pt #f04444; +} + +.mdLayout .h3-wrap.secondary.boxed { + box-shadow: 0 0 0 1.6pt #eaa13b; +} + +.mdLayout .h3-wrap > h3 { + @apply bg-emerald-500 text-white px-3 py-1 tracking-wider text-xs absolute right-0 top-0 rounded-bl-lg z-10; + @apply dark:bg-opacity-70 dark:text-slate-200; +} + +.mdLayout .h3-wrap.secondary, .h3-wrap.primary { + @apply shadow-md; +} + +.mdLayout .h3-wrap.secondary > h3 { + @apply bg-amber-500; +} + +.mdLayout .h3-wrap.primary > h3 { + @apply bg-red-500; +} + +.mdLayout .h3-wrap > .section { + @apply flex flex-col h-full w-full z-0; +} + +/* Paragraphs */ +.mdLayout .h3-wrap > .section > p { + background: #f8f9fa; + color: #345; + @apply w-full px-4 py-3 m-0; + @apply dark:bg-slate-900/30 dark:text-slate-400; +} + +.mdLayout .h3-wrap > .section > p:first-child:before, .h3-wrap > .section > h4:first-child:before { + content: '-'; + color: #f8f9fa; + background: #f8f9fa; + line-height: 1.75rem; + top: -4px; + @apply w-full absolute left-0; + @apply dark:bg-slate-900/30 dark:text-slate-800/0; +} + +.mdLayout .h3-wrap > .section > p:last-child { + /* https://stackoverflow.com/questions/31000885/align-an-element-to-bottom-with-flexbox */ + margin-top: auto; +} + +/* Headings in between bodies */ +.mdLayout .h3-wrap > .section > h4 { + @apply bg-slate-100 border-t border-slate-200 text-slate-500 m-0 px-4 py-1 text-center; + @apply dark:bg-slate-700/30 dark:text-slate-300 dark:border-slate-700/50; +} + +/* Links */ +.mdLayout .h3-wrap > .section p a, +.mdLayout .h3-wrap > .section p a:visited, +.intro p a, +.intro p a:visited { + color: #345; + text-decoration: none; + border-bottom: solid 1px rgba(85, 102, 119, 0.18); + @apply dark:text-slate-500; + @apply hover:underline hover:decoration-emerald-500 hover:underline-offset-2 hover:decoration-1; +} + +.mdLayout .h3-wrap > .section p a:hover, +.intro p a:hover { + @apply text-emerald-500; +} + + +/*******************************/ + +/* For links with sources, eg, [Foo](foo.com) _(foo.com)_ */ +.mdLayout.mdLayout a + em { + opacity: 0.5; + @apply dark:opacity-80; +} + +/* mdLayout context */ +.mdLayout h2 { + margin: 0; + padding: 0; + margin-bottom: 24px; + margin-top: 64px; + position: relative; + font-size: 30px; + line-height: 1.2; + font-weight: 200; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; + margin-top: 0; +} + +@media (max-width: 768px) { + .mdLayout h2 { + margin-bottom: 8px; + margin-top: 32px; + } +} + +@media (max-width: 480px) { + .mdLayout h2 { + margin-bottom: 8px; + margin-top: 32px; + } +} + +.mdLayout a, .mdLayout a:visited { + color: #1959a2; + text-decoration: none; + background-image: linear-gradient(transparent,transparent 6px,#34495e 6px,#34495e); + background-position: bottom; + background-size: 100% 6px; + background-repeat: repeat-x; + @apply dark:text-sky-600; + @apply hover:underline hover:decoration-emerald-500 hover:underline-offset-4 hover:decoration-2; +} + +.mdLayout em, .mdLayout sup, .mdLayout sub { + font-style: normal; + color: #556677; +} + +.mdLayout iframe { + border: 0; + margin: 0; + width: 100%; +} + +.local-anchor { + margin-left: -.9em; + margin-right: .1em; + padding: 0 .1em; +} + +.mdLayout .local-anchor, .mdLayout .local-anchor:visited { + color: #556677; + text-decoration: inherit; + opacity: .5; +} + +.mdLayout .local-anchor:target, .mdLayout :target > .local-anchor { + opacity: 1; + @apply text-emerald-500; +} + +.mdLayout .local-anchor:hover, .mdLayout .local-anchor:focus { + opacity: 1; + text-decoration: inherit; + @apply text-white bg-emerald-500; +} + +/* Crosslink (eg, phoenix.md) */ +.mdLayout.mdLayout img { + max-width: 100%; +} + +.mdLayout.mdLayout p.link-arrow > a { + box-shadow: none; + text-decoration: none; + @apply text-emerald-500 block -mx-5 -my-3 p-3 border-0 text-center; + @apply hover:text-emerald-300 hover:bg-slate-200; +} + +.mdLayout.mdLayout p.link-arrow > a:visited { + @apply text-emerald-500; +} + +.mdLayout.mdLayout p.link-arrow > a::before { + content: ''; + display: inline-block; + vertical-align: middle; + background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22rgb(255%2C255%2C255)%22%20d%3D%22M85%20277.375h259.704L225.002%20397.077%20256%20427l171-171L256%2085l-29.922%2029.924%20118.626%20119.7H85v42.75z%22%2F%3E%3C%2Fsvg%3E") center center/16px 16px no-repeat; + height: 16px; + width: 16px; + margin-right: 16px; + width: 32px; + height: 32px; + line-height: 32px; + border-radius: 50%; + @apply bg-emerald-500; +} + +.mdLayout.mdLayout p.link-arrow > a::before, .mdLayout.mdLayout p.link-arrow > a:visited::before { + @apply text-emerald-400 text-white; +} + +.mdLayout.mdLayout p.link-arrow > a:hover, .mdLayout.mdLayout p.link-arrow > a:focus { + @apply text-emerald-500; +} + +.mdLayout.mdLayout p.link-arrow > a:hover::before, .mdLayout.mdLayout p.link-arrow > a:focus::before { + @apply bg-emerald-500; +} diff --git a/themes/coo/source/font/iconfont.css b/themes/coo/source/font/iconfont.css new file mode 100644 index 0000000..d0c3bee --- /dev/null +++ b/themes/coo/source/font/iconfont.css @@ -0,0 +1,355 @@ +@font-face { + font-family: "icon"; /* Project id 2226430 */ + src: url('iconfont.woff2?1641177301') format('woff2'), + url('iconfont.woff?1641177301') format('woff'), + url('iconfont.ttf?1641177301') format('truetype'); +} + +.icon { + font-family: "icon" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-rust:before { + content: "\e685"; +} + +.icon-add:before { + content: "\e64d"; +} + +.icon-dark:before { + content: "\e62c"; +} + +.icon-light:before { + content: "\e861"; +} + +.icon-cs:before { + content: "\e61d"; +} + +.icon-close:before { + content: "\e6e9"; +} + +.icon-laravel:before { + content: "\e6f8"; +} + +.icon-dart:before { + content: "\e63f"; +} + +.icon-neo4j:before { + content: "\e610"; +} + +.icon-html:before { + content: "\eac6"; +} + +.icon-graphql:before { + content: "\e60c"; +} + +.icon-pycharm:before { + content: "\e60d"; +} + +.icon-idea:before { + content: "\ebd1"; +} + +.icon-webstorm:before { + content: "\ed0c"; +} + +.icon-vscode1:before { + content: "\e6b8"; +} + +.icon-breadcrumb-arrow:before { + content: "\e60b"; +} + +.icon-search:before { + content: "\e7ea"; +} + +.icon-heart:before { + content: "\e66a"; +} + +.icon-permission:before { + content: "\ed3f"; +} + +.icon-cpp:before { + content: "\e638"; +} + +.icon-java:before { + content: "\e623"; +} + +.icon-tmux:before { + content: "\e60a"; +} + +.icon-netstat:before { + content: "\e609"; +} + +.icon-postgres:before { + content: "\ec5d"; +} + +.icon-pinterest:before { + content: "\e602"; +} + +.icon-logo:before { + content: "\e604"; +} + +.icon-docker:before { + content: "\e616"; +} + +.icon-yaml:before { + content: "\e608"; +} + +.icon-toml:before { + content: "\e607"; +} + +.icon-sed:before { + content: "\e8a6"; +} + +.icon-resolution:before { + content: "\e67a"; +} + +.icon-redis:before { + content: "\e669"; +} + +.icon-css:before { + content: "\e684"; +} + +.icon-jquery:before { + content: "\ebdd"; +} + +.icon-netcat:before { + content: "\e606"; +} + +.icon-numpy:before { + content: "\e605"; +} + +.icon-mitmproxy:before { + content: "\e600"; +} + +.icon-grep:before { + content: "\e73d"; +} + +.icon-jsonpath:before { + content: "\e628"; +} + +.icon-sass:before { + content: "\e622"; +} + +.icon-emacs:before { + content: "\e64f"; +} + +.icon-cron:before { + content: "\e742"; +} + +.icon-git:before { + content: "\e61c"; +} + +.icon-emoji:before { + content: "\e658"; +} + +.icon-emmet:before { + content: "\e603"; +} + +.icon-enter:before { + content: "\e691"; +} + +.icon-php:before { + content: "\e61b"; +} + +.icon-json:before { + content: "\e6a5"; +} + +.icon-ejs:before { + content: "\e63a"; +} + +.icon-haml:before { + content: "\e647"; +} + +.icon-jade:before { + content: "\e656"; +} + +.icon-style:before { + content: "\ed3e"; +} + +.icon-nginx:before { + content: "\e640"; +} + +.icon-xml:before { + content: "\e760"; +} + +.icon-ansible:before { + content: "\e601"; +} + +.icon-npm:before { + content: "\e687"; +} + +.icon-markdown:before { + content: "\e92f"; +} + +.icon-react:before { + content: "\ea6c"; +} + +.icon-mysql:before { + content: "\e646"; +} + +.icon-atom:before { + content: "\e6d2"; +} + +.icon-golang:before { + content: "\e641"; +} + +.icon-vscode:before { + content: "\e60e"; +} + +.icon-es6:before { + content: "\e671"; +} + +.icon-css3:before { + content: "\e60f"; +} + +.icon-html5:before { + content: "\e6e0"; +} + +.icon-xpath:before { + content: "\e612"; +} + +.icon-vim:before { + content: "\ecd1"; +} + +.icon-bash:before { + content: "\e654"; +} + +.icon-javascript:before { + content: "\e756"; +} + +.icon-pandas:before { + content: "\e61a"; +} + +.icon-github:before { + content: "\e67c"; +} + +.icon-vue:before { + content: "\e674"; +} + +.icon-python:before { + content: "\e690"; +} + +.icon-regex:before { + content: "\e6b9"; +} + +.icon-arrow-up:before { + content: "\e62d"; +} + +.icon-excel:before { + content: "\e63b"; +} + +.icon-facebook:before { + content: "\e695"; +} + +.icon-linkedin:before { + content: "\e696"; +} + +.icon-reddit:before { + content: "\e698"; +} + +.icon-twitter:before { + content: "\e69b"; +} + +.icon-print:before { + content: "\e69d"; +} + +.icon-edit:before { + content: "\e6d1"; +} + +.icon-pdf:before { + content: "\e784"; +} + +.icon-link:before { + content: "\e7cc"; +} + +.icon-image:before { + content: "\e7e2"; +} + diff --git a/themes/coo/source/font/iconfont.ttf b/themes/coo/source/font/iconfont.ttf new file mode 100644 index 0000000..5d932dc Binary files /dev/null and b/themes/coo/source/font/iconfont.ttf differ diff --git a/themes/coo/source/font/iconfont.woff b/themes/coo/source/font/iconfont.woff new file mode 100644 index 0000000..9a13d7e Binary files /dev/null and b/themes/coo/source/font/iconfont.woff differ diff --git a/themes/coo/source/font/iconfont.woff2 b/themes/coo/source/font/iconfont.woff2 new file mode 100644 index 0000000..c4cf925 Binary files /dev/null and b/themes/coo/source/font/iconfont.woff2 differ diff --git a/themes/coo/source/images/favicon.png b/themes/coo/source/images/favicon.png new file mode 100644 index 0000000..7f72c27 Binary files /dev/null and b/themes/coo/source/images/favicon.png differ diff --git a/themes/coo/source/images/logo-original.png b/themes/coo/source/images/logo-original.png new file mode 100644 index 0000000..32f3826 Binary files /dev/null and b/themes/coo/source/images/logo-original.png differ diff --git a/themes/coo/source/images/logo.svg b/themes/coo/source/images/logo.svg new file mode 100644 index 0000000..b465522 --- /dev/null +++ b/themes/coo/source/images/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/themes/coo/source/js/fuse_6.4.6.js b/themes/coo/source/js/fuse_6.4.6.js new file mode 100644 index 0000000..7def598 --- /dev/null +++ b/themes/coo/source/js/fuse_6.4.6.js @@ -0,0 +1,9 @@ +/** + * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io) + * + * Copyright (c) 2021 Kiro Risk (http://kiro.me) + * All Rights Reserved. Apache Software License 2.0 + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ +var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(I).length;if(t.has(r))return t.get(r);var i=1/Math.sqrt(r),o=parseFloat(Math.round(i*n)/n);return t.set(r,o),o},clear:function(){t.clear()}}}var E=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?A.getFn:r;t(this,e),this.norm=C(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?A.getFn:r,o=new E({getFn:i});return o.setKeys(e.map(_)),o.setSources(t),o.create(),o}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?A.distance:s,h=t.ignoreLocation,f=void 0===h?A.ignoreLocation:h,l=r/e.length;if(f)return l;var d=Math.abs(a-o);return u?l+d/u:d?1:l}function F(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function P(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?A.location:o,a=i.threshold,s=void 0===a?A.threshold:a,u=i.distance,h=void 0===u?A.distance:u,f=i.includeMatches,l=void 0===f?A.includeMatches:f,d=i.findAllMatches,v=void 0===d?A.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?A.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?A.isCaseSensitive:p,k=i.ignoreLocation,M=void 0===k?A.ignoreLocation:k;if(t(this,e),this.options={location:c,threshold:s,distance:h,includeMatches:l,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){r.chunks.push({pattern:e,alphabet:P(e),startIndex:t})},x=this.pattern.length;if(x>32){for(var L=0,S=x%32,w=x-S;L3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?A.location:i,c=r.distance,a=void 0===c?A.distance:c,s=r.threshold,u=void 0===s?A.threshold:s,h=r.findAllMatches,f=void 0===h?A.findAllMatches:h,l=r.minMatchCharLength,d=void 0===l?A.minMatchCharLength:l,v=r.includeMatches,g=void 0===v?A.includeMatches:v,y=r.ignoreLocation,p=void 0===y?A.ignoreLocation:y;if(t.length>32)throw new Error(L(32));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,S=b,w=d>1||g,_=w?Array(M):[];(m=e.indexOf(t,S))>-1;){var O=R(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(O,x),S=m+k,w)for(var j=0;j=K;J-=1){var T=J-1,U=n[e.charAt(T)];if(w&&(_[T]=+!!U),W[J]=(W[J+1]<<1|1)&U,P&&(W[J]|=(I[J+1]|I[J])<<1|1|I[J+1]),W[J]&$&&(C=R(t,{errors:P,currentLocation:T,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=C,(S=T)<=b)break;K=Math.max(1,2*b-S)}}var V=R(t,{errors:P+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p});if(V>x)break;I=W}var B={isMatch:S>=0,score:Math.max(.001,C)};if(w){var G=F(_,d);G.length?g&&(B.indices=G):B.isMatch=!1}return B}(e,n,i,{location:c+o,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(l(d),l(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),D=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return z(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return z(e,this.singleRegex)}}]),e}();function z(e,t){var n=e.match(t);return n?n[1]:null}var K=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),i}(D),q=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}(D),W=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}(D),J=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}(D),T=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}(D),U=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}(D),V=function(e){a(i,e);var n=f(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?A.location:c,s=o.threshold,u=void 0===s?A.threshold:s,h=o.distance,f=void 0===h?A.distance:h,l=o.includeMatches,d=void 0===l?A.includeMatches:l,v=o.findAllMatches,g=void 0===v?A.findAllMatches:v,y=o.minMatchCharLength,p=void 0===y?A.minMatchCharLength:y,m=o.isCaseSensitive,k=void 0===m?A.isCaseSensitive:m,M=o.ignoreLocation,b=void 0===M?A.ignoreLocation:M;return t(this,i),(r=n.call(this,e))._bitapSearch=new N(e,{location:a,threshold:u,distance:f,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),r}return r(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}(D),B=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}(D),G=[K,B,W,J,U,T,q,V],H=G.length,Q=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Q).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=r.isCaseSensitive,o=void 0===i?A.isCaseSensitive:i,c=r.includeMatches,a=void 0===c?A.includeMatches:c,s=r.minMatchCharLength,u=void 0===s?A.minMatchCharLength:s,h=r.ignoreLocation,f=void 0===h?A.ignoreLocation:h,l=r.findAllMatches,d=void 0===l?A.findAllMatches:l,v=r.location,g=void 0===v?A.location:v,y=r.threshold,p=void 0===y?A.threshold:y,m=r.distance,k=void 0===m?A.distance:m;t(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:d,ignoreLocation:f,location:g,threshold:p,distance:k},this.pattern=o?n:n.toLowerCase(),this.query=X(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function le(e,t){t.score=e.score}function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?A.includeMatches:r,o=n.includeScore,c=void 0===o?A.includeScore:o,a=[];return i&&a.push(fe),c&&a.push(le),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}var ve=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=c({},A,{},r),this.options.useExtendedSearch,this._keyStore=new w(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof E))throw new Error("Incorrect 'index' type");this._myIndex=t||$(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){k(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=i.ignoreFieldNorm,h=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return he(h,{ignoreFieldNorm:u}),a&&h.sort(s),y(r)&&r>-1&&(h=h.slice(0,r)),de(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=te(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(k(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n),o=ae(n);if(!o&&r.length>1&&!ce(n))return e(ue(n));if(se(n)){var c=o?n[ie]:r[0],a=o?n[oe]:n[c];if(!g(a))throw new Error(x(c));var s={keyId:j(c),pattern:a};return i&&(s.searcher=te(a,t)),s}var u={children:[],operator:r[0]};return r.forEach((function(t){var r=n[t];v(r)&&r.forEach((function(t){u.children.push(e(t))}))})),u};return ce(e)||(e=ue(e)),o(e)}(e,this.options),r=this._myIndex.records,i={},o=[];return r.forEach((function(e){var r=e.$,c=e.i;if(k(r)){var a=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,a=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return a&&a.length?[{idx:i,item:r,matches:a}]:[]}switch(n.operator){case ne:for(var s=[],u=0,h=n.children.length;u1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?A.getFn:n,i=e.keys,o=e.records,c=new E({getFn:r});return c.setKeys(i),c.setIndexRecords(o),c},ve.config=A,function(){ee.push.apply(ee,arguments)}(Z),ve},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(); \ No newline at end of file diff --git a/themes/coo/source/js/main.js b/themes/coo/source/js/main.js new file mode 100644 index 0000000..4710606 --- /dev/null +++ b/themes/coo/source/js/main.js @@ -0,0 +1,493 @@ +let Utils = (function () { + return { + LIBRARY: { + ad: { + lib: ['//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8691406134231910'], + instance: 'adsbygoogle', + attr: {crossorigin: "anonymous", async: true} + }, + gtag: { + lib: ['https://www.googletagmanager.com/gtag/js?id=G-6SZEXN62V8'], + instance: 'gtag', + attr: {async: true} + }, + fuse: { + lib: ['/js/fuse_6.4.6.js'], + instance: 'Fuse', + attr: {async: true} + } + }, + loadScripts: function (urls, callback, attr = {}, container = document.head) { + let scripts = []; + for (let i in urls) { + scripts[i] = document.createElement('script'); + scripts[i].setAttribute("type", "text/javascript"); + scripts[i].setAttribute("src", urls[i]); + Object.keys(attr).forEach(function (key) { + scripts[i].setAttribute(key, attr[key]); + }) + } + let loadNextScript = function () { + let script = scripts.shift(); + let loaded = false; + container.appendChild(script); + script.onload = script.onreadystatechange = function () { + let rs = this.readyState; + if (rs && rs !== 'complete' && rs !== 'loaded') return; + if (loaded) return; + loaded = true; + if (scripts.length) { + loadNextScript(); + } else { + callback() + } + }; + }; + loadNextScript(); + }, + externalLibrary(library) { + return new Promise(resolve => { + if (window[library.instance] == null) { + this.loadScripts(library.lib, function () { + resolve(window[library.instance]); + }, library.attr, library.container); + } else { + resolve(window[library.instance]); + } + }); + } + }; +}()); + + +window.addEventListener('load', () => { + const isDarkMode = document.documentElement.classList.contains("dark") + if (!isDarkMode) { + let icon = document.querySelector("#darkMode > i").classList; + icon.toggle('icon-light') + icon.toggle('icon-dark') + } + document.querySelector("#darkMode").addEventListener("click", function () { + let html = document.documentElement.classList; + html.toggle('dark') + let icon = document.querySelector("#darkMode > i").classList; + icon.toggle('icon-light') + icon.toggle('icon-dark') + let isDarkMode = html.contains("dark"); + localStorage.theme = isDarkMode ? "dark" : ""; + }); + + /******** google analytics ***********/ + Utils.externalLibrary(Utils.LIBRARY.gtag).then(() => { + window.dataLayer = window.dataLayer || []; + + function gtag() { + dataLayer.push(arguments); + } + + gtag('js', new Date()); + gtag('config', 'G-6SZEXN62V8'); + }); + + /******** Remove bottom border noise ********/ + document.querySelectorAll(".h3-wrap ul").forEach(function (ul, i) { + let length = ul.querySelectorAll("li").length; + let matches = ul.className.match("cols-([0-9]+)"); + let cols = matches === null ? 1 : parseInt(matches[1]); + let no_border_length = length === 1 || length % cols === 0 ? cols : length % cols; + for (let j = 1; j <= no_border_length; j++) { + let element = ul.querySelector(`li:nth-last-child(${j})`); + if (element != null) { + element.style.borderBottom = "none"; + } + } + }); + + + /******** h3-wrap blink ***********/ + function blinkSection() { + let hash = window.location.hash; + let anchor = document.querySelector(`a[class="h-anchor"][href="${hash}"]`); + if (anchor != null) { + let anchorSection = anchor.parentElement.parentElement; + document.querySelectorAll(".h3-wrap.boxed").forEach((e) => { + e.classList.remove("boxed") + }); + let timer = setTimeout(function () { + anchorSection.classList.add("boxed"); + clearTimeout(timer); + }, 100); + } + } + + blinkSection(); + window.addEventListener('popstate', blinkSection); + + + /******** Search ***********/ + const searchEngine = function (options) { + let settings = options ? options : {}; + let defaultOptions = { + trigger: "#mysearch-trigger", + container: "#mysearch", + dbPath: `${location.protocol}//${location.host}/search.json?v=1.0` + }; + this.container = (typeof settings.container != 'undefined') ? settings.container : defaultOptions.container; + this.trigger = (typeof settings.trigger != 'undefined') ? settings.trigger : defaultOptions.trigger; + this.dbPath = (typeof settings.dbPath != 'undefined') ? settings.dbPath : defaultOptions.dbPath; + + this.lastSearch = {}; + + window.search = this; + }; + searchEngine.prototype = { + start: function () { + const _this = this; + + this.search = document.querySelector(this.container); + this.box = document.querySelector("#mysearch-box"); + this.input = document.querySelector("#mysearch-input"); + this.result = document.querySelector("#mysearch-list"); + this.lastSearch.query = this.input.value; + + this.detectModal(); + + // Cancel button + const cancel = document.querySelector(".cancel"); + cancel.addEventListener("click", function (e) { + _this.closeModal(true); + }); + + // Clear button + const clear = document.querySelector("#mysearch-clear"); + clear.addEventListener("click", function (e) { + _this.doSearch("", true).then(); + }); + + // Search trigger + const trigger = document.querySelector(_this.trigger); + trigger.addEventListener("click", function (e) { + _this.openModal(true); + }); + + document.body.addEventListener('keydown', function (e) { + if ((e.ctrlKey || e.metaKey) && e.key === 'k') { + _this.toggleModal(); + e.preventDefault(); + e.stopPropagation(); + } + }); + + document.body.addEventListener('click', function (e) { + if (_this.isOpened()) { + if (!_this.box.contains(e.target) && !trigger.contains(e.target)) { + _this.closeModal(); + } + } + }); + + // Search input event + this.input.addEventListener("keydown", function (e) { + let value = _this.input.value + if (value === _this.lastSearch.query) { + return; + } + _this.doSearch(value, true).then(); + }); + + document.body.addEventListener('keydown', function (e) { + if (e.key === "ArrowDown") { + if (_this.isOpened()) { + _this.moveItem(false) + e.preventDefault(); + e.stopPropagation(); + } + } else if (e.key === 'ArrowUp') { + if (_this.isOpened()) { + _this.moveItem(true) + e.preventDefault(); + e.stopPropagation(); + } + } else if (e.key === 'Enter') { + if (_this.isOpened()) { + let active = _this.result.querySelector("li.active > a") + if (active != null) { + window.location.href = active.getAttribute("href"); + } + } + e.preventDefault(); + e.stopPropagation(); + } else if (e.key === 'Escape') { + _this.closeModal(); + } else if (e.metaKey && e.key === 'k') { + _this.toggleModal(); + } + }); + + }, + + moveItem: function (up) { + let current = this.result.querySelector("li.active") + let next = up ? current.previousElementSibling : current.nextElementSibling; + if (next !== null) { + current.classList.remove("active"); + current.classList.add("inactive"); + next.classList.remove("inactive"); + next.classList.add("active"); + this.renderPreview(); + } + }, + detectModal: function () { + const url_string = window.location.href; + const url = new URL(url_string); + const query = url.searchParams.get("q"); + if (query != null) { + this.input.value = query; + this.openModal(false); + } + }, + isOpened: function () { + return this.search.classList.contains("block"); + }, + toggleModal: function () { + if (this.isOpened()) { + this.closeModal(); + } else { + this.openModal(); + } + }, + openModal: function (reset) { + this.search.classList.remove("hidden") + this.search.classList.add("block") + if (reset) { + this.input.value = ""; + } + document.body.classList.add("overflow-hidden"); + this.doSearch(this.input.value, false); + this.input.focus(); + }, + closeModal: function (reset) { + this.search.classList.remove("block") + this.search.classList.add("hidden") + if (reset) { + this.input.value = ""; + } + document.body.classList.remove("overflow-hidden"); + this.input.blur(); + }, + changeUrl: function (params) { + let baseURL = `${location.protocol}//${location.host}${location.pathname}`; + let newURL = baseURL; + if (params !== "" && params != null) { + newURL = `${baseURL}?${params}` + } + history.pushState({}, null, newURL); + }, + fetchData: async function () { + const _this = this; + if (_this.index !== undefined) { + return; + } + return await fetch(_this.dbPath) + .then(resp => resp.text()) + .then(resp => { + _this.db = JSON.parse(resp); + _this.index = new Fuse(_this.db, { + // isCaseSensitive: false, + includeScore: false, + shouldSort: true, + includeMatches: true, + matchEmptyQuery: true, + // minMatchCharLength: 1, + // location: 0, + threshold: 0.1, + // distance: 100, + // useExtendedSearch: false, + // ignoreLocation: true, + // ignoreFieldNorm: false, + keys: [ + {name: 'title', weight: 12}, + {name: 'tags', weight: 6}, + {name: 'categories', weight: 6}, + {name: 'sections.h3.title', weight: 5}, + {name: 'sections.h2.title', weight: 1}, + {name: 'intro', weight: 1}, + ] + }); + // default return all + _this.lastSearch.whole = _this.db.map((doc, idx) => ({ + item: doc, + score: 1, + refIndex: idx + })); + return resp; + }); + }, + doSearch: async function (value, history) { + const _this = this; + await _this.fetchData().then(() => { + if (this.lastSearch.query === value && this.lastSearch.resp !== undefined) { + this.renderResult(this.lastSearch.resp); + this.renderPreview(); + } else { + let results = value !== "" ? _this.index.search(`${value}`) : _this.lastSearch.whole; + if (history) { + this.changeUrl(value === "" ? null : `q=${value}`); + } + this.lastSearch.query = value; + this.lastSearch.resp = results; + this.renderResult(results); + this.renderPreview(); + } + }); + }, + addEventToResult: function () { + const _this = this; + this.result.querySelectorAll("li").forEach(function (li) { + li.addEventListener("mouseover", function (e) { + if (_this.isOpened()) { + _this.result.querySelectorAll("li").forEach(function (e) { + e.classList.remove("active") + e.classList.add("inactive") + }); + this.classList.remove("inactive"); + this.classList.add("active"); + _this.renderPreview(); + } + }); + }); + }, + mark: function (text, matches) { + let result = [] + let pair = matches.shift() + // Build the formatted string + for (let i = 0; i < text.length; i++) { + let char = text.charAt(i) + if (pair && i === pair[0]) { + result.push('') + } + result.push(char) + if (pair && i === pair[1]) { + result.push('') + pair = matches.shift() + } + } + return result.join(''); + }, + highlightMatches: function (result) { + if (result.matches === undefined || result.item.length === 0) { + return; + } + const _this = this; + result.item = JSON.parse(JSON.stringify(_this.db[result.refIndex])) + result.matches.forEach(m => { + switch (m.key) { + case "tags": + case "categories": + result.item[m.key][m.refIndex] = _this.mark(m.value, m.indices); + break; + case "sections.h2.title": + result.item["sections"][m.refIndex]["h2"]["title"] = _this.mark(m.value, m.indices); + break; + case "sections.h3.title": + let currLength = 0; + let lastLength = 0; + for (let i = 0; i < result.item["sections"].length; i++) { + let subArr = result.item["sections"][i]["h3"]; + currLength += subArr.length; + if (m.refIndex >= lastLength && m.refIndex < currLength) { + result.item["sections"][i]["h3"][m.refIndex - lastLength]["title"] = _this.mark(m.value, m.indices) + break; + } + lastLength += subArr.length; + } + break; + default: + result.item[m.key] = _this.mark(m.value, m.indices); + break; + } + }) + }, + renderResult: function (results) { + const _this = this; + let liHtml = ""; + let index = 0; + results.forEach(function (result, itemIndex) { + let activeStr = "inactive"; + if (index === 0) { + activeStr = "active"; + } + + _this.highlightMatches(result); + + let hit = result.item; + let tags = hit.tags || []; + let categories = hit.categories || []; + let tagStr = tags.join("•"); + let tagsHTML = ""; + if (tagStr !== "") { + tagsHTML = `
${tagStr}` + } + liHtml += `
  • + +
    +
    + +
    +
    + ${hit.title} +
    + ${categories[0]} + ${tagsHTML} +
    +
    +
    + +
    +
  • `; + index++; + }); + + this.result.innerHTML = liHtml; + this.addEventToResult(); + }, + renderPreview() { + const active = document.querySelector("li.active"); + if (active == null) { + return; + } + const _this = this; + let itemIndex = active.getAttribute("data-index"); + let hit = _this.lastSearch.resp[parseInt(itemIndex)].item; + + let olInnerHtml = ""; + + hit.sections.forEach(function (section, index, array) { + let h3HTML = ""; + section.h3.forEach(function (h3) { + let anchor = hit.path + h3.anchor; + h3HTML += `${h3.title.toLowerCase()}` + }); + let anchor = hit.path + section.h2.anchor; + olInnerHtml += `
  • + ${section.h2.title} +
  • + ${h3HTML}`; + }) + + + document.querySelector(".preview-panel").innerHTML = `
    +
    +
    + +
    +
    +
    ${hit.title}
    +
      ${olInnerHtml}
    +
    `; + } + }; + + // Start search + Utils.externalLibrary(Utils.LIBRARY.fuse).then(() => new searchEngine().start()); +});