Major rewrite (!) (#2130)
This commit is contained in:
parent
bf059536c6
commit
44bdd413fb
11
.babelrc
11
.babelrc
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"presets": [
|
|
||||||
[
|
|
||||||
"@babel/preset-env",
|
|
||||||
{
|
|
||||||
"useBuiltIns": "entry",
|
|
||||||
"targets": "> 2%"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
node_modules
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
/* eslint-env node */
|
||||||
|
module.exports = {
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'plugin:astro/recommended',
|
||||||
|
'prettier'
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
browser: true // enables window, document, etc
|
||||||
|
},
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
plugins: ['@typescript-eslint'],
|
||||||
|
root: true,
|
||||||
|
ignorePatterns: ['dist/**'],
|
||||||
|
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['*.test.ts'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['*.astro'],
|
||||||
|
parser: 'astro-eslint-parser',
|
||||||
|
parserOptions: {
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
extraFileExtensions: ['.astro']
|
||||||
|
}
|
||||||
|
// rules: {
|
||||||
|
// override/add rules settings here, such as:
|
||||||
|
// "astro/no-set-html-directive": "error"
|
||||||
|
// },
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -1 +0,0 @@
|
||||||
yarn.lock binary
|
|
Before Width: | Height: | Size: 504 KiB After Width: | Height: | Size: 504 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
@ -1,22 +1,35 @@
|
||||||
name: Build and test
|
name: Run tests
|
||||||
on: [push, pull_request]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
|
|
||||||
- name: Use Ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
with:
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .node-version
|
||||||
|
- uses: pnpm/action-setup@v3
|
||||||
|
with: { run_install: false }
|
||||||
|
|
||||||
- run: yarn install --frozen-lockfile
|
# https://github.com/pnpm/action-setup?tab=readme-ov-file#use-cache-to-reduce-installation-time
|
||||||
- run: yarn build
|
- name: Get pnpm store directory
|
||||||
- run: yarn test
|
shell: bash
|
||||||
- run: yarn test:smoke
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- name: Install playwright browsers
|
||||||
|
run: pnpm playwright install --with-deps chromium
|
||||||
|
- name: Run tests
|
||||||
|
run: pnpm run ci
|
||||||
|
|
|
@ -1,11 +1,26 @@
|
||||||
_output
|
# build output
|
||||||
_site
|
dist/
|
||||||
.jekyll-metadata
|
# generated types
|
||||||
/node_modules
|
.astro/
|
||||||
/vendor
|
|
||||||
.idea/
|
|
||||||
.cache/
|
|
||||||
|
|
||||||
# Generated by 'yarn dev'
|
# dependencies
|
||||||
/_includes/2017/critical/*
|
node_modules/
|
||||||
/assets/packed/*
|
|
||||||
|
# logs
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
|
||||||
|
# environment variables
|
||||||
|
.env
|
||||||
|
.env.production
|
||||||
|
|
||||||
|
# macOS-specific files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# playwright
|
||||||
|
test-results
|
||||||
|
|
15
.gitpod.yml
15
.gitpod.yml
|
@ -1,15 +0,0 @@
|
||||||
image: gitpod/workspace-full
|
|
||||||
|
|
||||||
ports:
|
|
||||||
- port: 4001
|
|
||||||
onOpen: open-preview
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- init: yarn install && bundle install
|
|
||||||
command: env PORT=4001 yarn run dev
|
|
||||||
|
|
||||||
github:
|
|
||||||
# Prebuild the docker image for gitpod - https://www.gitpod.io/docs/prebuilds/
|
|
||||||
prebuilds:
|
|
||||||
# enable for the master/default branch
|
|
||||||
master: true
|
|
|
@ -1 +1 @@
|
||||||
18.19.1
|
20.11.1
|
|
@ -0,0 +1,6 @@
|
||||||
|
src/sass/vendor
|
||||||
|
vendor
|
||||||
|
.cache
|
||||||
|
dist
|
||||||
|
*.md
|
||||||
|
pnpm-lock.yaml
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"semi": false,
|
"semi": false,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"jsxSingleQuote": true,
|
"trailingComma": "none",
|
||||||
"trailingComma": "none"
|
"plugins": ["prettier-plugin-astro"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"*.md": {
|
|
||||||
"type": "cheat",
|
|
||||||
"template": [
|
|
||||||
"---",
|
|
||||||
"title: {basename|capitalize}",
|
|
||||||
"category: Ruby",
|
|
||||||
"layout: 2017/sheet",
|
|
||||||
"updated: DATE",
|
|
||||||
"---"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"recommendations": ["astro-build.astro-vscode"],
|
||||||
|
"unwantedRecommendations": []
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"command": "./node_modules/.bin/astro dev",
|
||||||
|
"name": "Development server",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "node-terminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"Test snip": {
|
||||||
|
"prefix": ["about"],
|
||||||
|
"body": "Copyright. Foo Corp 2028",
|
||||||
|
"description": "Adds copyright...",
|
||||||
|
"scope": "markdown"
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ Or using a button:<br>
|
||||||
|
|
||||||
To preview the website you need to first build it then you can navigate to file that you are trying to contribute and preview directly.
|
To preview the website you need to first build it then you can navigate to file that you are trying to contribute and preview directly.
|
||||||
|
|
||||||
<img src='_docs/images/gitpod_preview_tut.png' width=828 height=459/>
|
<img src='.github/images/gitpod_preview_tut.png' width=828 height=459/>
|
||||||
|
|
||||||
## Starting a local instance
|
## Starting a local instance
|
||||||
|
|
||||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -1,11 +0,0 @@
|
||||||
FROM ruby:2.7.1
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
|
||||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
||||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
|
||||||
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
|
|
||||||
nodejs \
|
|
||||||
yarn \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
RUN mkdir -p /app
|
|
||||||
WORKDIR /app
|
|
9
Gemfile
9
Gemfile
|
@ -1,5 +1,4 @@
|
||||||
source 'https://rubygems.org'
|
source "https://rubygems.org"
|
||||||
gem 'webrick'
|
gem "minitest"
|
||||||
gem 'github-pages', group: :jekyll_plugins
|
gem "kramdown"
|
||||||
gem 'json'
|
gem "kramdown-parser-gfm"
|
||||||
gem 'csv'
|
|
||||||
|
|
288
Gemfile.lock
288
Gemfile.lock
|
@ -1,293 +1,21 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (7.1.3)
|
kramdown (2.4.0)
|
||||||
base64
|
|
||||||
bigdecimal
|
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
||||||
connection_pool (>= 2.2.5)
|
|
||||||
drb
|
|
||||||
i18n (>= 1.6, < 2)
|
|
||||||
minitest (>= 5.1)
|
|
||||||
mutex_m
|
|
||||||
tzinfo (~> 2.0)
|
|
||||||
addressable (2.8.6)
|
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
|
||||||
base64 (0.2.0)
|
|
||||||
bigdecimal (3.1.6)
|
|
||||||
coffee-script (2.4.1)
|
|
||||||
coffee-script-source
|
|
||||||
execjs
|
|
||||||
coffee-script-source (1.11.1)
|
|
||||||
colorator (1.1.0)
|
|
||||||
commonmarker (0.23.10)
|
|
||||||
concurrent-ruby (1.2.3)
|
|
||||||
connection_pool (2.4.1)
|
|
||||||
csv (3.2.8)
|
|
||||||
dnsruby (1.70.0)
|
|
||||||
simpleidn (~> 0.2.1)
|
|
||||||
drb (2.2.0)
|
|
||||||
ruby2_keywords
|
|
||||||
em-websocket (0.5.3)
|
|
||||||
eventmachine (>= 0.12.9)
|
|
||||||
http_parser.rb (~> 0)
|
|
||||||
ethon (0.16.0)
|
|
||||||
ffi (>= 1.15.0)
|
|
||||||
eventmachine (1.2.7)
|
|
||||||
execjs (2.9.1)
|
|
||||||
faraday (2.9.0)
|
|
||||||
faraday-net_http (>= 2.0, < 3.2)
|
|
||||||
faraday-net_http (3.1.0)
|
|
||||||
net-http
|
|
||||||
ffi (1.16.3)
|
|
||||||
forwardable-extended (2.6.0)
|
|
||||||
gemoji (3.0.1)
|
|
||||||
github-pages (228)
|
|
||||||
github-pages-health-check (= 1.17.9)
|
|
||||||
jekyll (= 3.9.3)
|
|
||||||
jekyll-avatar (= 0.7.0)
|
|
||||||
jekyll-coffeescript (= 1.1.1)
|
|
||||||
jekyll-commonmark-ghpages (= 0.4.0)
|
|
||||||
jekyll-default-layout (= 0.1.4)
|
|
||||||
jekyll-feed (= 0.15.1)
|
|
||||||
jekyll-gist (= 1.5.0)
|
|
||||||
jekyll-github-metadata (= 2.13.0)
|
|
||||||
jekyll-include-cache (= 0.2.1)
|
|
||||||
jekyll-mentions (= 1.6.0)
|
|
||||||
jekyll-optional-front-matter (= 0.3.2)
|
|
||||||
jekyll-paginate (= 1.1.0)
|
|
||||||
jekyll-readme-index (= 0.3.0)
|
|
||||||
jekyll-redirect-from (= 0.16.0)
|
|
||||||
jekyll-relative-links (= 0.6.1)
|
|
||||||
jekyll-remote-theme (= 0.4.3)
|
|
||||||
jekyll-sass-converter (= 1.5.2)
|
|
||||||
jekyll-seo-tag (= 2.8.0)
|
|
||||||
jekyll-sitemap (= 1.4.0)
|
|
||||||
jekyll-swiss (= 1.0.0)
|
|
||||||
jekyll-theme-architect (= 0.2.0)
|
|
||||||
jekyll-theme-cayman (= 0.2.0)
|
|
||||||
jekyll-theme-dinky (= 0.2.0)
|
|
||||||
jekyll-theme-hacker (= 0.2.0)
|
|
||||||
jekyll-theme-leap-day (= 0.2.0)
|
|
||||||
jekyll-theme-merlot (= 0.2.0)
|
|
||||||
jekyll-theme-midnight (= 0.2.0)
|
|
||||||
jekyll-theme-minimal (= 0.2.0)
|
|
||||||
jekyll-theme-modernist (= 0.2.0)
|
|
||||||
jekyll-theme-primer (= 0.6.0)
|
|
||||||
jekyll-theme-slate (= 0.2.0)
|
|
||||||
jekyll-theme-tactile (= 0.2.0)
|
|
||||||
jekyll-theme-time-machine (= 0.2.0)
|
|
||||||
jekyll-titles-from-headings (= 0.5.3)
|
|
||||||
jemoji (= 0.12.0)
|
|
||||||
kramdown (= 2.3.2)
|
|
||||||
kramdown-parser-gfm (= 1.1.0)
|
|
||||||
liquid (= 4.0.4)
|
|
||||||
mercenary (~> 0.3)
|
|
||||||
minima (= 2.5.1)
|
|
||||||
nokogiri (>= 1.13.6, < 2.0)
|
|
||||||
rouge (= 3.26.0)
|
|
||||||
terminal-table (~> 1.4)
|
|
||||||
github-pages-health-check (1.17.9)
|
|
||||||
addressable (~> 2.3)
|
|
||||||
dnsruby (~> 1.60)
|
|
||||||
octokit (~> 4.0)
|
|
||||||
public_suffix (>= 3.0, < 5.0)
|
|
||||||
typhoeus (~> 1.3)
|
|
||||||
html-pipeline (2.14.3)
|
|
||||||
activesupport (>= 2)
|
|
||||||
nokogiri (>= 1.4)
|
|
||||||
http_parser.rb (0.8.0)
|
|
||||||
i18n (1.14.1)
|
|
||||||
concurrent-ruby (~> 1.0)
|
|
||||||
jekyll (3.9.3)
|
|
||||||
addressable (~> 2.4)
|
|
||||||
colorator (~> 1.0)
|
|
||||||
em-websocket (~> 0.5)
|
|
||||||
i18n (>= 0.7, < 2)
|
|
||||||
jekyll-sass-converter (~> 1.0)
|
|
||||||
jekyll-watch (~> 2.0)
|
|
||||||
kramdown (>= 1.17, < 3)
|
|
||||||
liquid (~> 4.0)
|
|
||||||
mercenary (~> 0.3.3)
|
|
||||||
pathutil (~> 0.9)
|
|
||||||
rouge (>= 1.7, < 4)
|
|
||||||
safe_yaml (~> 1.0)
|
|
||||||
jekyll-avatar (0.7.0)
|
|
||||||
jekyll (>= 3.0, < 5.0)
|
|
||||||
jekyll-coffeescript (1.1.1)
|
|
||||||
coffee-script (~> 2.2)
|
|
||||||
coffee-script-source (~> 1.11.1)
|
|
||||||
jekyll-commonmark (1.4.0)
|
|
||||||
commonmarker (~> 0.22)
|
|
||||||
jekyll-commonmark-ghpages (0.4.0)
|
|
||||||
commonmarker (~> 0.23.7)
|
|
||||||
jekyll (~> 3.9.0)
|
|
||||||
jekyll-commonmark (~> 1.4.0)
|
|
||||||
rouge (>= 2.0, < 5.0)
|
|
||||||
jekyll-default-layout (0.1.4)
|
|
||||||
jekyll (~> 3.0)
|
|
||||||
jekyll-feed (0.15.1)
|
|
||||||
jekyll (>= 3.7, < 5.0)
|
|
||||||
jekyll-gist (1.5.0)
|
|
||||||
octokit (~> 4.2)
|
|
||||||
jekyll-github-metadata (2.13.0)
|
|
||||||
jekyll (>= 3.4, < 5.0)
|
|
||||||
octokit (~> 4.0, != 4.4.0)
|
|
||||||
jekyll-include-cache (0.2.1)
|
|
||||||
jekyll (>= 3.7, < 5.0)
|
|
||||||
jekyll-mentions (1.6.0)
|
|
||||||
html-pipeline (~> 2.3)
|
|
||||||
jekyll (>= 3.7, < 5.0)
|
|
||||||
jekyll-optional-front-matter (0.3.2)
|
|
||||||
jekyll (>= 3.0, < 5.0)
|
|
||||||
jekyll-paginate (1.1.0)
|
|
||||||
jekyll-readme-index (0.3.0)
|
|
||||||
jekyll (>= 3.0, < 5.0)
|
|
||||||
jekyll-redirect-from (0.16.0)
|
|
||||||
jekyll (>= 3.3, < 5.0)
|
|
||||||
jekyll-relative-links (0.6.1)
|
|
||||||
jekyll (>= 3.3, < 5.0)
|
|
||||||
jekyll-remote-theme (0.4.3)
|
|
||||||
addressable (~> 2.0)
|
|
||||||
jekyll (>= 3.5, < 5.0)
|
|
||||||
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
|
|
||||||
rubyzip (>= 1.3.0, < 3.0)
|
|
||||||
jekyll-sass-converter (1.5.2)
|
|
||||||
sass (~> 3.4)
|
|
||||||
jekyll-seo-tag (2.8.0)
|
|
||||||
jekyll (>= 3.8, < 5.0)
|
|
||||||
jekyll-sitemap (1.4.0)
|
|
||||||
jekyll (>= 3.7, < 5.0)
|
|
||||||
jekyll-swiss (1.0.0)
|
|
||||||
jekyll-theme-architect (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-cayman (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-dinky (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-hacker (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-leap-day (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-merlot (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-midnight (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-minimal (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-modernist (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-primer (0.6.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-github-metadata (~> 2.9)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-slate (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-tactile (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-theme-time-machine (0.2.0)
|
|
||||||
jekyll (> 3.5, < 5.0)
|
|
||||||
jekyll-seo-tag (~> 2.0)
|
|
||||||
jekyll-titles-from-headings (0.5.3)
|
|
||||||
jekyll (>= 3.3, < 5.0)
|
|
||||||
jekyll-watch (2.2.1)
|
|
||||||
listen (~> 3.0)
|
|
||||||
jemoji (0.12.0)
|
|
||||||
gemoji (~> 3.0)
|
|
||||||
html-pipeline (~> 2.2)
|
|
||||||
jekyll (>= 3.0, < 5.0)
|
|
||||||
json (2.7.1)
|
|
||||||
kramdown (2.3.2)
|
|
||||||
rexml
|
rexml
|
||||||
kramdown-parser-gfm (1.1.0)
|
kramdown-parser-gfm (1.1.0)
|
||||||
kramdown (~> 2.0)
|
kramdown (~> 2.0)
|
||||||
liquid (4.0.4)
|
minitest (5.18.0)
|
||||||
listen (3.8.0)
|
rexml (3.2.5)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
|
||||||
mercenary (0.3.6)
|
|
||||||
minima (2.5.1)
|
|
||||||
jekyll (>= 3.5, < 5.0)
|
|
||||||
jekyll-feed (~> 0.9)
|
|
||||||
jekyll-seo-tag (~> 2.1)
|
|
||||||
minitest (5.21.2)
|
|
||||||
mutex_m (0.2.0)
|
|
||||||
net-http (0.4.1)
|
|
||||||
uri
|
|
||||||
nokogiri (1.16.1-aarch64-linux)
|
|
||||||
racc (~> 1.4)
|
|
||||||
nokogiri (1.16.1-arm-linux)
|
|
||||||
racc (~> 1.4)
|
|
||||||
nokogiri (1.16.1-arm64-darwin)
|
|
||||||
racc (~> 1.4)
|
|
||||||
nokogiri (1.16.1-x86-linux)
|
|
||||||
racc (~> 1.4)
|
|
||||||
nokogiri (1.16.1-x86_64-darwin)
|
|
||||||
racc (~> 1.4)
|
|
||||||
nokogiri (1.16.1-x86_64-linux)
|
|
||||||
racc (~> 1.4)
|
|
||||||
octokit (4.25.1)
|
|
||||||
faraday (>= 1, < 3)
|
|
||||||
sawyer (~> 0.9)
|
|
||||||
pathutil (0.16.2)
|
|
||||||
forwardable-extended (~> 2.6)
|
|
||||||
public_suffix (4.0.7)
|
|
||||||
racc (1.7.3)
|
|
||||||
rb-fsevent (0.11.2)
|
|
||||||
rb-inotify (0.10.1)
|
|
||||||
ffi (~> 1.0)
|
|
||||||
rexml (3.2.6)
|
|
||||||
rouge (3.26.0)
|
|
||||||
ruby2_keywords (0.0.5)
|
|
||||||
rubyzip (2.3.2)
|
|
||||||
safe_yaml (1.0.5)
|
|
||||||
sass (3.7.4)
|
|
||||||
sass-listen (~> 4.0.0)
|
|
||||||
sass-listen (4.0.0)
|
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
|
||||||
sawyer (0.9.2)
|
|
||||||
addressable (>= 2.3.5)
|
|
||||||
faraday (>= 0.17.3, < 3)
|
|
||||||
simpleidn (0.2.1)
|
|
||||||
unf (~> 0.1.4)
|
|
||||||
terminal-table (1.8.0)
|
|
||||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
||||||
typhoeus (1.4.1)
|
|
||||||
ethon (>= 0.9.0)
|
|
||||||
tzinfo (2.0.6)
|
|
||||||
concurrent-ruby (~> 1.0)
|
|
||||||
unf (0.1.4)
|
|
||||||
unf_ext
|
|
||||||
unf_ext (0.0.9.1)
|
|
||||||
unicode-display_width (1.8.0)
|
|
||||||
uri (0.13.0)
|
|
||||||
webrick (1.8.1)
|
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
aarch64-linux
|
aarch64-linux-android
|
||||||
arm-linux
|
|
||||||
arm64-darwin
|
|
||||||
x86-linux
|
|
||||||
x86_64-darwin
|
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
csv
|
kramdown
|
||||||
github-pages
|
kramdown-parser-gfm
|
||||||
json
|
minitest
|
||||||
webrick
|
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.5.3
|
2.4.1
|
||||||
|
|
21
LICENSE
21
LICENSE
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 Rico Sta. Cruz and contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
19
Makefile
19
Makefile
|
@ -1,19 +0,0 @@
|
||||||
npmbin := ./node_modules/.bin
|
|
||||||
PORT ?= 3000
|
|
||||||
HOST ?= 127.0.0.1
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo
|
|
||||||
@echo Makefile targets
|
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
||||||
@echo
|
|
||||||
|
|
||||||
# Builds intermediate files. Needs a _site built first though
|
|
||||||
update: _site
|
|
||||||
|
|
||||||
# Builds _site
|
|
||||||
_site:
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
dev:
|
|
||||||
yarn dev
|
|
|
@ -4,16 +4,10 @@
|
||||||
TL;DR for developer documentation - a ridiculous collection of cheatsheets
|
TL;DR for developer documentation - a ridiculous collection of cheatsheets
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p align='center'>
|
|
||||||
<a href='https://travis-ci.org/rstacruz/cheatsheets'><img src='https://travis-ci.org/rstacruz/cheatsheets.svg?branch=master' alt='See test builds'></a>
|
|
||||||
<a href='https://github.com/rstacruz/cheatsheets/actions?query=workflow%3ADeploy'><img src='https://github.com/rstacruz/cheatsheets/workflows/Deploy/badge.svg' alt='GitHub pages deploy status'></a>
|
|
||||||
<a href='https://app.netlify.com/sites/devhints-cheatsheets/deploys'><img src='https://api.netlify.com/api/v1/badges/c66b2a8b-5147-4243-9bf6-e2143126f6c8/deploy-status' alt='Netlify deploy status'></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<p align='center'>
|
<p align='center'>
|
||||||
<a href='https://devhints.io/'><img src='_docs/images/screenshot.png' width=600></a>
|
<a href='https://devhints.io/'><img src='.github/images/screenshot.png' width=600></a>
|
||||||
<br>
|
<br>
|
||||||
✨ <b><a href='https://devhints.io/'>devhints.io</a></b> ✨
|
✨ <b><a href='https://devhints.io/'>devhints.io</a></b> ✨
|
||||||
</p>
|
</p>
|
||||||
|
|
67
_config.yml
67
_config.yml
|
@ -1,67 +0,0 @@
|
||||||
# Jekyll configuration
|
|
||||||
|
|
||||||
whitelist:
|
|
||||||
- jekyll-redirect-from
|
|
||||||
- jekyll-github-metadata
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
- jekyll-redirect-from
|
|
||||||
- jekyll-github-metadata
|
|
||||||
|
|
||||||
exclude:
|
|
||||||
- .babelrc
|
|
||||||
- .cache
|
|
||||||
- CNAME
|
|
||||||
- CONTRIBUTING.md
|
|
||||||
- cssnano.config.js
|
|
||||||
- docker_compose.yml
|
|
||||||
- Dockerfile
|
|
||||||
- Gemfile
|
|
||||||
- Gemfile.lock
|
|
||||||
- Makefile
|
|
||||||
- node_modules
|
|
||||||
- package.json
|
|
||||||
- package-lock.json
|
|
||||||
- postcss.config.js
|
|
||||||
- README.md
|
|
||||||
- vendor
|
|
||||||
- webpack.config.js
|
|
||||||
- yarn-error.log
|
|
||||||
- yarn.lock
|
|
||||||
|
|
||||||
# Markdown
|
|
||||||
|
|
||||||
highlighter: false
|
|
||||||
markdown: kramdown
|
|
||||||
kramdown:
|
|
||||||
input: GFM
|
|
||||||
hard_wrap: false
|
|
||||||
parse_block_html: true
|
|
||||||
syntax_highlighter_opts:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
# Defaults
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
- scope:
|
|
||||||
path: ''
|
|
||||||
type: pages
|
|
||||||
values:
|
|
||||||
layout: 'default'
|
|
||||||
og_type: article
|
|
||||||
type: article
|
|
||||||
category: 'Others'
|
|
||||||
excerpt_separator: '<!--more-->'
|
|
||||||
prism_languages: []
|
|
||||||
|
|
||||||
# Site info
|
|
||||||
|
|
||||||
url: https://devhints.io
|
|
||||||
title: Devhints.io cheatsheets
|
|
||||||
|
|
||||||
# GitHub metadata
|
|
||||||
# https://help.github.com/articles/repository-metadata-on-github-pages/
|
|
||||||
|
|
||||||
repository: rstacruz/cheatsheets
|
|
||||||
include:
|
|
||||||
- _redirects
|
|
|
@ -1,2 +0,0 @@
|
||||||
# No trailing slash
|
|
||||||
preview_host: https://assets.devhints.io/previews
|
|
|
@ -1,2 +0,0 @@
|
||||||
enabled: true
|
|
||||||
src: https://cdn.carbonads.com/carbon.js?serve=CE7IK5QM&placement=devhintsio
|
|
|
@ -1,30 +0,0 @@
|
||||||
enabled: true
|
|
||||||
names:
|
|
||||||
- Analytics
|
|
||||||
- Ansible
|
|
||||||
- Apps
|
|
||||||
- C-like
|
|
||||||
- CLI
|
|
||||||
- CSS
|
|
||||||
- Databases
|
|
||||||
- Devops
|
|
||||||
- Elixir
|
|
||||||
- Git
|
|
||||||
- HTML
|
|
||||||
- Java & JVM
|
|
||||||
- JavaScript
|
|
||||||
- JavaScript libraries
|
|
||||||
- Jekyll
|
|
||||||
- Ledger
|
|
||||||
- Markup
|
|
||||||
- macOS
|
|
||||||
- Node.js
|
|
||||||
- PHP
|
|
||||||
- Python
|
|
||||||
- Rails
|
|
||||||
- React
|
|
||||||
- Ruby
|
|
||||||
- Ruby libraries
|
|
||||||
- Vim
|
|
||||||
- Fitness
|
|
||||||
- Others
|
|
|
@ -1,2 +0,0 @@
|
||||||
enabled: true
|
|
||||||
# token: "c2c8bc62-c275-4c7a-a304-74335c5a1cd0"
|
|
|
@ -1,51 +0,0 @@
|
||||||
home:
|
|
||||||
title: "Rico's cheatsheets"
|
|
||||||
tagline: |
|
|
||||||
Hey! I'm <a href='https://ricostacruz.com'>@rstacruz</a> and this is a modest collection of cheatsheets I've written.
|
|
||||||
|
|
||||||
top_nav:
|
|
||||||
title: Devhints.io
|
|
||||||
edit: Edit
|
|
||||||
edit_on_github: Edit this page on GitHub
|
|
||||||
|
|
||||||
sheet:
|
|
||||||
suffix: cheatsheet
|
|
||||||
|
|
||||||
social_list:
|
|
||||||
default_description: 'Ridiculous collection of web development cheatsheets'
|
|
||||||
description: 'The ultimate cheatsheet for TITLE.'
|
|
||||||
facebook_share: Share on Facebook
|
|
||||||
twitter_share: Share on Twitter
|
|
||||||
|
|
||||||
related_posts_callout:
|
|
||||||
description: Over SIZE curated cheatsheets, by developers for developers.
|
|
||||||
link: Devhints home
|
|
||||||
|
|
||||||
related_posts_group:
|
|
||||||
top: Top cheatsheets
|
|
||||||
other: Other cheatsheets
|
|
||||||
category: Other CATEGORY cheatsheets
|
|
||||||
|
|
||||||
search_form:
|
|
||||||
default_placeholder: Search SIZE+ cheatsheets
|
|
||||||
home_placeholder: Search...
|
|
||||||
prefix: devhints.io
|
|
||||||
|
|
||||||
comments_area:
|
|
||||||
suffix: for this cheatsheet.
|
|
||||||
link: 'Write yours!'
|
|
||||||
|
|
||||||
not_found:
|
|
||||||
title: Not found
|
|
||||||
description: Sorry, we don't have a cheatsheet for this yet. Try searching!
|
|
||||||
home: Back to home
|
|
||||||
|
|
||||||
announcement:
|
|
||||||
# id: 2017-10-26-twitter
|
|
||||||
id: 2023-12-14
|
|
||||||
title: |
|
|
||||||
We're on Twitter ♥️
|
|
||||||
body: |
|
|
||||||
Follow [@devhints](https://twitter.com/devhints) on X/Twitter for daily "today I learned" snippets.
|
|
||||||
|
|
||||||
Also: I've started a new blog with some insights on web development. Have a look! [**ricostacruz.com/posts**](https://ricostacruz.com/posts?utm_source=devhints)
|
|
|
@ -1,2 +0,0 @@
|
||||||
enabled: true
|
|
||||||
host: devhints.disqus.com
|
|
|
@ -1,4 +0,0 @@
|
||||||
enabled: true
|
|
||||||
hostname: devhints.io
|
|
||||||
id: "G-N7TC6B227L"
|
|
||||||
# id: "UA-106902774-1"
|
|
|
@ -1,10 +0,0 @@
|
||||||
{% if site.data.content.announcement %}
|
|
||||||
<div class='announcements-list'>
|
|
||||||
<div class='announcements-item item -hide' data-js-dismissable='{"id":"{{ site.data.content.announcement.id }}"}'>
|
|
||||||
<h3 class='title'>{{ site.data.content.announcement.title }}</h3>
|
|
||||||
<div class='body'>{{ site.data.content.announcement.body | markdownify }}</div>
|
|
||||||
<button data-js-dismiss class='close'></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
<script type='application/ld+json'>
|
|
||||||
{
|
|
||||||
"@context": "http://schema.org",
|
|
||||||
"@type": "NewsArticle",
|
|
||||||
"mainEntityOfPage": {
|
|
||||||
"@type": "WebPage",
|
|
||||||
"@id": "https://google.com/article"
|
|
||||||
},
|
|
||||||
"headline": {{ meta_title | jsonify }},
|
|
||||||
"image": [ {{ meta_image | jsonify }} ],
|
|
||||||
"description": {{ meta_description | jsonify }}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script type='application/ld+json'>
|
|
||||||
{
|
|
||||||
"@context": "http://schema.org",
|
|
||||||
"@type": "BreadcrumbList",
|
|
||||||
"itemListElement": [{
|
|
||||||
"@type": "ListItem",
|
|
||||||
"position": 1,
|
|
||||||
"item": {
|
|
||||||
"@id": "{{ site.url }}/#{{ page.category | downcase | replace: ' ', '-' }}",
|
|
||||||
"name": "{{ page.category }}"
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
"@type": "ListItem",
|
|
||||||
"position": 2,
|
|
||||||
"item": {
|
|
||||||
"@id": {{ page_url | jsonify }},
|
|
||||||
"name": {{ page.title | jsonify }}
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
</script>
|
|
|
@ -1,22 +0,0 @@
|
||||||
{% assign identifier = include.page.url | remove: '.html' | remove_first: '/' %}
|
|
||||||
{% if site.data.disqus.enabled %}
|
|
||||||
<section class='comments-area' id='comments' data-js-no-preview>
|
|
||||||
<div class='container'>
|
|
||||||
<details class='comments-details'>
|
|
||||||
<summary>
|
|
||||||
<strong class='count'>
|
|
||||||
<span class='disqus-comment-count' data-disqus-identifier="{{ identifier }}" data-disqus-url='{{ site.url }}/{{ identifier }}'>0 Comments</span>
|
|
||||||
</strong>
|
|
||||||
<span class='suffix'>{{ site.data.content.comments_area.suffix }}</span>
|
|
||||||
<span class='fauxlink'>{{ site.data.content.comments_area.link }}</span>
|
|
||||||
</summary>
|
|
||||||
<div class='comments-section'>
|
|
||||||
<div class='comments'>
|
|
||||||
<div id='disqus_thread'></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
<noscript data-js-disqus='{"host":"{{ site.data.disqus.host }}","url":"{{ site.url }}/{{ identifier }}","identifier":"{{ identifier }}"}'></noscript>
|
|
||||||
</section>
|
|
||||||
{% endif %}
|
|
|
@ -1,3 +0,0 @@
|
||||||
<script>{% include 2017/critical/critical.js %}</script>
|
|
||||||
<script src='{{base}}/assets/packed/app.js?t={{ timestamp }}'></script>
|
|
||||||
{% for lang in page.prism_languages %}<script src='https://cdn.jsdelivr.net/npm/prismjs@1.6.0/components/prism-{{lang}}.min.js'></script>{% endfor %}
|
|
|
@ -1,24 +0,0 @@
|
||||||
{% include meta.html %}
|
|
||||||
{% include polyfills.html %}
|
|
||||||
|
|
||||||
<!-- critical css -->
|
|
||||||
{% if include.critical == 'home'
|
|
||||||
%}<style id='critical-css'>{% include 2017/critical/critical-home.css %}</style>{%
|
|
||||||
endif
|
|
||||||
%}{%
|
|
||||||
if include.critical == 'sheet'
|
|
||||||
%}<style id='critical-css'>{% include 2017/critical/critical-sheet.css %}</style>{%
|
|
||||||
endif %}
|
|
||||||
|
|
||||||
<!-- allow disabling critical CSS optimization by passing ?nocrit=1 -->
|
|
||||||
<script id='critical-css-disable'>if (~window.location.search.indexOf('nocrit')){;[].slice.call(document.querySelectorAll('#critical-css')).map(function(e){e.parentNode.removeChild(e)})}</script>
|
|
||||||
|
|
||||||
<!-- deferred css -->
|
|
||||||
<script id='deferred-css'>;(function(links){(requestAnimationFrame||mozRequestAnimationFrame||webkitRequestAnimationFrame||msRequestAnimationFrame||(function(fn){window.addEventListener('load',fn)}))(function(){var h=document.getElementsByTagName('head')[0],l,i;for (i=0;i<links.length;i++){l=document.createElement('link');l.rel='stylesheet';l.href=links[i];h.appendChild(l);}})})([
|
|
||||||
'https://fonts.googleapis.com/css?family=Cousine',
|
|
||||||
'{{base}}/assets/2017/style.css?t={{ timestamp }}'
|
|
||||||
])</script>
|
|
||||||
<noscript id='deferred-css-fallback'>
|
|
||||||
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Cousine'>
|
|
||||||
<link rel='stylesheet' href='{{base}}/assets/2017/style.css?t={{ timestamp }}'>
|
|
||||||
</noscript>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<div class='HeadlinePub' role='complementary'>
|
|
||||||
<script async src='{{ site.data.carbon.src }}' id="_carbonads_js"></script>
|
|
||||||
<span class='placeholder -one'></span>
|
|
||||||
<span class='placeholder -two'></span>
|
|
||||||
<span class='placeholder -three'></span>
|
|
||||||
<span class='placeholder -four'></span>
|
|
||||||
</div>
|
|
|
@ -1,41 +0,0 @@
|
||||||
{% comment %}
|
|
||||||
|
|
||||||
This partial assigns these variables:
|
|
||||||
|
|
||||||
meta_image: "https://assets.devhints.io/previews/react.jpg"
|
|
||||||
meta_description: "A comprehensive cheatsheet for React."
|
|
||||||
meta_title: "React cheatsheet"
|
|
||||||
depth: "1"
|
|
||||||
base: "./"
|
|
||||||
timestamp: "293048189123"
|
|
||||||
page_url: "https://devhints.io/react"
|
|
||||||
|
|
||||||
It emits some blank lines because Jekyll, lol.
|
|
||||||
|
|
||||||
{% endcomment %}
|
|
||||||
|
|
||||||
{% assign depth = page.url | split: '/' | size | minus: 1 %}
|
|
||||||
|
|
||||||
{% assign base = '' %}
|
|
||||||
{% if depth <= 1 %}{% assign base = '.' %}
|
|
||||||
{% elsif depth == 2 %}{% assign base = '..' %}
|
|
||||||
{% elsif depth == 3 %}{% assign base = '../..' %}
|
|
||||||
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}
|
|
||||||
|
|
||||||
{% assign timestamp = site.time | date: "%Y%m%d%H%M%S" %}
|
|
||||||
|
|
||||||
{% if site.data.assets.preview_host %}{% capture meta_image %}{%
|
|
||||||
if page.url == '/'
|
|
||||||
%}{{ site.data.assets.preview_host }}/index.jpg?t={{ timestamp }}{%
|
|
||||||
else
|
|
||||||
%}{{ site.data.assets.preview_host }}{{ include.page.url | remove: '.html' }}.jpg?t={{ timestamp }}{%
|
|
||||||
endif
|
|
||||||
%}{% endcapture %}{% endif %}
|
|
||||||
|
|
||||||
{% capture meta_title %}{% include values/title.html page=include.page %}{% endcapture %}
|
|
||||||
{% assign meta_title = meta_title | strip_newlines %}
|
|
||||||
|
|
||||||
{% capture meta_description %}{% include values/description.html page=include.page %}{% endcapture %}
|
|
||||||
{% assign meta_description = meta_description | strip_newlines %}
|
|
||||||
|
|
||||||
{% capture page_url %}{{ site.url }}{{ page.url | remove: '.html' }}{% endcapture %}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{% assign slug = include.page.url | remove: '.html' | remove_first: '/' %}
|
|
||||||
<a class='{{ include.class }} -item-{{ slug }}'
|
|
||||||
href="{{base}}{{ include.page.url | remove: '.html' }}"
|
|
||||||
data-js-searchable-item='{"slug":"{{ slug }}","category":"{{ include.page.category }}"}'>
|
|
||||||
<span class='info'>
|
|
||||||
<code class='slug'>{{ slug }}</code>
|
|
||||||
|
|
||||||
{% if include.page.layout == '2017/sheet' %}
|
|
||||||
<abbr class='attribute-peg -new-layout hint--bottom' data-hint='New layout!'><span></span></abbr>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<span class='title'>{{ include.page.title }} {{ include.page.redirect_to }}</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<li class='{{ include.class }}'>
|
|
||||||
<a href='{{ base }}{{ include.page.url | remove: '.html' }}'>
|
|
||||||
<strong>{{ include.page.title }}</strong>
|
|
||||||
<span>
|
|
||||||
cheatsheet
|
|
||||||
|
|
||||||
{% if include.page.layout == '2017/sheet' %}
|
|
||||||
<abbr class='attribute-peg -new-layout hint--bottom' data-hint='New layout!'><span></span></abbr>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
|
@ -1,62 +0,0 @@
|
||||||
{% assign category_pages = site.pages
|
|
||||||
| where: "category", include.page.category
|
|
||||||
| where_exp: "page", "page.url != include.page.url"
|
|
||||||
| where_exp: "page", "page.deprecated != true"
|
|
||||||
| where_exp: "page", "page.redirect_to == null"
|
|
||||||
| sort: "weight", "last"
|
|
||||||
%}
|
|
||||||
{% assign top_pages = site.pages
|
|
||||||
| where_exp: "page", "page.url != include.page.url"
|
|
||||||
| where_exp: "page", "page.deprecated != true"
|
|
||||||
| sort: "weight", "last"
|
|
||||||
%}
|
|
||||||
{% assign size = site.pages | size %}
|
|
||||||
<footer class='related-posts-area' id='related' data-js-no-preview>
|
|
||||||
<div class='container'>
|
|
||||||
<div class='related-posts-section'>
|
|
||||||
<div class='callout'>
|
|
||||||
<a class='related-posts-callout' href='{{ base }}'>
|
|
||||||
<div class='text'>
|
|
||||||
<i class='icon'></i>
|
|
||||||
|
|
||||||
<span class='description'>
|
|
||||||
{{ site.data.content.related_posts_callout.description | replace: "SIZE", size }}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class='push-button -dark'>
|
|
||||||
{{ site.data.content.related_posts_callout.link }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='group'>
|
|
||||||
<div class='related-posts-group'>
|
|
||||||
{% if include.page.category == 'Others' %}
|
|
||||||
<h3>{{ site.data.content.related_posts_group.other }}</h3>
|
|
||||||
{% else %}
|
|
||||||
<h3>{{ site.data.content.related_posts_group.category | replace: "CATEGORY", include.page.category }}</h3>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<ul class='related-post-list'>
|
|
||||||
{% for page in category_pages limit: 6 %}
|
|
||||||
{% include 2017/related-posts-item.html page=page class='item related-post-item' %}
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='group'>
|
|
||||||
<div class='related-posts-group'>
|
|
||||||
<h3>{{ site.data.content.related_posts_group.top }}</h3>
|
|
||||||
|
|
||||||
<ul class='related-post-list'>
|
|
||||||
{% for page in top_pages limit: 6 %}
|
|
||||||
{% include 2017/related-posts-item.html page=page class='item related-post-item' %}
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<footer class='search-footer' data-js-no-preview>
|
|
||||||
<div class='container'>
|
|
||||||
<div class='search-footer-section'>
|
|
||||||
<div class='search'>
|
|
||||||
{% include 2017/search-form.html class="-small" %}
|
|
||||||
</div>
|
|
||||||
<div class='links'>
|
|
||||||
<a class='home-button' href='{{ base }}'><i></i></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
|
@ -1,19 +0,0 @@
|
||||||
<form
|
|
||||||
{% if include.live %}data-js-search-form{% endif %}
|
|
||||||
class='search' action='{{ base }}' method='get'>
|
|
||||||
<label class='search-box {{ include.class }}'>
|
|
||||||
<span class='prefix'>{{ site.data.content.search_form.prefix }}</span>
|
|
||||||
<span class='sep'>/</span>
|
|
||||||
<input name='q'
|
|
||||||
type='text'
|
|
||||||
{% if include.live %}
|
|
||||||
{% assign placeholder = site.data.content.search_form.home_placeholder | replace: "%{size}", size %}
|
|
||||||
autofocus data-js-search-input
|
|
||||||
placeholder='{{ placeholder }}'
|
|
||||||
{% else %}
|
|
||||||
{% assign size = site.pages | size %}
|
|
||||||
{% assign placeholder = site.data.content.search_form.default_placeholder | replace: "SIZE", size %}
|
|
||||||
placeholder='{{ placeholder }}'
|
|
||||||
{% endif %}>
|
|
||||||
</label>
|
|
||||||
</form>
|
|
|
@ -1,35 +0,0 @@
|
||||||
{% comment %}
|
|
||||||
Params:
|
|
||||||
- noshare
|
|
||||||
- noedit
|
|
||||||
- noback
|
|
||||||
{% endcomment %}
|
|
||||||
<nav class='top-nav' data-js-no-preview role='navigation'>
|
|
||||||
<div class='container'>
|
|
||||||
{% unless include.noback %}
|
|
||||||
<div class='left'>
|
|
||||||
<a class='home back-button' href='{{base}}'></a>
|
|
||||||
</div>
|
|
||||||
{% endunless %}
|
|
||||||
|
|
||||||
<a class='brand' href='{{base}}'>
|
|
||||||
{{ site.data.content.top_nav.title }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{% unless include.noshare %}
|
|
||||||
<div class='actions'>
|
|
||||||
{% include social-list.html class="social page-actions" page=include.page %}
|
|
||||||
|
|
||||||
{% unless include.noedit %}
|
|
||||||
<ul class='page-actions'>
|
|
||||||
<li class='link github -button hint--bottom' data-hint='{{ site.data.content.top_nav.edit_on_github }}'>
|
|
||||||
<a href='{{ site.github.repository_url }}/blob/master/{{ page.path | remove: '.html' }}'>
|
|
||||||
<span class='text -visible'>{{ site.data.content.top_nav.edit }}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endunless %}
|
|
||||||
</div>
|
|
||||||
{% endunless %}
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<div class="about-the-site">
|
|
||||||
<div class="container">
|
|
||||||
<p class='blurb'>
|
|
||||||
<strong><a href="{{ base }}">{{ site.title }}</a></strong> is a collection of cheatsheets I've written over the years.
|
|
||||||
Suggestions and corrections? <a href='https://github.com/rstacruz/cheatsheets/issues/907'>Send them in</a>.
|
|
||||||
<i class='fleuron'></i>
|
|
||||||
I'm <a href="http://ricostacruz.com">Rico Sta. Cruz</a>.
|
|
||||||
Check out my <a href="http://ricostacruz.com/posts">Today I learned blog</a> for more.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% if page.url != '/index.html' %}
|
|
||||||
<p class='back'>
|
|
||||||
<a class='big-button -back -slim' href='.#toc'></a>
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,14 +0,0 @@
|
||||||
{% include about-the-site.html %}
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script>
|
|
||||||
|
|
||||||
{% comment %}<!-- https://github.com/highlightjs/cdn-release/tree/master/build/languages -->{% endcomment %}
|
|
||||||
{% for lang in page.hljs_languages %}
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/languages/{{lang}}.min.js"></script>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<script src="https://cdn.rawgit.com/rstacruz/unorphan/v1.0.1/index.js"></script>
|
|
||||||
<script>hljs.initHighlightingOnLoad()</script>
|
|
||||||
<script>unorphan('h1, h2, h3, p, li, .unorphan')</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang='en' class='no-js {{ page.html_class }}'>
|
|
||||||
<head>
|
|
||||||
{% include meta.html %}
|
|
||||||
{% include polyfills.html %}
|
|
||||||
<style>html{opacity:0}</style>
|
|
||||||
<link rel="stylesheet" href="{{base}}/assets/2015/style.css?t={{ timestamp }}">
|
|
||||||
<link href="{{base}}/assets/style.css?t={{ timestamp }}" rel="stylesheet" />
|
|
||||||
<link href="{{base}}/assets/print.css?t={{ timestamp }}" rel="stylesheet" media="print" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class='all'>
|
|
|
@ -1,85 +0,0 @@
|
||||||
{% include 2017/meta-vars.html page=page %}
|
|
||||||
<meta charset='utf-8'>
|
|
||||||
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
|
||||||
<link href='{{ base }}/assets/favicon.png' rel='shortcut icon'>
|
|
||||||
<meta content='{{ page.url | escape }}' name='app:pageurl'>
|
|
||||||
|
|
||||||
{% if meta_title %}
|
|
||||||
<title>{{ meta_title | escape }}</title>
|
|
||||||
<meta content='{{ meta_title | escape }}' property='og:title'>
|
|
||||||
<meta content='{{ meta_title | escape }}' property='twitter:title'>
|
|
||||||
<meta content='{{ page.og_type | default: "article" | escape }}' property='og:type'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if meta_image %}
|
|
||||||
<meta content='{{ meta_image | escape }}' property='og:image'>
|
|
||||||
<meta content='{{ meta_image | escape }}' property='twitter:image'>
|
|
||||||
<meta content='900' property='og:image:width'>
|
|
||||||
<meta content='471' property='og:image:height'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if meta_description %}
|
|
||||||
<meta content="{{ meta_description | escape }}" name="description">
|
|
||||||
<meta content="{{ meta_description | escape }}" property="og:description">
|
|
||||||
<meta content="{{ meta_description | escape }}" property="twitter:description">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<link rel="canonical" href="{{ page_url | escape }}">
|
|
||||||
<meta name="og:url" content="{{ page_url | escape }}">
|
|
||||||
{% if page.url == '/' %}
|
|
||||||
<link rel="prefetch" href="{{ site.url | escape }}">
|
|
||||||
<link rel="prerender" href="{{ site.url | escape }}">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.author %}
|
|
||||||
{% for author in site.authors | where: "name", page.author %}
|
|
||||||
<meta content='{{ author.name }}' name='author'>
|
|
||||||
{% if author.ogp %}
|
|
||||||
<meta content='{{ author.ogp }}' property='article:author'>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if site.title %}
|
|
||||||
<meta content='{{ site.title | escape }}' property='og:site_name'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if site.facebook.app_id %}
|
|
||||||
<meta content='{{ site.facebook.app_id | escape }}' property='fb:app_id'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if site.facebook.admin %}
|
|
||||||
<meta content='{{ site.facebook.admin | escape }}' property='fb:admins'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.date %}
|
|
||||||
<meta content='{{ page.date | date: "%Y-%m-%d" }}' property='article:published_date'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.category %}
|
|
||||||
<meta content='{{ page.category | escape }}' property='article:section'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.tags %}
|
|
||||||
{% for tag in page.tags %}
|
|
||||||
<meta content='{{ tag | escape }}' property='article:tag'>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if site.data.google_analytics.enabled %}
|
|
||||||
<script async src='https://www.googletagmanager.com/gtag/js?id={{ site.data.google_analytics.id }}'></script>
|
|
||||||
<script>
|
|
||||||
{% comment %} if(~location.hostname.indexOf('{{site.data.google_analytics.hostname}}')){ {% endcomment %}
|
|
||||||
window.dataLayer=window.dataLayer||[];
|
|
||||||
function gtag(){dataLayer.push(arguments)};
|
|
||||||
gtag('js',new Date());
|
|
||||||
gtag('config','{{ site.data.google_analytics.id }}');
|
|
||||||
</script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if depth %}
|
|
||||||
<meta property='page:depth' content='{{depth}}'>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
|
|
||||||
<script>(function(H){H.className=H.className.replace(/\bNoJs\b/,'WithJs')})(document.documentElement)</script>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<script>(function(d,s){if(window.Promise&&[].includes&&Object.assign&&window.Map)return;var js,sc=d.getElementsByTagName(s)[0];js=d.createElement(s);js.src='https://cdn.polyfill.io/v2/polyfill.min.js';sc.parentNode.insertBefore(js, sc);}(document,'script'))</script>
|
|
||||||
|
|
||||||
<!--[if lt IE 9]>{%comment%}
|
|
||||||
{%endcomment%}<script src='https://cdnjs.cloudflare.com/ajax/libs/nwmatcher/1.2.5/nwmatcher.min.js'></script>{%comment%}
|
|
||||||
{%endcomment%}<script src='https://cdnjs.cloudflare.com/ajax/libs/json2/20140204/json2.js'></script>{%comment%}
|
|
||||||
{%endcomment%}<script src='https://cdn.rawgit.com/gisu/selectivizr/1.0.3/selectivizr.js'></script>{%comment%}
|
|
||||||
{%endcomment%}<script src='https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js'></script>{%comment%}
|
|
||||||
{%endcomment%}<script src='https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js'></script>{%comment%}
|
|
||||||
{%endcomment%}<![endif]-->
|
|
|
@ -1,6 +0,0 @@
|
||||||
<div class='site-header'>
|
|
||||||
<div class='container'>
|
|
||||||
This is <a href="."><em>{{ site.title }}</em></a> — a collection of cheatsheets I've written.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
{% if include.page.type == 'home' %}
|
|
||||||
{% assign description = site.data.content.social_list.default_description %}
|
|
||||||
{% else %}
|
|
||||||
{% assign description = site.data.content.social_list.description | replace: "TITLE", include.page.title %}
|
|
||||||
{% endif %}
|
|
||||||
<ul class="social-list {{ include.class }}">
|
|
||||||
<li class="facebook link hint--bottom" data-hint="{{ site.data.content.social_list.facebook_share }}"><a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url | uri_escape }}{{ include.page.url | uri_escape }}" target="share"><span class="text"></span></a></li>
|
|
||||||
<li class="twitter link hint--bottom" data-hint="{{ site.data.content.social_list.twitter_share }}"><a href="https://twitter.com/intent/tweet?text={{ description | uri_escape }}%20{{ site.url | uri_escape }}{{ include.page.url | uri_escape }}" target="share"><span class="text"></span></a></li>
|
|
||||||
{% comment %}
|
|
||||||
<li class="googleplus link hint--bottom" data-hint="Share on Google Plus"><a href="https://plus.google.com/share?url={{ site.url }}{{ include.page.url }}" target="share"><span class="text">+1</span></a></li>-->
|
|
||||||
{% endcomment %}
|
|
||||||
</ul>
|
|
|
@ -1,17 +0,0 @@
|
||||||
{%
|
|
||||||
if page.description and page.intro
|
|
||||||
%}{{ page.description }} {{ page.intro | markdownify | strip_html }}{%
|
|
||||||
elsif page.description
|
|
||||||
%}{{ page.description }} · One-page guide to {{ page.title }}{%
|
|
||||||
elsif page.keywords and page.intro
|
|
||||||
%}{{ page.keywords | join: ' · ' }} · {{ page.intro | markdownify | strip_html }}{%
|
|
||||||
elsif page.keywords
|
|
||||||
%}{{ page.keywords | join: ' · ' }} · One-page guide to {{ page.title }}{%
|
|
||||||
elsif page.intro
|
|
||||||
%}One-page guide to {{ page.title }}: usage, examples, and more. {{ page.intro | markdownify | strip_html }}{%
|
|
||||||
elsif page.type == 'article'
|
|
||||||
%}The one-page guide to {{ page.title }}: usage, examples, links, snippets, and more.{%
|
|
||||||
else
|
|
||||||
%}The one-page guide to {{ page.title }}: usage, examples, links, snippets, and more.{%
|
|
||||||
endif
|
|
||||||
%}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{%
|
|
||||||
if page.full_title
|
|
||||||
%}{{ page.full_title }}{%
|
|
||||||
elsif page.type == 'article'
|
|
||||||
%}{{ page.title }} cheatsheet{%
|
|
||||||
elsif page.title
|
|
||||||
%}{{ page.title }}{%
|
|
||||||
else
|
|
||||||
%}{{ site.title }}{%
|
|
||||||
endif
|
|
||||||
%}
|
|
|
@ -1,78 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html class='NoJs' lang='en'><head>
|
|
||||||
|
|
||||||
{% assign featured_pages = site.pages
|
|
||||||
| where_exp: "page", "page.tags contains 'Featured'"
|
|
||||||
%}
|
|
||||||
{% assign recent_pages = site.pages
|
|
||||||
| where_exp: "page", "page.updated"
|
|
||||||
| sort: "updated", "first"
|
|
||||||
%}
|
|
||||||
{% include 2017/head.html critical='home' %}
|
|
||||||
|
|
||||||
</head><body class='UseCompactHeader HighlightPubFirstLine'>
|
|
||||||
|
|
||||||
{% include 2017/top-nav.html page=page is_home=true noedit=true noback=true %}
|
|
||||||
|
|
||||||
<div class='body-area -slim'>
|
|
||||||
<div class='site-header' role='banner'>
|
|
||||||
<h1>
|
|
||||||
{{ site.data.content.home.title }}
|
|
||||||
</h1>
|
|
||||||
<p>
|
|
||||||
{{ site.data.content.home.tagline }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% include 2017/search-form.html live=true %}
|
|
||||||
|
|
||||||
{% if site.data.carbon.enabled %}
|
|
||||||
<div class='pubbox'>
|
|
||||||
{% include 2017/headline-pub.html %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='pages-list' role='main'>
|
|
||||||
{% for page in featured_pages %}
|
|
||||||
{% include 2017/pages-list-item.html page=page class='item top-sheet' %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<h2 class='category item' data-js-searchable-header>
|
|
||||||
<span>Recently updated</span>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
{% for page in recent_pages reversed %}
|
|
||||||
{% if forloop.index <= 18 %}
|
|
||||||
{% include 2017/pages-list-item.html page=page class='article item' %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
|
|
||||||
{% for category in site.data.categories.names %}
|
|
||||||
<h2 class='category item' id='{{ category | downcase | replace: " ", "-" }}' data-js-searchable-header>
|
|
||||||
<span>{{ category }}</span>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
{% for page in site.pages %}
|
|
||||||
{% if page.category == category %}
|
|
||||||
{% if page.title %}
|
|
||||||
{% include 2017/pages-list-item.html page=page class='article item' %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<div class='message item missing-message'>
|
|
||||||
<h3>See something missing?</h3>
|
|
||||||
<p>
|
|
||||||
<a class='push-button' href='{{ site.github.repository_url }}/issues/907'>Request cheatsheet</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include 2017/announcements-list.html %}
|
|
||||||
|
|
||||||
{% include 2017/foot.html %}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,26 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang='en'><head>
|
|
||||||
|
|
||||||
{% include 2017/head.html %}
|
|
||||||
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
{% include 2017/top-nav.html page=page noshare=true %}
|
|
||||||
|
|
||||||
<div class='body-area -slim'>
|
|
||||||
<div class='site-header'>
|
|
||||||
<h1>{{ site.data.content.not_found.title }}</h1>
|
|
||||||
<p>{{ site.data.content.not_found.description }}</p>
|
|
||||||
|
|
||||||
{% include 2017/search-form.html %}
|
|
||||||
|
|
||||||
<p class='action'>
|
|
||||||
<a class='push-button' href='./'>{{ site.data.content.not_found.home }}</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include 2017/foot.html %}
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,54 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html class='NoJs' lang='en'><head>
|
|
||||||
|
|
||||||
{% include 2017/head.html critical='sheet' %}
|
|
||||||
{% include 2017/article-schema.html page=page %}
|
|
||||||
|
|
||||||
</head><body class='UseCompactHeader HighlightPubFirstLine'>
|
|
||||||
|
|
||||||
{% include 2017/top-nav.html page=page %}
|
|
||||||
|
|
||||||
<div class='body-area'>
|
|
||||||
<header class='main-heading -center' role='banner'>
|
|
||||||
<h1 class='h1'>{{ page.title }} <em>{{ site.data.content.sheet.suffix }}</em></h1>
|
|
||||||
|
|
||||||
<div class='pubbox' data-js-no-preview>
|
|
||||||
{% if site.data.carbon.enabled %}
|
|
||||||
{% include 2017/headline-pub.html %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{% if page.tags contains 'WIP' %}
|
|
||||||
<aside class='notice-box'>
|
|
||||||
This page is a work in progress. You can help by <a href='{{ site.github.repository_url }}/blob/master/{{ page.path | remove: '.html' }}'>suggesting edits</a>!
|
|
||||||
</aside>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.deprecated_by %}
|
|
||||||
<aside class='notice-box'>
|
|
||||||
<strong>Deprecated:</strong> This guide covers an older version.
|
|
||||||
<a href='{{ base }}{{ page.deprecated_by }}'>A newer version is available here.</a>
|
|
||||||
</aside>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if page.intro %}
|
|
||||||
<div class='intro-content MarkdownBody'>
|
|
||||||
{{ page.intro | markdownify }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<main class='post-content MarkdownBody' data-js-main-body data-js-anchors role='main'>
|
|
||||||
{{ content }}
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='pre-footer' data-js-no-preview><i class='icon'></i></div>
|
|
||||||
|
|
||||||
{% include 2017/comments-area.html page=page %}
|
|
||||||
{% include 2017/search-footer.html %}
|
|
||||||
{% include 2017/related-posts.html page=page %}
|
|
||||||
{% include 2017/foot.html %}
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1 +0,0 @@
|
||||||
{{content}}
|
|
|
@ -1,30 +0,0 @@
|
||||||
---
|
|
||||||
type: article
|
|
||||||
---
|
|
||||||
{% include head.html %}
|
|
||||||
{% include site-header.html %}
|
|
||||||
|
|
||||||
<div class='post-list -single -cheatsheet'>
|
|
||||||
<div class='post-item'>
|
|
||||||
{% include social-list.html page=page class="-collapse" %}
|
|
||||||
|
|
||||||
<div class='post-headline -cheatsheet'>
|
|
||||||
<p class='prelude'><span></span></p>
|
|
||||||
<h1><span>{{ page.title }}</span></h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if site.data.carbon.enabled %}
|
|
||||||
<div class='headline-pub'>
|
|
||||||
<script async src='{{ site.data.carbon.src }}' id="_carbonads_js"></script>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class='post-content -cheatsheet'>
|
|
||||||
{{ content }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include social-list.html page=page %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include foot.html %}
|
|
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
type: article
|
|
||||||
---
|
|
||||||
{% include head.html %}
|
|
||||||
{% include site-header.html %}
|
|
||||||
|
|
||||||
{% include 2017/article-schema.html page=page %}
|
|
||||||
|
|
||||||
<div class='post-list -single -cheatsheet'>
|
|
||||||
<div class='post-item'>
|
|
||||||
<div class='post-headline -cheatsheet'>
|
|
||||||
<p class='prelude'><span></span></p>
|
|
||||||
<h1><span>{{ page.title }}</span></h1>
|
|
||||||
|
|
||||||
<div class='pubbox'>
|
|
||||||
{% include 2017/headline-pub.html %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='post-content -cheatsheet'>
|
|
||||||
{{ content }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include social-list.html page=page %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include foot.html %}
|
|
|
@ -1,30 +0,0 @@
|
||||||
---
|
|
||||||
html_class: home
|
|
||||||
type: home
|
|
||||||
---
|
|
||||||
{% include head.html %}
|
|
||||||
{% include site-header.html %}
|
|
||||||
|
|
||||||
{% for category in site.data.categories.names %}
|
|
||||||
<div class='pages-header'>
|
|
||||||
<h2 id='{{ category | downcase | replace: " ", "-" }}'>{{ category }}</h2>
|
|
||||||
</div>
|
|
||||||
<div class='pages-list'>
|
|
||||||
{% for page in site.pages %}
|
|
||||||
{% if page.category == category %}
|
|
||||||
<a href="{{base}}{{ page.url }}">
|
|
||||||
<span class='title'>{{ page.title }}</span>
|
|
||||||
<span class='date'>{{ page.url | remove: '.html' | remove: '/' }}</span>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% if site.data.carbon.enabled %}
|
|
||||||
<div class='side-ad'>
|
|
||||||
<script async src='{{ site.data.carbon.src }}' id="_carbonads_js"></script>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% include foot.html %}
|
|
|
@ -1,11 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
{% assign target = page.redirect.to | remove: '.html' | replace: 'cheatsheets/cheatsheets', 'cheatsheets' %}
|
|
||||||
<html lang="en-US">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Redirecting…</title>
|
|
||||||
<link rel="canonical" href="{{ target }}">
|
|
||||||
<meta http-equiv="refresh" content="0; url={{ target }}">
|
|
||||||
<h1>Redirecting...</h1>
|
|
||||||
<a href="{{ target }}">Click here if you are not redirected.</a>
|
|
||||||
<script>location="{{ target }}"</script>
|
|
||||||
</html>
|
|
|
@ -1,3 +0,0 @@
|
||||||
// Base
|
|
||||||
@import '../_sass/2017/base/base.scss';
|
|
||||||
@import '../_sass/2017/base/fade.scss';
|
|
|
@ -1,30 +0,0 @@
|
||||||
// Prismjs
|
|
||||||
import 'prismjs'
|
|
||||||
import 'prismjs/plugins/line-highlight/prism-line-highlight.min.js'
|
|
||||||
import 'prismjs/components/prism-jsx.min.js'
|
|
||||||
import 'prismjs/components/prism-bash.min.js'
|
|
||||||
import 'prismjs/components/prism-scss.min.js'
|
|
||||||
import 'prismjs/components/prism-css.min.js'
|
|
||||||
import 'prismjs/components/prism-elixir.min.js'
|
|
||||||
import 'prismjs/components/prism-ruby.min.js'
|
|
||||||
|
|
||||||
// Initializers
|
|
||||||
import './initializers/prism'
|
|
||||||
import './initializers/onmount'
|
|
||||||
|
|
||||||
// Behaviors
|
|
||||||
import './behaviors/anchors'
|
|
||||||
import './behaviors/dismissable'
|
|
||||||
import './behaviors/dismiss'
|
|
||||||
import './behaviors/disqus'
|
|
||||||
import './behaviors/h3-section-list'
|
|
||||||
import './behaviors/main-body'
|
|
||||||
import './behaviors/no-preview'
|
|
||||||
import './behaviors/searchable-header'
|
|
||||||
import './behaviors/searchable-item'
|
|
||||||
import './behaviors/search-form'
|
|
||||||
import './behaviors/search-input'
|
|
||||||
|
|
||||||
// CSS
|
|
||||||
import 'prismjs/plugins/line-highlight/prism-line-highlight.css'
|
|
||||||
import 'hint.css/hint.min.css'
|
|
|
@ -1,46 +0,0 @@
|
||||||
import onmount from 'onmount'
|
|
||||||
import prepend from 'dom101/prepend'
|
|
||||||
|
|
||||||
const DEFAULTS = {
|
|
||||||
// select elements to put anchor on
|
|
||||||
rule: 'h2[id]',
|
|
||||||
// class name for anchor
|
|
||||||
className: 'local-anchor anchor',
|
|
||||||
// text of anchor
|
|
||||||
text: '#',
|
|
||||||
// append before or after innerText?
|
|
||||||
shouldAppend: false
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Behavior: Add local anchors
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-anchors]', function () {
|
|
||||||
const data = JSON.parse(this.getAttribute('data-js-anchors') || '{}')
|
|
||||||
const rules = Array.isArray(data)
|
|
||||||
? data.length
|
|
||||||
? data
|
|
||||||
: [DEFAULTS]
|
|
||||||
: [Object.assign({}, DEFAULTS, data)]
|
|
||||||
|
|
||||||
for (const { rule, className, text, shouldAppend } of rules) {
|
|
||||||
for (const el of this.querySelectorAll(rule)) {
|
|
||||||
if (!el.hasAttribute('id')) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
const id = el.getAttribute('id')
|
|
||||||
const anchor = document.createElement('a')
|
|
||||||
anchor.setAttribute('href', `#${id}`)
|
|
||||||
anchor.setAttribute('class', className)
|
|
||||||
anchor.innerText = String(text || DEFAULTS.text)
|
|
||||||
|
|
||||||
if (shouldAppend) {
|
|
||||||
el.appendChild(anchor)
|
|
||||||
} else {
|
|
||||||
prepend(el, anchor)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,22 +0,0 @@
|
||||||
import closest from 'dom101/closest'
|
|
||||||
import remove from 'dom101/remove'
|
|
||||||
import on from 'dom101/on'
|
|
||||||
import { getData } from '../helpers/data'
|
|
||||||
import onmount from 'onmount'
|
|
||||||
import * as Dismiss from '../helpers/dismiss'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dismiss button
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-dismiss]', function () {
|
|
||||||
const parent = closest(this, '[data-js-dismissable]')
|
|
||||||
const dismissable = getData(parent, 'js-dismissable')
|
|
||||||
const id = (dismissable && dismissable.id) || ''
|
|
||||||
|
|
||||||
on(this, 'click', (e) => {
|
|
||||||
Dismiss.setDismissed(id)
|
|
||||||
e.preventDefault()
|
|
||||||
if (parent) remove(parent)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,17 +0,0 @@
|
||||||
import onmount from 'onmount'
|
|
||||||
import remove from 'dom101/remove'
|
|
||||||
import removeClass from 'dom101/remove-class'
|
|
||||||
|
|
||||||
import { getData } from '../helpers/data'
|
|
||||||
import { isDismissed } from '../helpers/dismiss'
|
|
||||||
import { isPreview } from '../helpers/preview'
|
|
||||||
|
|
||||||
onmount('[data-js-dismissable]', function () {
|
|
||||||
const id = getData(this, 'js-dismissable').id || ''
|
|
||||||
|
|
||||||
if (isPreview() || isDismissed(id)) {
|
|
||||||
remove(this)
|
|
||||||
} else {
|
|
||||||
removeClass(this, '-hide')
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,32 +0,0 @@
|
||||||
import onmount from 'onmount'
|
|
||||||
import injectDisqus from '../helpers/inject_disqus'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delay disqus by some time. It's at the bottom of the page, there's no need
|
|
||||||
* for it to load fast. This will give more time to load more critical assets.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const DISQUS_DELAY = 100
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Injects Disqus onto the page.
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-disqus]', function () {
|
|
||||||
const data = JSON.parse(this.getAttribute('data-js-disqus'))
|
|
||||||
const $parent = this.parentNode
|
|
||||||
$parent.setAttribute('hidden', true)
|
|
||||||
|
|
||||||
window.disqus_config = function () {
|
|
||||||
this.page.url = data.url
|
|
||||||
this.page.identifier = data.identifier
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disqus takes a while to load, don't do it so eagerly.
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
setTimeout(() => {
|
|
||||||
injectDisqus(data.host)
|
|
||||||
$parent.removeAttribute('hidden')
|
|
||||||
}, DISQUS_DELAY)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,32 +0,0 @@
|
||||||
/* eslint-disable no-new */
|
|
||||||
|
|
||||||
import Isotope from 'isotope-layout'
|
|
||||||
import onmount from 'onmount'
|
|
||||||
import on from 'dom101/on'
|
|
||||||
import qsa from 'dom101/query-selector-all'
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Behavior: Isotope
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-h3-section-list]', function () {
|
|
||||||
const iso = new Isotope(this, {
|
|
||||||
itemSelector: '.h3-section',
|
|
||||||
transitionDuration: 0
|
|
||||||
})
|
|
||||||
|
|
||||||
const images = qsa('img', this)
|
|
||||||
|
|
||||||
images.forEach((image) => {
|
|
||||||
on(image, 'load', () => {
|
|
||||||
iso.layout()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// Insurance against weirdness on pages like devhints.io/vim, where the
|
|
||||||
// critical path CSS may look different from the final CSS (because of the
|
|
||||||
// tables).
|
|
||||||
on(window, 'load', () => {
|
|
||||||
iso.layout()
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,16 +0,0 @@
|
||||||
import remove from 'dom101/remove'
|
|
||||||
import onmount from 'onmount'
|
|
||||||
import addClass from 'dom101/add-class'
|
|
||||||
|
|
||||||
import { isPreview } from '../helpers/preview'
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Behavior: Things to remove when preview mode is on
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-no-preview]', function (b) {
|
|
||||||
if (isPreview()) {
|
|
||||||
remove(this)
|
|
||||||
addClass(document.documentElement, 'PreviewMode')
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,17 +0,0 @@
|
||||||
import onmount from 'onmount'
|
|
||||||
import on from 'dom101/on'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Submitting the search form
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-search-form]', function () {
|
|
||||||
on(this, 'submit', (e) => {
|
|
||||||
e.preventDefault()
|
|
||||||
|
|
||||||
const link = document.querySelector('a[data-search-index]:not([hidden])')
|
|
||||||
const href = link && link.getAttribute('href')
|
|
||||||
|
|
||||||
if (href) window.location = href
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,24 +0,0 @@
|
||||||
import onmount from 'onmount'
|
|
||||||
import * as Search from '../helpers/search'
|
|
||||||
import qs from '../helpers/qs'
|
|
||||||
import on from 'dom101/on'
|
|
||||||
|
|
||||||
onmount('[data-js-search-input]', function () {
|
|
||||||
on(this, 'input', () => {
|
|
||||||
const val = this.value
|
|
||||||
|
|
||||||
if (val === '') {
|
|
||||||
Search.showAll()
|
|
||||||
} else {
|
|
||||||
Search.show(val)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const query = (qs(window.location.search) || {}).q
|
|
||||||
if (query && query.length) {
|
|
||||||
this.value = query
|
|
||||||
setTimeout(() => {
|
|
||||||
Search.show(query)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,23 +0,0 @@
|
||||||
import onmount from 'onmount'
|
|
||||||
import { nextUntil } from '../helpers/dom'
|
|
||||||
import matches from 'dom101/matches'
|
|
||||||
|
|
||||||
// Ensure that search-index is set first
|
|
||||||
import './searchable-item'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Propagate item search indices to headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-searchable-header]', function () {
|
|
||||||
const els = nextUntil(this, '[data-js-searchable-header]').filter((el) =>
|
|
||||||
matches(el, '[data-search-index]')
|
|
||||||
)
|
|
||||||
|
|
||||||
const keywords = els
|
|
||||||
.map((n) => n.getAttribute('data-search-index'))
|
|
||||||
.join(' ')
|
|
||||||
.split(' ')
|
|
||||||
|
|
||||||
this.setAttribute('data-search-index', keywords.join(' '))
|
|
||||||
})
|
|
|
@ -1,13 +0,0 @@
|
||||||
import onmount from 'onmount'
|
|
||||||
import permutate from '../helpers/permutate'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets search indices (`data-search-index` attribute)
|
|
||||||
*/
|
|
||||||
|
|
||||||
onmount('[data-js-searchable-item]', function () {
|
|
||||||
const data = JSON.parse(this.getAttribute('data-js-searchable-item') || '{}')
|
|
||||||
const words = permutate(data)
|
|
||||||
|
|
||||||
this.setAttribute('data-search-index', words.join(' '))
|
|
||||||
})
|
|
|
@ -1,2 +0,0 @@
|
||||||
import 'sanitize.css'
|
|
||||||
import './critical-home.scss'
|
|
|
@ -1,16 +0,0 @@
|
||||||
@import './_utils.scss';
|
|
||||||
@import './_base.scss';
|
|
||||||
|
|
||||||
// Components
|
|
||||||
@import '../_sass/2017/components/attribute-peg.scss';
|
|
||||||
@import '../_sass/2017/components/announcements-item.scss';
|
|
||||||
@import '../_sass/2017/components/announcements-list.scss';
|
|
||||||
@import '../_sass/2017/components/back-button.scss';
|
|
||||||
@import '../_sass/2017/components/body-area.scss';
|
|
||||||
@import '../_sass/2017/components/headline-pub.scss';
|
|
||||||
@import '../_sass/2017/components/page-actions.scss';
|
|
||||||
@import '../_sass/2017/components/pages-list.scss';
|
|
||||||
@import '../_sass/2017/components/search-box.scss';
|
|
||||||
@import '../_sass/2017/components/site-header.scss';
|
|
||||||
@import '../_sass/2017/components/top-nav.scss';
|
|
||||||
@import '../_sass/2017/components/top-sheet.scss';
|
|
|
@ -1,2 +0,0 @@
|
||||||
import 'sanitize.css'
|
|
||||||
import './critical-sheet.scss'
|
|
|
@ -1,21 +0,0 @@
|
||||||
@import './_utils.scss';
|
|
||||||
@import './_base.scss';
|
|
||||||
|
|
||||||
// Markdown
|
|
||||||
@import '../_sass/2017/markdown/a-em.scss';
|
|
||||||
@import '../_sass/2017/markdown/code.scss';
|
|
||||||
@import '../_sass/2017/markdown/headings.scss';
|
|
||||||
@import '../_sass/2017/markdown/local-anchor.scss';
|
|
||||||
@import '../_sass/2017/markdown/p.scss';
|
|
||||||
@import '../_sass/2017/markdown/table.scss';
|
|
||||||
@import '../_sass/2017/markdown/ul.scss';
|
|
||||||
|
|
||||||
// Components
|
|
||||||
@import '../_sass/2017/components/back-button.scss';
|
|
||||||
@import '../_sass/2017/components/body-area.scss';
|
|
||||||
@import '../_sass/2017/components/h3-section.scss';
|
|
||||||
@import '../_sass/2017/components/h3-section-list.scss';
|
|
||||||
@import '../_sass/2017/components/headline-pub.scss';
|
|
||||||
@import '../_sass/2017/components/main-heading.scss';
|
|
||||||
@import '../_sass/2017/components/page-actions.scss';
|
|
||||||
@import '../_sass/2017/components/top-nav.scss';
|
|
|
@ -1,27 +0,0 @@
|
||||||
/*
|
|
||||||
* This is the "critical path" JavaScript that will be included INLINE on every
|
|
||||||
* page. Keep this as small as possible!
|
|
||||||
*/
|
|
||||||
|
|
||||||
import wrapify from './wrapify'
|
|
||||||
import addClass from 'dom101/add-class'
|
|
||||||
import on from 'dom101/on'
|
|
||||||
|
|
||||||
// Transform the main body markup to make it readable.
|
|
||||||
const body = document.querySelector('[data-js-main-body]')
|
|
||||||
|
|
||||||
if (body) {
|
|
||||||
wrapify(body)
|
|
||||||
addClass(body, '-wrapified')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Be "done" when we're done, or after a certain timeout.
|
|
||||||
on(window, 'load', done)
|
|
||||||
setTimeout(done, 5000)
|
|
||||||
|
|
||||||
let isDone
|
|
||||||
function done() {
|
|
||||||
if (isDone) return
|
|
||||||
addClass(document.documentElement, 'LoadDone')
|
|
||||||
isDone = true
|
|
||||||
}
|
|
|
@ -1,62 +0,0 @@
|
||||||
import matches from 'dom101/matches'
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Just like jQuery.append
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function appendMany(el, children) {
|
|
||||||
children.forEach((child) => {
|
|
||||||
el.appendChild(child)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Just like jQuery.nextUntil
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function nextUntil(el, selector) {
|
|
||||||
const nextEl = el.nextSibling
|
|
||||||
return nextUntilTick(nextEl, selector, [])
|
|
||||||
}
|
|
||||||
|
|
||||||
function nextUntilTick(el, selector, acc) {
|
|
||||||
if (!el) return acc
|
|
||||||
|
|
||||||
const isMatch = matches(el, selector)
|
|
||||||
if (isMatch) return acc
|
|
||||||
|
|
||||||
return nextUntilTick(el.nextSibling, selector, [...acc, el])
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Just like jQuery.before
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function before(reference, newNode) {
|
|
||||||
reference.parentNode.insertBefore(newNode, reference)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Like jQuery.children('selector')
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function findChildren(el, selector) {
|
|
||||||
return [].slice.call(el.children).filter((child) => matches(child, selector))
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a div
|
|
||||||
* @private
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* createDiv({ class: 'foo' })
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function createDiv(props) {
|
|
||||||
const d = document.createElement('div')
|
|
||||||
Object.keys(props).forEach((key) => {
|
|
||||||
d.setAttribute(key, props[key])
|
|
||||||
})
|
|
||||||
return d
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
/* blank */
|
|
|
@ -1,72 +0,0 @@
|
||||||
/**
|
|
||||||
* Permutates a searcheable item.
|
|
||||||
*
|
|
||||||
* permutate({
|
|
||||||
* slug: 'hello-world',
|
|
||||||
* category: 'greetings'
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
|
|
||||||
export default function permutate(data) {
|
|
||||||
let words = []
|
|
||||||
if (data.slug) {
|
|
||||||
words = words.concat(permutateString(data.slug))
|
|
||||||
}
|
|
||||||
if (data.category) {
|
|
||||||
words = words.concat(permutateString(data.category))
|
|
||||||
}
|
|
||||||
return words
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Permutates strings.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* permutateString('hi joe')
|
|
||||||
* => ['h', 'hi', 'j', 'jo', 'joe']
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function permutateString(str) {
|
|
||||||
let words = []
|
|
||||||
let inputs = splitwords(str)
|
|
||||||
|
|
||||||
inputs.forEach((word) => {
|
|
||||||
words = words.concat(permutateWord(word))
|
|
||||||
})
|
|
||||||
|
|
||||||
return words
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Permutates a word.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* permutateWord('hello')
|
|
||||||
* => ['h', 'he', 'hel', 'hell', 'hello']
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function permutateWord(str) {
|
|
||||||
let words = []
|
|
||||||
const len = str.length
|
|
||||||
for (var i = 1; i <= len; ++i) {
|
|
||||||
words.push(str.substr(0, i))
|
|
||||||
}
|
|
||||||
return words
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper for splitting to words.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* splitWords('Hello, world!')
|
|
||||||
* => ['hello', 'world']
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function splitwords(str) {
|
|
||||||
const words = str
|
|
||||||
.toLowerCase()
|
|
||||||
.split(/[ /\-_]/)
|
|
||||||
.filter((k) => k && k.length !== 0)
|
|
||||||
|
|
||||||
return words
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
import { splitwords } from './permutate'
|
|
||||||
import qsa from 'dom101/query-selector-all'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show everything.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* Search.showAll()
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function showAll() {
|
|
||||||
qsa('[data-search-index]').forEach((el) => {
|
|
||||||
el.removeAttribute('hidden')
|
|
||||||
el.style.removeProperty('display')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search for a given keyword.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* Search.show('hello')
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function show(val) {
|
|
||||||
const keywords = splitwords(val)
|
|
||||||
|
|
||||||
if (!keywords.length) return showAll()
|
|
||||||
|
|
||||||
const selectors = keywords
|
|
||||||
.map((k) => `[data-search-index~=${JSON.stringify(k)}]`)
|
|
||||||
.join('')
|
|
||||||
|
|
||||||
qsa('[data-search-index]').forEach((el) => {
|
|
||||||
el.setAttribute('hidden', true)
|
|
||||||
el.style.setProperty('display', "none")
|
|
||||||
})
|
|
||||||
|
|
||||||
qsa(selectors).forEach((el) => {
|
|
||||||
el.removeAttribute('hidden')
|
|
||||||
el.style.removeProperty('display')
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
import ready from 'dom101/ready'
|
|
||||||
import onmount from 'onmount'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Behavior: Wrapping
|
|
||||||
*/
|
|
||||||
|
|
||||||
ready(() => {
|
|
||||||
setTimeout(() => {
|
|
||||||
onmount()
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1 +0,0 @@
|
||||||
window.Prism = require('prismjs')
|
|
|
@ -1,274 +0,0 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
||||||
|
|
||||||
exports[`h2 + pre 1`] = `
|
|
||||||
<div>
|
|
||||||
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="h2-section"
|
|
||||||
>
|
|
||||||
<h2>
|
|
||||||
heading
|
|
||||||
</h2>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="h3-section language-markdown"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="body language-markdown"
|
|
||||||
>
|
|
||||||
<pre
|
|
||||||
class="language-markdown"
|
|
||||||
>
|
|
||||||
(code)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`h3 with class 1`] = `
|
|
||||||
<div>
|
|
||||||
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="h2-section -hello"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list -hello"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="h3-section -hello"
|
|
||||||
>
|
|
||||||
<h3
|
|
||||||
class="-hello"
|
|
||||||
>
|
|
||||||
install
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="body -hello"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
(install)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`multiple h2s 1`] = `
|
|
||||||
<div>
|
|
||||||
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="h2-section"
|
|
||||||
>
|
|
||||||
<h2>
|
|
||||||
multiple h2
|
|
||||||
</h2>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="h2-section"
|
|
||||||
>
|
|
||||||
<h2>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</h2>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="h3-section"
|
|
||||||
>
|
|
||||||
<h3>
|
|
||||||
install
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="body"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
(install)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="h3-section"
|
|
||||||
>
|
|
||||||
<h3>
|
|
||||||
usage
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="body"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
(usage)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="h2-section"
|
|
||||||
>
|
|
||||||
<h2>
|
|
||||||
getting started
|
|
||||||
</h2>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="h2-section"
|
|
||||||
>
|
|
||||||
<h2>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</h2>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="h3-section"
|
|
||||||
>
|
|
||||||
<h3>
|
|
||||||
first
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="body"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
(first)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="h3-section"
|
|
||||||
>
|
|
||||||
<h3>
|
|
||||||
second
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="body"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
(second)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`simple usage 1`] = `
|
|
||||||
<div>
|
|
||||||
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="h2-section"
|
|
||||||
>
|
|
||||||
<h2>
|
|
||||||
simple usage
|
|
||||||
</h2>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="h2-section"
|
|
||||||
>
|
|
||||||
<h2>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</h2>
|
|
||||||
<div
|
|
||||||
class="body h3-section-list"
|
|
||||||
data-js-h3-section-list=""
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="h3-section"
|
|
||||||
>
|
|
||||||
<h3>
|
|
||||||
install
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="body"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
(install)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="h3-section"
|
|
||||||
>
|
|
||||||
<h3>
|
|
||||||
usage
|
|
||||||
</h3>
|
|
||||||
<div
|
|
||||||
class="body"
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
(usage)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
|
@ -1,88 +0,0 @@
|
||||||
/* eslint-env jest */
|
|
||||||
import wrapify from '../index'
|
|
||||||
|
|
||||||
it(
|
|
||||||
'simple usage',
|
|
||||||
run(
|
|
||||||
`
|
|
||||||
<div>
|
|
||||||
<h2>simple usage<h2>
|
|
||||||
|
|
||||||
<h3>install</h3>
|
|
||||||
<p>(install)</p>
|
|
||||||
|
|
||||||
<h3>usage</h3>
|
|
||||||
<p>(usage)</p>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
(root) => {
|
|
||||||
expect(
|
|
||||||
root.querySelectorAll('.h2-section .h3-section-list .h3-section').length
|
|
||||||
).toEqual(2)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
it(
|
|
||||||
'h3 with class',
|
|
||||||
run(
|
|
||||||
`
|
|
||||||
<div>
|
|
||||||
<h3 class='-hello'>install</h3>
|
|
||||||
<p>(install)</p>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
(root) => {
|
|
||||||
expect(root.querySelectorAll('div.h3-section.-hello').length).toEqual(1)
|
|
||||||
expect(
|
|
||||||
root.querySelectorAll('div.h3-section-list.-hello').length
|
|
||||||
).toEqual(1)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
it(
|
|
||||||
'multiple h2s',
|
|
||||||
run(`
|
|
||||||
<div>
|
|
||||||
<h2>multiple h2<h2>
|
|
||||||
|
|
||||||
<h3>install</h3>
|
|
||||||
<p>(install)</p>
|
|
||||||
|
|
||||||
<h3>usage</h3>
|
|
||||||
<p>(usage)</p>
|
|
||||||
|
|
||||||
<h2>getting started<h2>
|
|
||||||
|
|
||||||
<h3>first</h3>
|
|
||||||
<p>(first)</p>
|
|
||||||
|
|
||||||
<h3>second</h3>
|
|
||||||
<p>(second)</p>
|
|
||||||
</div>
|
|
||||||
`)
|
|
||||||
)
|
|
||||||
|
|
||||||
function run(input, fn) {
|
|
||||||
return function () {
|
|
||||||
const div = document.createElement('div')
|
|
||||||
div.innerHTML = input
|
|
||||||
|
|
||||||
const root = div.children[0]
|
|
||||||
wrapify(root)
|
|
||||||
expect(root).toMatchSnapshot()
|
|
||||||
|
|
||||||
if (fn) fn(root)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
it(
|
|
||||||
'h2 + pre',
|
|
||||||
run(`
|
|
||||||
<div>
|
|
||||||
<h2>heading</h2>
|
|
||||||
<pre class='language-markdown'>(code)</pre>
|
|
||||||
</div>
|
|
||||||
`)
|
|
||||||
)
|
|
|
@ -1,119 +0,0 @@
|
||||||
import matches from 'dom101/matches'
|
|
||||||
import addClass from 'dom101/add-class'
|
|
||||||
import {
|
|
||||||
appendMany,
|
|
||||||
nextUntil,
|
|
||||||
before,
|
|
||||||
findChildren,
|
|
||||||
createDiv
|
|
||||||
} from '../helpers/dom'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wraps h2 sections into h2-section.
|
|
||||||
* Wraps h3 sections into h3-section.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
|
|
||||||
export default function wrapify(root) {
|
|
||||||
// These are your H2 sections. Returns a list of .h2-section nodes.
|
|
||||||
const sections = wrapifyH2(root)
|
|
||||||
|
|
||||||
// For each h2 section, wrap the H3's in them
|
|
||||||
sections.forEach((section) => {
|
|
||||||
const bodies = findChildren(section, '[data-js-h3-section-list]')
|
|
||||||
bodies.forEach((body) => {
|
|
||||||
wrapifyH3(body)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wraps h2 sections into h2-section.
|
|
||||||
* Creates and HTML structure like so:
|
|
||||||
*
|
|
||||||
* .h2-section
|
|
||||||
* h2.
|
|
||||||
* (title)
|
|
||||||
* .body.h3-section-list.
|
|
||||||
* (body goes here)
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function wrapifyH2(root) {
|
|
||||||
return groupify(root, {
|
|
||||||
tag: 'h2',
|
|
||||||
wrapperFn: () => createDiv({ class: 'h2-section' }),
|
|
||||||
bodyFn: () =>
|
|
||||||
createDiv({
|
|
||||||
class: 'body h3-section-list',
|
|
||||||
'data-js-h3-section-list': ''
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wraps h3 sections into h3-section.
|
|
||||||
* Creates and HTML structure like so:
|
|
||||||
*
|
|
||||||
* .h3-section
|
|
||||||
* h3.
|
|
||||||
* (title)
|
|
||||||
* .body.
|
|
||||||
* (body goes here)
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function wrapifyH3(root) {
|
|
||||||
return groupify(root, {
|
|
||||||
tag: 'h3',
|
|
||||||
wrapperFn: () => createDiv({ class: 'h3-section' }),
|
|
||||||
bodyFn: () => createDiv({ class: 'body' })
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Groups all headings (a `tag` selector) under wrappers like `.h2-section`
|
|
||||||
* (build by `wrapperFn()`).
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function groupify(el, { tag, wrapperFn, bodyFn }) {
|
|
||||||
const first = el.children[0]
|
|
||||||
let result = []
|
|
||||||
|
|
||||||
// Handle the markup before the first h2
|
|
||||||
if (first && !matches(first, tag)) {
|
|
||||||
const sibs = nextUntil(first, tag)
|
|
||||||
result.push(wrap(first, null, [first, ...sibs]))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find all h3's inside it
|
|
||||||
const children = findChildren(el, tag)
|
|
||||||
|
|
||||||
children.forEach((child) => {
|
|
||||||
const sibs = nextUntil(child, tag)
|
|
||||||
result.push(wrap(child, child, sibs))
|
|
||||||
})
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
function wrap(pivot, first, sibs) {
|
|
||||||
const wrap = wrapperFn()
|
|
||||||
|
|
||||||
const pivotClass = pivot.className
|
|
||||||
if (pivotClass) addClass(wrap, pivotClass)
|
|
||||||
before(pivot, wrap)
|
|
||||||
|
|
||||||
const body = bodyFn()
|
|
||||||
if (pivotClass) addClass(body, pivotClass)
|
|
||||||
appendMany(body, sibs)
|
|
||||||
|
|
||||||
if (first) wrap.appendChild(first)
|
|
||||||
wrap.appendChild(body)
|
|
||||||
|
|
||||||
return wrap
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,427 +0,0 @@
|
||||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Set default font family to sans-serif.
|
|
||||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
|
||||||
* user zoom.
|
|
||||||
*/
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-family: sans-serif; /* 1 */
|
|
||||||
-ms-text-size-adjust: 100%; /* 2 */
|
|
||||||
-webkit-text-size-adjust: 100%; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove default margin.
|
|
||||||
*/
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* HTML5 display definitions
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
|
||||||
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
|
||||||
* and Firefox.
|
|
||||||
* Correct `block` display not defined for `main` in IE 11.
|
|
||||||
*/
|
|
||||||
|
|
||||||
article,
|
|
||||||
aside,
|
|
||||||
details,
|
|
||||||
figcaption,
|
|
||||||
figure,
|
|
||||||
footer,
|
|
||||||
header,
|
|
||||||
hgroup,
|
|
||||||
main,
|
|
||||||
menu,
|
|
||||||
nav,
|
|
||||||
section,
|
|
||||||
summary {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct `inline-block` display not defined in IE 8/9.
|
|
||||||
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
|
||||||
*/
|
|
||||||
|
|
||||||
audio,
|
|
||||||
canvas,
|
|
||||||
progress,
|
|
||||||
video {
|
|
||||||
display: inline-block; /* 1 */
|
|
||||||
vertical-align: baseline; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prevent modern browsers from displaying `audio` without controls.
|
|
||||||
* Remove excess height in iOS 5 devices.
|
|
||||||
*/
|
|
||||||
|
|
||||||
audio:not([controls]) {
|
|
||||||
display: none;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address `[hidden]` styling not present in IE 8/9/10.
|
|
||||||
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[hidden],
|
|
||||||
template {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Links
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the gray background color from active links in IE 10.
|
|
||||||
*/
|
|
||||||
|
|
||||||
a {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Improve readability when focused and also mouse hovered in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
a:active,
|
|
||||||
a:hover {
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Text-level semantics
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
|
||||||
*/
|
|
||||||
|
|
||||||
abbr[title] {
|
|
||||||
border-bottom: 1px dotted;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
|
||||||
*/
|
|
||||||
|
|
||||||
b,
|
|
||||||
strong {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address styling not present in Safari and Chrome.
|
|
||||||
*/
|
|
||||||
|
|
||||||
dfn {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address variable `h1` font-size and margin within `section` and `article`
|
|
||||||
* contexts in Firefox 4+, Safari, and Chrome.
|
|
||||||
*/
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
margin: 0.67em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address styling not present in IE 8/9.
|
|
||||||
*/
|
|
||||||
|
|
||||||
mark {
|
|
||||||
background: #ff0;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address inconsistent and variable font size in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
small {
|
|
||||||
font-size: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
sub,
|
|
||||||
sup {
|
|
||||||
font-size: 75%;
|
|
||||||
line-height: 0;
|
|
||||||
position: relative;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
|
||||||
top: -0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub {
|
|
||||||
bottom: -0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Embedded content
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove border when inside `a` element in IE 8/9/10.
|
|
||||||
*/
|
|
||||||
|
|
||||||
img {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct overflow not hidden in IE 9/10/11.
|
|
||||||
*/
|
|
||||||
|
|
||||||
svg:not(:root) {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Grouping content
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address margin not present in IE 8/9 and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
figure {
|
|
||||||
margin: 1em 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address differences between Firefox and other browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
hr {
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
box-sizing: content-box;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contain overflow in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
pre {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address odd `em`-unit font size rendering in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
pre,
|
|
||||||
samp {
|
|
||||||
font-family: monospace, monospace;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Forms
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
|
||||||
* styling of `select`, unless a `border` property is set.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct color not being inherited.
|
|
||||||
* Known issue: affects color of disabled elements.
|
|
||||||
* 2. Correct font properties not being inherited.
|
|
||||||
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
input,
|
|
||||||
optgroup,
|
|
||||||
select,
|
|
||||||
textarea {
|
|
||||||
color: inherit; /* 1 */
|
|
||||||
font: inherit; /* 2 */
|
|
||||||
margin: 0; /* 3 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button {
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
|
||||||
* All other form control elements do not inherit `text-transform` values.
|
|
||||||
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
|
||||||
* Correct `select` style inheritance in Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
select {
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
|
||||||
* and `video` controls.
|
|
||||||
* 2. Correct inability to style clickable `input` types in iOS.
|
|
||||||
* 3. Improve usability and consistency of cursor style between image-type
|
|
||||||
* `input` and others.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
html input[type="button"], /* 1 */
|
|
||||||
input[type="reset"],
|
|
||||||
input[type="submit"] {
|
|
||||||
-webkit-appearance: button; /* 2 */
|
|
||||||
cursor: pointer; /* 3 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Re-set default cursor for disabled elements.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button[disabled],
|
|
||||||
html input[disabled] {
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove inner padding and border in Firefox 4+.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button::-moz-focus-inner,
|
|
||||||
input::-moz-focus-inner {
|
|
||||||
border: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
|
||||||
* the UA stylesheet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
input {
|
|
||||||
line-height: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* It's recommended that you don't attempt to style these elements.
|
|
||||||
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
|
||||||
*
|
|
||||||
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
|
||||||
* 2. Remove excess padding in IE 8/9/10.
|
|
||||||
*/
|
|
||||||
|
|
||||||
input[type="checkbox"],
|
|
||||||
input[type="radio"] {
|
|
||||||
box-sizing: border-box; /* 1 */
|
|
||||||
padding: 0; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
|
||||||
* `font-size` values of the `input`, it causes the cursor style of the
|
|
||||||
* decrement button to change from `default` to `text`.
|
|
||||||
*/
|
|
||||||
|
|
||||||
input[type="number"]::-webkit-inner-spin-button,
|
|
||||||
input[type="number"]::-webkit-outer-spin-button {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
|
||||||
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
|
||||||
* (include `-moz` to future-proof).
|
|
||||||
*/
|
|
||||||
|
|
||||||
input[type="search"] {
|
|
||||||
-webkit-appearance: textfield; /* 1 */
|
|
||||||
-moz-box-sizing: content-box;
|
|
||||||
-webkit-box-sizing: content-box; /* 2 */
|
|
||||||
box-sizing: content-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
|
||||||
* Safari (but not Chrome) clips the cancel button when the search input has
|
|
||||||
* padding (and `textfield` appearance).
|
|
||||||
*/
|
|
||||||
|
|
||||||
input[type="search"]::-webkit-search-cancel-button,
|
|
||||||
input[type="search"]::-webkit-search-decoration {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define consistent border, margin, and padding.
|
|
||||||
*/
|
|
||||||
|
|
||||||
fieldset {
|
|
||||||
border: 1px solid #c0c0c0;
|
|
||||||
margin: 0 2px;
|
|
||||||
padding: 0.35em 0.625em 0.75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
|
||||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
|
||||||
*/
|
|
||||||
|
|
||||||
legend {
|
|
||||||
border: 0; /* 1 */
|
|
||||||
padding: 0; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove default vertical scrollbar in IE 8/9/10/11.
|
|
||||||
*/
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Don't inherit the `font-weight` (applied by a rule above).
|
|
||||||
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
|
||||||
*/
|
|
||||||
|
|
||||||
optgroup {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tables
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove most spacing between table cells.
|
|
||||||
*/
|
|
||||||
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
|
@ -1,58 +0,0 @@
|
||||||
@import url('//brick.a.ssl.fastly.net/Roboto:400,400i,700')
|
|
||||||
@import url('//fonts.googleapis.com/css?family=Raleway:800')
|
|
||||||
@import url('//fonts.googleapis.com/css?family=Fira+Mono:400,400i')
|
|
||||||
@import url('//brick.a.ssl.fastly.net/EB+Garamond:400i')
|
|
||||||
|
|
||||||
$body-font-size: 17px
|
|
||||||
$body-line-height: 1.7
|
|
||||||
|
|
||||||
@mixin font-size($multiplier, $lhmultiplier, $size, $line-height)
|
|
||||||
font-size: $size * $multiplier
|
|
||||||
@if $line-height != none
|
|
||||||
line-height: $line-height * $lhmultiplier
|
|
||||||
|
|
||||||
@mixin body-font
|
|
||||||
font-family: 'Roboto', sans-serif
|
|
||||||
font-weight: 400
|
|
||||||
|
|
||||||
@mixin italic-font
|
|
||||||
font-family: 'eb garamond', serif
|
|
||||||
font-weight: 400
|
|
||||||
font-style: italic
|
|
||||||
+kernliga
|
|
||||||
|
|
||||||
@mixin headline-font
|
|
||||||
font-family: 'eb garamond', serif
|
|
||||||
font-weight: 400
|
|
||||||
font-style: italic
|
|
||||||
+kernliga
|
|
||||||
|
|
||||||
@mixin caps-font
|
|
||||||
text-transform: uppercase
|
|
||||||
letter-spacing: 2px
|
|
||||||
|
|
||||||
@mixin mono-font
|
|
||||||
font-family: 'fira mono', monospace
|
|
||||||
font-weight: 400
|
|
||||||
letter-spacing: -0.5px
|
|
||||||
+no-antialias
|
|
||||||
|
|
||||||
@mixin bold-font
|
|
||||||
font-family: 'raleway', sans-serif
|
|
||||||
font-weight: 800
|
|
||||||
|
|
||||||
/*
|
|
||||||
* sizes
|
|
||||||
*/
|
|
||||||
|
|
||||||
@mixin italic-font-size($size, $line-height: none)
|
|
||||||
+font-size(1.0, 1.0, $size, $line-height)
|
|
||||||
|
|
||||||
@mixin headline-font-size($size, $line-height: none)
|
|
||||||
+font-size(1.0, 1.0, $size, $line-height)
|
|
||||||
|
|
||||||
@mixin bold-font-size($size, $line-height: none)
|
|
||||||
+font-size(1.0, 1.0, $size, $line-height)
|
|
||||||
|
|
||||||
@mixin mono-font-size($size, $line-height: none)
|
|
||||||
+font-size(1.0, 1.0, $size, $line-height)
|
|
|
@ -1,41 +0,0 @@
|
||||||
@mixin kernliga
|
|
||||||
font-size-adjust: none
|
|
||||||
// don't display digraphs in languages that don't support it
|
|
||||||
-webkit-font-language-override: normal
|
|
||||||
font-language-override: normal
|
|
||||||
|
|
||||||
// use font-defined kerning info
|
|
||||||
-webkit-font-kerning: auto
|
|
||||||
font-kerning: auto
|
|
||||||
|
|
||||||
// opentype options: kerning, ligatures, horiz ligatures, discretionary ligatures, contextual swash
|
|
||||||
// https://en.wikipedia.org/wiki/List_of_typographic_features
|
|
||||||
-webkit-font-feature-settings: "kern", "liga", "dlig", "hlig", "cswh"
|
|
||||||
font-feature-settings: "kern", "liga", "dlig", "hlig", "cswh"
|
|
||||||
|
|
||||||
// allow browser to auto-infer missing glyphs
|
|
||||||
font-synthesis: weight style
|
|
||||||
|
|
||||||
// swashes on first letters
|
|
||||||
// &:first-letter
|
|
||||||
// font-feature-settings: "kern", "swsh"
|
|
||||||
// -webkit-font-feature-settings: "kern", "swsh"
|
|
||||||
|
|
||||||
@mixin antialias
|
|
||||||
text-rendering: optimizeLegibility
|
|
||||||
-webkit-font-smoothing: antialiased
|
|
||||||
-moz-osx-font-smoothing: grayscale
|
|
||||||
|
|
||||||
@mixin no-antialias
|
|
||||||
text-rendering: auto
|
|
||||||
-webkit-font-smoothing: subpixel-antialiased
|
|
||||||
-moz-osx-font-smoothing: auto
|
|
||||||
|
|
||||||
@mixin clearfix
|
|
||||||
&:after
|
|
||||||
display: table
|
|
||||||
content: ''
|
|
||||||
clear: both
|
|
||||||
height: 0
|
|
||||||
zoom: 1
|
|
||||||
|
|
|
@ -1,105 +0,0 @@
|
||||||
/*
|
|
||||||
* .about-the-site
|
|
||||||
*/
|
|
||||||
|
|
||||||
.about-the-site
|
|
||||||
&
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
.container
|
|
||||||
text-align: center
|
|
||||||
padding: 3em 80px
|
|
||||||
margin: 0 auto
|
|
||||||
+clearfix
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
padding-left: 40px
|
|
||||||
padding-right: 40px
|
|
||||||
|
|
||||||
&:before
|
|
||||||
content: ''
|
|
||||||
position: absolute
|
|
||||||
display: block
|
|
||||||
left: 20px
|
|
||||||
right: 20px
|
|
||||||
top: 0
|
|
||||||
border-top: solid 1px $hairline
|
|
||||||
|
|
||||||
&
|
|
||||||
+body-font
|
|
||||||
font-size: 0.85em
|
|
||||||
color: lighten($gray, 20%)
|
|
||||||
|
|
||||||
a, a:visited
|
|
||||||
color: lighten($gray, 10%)
|
|
||||||
box-shadow: inset 0 -1px rgba(black, 0.05)
|
|
||||||
padding-bottom: 2px
|
|
||||||
|
|
||||||
a:hover, a:focus
|
|
||||||
color: $black
|
|
||||||
box-shadow: inset 0 -2px $accent
|
|
||||||
|
|
||||||
strong
|
|
||||||
+bold-font
|
|
||||||
|
|
||||||
strong a, strong a:visited
|
|
||||||
color: $black
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
strong a:hover, strong a:focus
|
|
||||||
color: $black
|
|
||||||
box-shadow: inset 0 -2px $accent
|
|
||||||
|
|
||||||
.identity
|
|
||||||
margin: 0
|
|
||||||
margin-top: 0.2em
|
|
||||||
float: right
|
|
||||||
+italic-font
|
|
||||||
+italic-font-size(2.5em)
|
|
||||||
|
|
||||||
.identity a,
|
|
||||||
.identity a:visited
|
|
||||||
color: $black
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
.identity a:hover,
|
|
||||||
.identity a:focus
|
|
||||||
color: $accent
|
|
||||||
|
|
||||||
.blurb
|
|
||||||
margin: 0
|
|
||||||
max-width: 500px
|
|
||||||
text-align: left
|
|
||||||
float: left
|
|
||||||
line-height: 1.55
|
|
||||||
|
|
||||||
.back
|
|
||||||
float: right
|
|
||||||
margin-top: 0.4em
|
|
||||||
margin-right: 2em
|
|
||||||
|
|
||||||
.fleuron:before
|
|
||||||
content: '\f492'
|
|
||||||
font-family: Ionicons
|
|
||||||
font-size: 16px
|
|
||||||
font-weight: normal
|
|
||||||
font-style: normal
|
|
||||||
display: inline-block
|
|
||||||
vertical-align: middle
|
|
||||||
color: $black
|
|
||||||
margin: 0 7px
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
display: none
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
.identity
|
|
||||||
float: left
|
|
||||||
clear: both
|
|
||||||
.blurb
|
|
||||||
float: none
|
|
||||||
margin-bottom: 1em
|
|
||||||
width: auto
|
|
||||||
.back
|
|
||||||
float: right
|
|
||||||
margin-right: 0
|
|
|
@ -1,66 +0,0 @@
|
||||||
.big-button,
|
|
||||||
a.big-button
|
|
||||||
display: inline-block
|
|
||||||
|
|
||||||
width: 180px
|
|
||||||
height: 50px
|
|
||||||
line-height: 50px - 2px
|
|
||||||
padding: 0
|
|
||||||
border-radius: 30px
|
|
||||||
font-size: 0.85em
|
|
||||||
box-shadow: none
|
|
||||||
background: transparent
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
width: 140px
|
|
||||||
height: 40px
|
|
||||||
line-height: 40px - 2px
|
|
||||||
|
|
||||||
&, &:visited
|
|
||||||
border: solid 2px $accent
|
|
||||||
color: $accent
|
|
||||||
|
|
||||||
&.-back,
|
|
||||||
&.-back:visited
|
|
||||||
border: solid 1px rgba($gray, 0.2)
|
|
||||||
color: $gray
|
|
||||||
|
|
||||||
&.-back:before,
|
|
||||||
&.-next:after
|
|
||||||
font-family: Ionicons
|
|
||||||
font-size: 20px
|
|
||||||
display: inline-block
|
|
||||||
vertical-align: middle
|
|
||||||
position: relative
|
|
||||||
top: -1px
|
|
||||||
|
|
||||||
&.-back:before
|
|
||||||
content: '\f38f'
|
|
||||||
|
|
||||||
&.-next:after
|
|
||||||
content: '\f3d1'
|
|
||||||
margin-left: 16px
|
|
||||||
top: 0
|
|
||||||
|
|
||||||
&.-slim
|
|
||||||
width: 60px
|
|
||||||
border-width: 2px
|
|
||||||
height: 60px
|
|
||||||
line-height: 60px
|
|
||||||
border-radius: 50%
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
width: 40px
|
|
||||||
height: 40px
|
|
||||||
line-height: 40px
|
|
||||||
|
|
||||||
&:hover, &:focus
|
|
||||||
background: $accent
|
|
||||||
border-color: transparent
|
|
||||||
color: white
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
&.-back:hover,
|
|
||||||
&.-back:focus
|
|
||||||
background: $accent
|
|
||||||
color: white
|
|
|
@ -1,8 +0,0 @@
|
||||||
/*
|
|
||||||
* .brief-intro -- Brief introduction
|
|
||||||
*/
|
|
||||||
|
|
||||||
.brief-intro
|
|
||||||
font-size: 1.1em
|
|
||||||
color: $gray
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
/*
|
|
||||||
* .full-image -- full width image containers
|
|
||||||
*/
|
|
||||||
|
|
||||||
.full-image
|
|
||||||
&
|
|
||||||
overflow: hidden
|
|
||||||
text-align: center
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
img
|
|
||||||
background: #fcfcfc
|
|
||||||
|
|
||||||
&.cropped img,
|
|
||||||
&.cropped img:first-child:last-child
|
|
||||||
margin-bottom: -50px
|
|
||||||
display: block
|
|
||||||
background: transparent
|
|
||||||
|
|
||||||
&.cropped:after
|
|
||||||
content: ''
|
|
||||||
display: block
|
|
||||||
position: absolute
|
|
||||||
bottom: 0
|
|
||||||
left: 20px
|
|
||||||
right: 20px
|
|
||||||
border-bottom: solid 1px $lightgray
|
|
||||||
|
|
||||||
&.stretched img
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
margin-left: -20px
|
|
||||||
margin-right: -20px
|
|
||||||
|
|
||||||
@media (min-width: 769px)
|
|
||||||
width: 100vw
|
|
||||||
margin-left: calc(-50vw + #{$page-width} / 2)
|
|
|
@ -1,14 +0,0 @@
|
||||||
.hint--top, .hint--bottom
|
|
||||||
&:before
|
|
||||||
margin-top: -14px
|
|
||||||
margin-left: -8px
|
|
||||||
border-radius: 2px
|
|
||||||
|
|
||||||
&:before, &:after
|
|
||||||
transition-duration: 10ms
|
|
||||||
|
|
||||||
&:after
|
|
||||||
box-shadow: none
|
|
||||||
border-radius: 2px
|
|
||||||
text-shadow: none
|
|
||||||
margin-left: -55px
|
|
|
@ -1,78 +0,0 @@
|
||||||
.hljs-literal,
|
|
||||||
.hljs-number,
|
|
||||||
.hljs-string,
|
|
||||||
.hljs-symbol,
|
|
||||||
.hljs-value
|
|
||||||
color: $accent
|
|
||||||
|
|
||||||
.hljs-key,
|
|
||||||
.hljs-attribute
|
|
||||||
color: darken($accent, 20%)
|
|
||||||
|
|
||||||
.hljs-keyword,
|
|
||||||
.hljs-constant
|
|
||||||
color: $black
|
|
||||||
|
|
||||||
.hljs-comment
|
|
||||||
color: $gray
|
|
||||||
font-style: italic
|
|
||||||
|
|
||||||
//
|
|
||||||
// Prism
|
|
||||||
//
|
|
||||||
|
|
||||||
.token.comment,
|
|
||||||
.token.prolog,
|
|
||||||
.token.doctype,
|
|
||||||
.token.cdata
|
|
||||||
color: $gray
|
|
||||||
font-style: italic
|
|
||||||
|
|
||||||
.token.punctuation
|
|
||||||
color: #999
|
|
||||||
|
|
||||||
.token.property,
|
|
||||||
.token.tag,
|
|
||||||
.token.boolean,
|
|
||||||
.token.number,
|
|
||||||
.token.constant,
|
|
||||||
.token.symbol,
|
|
||||||
.token.deleted
|
|
||||||
color: #905
|
|
||||||
|
|
||||||
.token.selector,
|
|
||||||
.token.attr-name,
|
|
||||||
.token.string,
|
|
||||||
.token.char,
|
|
||||||
.token.builtin,
|
|
||||||
.token.inserted
|
|
||||||
color: $accent
|
|
||||||
|
|
||||||
.token.operator,
|
|
||||||
.token.entity,
|
|
||||||
.token.url,
|
|
||||||
.language-css .token.string,
|
|
||||||
.style .token.string
|
|
||||||
color: #a67f59
|
|
||||||
|
|
||||||
.token.atrule,
|
|
||||||
.token.attr-value,
|
|
||||||
.token.keyword
|
|
||||||
color: #07a
|
|
||||||
|
|
||||||
.token.function
|
|
||||||
color: #DD4A68
|
|
||||||
|
|
||||||
.token.regex,
|
|
||||||
.token.important,
|
|
||||||
.token.variable
|
|
||||||
color: #e90
|
|
||||||
|
|
||||||
.token.important,
|
|
||||||
.token.bold
|
|
||||||
font-weight: bold
|
|
||||||
.token.italic
|
|
||||||
font-style: italic
|
|
||||||
|
|
||||||
.token.entity
|
|
||||||
cursor: help
|
|
|
@ -1,142 +0,0 @@
|
||||||
/*
|
|
||||||
* .next-article -- lead into the next article
|
|
||||||
*/
|
|
||||||
|
|
||||||
.next-article
|
|
||||||
$bg: darken(#8e44ad, 15%)
|
|
||||||
$textcolor: saturate(mix(white, $bg, 85%), 90%)
|
|
||||||
|
|
||||||
&
|
|
||||||
display: block
|
|
||||||
padding: 0
|
|
||||||
margin-left: 40px
|
|
||||||
margin-right: 40px
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
|
|
||||||
&, &:hover, &:focus
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
&:after
|
|
||||||
content: ''
|
|
||||||
display: block
|
|
||||||
position: absolute
|
|
||||||
left: -20px
|
|
||||||
right: -20px
|
|
||||||
bottom: 0
|
|
||||||
border-bottom: solid 1px $hairline
|
|
||||||
|
|
||||||
// suppress its hairline
|
|
||||||
& + .about-the-site:before
|
|
||||||
display: none
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
margin-left: 0
|
|
||||||
margin-right: 0
|
|
||||||
|
|
||||||
// remove horizontal line
|
|
||||||
& + .about-the-site:before
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.container
|
|
||||||
display: block
|
|
||||||
text-align: center
|
|
||||||
padding: 10em 20px
|
|
||||||
|
|
||||||
@media (min-width: 769px)
|
|
||||||
margin-top: 8em
|
|
||||||
padding: 8em 20px
|
|
||||||
|
|
||||||
.h3
|
|
||||||
display: block
|
|
||||||
margin: 0 auto auto
|
|
||||||
padding: 0
|
|
||||||
font-size: 2.2em
|
|
||||||
line-height: 1.3em
|
|
||||||
+bold-font
|
|
||||||
color: white
|
|
||||||
transition: all 250ms linear
|
|
||||||
|
|
||||||
// &:hover > span
|
|
||||||
// box-shadow: inset 0 -2px $accent
|
|
||||||
// text-shadow: 0 0 4px $bg, 0 0 4px $bg, 0 0 4px $bg, 0 0 4px $bg, 0 0 4px $bg, 0 0 4px $bg, 0 0 4px $bg, 0 0 4px $bg, 0 0 4px $bg
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
font-size: 1.5em
|
|
||||||
|
|
||||||
.h3, .excerpt
|
|
||||||
max-width: $page-width * 0.9
|
|
||||||
|
|
||||||
.h3 + .excerpt
|
|
||||||
margin-top: 0.5em
|
|
||||||
|
|
||||||
.excerpt
|
|
||||||
display: block
|
|
||||||
margin-left: auto
|
|
||||||
margin-right: auto
|
|
||||||
font-size: 1em
|
|
||||||
line-height: 1.6em
|
|
||||||
|
|
||||||
.big-button
|
|
||||||
margin-top: 2em
|
|
||||||
|
|
||||||
h3 a:hover,
|
|
||||||
h3 a:focus
|
|
||||||
color: $accent
|
|
||||||
|
|
||||||
.heading
|
|
||||||
display: block
|
|
||||||
+caps-font
|
|
||||||
font-size: 0.7em
|
|
||||||
margin-bottom: 1em
|
|
||||||
|
|
||||||
.heading:before
|
|
||||||
font-family: Ionicons
|
|
||||||
content: '\f4a8'
|
|
||||||
margin-right: 15px
|
|
||||||
font-size: 16px
|
|
||||||
display: inline-block
|
|
||||||
vertical-align: middle
|
|
||||||
color: $accent
|
|
||||||
|
|
||||||
.big-button,
|
|
||||||
a.big-button
|
|
||||||
background: transparent
|
|
||||||
|
|
||||||
&, &:visited
|
|
||||||
border-color: $accent
|
|
||||||
color: white
|
|
||||||
|
|
||||||
&:hover, &:focus
|
|
||||||
background: $accent
|
|
||||||
border-color: transparent
|
|
||||||
|
|
||||||
@mixin recolor-article($bg, $bg2, $url: '', $a: 0.9, $angle: 177deg)
|
|
||||||
$w: 1500
|
|
||||||
$h: 10
|
|
||||||
$textcolor: mix(white, $bg, 75%)
|
|
||||||
$notch: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='#{$w}' height='#{$h}' version='1.1'><polyline fill='white' points='#{$w},0 0,0 0,#{$h}'/></svg>"
|
|
||||||
|
|
||||||
&
|
|
||||||
background: url($notch) -50px top / 110% auto no-repeat, linear-gradient(to right, rgba(adjust-color($bg, $lightness: 0%), $a), rgba(adjust-color($bg2, $lightness: 0%), $a)), linear-gradient($angle, rgba($bg, 0.0), rgba($bg, 0.9)), url($url) center center / cover, $bg
|
|
||||||
&:hover, &:focus
|
|
||||||
background: url($notch) -50px top / 110% auto no-repeat, linear-gradient(to right, rgba(adjust-color($bg, $lightness: 1%), $a), rgba(adjust-color($bg2, $lightness: 1%), $a)), linear-gradient($angle, rgba($bg, 0.0), rgba($bg, 0.9)), url($url) center center / cover, $bg
|
|
||||||
.excerpt, .heading
|
|
||||||
color: $textcolor
|
|
||||||
|
|
||||||
.next-article
|
|
||||||
&
|
|
||||||
+recolor-article(#612e76, #5867cc)
|
|
||||||
&.-v2
|
|
||||||
text-shadow: 0 1px 1px rgba(black, 0.5)
|
|
||||||
+recolor-article(#027d65, #00536b, "bg/pebbles.jpg", 0.7, $angle: 35deg)
|
|
||||||
&.-v3
|
|
||||||
text-shadow: 0 1px 1px rgba(black, 0.5)
|
|
||||||
+recolor-article(#1d2434, #202a3e, "bg/roughwall.jpg", 0.9, $angle: 1deg)
|
|
||||||
&.-v4
|
|
||||||
text-shadow: 0 1px 1px rgba(black, 0.5)
|
|
||||||
+recolor-article(#902014, #c77e0a, "bg/woodfloor.jpg", 0.45, $angle: 1deg)
|
|
||||||
&.-v5
|
|
||||||
text-shadow: 0 1px 1px rgba(black, 0.5)
|
|
||||||
+recolor-article(#17283a, #25295e, "bg/stairs.jpg", 0.85, $angle: 1deg)
|
|
||||||
// &.next-article
|
|
|
@ -1,64 +0,0 @@
|
||||||
/*
|
|
||||||
* .post-headline -- H1's of posts
|
|
||||||
*/
|
|
||||||
|
|
||||||
.post-headline
|
|
||||||
&
|
|
||||||
margin: 1.5em auto 3em auto
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
.post-icon
|
|
||||||
margin-bottom: 2px
|
|
||||||
|
|
||||||
h1
|
|
||||||
text-align: center
|
|
||||||
margin-bottom: 0
|
|
||||||
+headline-font
|
|
||||||
+headline-font-size(2.8em, 1.2)
|
|
||||||
width: 80%
|
|
||||||
margin-left: auto
|
|
||||||
margin-right: auto
|
|
||||||
|
|
||||||
@media (max-width: 768px)
|
|
||||||
+headline-font-size(2em)
|
|
||||||
|
|
||||||
.meta
|
|
||||||
display: block
|
|
||||||
text-align: center
|
|
||||||
margin: 0
|
|
||||||
margin-top: 1em
|
|
||||||
font-weight: normal
|
|
||||||
+caps-font
|
|
||||||
font-size: 0.8em
|
|
||||||
|
|
||||||
.meta .author,
|
|
||||||
.meta .date
|
|
||||||
margin: 0 5px
|
|
||||||
padding-bottom: 2px
|
|
||||||
|
|
||||||
.meta a,
|
|
||||||
.meta a:visited
|
|
||||||
color: $gray
|
|
||||||
|
|
||||||
.meta a:hover,
|
|
||||||
.meta a:focus
|
|
||||||
&, span
|
|
||||||
color: $gray
|
|
||||||
|
|
||||||
time
|
|
||||||
color: $black
|
|
||||||
box-shadow: inset 0 -2px $accent
|
|
||||||
|
|
||||||
a, a:visited, a:focus, a:hover
|
|
||||||
color: $black
|
|
||||||
text-decoration: none
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
.pubbox
|
|
||||||
margin-top: 32px
|
|
||||||
font-size: 16px
|
|
||||||
line-height: 1.5
|
|
||||||
|
|
||||||
.carbon-img
|
|
||||||
margin-top: 4px
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue