Add initial migration to NextJS
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"extends": "react-app",
|
||||
"plugins": ["prettier"],
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"jsx-a11y/no-redundant-roles": "off"
|
||||
}
|
||||
}
|
||||
74
.github/workflows/deploy-beta.yml
vendored
@@ -1,74 +0,0 @@
|
||||
name: deploy-beta
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI: true
|
||||
steps:
|
||||
- name: Create GitHub deployment
|
||||
uses: bobheadxi/deployments@v0.4.3
|
||||
id: deployment
|
||||
with:
|
||||
step: start
|
||||
token: ${{ github.token }}
|
||||
env: beta
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build-beta
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
name: Sync files to DigitalOcean Spaces
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_S3_ENDPOINT: https://sfo2.digitaloceanspaces.com
|
||||
SOURCE_DIR: public
|
||||
DEST_DIR: beta
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
||||
|
||||
- name: Flush DigitalOcean Spaces cache
|
||||
run: doctl compute cdn flush ${{ secrets.DIGITALOCEAN_CDN_ID }} --files beta/*
|
||||
|
||||
- name: Update deployment status
|
||||
uses: bobheadxi/deployments@v0.4.3
|
||||
if: always()
|
||||
with:
|
||||
step: finish
|
||||
token: ${{ github.token }}
|
||||
status: ${{ job.status }}
|
||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
||||
env_url: https://beta.unicorn-utterances.com
|
||||
83
.github/workflows/deploy-dev.yml
vendored
@@ -1,83 +0,0 @@
|
||||
name: deploy-dev
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.repository_owner == 'unicorn-utterances'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI: true
|
||||
steps:
|
||||
# see https://dev.to/bobheadxi/branch-previews-with-google-app-engine-and-github-actions-3pco
|
||||
- name: Extract branch name
|
||||
id: get_branch
|
||||
shell: bash
|
||||
env:
|
||||
PR_HEAD: ${{ github.head_ref }}
|
||||
run: echo "##[set-output name=branch;]$(echo ${PR_HEAD#refs/heads/} | tr / -)"
|
||||
|
||||
- name: Create GitHub deployment
|
||||
uses: bobheadxi/deployments@v0.4.3
|
||||
id: deployment
|
||||
with:
|
||||
step: start
|
||||
token: ${{ github.token }}
|
||||
env: ${{ steps.get_branch.outputs.branch }}
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build-beta
|
||||
env:
|
||||
SITE_URL: https://${{ steps.get_branch.outputs.branch }}.unicorn-utterances.com
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
name: Sync files to DigitalOcean Spaces
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_S3_ENDPOINT: https://sfo2.digitaloceanspaces.com
|
||||
SOURCE_DIR: public
|
||||
DEST_DIR: ${{ steps.get_branch.outputs.branch }}
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
||||
|
||||
- name: Flush DigitalOcean Spaces cache
|
||||
run: doctl compute cdn flush ${{ secrets.DIGITALOCEAN_CDN_ID }} --files ${{ steps.get_branch.outputs.branch }}/*
|
||||
|
||||
- name: Update deployment status
|
||||
uses: bobheadxi/deployments@v0.4.3
|
||||
if: always()
|
||||
with:
|
||||
step: finish
|
||||
token: ${{ github.token }}
|
||||
status: ${{ job.status }}
|
||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
||||
env_url: https://${{ steps.get_branch.outputs.branch }}.unicorn-utterances.com
|
||||
71
.github/workflows/deploy-prod.yml
vendored
@@ -1,71 +0,0 @@
|
||||
name: deploy-prod
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI: true
|
||||
steps:
|
||||
- name: Create GitHub deployment
|
||||
uses: bobheadxi/deployments@v0.4.3
|
||||
id: deployment
|
||||
with:
|
||||
step: start
|
||||
token: ${{ github.token }}
|
||||
env: production
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
name: Sync files to DigitalOcean Spaces
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_S3_ENDPOINT: https://sfo2.digitaloceanspaces.com
|
||||
SOURCE_DIR: public
|
||||
DEST_DIR: prod
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
||||
|
||||
- name: Flush DigitalOcean Spaces cache
|
||||
run: doctl compute cdn flush ${{ secrets.DIGITALOCEAN_CDN_ID }} --files prod/*
|
||||
|
||||
- name: Update deployment status
|
||||
uses: bobheadxi/deployments@v0.4.3
|
||||
if: always()
|
||||
with:
|
||||
step: finish
|
||||
token: ${{ github.token }}
|
||||
status: ${{ job.status }}
|
||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
||||
env_url: https://unicorn-utterances.com
|
||||
40
.github/workflows/destroy-dev.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name: destroy-dev
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
destroy:
|
||||
if: github.repository_owner == 'unicorn-utterances'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI: true
|
||||
steps:
|
||||
# see https://dev.to/bobheadxi/branch-previews-with-google-app-engine-and-github-actions-3pco
|
||||
- name: Extract branch name
|
||||
id: get_branch
|
||||
shell: bash
|
||||
env:
|
||||
PR_HEAD: ${{ github.head_ref }}
|
||||
run: echo "##[set-output name=branch;]$(echo ${PR_HEAD#refs/heads/} | tr / -)"
|
||||
|
||||
- name: Remove files from DigitalOcean Spaces
|
||||
uses: vitorsgomes/s3-rm-action@v1.0.1
|
||||
with:
|
||||
args: --recursive
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_S3_ENDPOINT: https://sfo2.digitaloceanspaces.com
|
||||
PATH_TO_DELETE: "${{ steps.get_branch.outputs.branch }}"
|
||||
|
||||
- name: Mark environment as deactivated
|
||||
uses: bobheadxi/deployments@v0.4.3
|
||||
with:
|
||||
step: deactivate-env
|
||||
token: ${{ github.token }}
|
||||
env: ${{ steps.get_branch.outputs.branch }}
|
||||
desc: Deployment was pruned
|
||||
39
.github/workflows/test.yml
vendored
@@ -1,39 +0,0 @@
|
||||
name: test
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
test-lint-build:
|
||||
env:
|
||||
CI: true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Test
|
||||
run: npm test
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
93
.gitignore
vendored
@@ -1,69 +1,34 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.idea/
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Typescript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# gatsby files
|
||||
.cache/
|
||||
public
|
||||
|
||||
# Mac files
|
||||
.DS_Store
|
||||
|
||||
# Yarn
|
||||
yarn-error.log
|
||||
.pnp/
|
||||
.pnp.js
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install lint-staged
|
||||
5
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/unicorn-utterances.iml" filepath="$PROJECT_DIR$/.idea/unicorn-utterances.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/unicorn-utterances.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"useTabs": true,
|
||||
"endOfLine": "auto"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": ["stylelint-prettier/recommended"]
|
||||
}
|
||||
1
@types/remark-html.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'remark-html'
|
||||
@@ -1,7 +0,0 @@
|
||||
export const MockLicense = {
|
||||
licenceType: 'Mocked License',
|
||||
footerImg: "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
explainLink: "example.com/explainLink",
|
||||
name: "The Mocking License",
|
||||
displayName: "MockLicense with Attribution"
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
import { MockUnicorn, MockUnicornTwo } from "./mock-unicorn";
|
||||
import { MockLicense } from "./mock-license";
|
||||
|
||||
export const MockPost = {
|
||||
id: "123123",
|
||||
excerpt: "This would be an auto generated excerpt of the post in particular",
|
||||
html: "<div>Hey there</div>",
|
||||
frontmatter: {
|
||||
title: "Post title",
|
||||
published: "10-10-2010",
|
||||
tags: ["item1"],
|
||||
description:
|
||||
"This is a short description dunno why this would be this short",
|
||||
authors: [MockUnicorn],
|
||||
license: MockLicense
|
||||
},
|
||||
fields: {
|
||||
slug: "/this-post-name-here",
|
||||
inlineCount: 0,
|
||||
headingsWithId: []
|
||||
},
|
||||
wordCount: {
|
||||
words: 10000
|
||||
}
|
||||
};
|
||||
|
||||
export const MockMultiAuthorPost = {
|
||||
id: "345345",
|
||||
excerpt:
|
||||
"This would be a second auto generated excerpt of the post in particular",
|
||||
html: "<div>Hello, friends</div>",
|
||||
frontmatter: {
|
||||
title: "Another post title",
|
||||
published: "10-20-2010",
|
||||
tags: ["item1"],
|
||||
description:
|
||||
"This is another short description dunno why this would be this short",
|
||||
authors: [MockUnicornTwo, MockUnicorn],
|
||||
license: MockLicense
|
||||
},
|
||||
fields: {
|
||||
slug: "/this-other-post-name-here",
|
||||
inlineCount: 0,
|
||||
headingsWithId: []
|
||||
},
|
||||
wordCount: {
|
||||
words: 100000
|
||||
}
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
export const MockRole = {
|
||||
id: "developer",
|
||||
prettyname: "Developer"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
export const siteMetadata = {
|
||||
title: 'siteTitle',
|
||||
siteUrl: "https://example.com/siteUrl/",
|
||||
disqusShortname: "disqus-example-shorthand",
|
||||
repoPath: 'unicorn-example-repo-path',
|
||||
relativeToPosts: 'relative/to/posts'
|
||||
}
|
||||
@@ -1,168 +0,0 @@
|
||||
import { MockRole } from "./mock-role";
|
||||
import { UnicornInfo } from "../../src/types";
|
||||
|
||||
export const MockUnicorn: UnicornInfo = {
|
||||
name: "Joe",
|
||||
firstName: "Joe",
|
||||
lastName: "Other",
|
||||
id: "joe",
|
||||
description: "Exists",
|
||||
color: "red",
|
||||
fields: {
|
||||
isAuthor: true,
|
||||
},
|
||||
roles: [MockRole as any],
|
||||
socials: {
|
||||
twitter: "twtrusrname",
|
||||
github: "ghusrname",
|
||||
website: "example.com",
|
||||
},
|
||||
pronouns: {
|
||||
they: "they",
|
||||
them: "them",
|
||||
their: "their",
|
||||
theirs: "theirs",
|
||||
themselves: "themselves",
|
||||
},
|
||||
profileImg: {
|
||||
childImageSharp: {
|
||||
smallPic: {
|
||||
images: {
|
||||
fallback: {
|
||||
src:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
srcSet:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
type: "png",
|
||||
},
|
||||
],
|
||||
},
|
||||
width: 272,
|
||||
height: 92,
|
||||
layout: "fixed",
|
||||
},
|
||||
mediumPic: {
|
||||
images: {
|
||||
fallback: {
|
||||
src:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
srcSet:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
type: "png",
|
||||
},
|
||||
],
|
||||
},
|
||||
width: 272,
|
||||
height: 92,
|
||||
layout: "fixed",
|
||||
},
|
||||
bigPic: {
|
||||
images: {
|
||||
fallback: {
|
||||
src:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
srcSet:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
type: "png",
|
||||
},
|
||||
],
|
||||
},
|
||||
width: 272,
|
||||
height: 92,
|
||||
layout: "fixed",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const MockUnicornTwo: UnicornInfo = {
|
||||
name: "Diane",
|
||||
firstName: "Diane",
|
||||
lastName: "",
|
||||
id: "diane",
|
||||
description: "Is a human",
|
||||
color: "blue",
|
||||
fields: {
|
||||
isAuthor: true,
|
||||
},
|
||||
roles: [MockRole] as any[],
|
||||
socials: {
|
||||
twitter: "twtrusrname2",
|
||||
github: "ghusrname2",
|
||||
website: "example.com/2",
|
||||
},
|
||||
pronouns: {
|
||||
they: "they",
|
||||
them: "them",
|
||||
their: "their",
|
||||
theirs: "theirs",
|
||||
themselves: "themselves",
|
||||
},
|
||||
profileImg: {
|
||||
childImageSharp: {
|
||||
smallPic: {
|
||||
images: {
|
||||
fallback: {
|
||||
src:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
srcSet:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
type: "png",
|
||||
},
|
||||
],
|
||||
},
|
||||
width: 272,
|
||||
height: 92,
|
||||
layout: "fixed",
|
||||
},
|
||||
mediumPic: {
|
||||
images: {
|
||||
fallback: {
|
||||
src:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
srcSet:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
type: "png",
|
||||
},
|
||||
],
|
||||
},
|
||||
width: 272,
|
||||
height: 92,
|
||||
layout: "fixed",
|
||||
},
|
||||
bigPic: {
|
||||
images: {
|
||||
fallback: {
|
||||
src:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
srcSet:
|
||||
"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
|
||||
type: "png",
|
||||
},
|
||||
],
|
||||
},
|
||||
width: 272,
|
||||
height: 92,
|
||||
layout: "fixed",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = "test-file-stub"
|
||||
@@ -1,8 +0,0 @@
|
||||
jest.mock("disqus-react", () => {
|
||||
const React = require("react");
|
||||
return {
|
||||
DiscussionEmbed: () => <></>
|
||||
};
|
||||
});
|
||||
|
||||
export default {};
|
||||
@@ -1,16 +0,0 @@
|
||||
jest.mock("gatsby-image", () => {
|
||||
const React = require("react");
|
||||
|
||||
return (props: any) => {
|
||||
return (
|
||||
<img
|
||||
src={props.fixed}
|
||||
alt={props.alt}
|
||||
data-testid={props["data-testid"]}
|
||||
className={props.className}
|
||||
/>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
export default {};
|
||||
@@ -1,19 +0,0 @@
|
||||
import { onLinkClick } from "gatsby-plugin-google-analytics";
|
||||
|
||||
afterEach(() => {
|
||||
onLinkClick.mockReset();
|
||||
});
|
||||
|
||||
jest.mock("gatsby-plugin-google-analytics", () => {
|
||||
const React = require("react");
|
||||
const onLinkClickFn = jest.fn();
|
||||
|
||||
return {
|
||||
OutboundLink: (props: any) => (
|
||||
<div onClick={onLinkClickFn}>{props.children}</div>
|
||||
),
|
||||
onLinkClick: onLinkClickFn
|
||||
};
|
||||
});
|
||||
|
||||
export default {};
|
||||
@@ -1,46 +0,0 @@
|
||||
import { onLinkClick } from "gatsby";
|
||||
|
||||
afterEach(() => {
|
||||
onLinkClick.mockReset();
|
||||
});
|
||||
|
||||
jest.mock("gatsby", () => {
|
||||
const React = require("react");
|
||||
const gatsbyOGl = jest.requireActual("gatsby");
|
||||
const onLinkClickFn = jest.fn();
|
||||
|
||||
return {
|
||||
...gatsbyOGl,
|
||||
Link: React.forwardRef((props: any, ref: any) => {
|
||||
const {
|
||||
// these props are invalid for an `a` tag
|
||||
activeClassName,
|
||||
activeStyle,
|
||||
getProps,
|
||||
innerRef,
|
||||
partiallyActive,
|
||||
replace,
|
||||
to,
|
||||
...rest
|
||||
} = props;
|
||||
return (
|
||||
<a
|
||||
{...rest}
|
||||
onClick={onLinkClickFn}
|
||||
style={props.style}
|
||||
className={props.className}
|
||||
ref={ref}
|
||||
href={to}
|
||||
>
|
||||
{props.children}
|
||||
</a>
|
||||
);
|
||||
}),
|
||||
onLinkClick: onLinkClickFn,
|
||||
graphql: jest.fn(),
|
||||
StaticQuery: jest.fn(),
|
||||
useStaticQuery: jest.fn()
|
||||
};
|
||||
});
|
||||
|
||||
export default {};
|
||||
@@ -1,4 +0,0 @@
|
||||
import "./gatsby";
|
||||
import "./gatsby-image";
|
||||
import "./disqus-react";
|
||||
import "./gatsby-plugin-google-analytics";
|
||||
@@ -1 +0,0 @@
|
||||
export default () => null;
|
||||
@@ -1,18 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: 'current',
|
||||
},
|
||||
},
|
||||
],
|
||||
'@babel/preset-typescript'
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
'@babel/plugin-transform-react-jsx',
|
||||
'@babel/plugin-proposal-class-properties'
|
||||
],
|
||||
};
|
||||
19
components/PostRenderer.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import Image, {ImageProps} from "next/image";
|
||||
import { MDXRemote } from "next-mdx-remote";
|
||||
|
||||
// this object will contain all the replacements we want to make
|
||||
const components = {
|
||||
img: (props: ImageProps) => (
|
||||
// height and width are part of the props, so they get automatically passed here with {...props}
|
||||
<Image {...props} layout="responsive" loading="lazy" />
|
||||
),
|
||||
};
|
||||
|
||||
export function PostRenderer({ post }: { post: string }) {
|
||||
return (
|
||||
<>
|
||||
{/* MDXRemote uses the components prop to decide which html elements to switch for components */}
|
||||
<MDXRemote compiledSource={post} components={components} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
googleAnalytics: "UA-143062623-1"
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
import React from "react";
|
||||
import "@testing-library/jest-dom/extend-expect";
|
||||
import "jest-axe/extend-expect";
|
||||
import "../../__mocks__/modules";
|
||||
|
||||
const originConsoleErr = console.error;
|
||||
console.error = (message?: any, ...optionalParams: any[]) => {
|
||||
if (/Not implemented: navigation/.exec(message)) return;
|
||||
originConsoleErr(message, ...optionalParams);
|
||||
};
|
||||
|
||||
(global as any).IntersectionObserver = class IntersectionObserver {
|
||||
constructor() {}
|
||||
|
||||
observe() {
|
||||
return null;
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
return null;
|
||||
}
|
||||
|
||||
unobserve() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
# this is the config for our redirects for our NGINX server
|
||||
# include this file with "include redirects_unicorn-utterances.com;"
|
||||
|
||||
# url migration per PR #15
|
||||
location = /authors/crutchcorn/ {
|
||||
return 301 /unicorns/crutchcorn;
|
||||
}
|
||||
|
||||
location = /unicorns/ {
|
||||
return 302 /about;
|
||||
}
|
||||
|
||||
location = /posts/ {
|
||||
return 301 /;
|
||||
}
|
||||
5
content/blog/python-list-comprehension-guide/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
8
content/blog/python-list-comprehension-guide/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/python-list-comprehension-guide.iml" filepath="$PROJECT_DIR$/.idea/python-list-comprehension-guide.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
12
content/blog/python-list-comprehension-guide/.idea/python-list-comprehension-guide.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
content/blog/python-list-comprehension-guide/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
435
gatsby-config.js
@@ -1,435 +0,0 @@
|
||||
const { SeriesToC } = require("./src/components/series-toc");
|
||||
|
||||
let CONSTS = require("./config/gatsby-config-consts");
|
||||
if (!CONSTS) CONSTS = {};
|
||||
|
||||
const buildMode = process.env.BUILD_ENV || "production";
|
||||
|
||||
let siteUrl = process.env.SITE_URL;
|
||||
|
||||
if (!siteUrl) {
|
||||
switch (buildMode) {
|
||||
case "production":
|
||||
siteUrl = "https://unicorn-utterances.com";
|
||||
break;
|
||||
case "local":
|
||||
siteUrl = "localhost:8000";
|
||||
break;
|
||||
default:
|
||||
siteUrl = "https://beta.unicorn-utterances.com";
|
||||
}
|
||||
}
|
||||
|
||||
// To set for Twitch
|
||||
let parent;
|
||||
|
||||
// Try & Catch to allow for hosts themselves to be passed
|
||||
// `new URL('domain.com')` will fail/throw, but is a valid host
|
||||
try {
|
||||
const url = new URL(siteUrl);
|
||||
// URLs like 'localhost:3000' might not give host.
|
||||
// Throw in order to catch in wrapper handler
|
||||
if (!url.host) throw new Error();
|
||||
parent = url.host;
|
||||
} catch (_) {
|
||||
const url = new URL("https://" + siteUrl);
|
||||
parent = url.host;
|
||||
}
|
||||
|
||||
// Twitch embed throws error with strings like 'localhost:3000', but
|
||||
// those persist with `new URL().host`
|
||||
if (parent.startsWith("localhost")) {
|
||||
parent = "localhost";
|
||||
}
|
||||
|
||||
console.log(`Building for ${buildMode} at ${siteUrl} with the parent ${parent}`);
|
||||
|
||||
module.exports = {
|
||||
siteMetadata: {
|
||||
title: `Unicorn Utterances`,
|
||||
description: `Learning programming from magically majestic words. A place to learn about all sorts of programming topics from entry-level concepts to advanced abstractions`,
|
||||
siteUrl,
|
||||
disqusShortname: "unicorn-utterances",
|
||||
repoPath: "unicorn-utterances/unicorn-utterances",
|
||||
relativeToPosts: "/content/blog",
|
||||
keywords:
|
||||
"programming,development,mobile,web,game,utterances,software engineering,javascript,angular,react,computer science",
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
path: `${__dirname}/content/blog`,
|
||||
name: `blog`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
path: `${__dirname}/src/assets`,
|
||||
name: `assets`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
path: `${__dirname}/content/site`,
|
||||
name: `sitecontent`,
|
||||
},
|
||||
},
|
||||
`gatsby-transformer-json`,
|
||||
`gatsby-plugin-typescript`,
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
path: `./content/data`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: "gatsby-plugin-web-font-loader",
|
||||
options: {
|
||||
google: {
|
||||
families: [
|
||||
`Work Sans:400,500,600,700`,
|
||||
`Archivo:400,500,600`,
|
||||
`Roboto Mono:400`,
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-transformer-remark`,
|
||||
options: {
|
||||
plugins: [
|
||||
`gatsby-remark-behead`,
|
||||
{
|
||||
// TODO: NEXTJS: Replace with https://ironeko.com/posts/how-to-use-next-js-image-with-markdown-or-mdx
|
||||
resolve: `gatsby-remark-images`,
|
||||
options: {
|
||||
maxWidth: 590,
|
||||
linkImagesToOriginal: false,
|
||||
backgroundColor: `transparent`,
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO: NEXTJS: Replace with https://ironeko.com/posts/how-to-use-next-js-image-with-markdown-or-mdx
|
||||
// https://wangchujiang.com/rehype-video/
|
||||
resolve: "gatsby-remark-video",
|
||||
options: {
|
||||
width: "100%",
|
||||
height: "auto",
|
||||
preload: "auto",
|
||||
muted: true,
|
||||
autoplay: true,
|
||||
controls: true,
|
||||
loop: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO: NEXTJS: Replace with https://github.com/francoischalifour/medium-zoom/blob/master/examples/react-markdown/src/Post.js
|
||||
resolve: `gatsby-remark-images-medium-zoom`,
|
||||
options: {
|
||||
includedSelector: '[src$=".svg"]',
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO: NEXTJS: Replace with https://ironeko.com/posts/how-to-use-next-js-image-with-markdown-or-mdx
|
||||
resolve: `gatsby-remark-responsive-iframe`,
|
||||
options: {
|
||||
wrapperStyle: `margin-bottom: 1.0725rem`,
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO: NEXTJS: Replace with https://github.com/rehypejs/rehype-autolink-headings
|
||||
resolve: `gatsby-remark-autolink-headers`,
|
||||
options: {
|
||||
offsetY: `100`,
|
||||
icon: `<svg width="20" height="20" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.10021 27.8995C6.14759 25.9469 6.14759 22.7811 8.10021 20.8284L12.6964 16.2322C14.4538 14.4749 17.303 14.4749 19.0604 16.2322L20.121 17.2929C20.7068 17.8787 21.6566 17.8787 22.2423 17.2929C22.8281 16.7071 22.8281 15.7574 22.2423 15.1716L21.1817 14.1109C18.2528 11.182 13.504 11.182 10.5751 14.1109L5.97889 18.7071C2.85469 21.8313 2.85469 26.8966 5.97889 30.0208C9.10308 33.145 14.1684 33.145 17.2926 30.0208L18.3533 28.9602C18.939 28.3744 18.939 27.4246 18.3533 26.8388C17.7675 26.2531 16.8177 26.2531 16.2319 26.8388L15.1713 27.8995C13.2187 29.8521 10.0528 29.8521 8.10021 27.8995Z" fill="#153E67"/><path d="M27.8992 8.10051C29.8518 10.0531 29.8518 13.219 27.8992 15.1716L23.303 19.7678C21.5456 21.5251 18.6964 21.5251 16.939 19.7678L15.8784 18.7071C15.2926 18.1213 14.3428 18.1213 13.7571 18.7071C13.1713 19.2929 13.1713 20.2426 13.7571 20.8284L14.8177 21.8891C17.7467 24.818 22.4954 24.818 25.4243 21.8891L30.0205 17.2929C33.1447 14.1687 33.1447 9.10339 30.0205 5.97919C26.8963 2.855 21.831 2.855 18.7068 5.97919L17.6461 7.03985C17.0604 7.62564 17.0604 8.57539 17.6461 9.16117C18.2319 9.74696 19.1817 9.74696 19.7675 9.16117L20.8281 8.10051C22.7808 6.14789 25.9466 6.14789 27.8992 8.10051Z" fill="#153E67"/></svg>`,
|
||||
maintainCase: true,
|
||||
removeAccents: true,
|
||||
enableCustomId: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
// TODO: NEXTJS: Replace with https://github.com/rehypejs/rehype-highlight
|
||||
resolve: `gatsby-remark-prismjs`,
|
||||
options: {
|
||||
aliases: {
|
||||
gradle: "groovy", //prismjs doesn't support gradle yet, so aliasing it to groovy provides at least some highlighting
|
||||
},
|
||||
},
|
||||
},
|
||||
// TODO: NEXTJS: Are we legit using this at all?
|
||||
`gatsby-remark-copy-linked-files`,
|
||||
{
|
||||
resolve: "gatsby-remark-series",
|
||||
options: {
|
||||
render: {
|
||||
// The location where the toc should be rendered.
|
||||
placeholder: "top",
|
||||
template: SeriesToC,
|
||||
},
|
||||
resolvers: {
|
||||
slug: (markdownNode) => `/posts${markdownNode.fields.slug}`,
|
||||
date: (markdownNode) => markdownNode.frontmatter.published,
|
||||
draft: () => false,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-remark-embedder`,
|
||||
options: {
|
||||
services: {
|
||||
Twitch: {
|
||||
parent,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
`gatsby-remark-external-links`,
|
||||
],
|
||||
},
|
||||
},
|
||||
`count-inline-code`,
|
||||
`remarked-autolink-headers-and-add-id`,
|
||||
`gatsby-plugin-image`,
|
||||
`gatsby-plugin-sharp`,
|
||||
`gatsby-transformer-sharp`,
|
||||
{
|
||||
resolve: `gatsby-plugin-google-analytics`,
|
||||
options: {
|
||||
trackingId: CONSTS.googleAnalytics || "",
|
||||
head: false,
|
||||
respectDNT: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-feed`,
|
||||
options: {
|
||||
query: `
|
||||
{
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
description
|
||||
siteUrl
|
||||
site_url: siteUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
feeds: [
|
||||
{
|
||||
serialize: ({ query: { site, allMarkdownRemark } }) => {
|
||||
const siteUrl = site.siteMetadata.siteUrl;
|
||||
return allMarkdownRemark.edges.map((edge) => {
|
||||
const slug = edge.node.fields.slug;
|
||||
const { frontmatter } = edge.node;
|
||||
const nodeUrl = `${siteUrl}/posts${slug}`;
|
||||
return {
|
||||
description: frontmatter.description || edge.node.excerpt,
|
||||
date: frontmatter.published,
|
||||
title: frontmatter.title,
|
||||
url: nodeUrl,
|
||||
guid: nodeUrl,
|
||||
custom_elements: [
|
||||
/**
|
||||
* We chose `dc:creator` in order to avoid having
|
||||
* to list contact information from our contributors,
|
||||
* as `dc:creator`
|
||||
*
|
||||
* FIXME: This does not have the functionality we'd expect
|
||||
* it only lists the last author's name
|
||||
*
|
||||
* @see https://github.com/dylang/node-rss/issues/92
|
||||
*/
|
||||
{
|
||||
"dc:creator": frontmatter.authors.map(
|
||||
(author) => author.name
|
||||
),
|
||||
},
|
||||
{ comments: `${nodeUrl}#disqus_thread` },
|
||||
],
|
||||
};
|
||||
});
|
||||
},
|
||||
query: `
|
||||
{
|
||||
allMarkdownRemark(
|
||||
sort: { order: DESC, fields: [frontmatter___published] },
|
||||
filter: {fileAbsolutePath: {regex: "/content/blog/"}}
|
||||
) {
|
||||
edges {
|
||||
node {
|
||||
excerpt
|
||||
html
|
||||
fields { slug }
|
||||
frontmatter {
|
||||
title
|
||||
description
|
||||
published
|
||||
authors {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
output: "/rss.xml",
|
||||
title: "Unicorn Utterances's RSS Feed",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: `Unicorn Utterances`,
|
||||
short_name: `Unicorn Utterances`,
|
||||
start_url: `/`,
|
||||
background_color: `#ffffff`,
|
||||
theme_color: `#127db3`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/assets/unicorn_utterances_logo_512.png`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-offline`,
|
||||
options: {
|
||||
workboxConfig: {
|
||||
runtimeCaching: [
|
||||
// Some as-is options from default config, explictly stated to avoid regressions from issues with `_.merge`ing into the default
|
||||
{
|
||||
// DEFAULT - Use cacheFirst since these don't need to be revalidated (same RegExp
|
||||
// and same reason as above)
|
||||
urlPattern: /(\.js$|\.css$|static\/)/,
|
||||
handler: `CacheFirst`,
|
||||
},
|
||||
{
|
||||
// MODIFIED - page-data.json files are not content hashed
|
||||
urlPattern: /^https?:.*\/page-data\/.*\/page-data\.json/,
|
||||
handler: `NetworkFirst`,
|
||||
},
|
||||
{
|
||||
// MODIFIED - app-data.json is not content hashed
|
||||
urlPattern: /^https?:.*\/page-data\/app-data\.json/,
|
||||
handler: `NetworkFirst`,
|
||||
},
|
||||
{
|
||||
// DEFAULT - Add runtime caching of various other page resources
|
||||
urlPattern: /^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
|
||||
handler: `StaleWhileRevalidate`,
|
||||
},
|
||||
{
|
||||
// DEFAULT - Google Fonts CSS (doesn't end in .css so we need to specify it)
|
||||
urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
|
||||
handler: `StaleWhileRevalidate`,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-react-helmet`,
|
||||
{
|
||||
resolve: "gatsby-plugin-react-svg",
|
||||
options: {
|
||||
rule: {
|
||||
include: /(?:\/src\/assets\/icons\/|\\src\\assets\\icons\\).*\.svg$/,
|
||||
},
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-sass`,
|
||||
{
|
||||
resolve: `gatsby-plugin-lunr`,
|
||||
options: {
|
||||
languages: [
|
||||
{
|
||||
name: "en",
|
||||
// A function for filtering nodes. () => true by default
|
||||
filterNodes: (node) =>
|
||||
!!node.frontmatter && !!node.frontmatter.authors,
|
||||
},
|
||||
],
|
||||
// Fields to index. If store === true value will be stored in index file.
|
||||
// Attributes for custom indexing logic. See https://lunrjs.com/docs/lunr.Builder.html for details
|
||||
fields: [
|
||||
{
|
||||
name: "title",
|
||||
store: true,
|
||||
attributes: { boost: 20 },
|
||||
},
|
||||
{ name: "excerpt" },
|
||||
{ name: "description" },
|
||||
{
|
||||
name: "slug",
|
||||
store: true,
|
||||
},
|
||||
{ name: "authors" },
|
||||
{ name: "tags" },
|
||||
],
|
||||
// How to resolve each field's value for a supported node type
|
||||
resolvers: {
|
||||
// For any node of type MarkdownRemark, list how to resolve the fields' values
|
||||
MarkdownRemark: {
|
||||
title: (node) => node.frontmatter.title,
|
||||
excerpt: (node) => node.excerpt,
|
||||
description: (node) => node.frontmatter.description,
|
||||
slug: (node) => node.fields.slug,
|
||||
/**
|
||||
* FIXME: This does not work the way we'd want. We want the name
|
||||
* the author rather than the username, but the node is not
|
||||
* populated
|
||||
*
|
||||
* @see https://github.com/humanseelabs/gatsby-plugin-lunr/issues/24
|
||||
*/
|
||||
authors: (node) => node.frontmatter.authors.join(", "),
|
||||
tags: (node) => node.frontmatter.tags,
|
||||
},
|
||||
},
|
||||
//custom index file name, default is search_index.json
|
||||
filename: "search_index.json",
|
||||
//custom options on fetch api call for search_ındex.json
|
||||
fetchOptions: {
|
||||
credentials: "same-origin",
|
||||
},
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-sitemap`,
|
||||
{
|
||||
resolve: "gatsby-plugin-robots-txt",
|
||||
options: {
|
||||
resolveEnv: () => buildMode,
|
||||
env: {
|
||||
development: {
|
||||
host: siteUrl,
|
||||
sitemap: `${siteUrl}/sitemap.xml`,
|
||||
policy: [
|
||||
{
|
||||
userAgent: "*",
|
||||
disallow: ["/"],
|
||||
},
|
||||
],
|
||||
},
|
||||
production: {
|
||||
host: siteUrl,
|
||||
sitemap: `${siteUrl}/sitemap.xml`,
|
||||
policy: [
|
||||
{
|
||||
userAgent: "*",
|
||||
allow: "/",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
mapping: {
|
||||
"MarkdownRemark.frontmatter.authors": `UnicornsJson`,
|
||||
"MarkdownRemark.frontmatter.license": `LicensesJson`,
|
||||
"UnicornsJson.pronouns": `PronounsJson`,
|
||||
"UnicornsJson.roles": `RolesJson`,
|
||||
},
|
||||
};
|
||||
236
gatsby-node.js
@@ -1,236 +0,0 @@
|
||||
const path = require(`path`);
|
||||
const fs = require("fs");
|
||||
const { createFilePath } = require(`gatsby-source-filesystem`);
|
||||
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
|
||||
|
||||
/**
|
||||
* Allow tsconfig.path usage
|
||||
*/
|
||||
exports.onCreateWebpackConfig = ({ actions }) => {
|
||||
actions.setWebpackConfig({
|
||||
resolve: {
|
||||
plugins: [new TsconfigPathsPlugin()]
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add slugs to Markdown and Unicorns
|
||||
*/
|
||||
exports.onCreateNode = ({ node, actions, getNode }) => {
|
||||
const { createNodeField } = actions;
|
||||
|
||||
if (node.internal.type === `MarkdownRemark`) {
|
||||
const value = createFilePath({
|
||||
node,
|
||||
getNode
|
||||
});
|
||||
createNodeField({
|
||||
name: `slug`,
|
||||
node,
|
||||
value
|
||||
});
|
||||
}
|
||||
|
||||
if (node.internal.type === `UnicornsJson`) {
|
||||
const value = createFilePath({
|
||||
node,
|
||||
getNode
|
||||
});
|
||||
createNodeField({
|
||||
name: `slug`,
|
||||
node,
|
||||
value
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Add "isAuthor" field to Markdown pages
|
||||
*/
|
||||
exports.sourceNodes = async ({
|
||||
getNodesByType,
|
||||
actions: { createNodeField }
|
||||
}) => {
|
||||
const postNodes = getNodesByType(`MarkdownRemark`);
|
||||
const unicornNodes = getNodesByType(`UnicornsJson`);
|
||||
|
||||
unicornNodes.forEach(unicornNode => {
|
||||
const isAuthor = postNodes
|
||||
// Ensure it's actually a post
|
||||
.filter(post => !!post.frontmatter.authors)
|
||||
.some(post => {
|
||||
return post.frontmatter.authors.includes(unicornNode.id);
|
||||
});
|
||||
|
||||
createNodeField({
|
||||
name: `isAuthor`,
|
||||
node: unicornNode,
|
||||
value: isAuthor
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
exports.createPages = ({ graphql, actions }) => {
|
||||
const { createPage } = actions;
|
||||
|
||||
const blogPost = path.resolve(`./src/templates/blog-post/blog-post.tsx`);
|
||||
const blogProfile = path.resolve(
|
||||
`./src/templates/blog-profile/blog-profile.tsx`
|
||||
);
|
||||
const postList = path.resolve(`./src/templates/post-list/post-list.tsx`);
|
||||
return graphql(
|
||||
`
|
||||
{
|
||||
allMarkdownRemark(
|
||||
sort: { fields: [frontmatter___published], order: DESC }
|
||||
filter: { fileAbsolutePath: { regex: "/content/blog/" } }
|
||||
limit: 1000
|
||||
) {
|
||||
edges {
|
||||
node {
|
||||
fields {
|
||||
slug
|
||||
}
|
||||
frontmatter {
|
||||
title
|
||||
authors {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
allUnicornsJson(limit: 100) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
).then(result => {
|
||||
if (result.errors) {
|
||||
throw result.errors;
|
||||
}
|
||||
|
||||
// Create blog posts pages.
|
||||
const posts = result.data.allMarkdownRemark.edges;
|
||||
const unicorns = result.data.allUnicornsJson.edges;
|
||||
|
||||
posts.forEach((post, index, arr) => {
|
||||
const previous = index === arr.length - 1 ? null : arr[index + 1].node;
|
||||
const next = index === 0 ? null : arr[index - 1].node;
|
||||
|
||||
const postInfo = post.node.frontmatter;
|
||||
if (postInfo.attached && postInfo.attached.length > 0) {
|
||||
postInfo.attached.forEach(({ file: fileStr }) => {
|
||||
const postPath = post.node.fields.slug;
|
||||
const relFilePath = path.join(
|
||||
__dirname,
|
||||
"static",
|
||||
"posts",
|
||||
postPath,
|
||||
fileStr
|
||||
);
|
||||
const fileExists = fs.existsSync(path.resolve(relFilePath));
|
||||
if (!fileExists) {
|
||||
console.error(
|
||||
`Could not find file to attach in the static folder: ${postPath}${fileStr}`
|
||||
);
|
||||
console.error(
|
||||
`To fix this problem, attach the file to the static folder's expected path above, or remove it from the post frontmatter definition`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
createPage({
|
||||
path: `/posts${post.node.fields.slug}`,
|
||||
component: blogPost,
|
||||
context: {
|
||||
slug: post.node.fields.slug,
|
||||
previous,
|
||||
next
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const postsPerPage = 8;
|
||||
const numberOfPages = Math.ceil(posts.length / postsPerPage);
|
||||
|
||||
createPage({
|
||||
path: "/",
|
||||
component: postList,
|
||||
context: {
|
||||
limitNumber: postsPerPage,
|
||||
skipNumber: 0,
|
||||
pageIndex: 1,
|
||||
numberOfPages,
|
||||
absolutePath: "/"
|
||||
}
|
||||
});
|
||||
|
||||
for (const i of Array(numberOfPages).keys()) {
|
||||
if (i === 0) continue;
|
||||
const pageNum = i + 1;
|
||||
const skipNumber = postsPerPage * i;
|
||||
createPage({
|
||||
path: `/page/${pageNum}/`,
|
||||
component: postList,
|
||||
context: {
|
||||
limitNumber: postsPerPage,
|
||||
skipNumber,
|
||||
pageIndex: pageNum,
|
||||
numberOfPages,
|
||||
absolutePath: "/"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
unicorns.forEach(unicorn => {
|
||||
const uniId = unicorn.node.id;
|
||||
|
||||
const uniPosts = posts.filter(({ node: { frontmatter } }) =>
|
||||
frontmatter.authors.find(uni => uni.id === uniId)
|
||||
);
|
||||
|
||||
const numberOfUniPages = Math.ceil(uniPosts.length / postsPerPage);
|
||||
|
||||
createPage({
|
||||
path: `/unicorns/${uniId}/`,
|
||||
component: blogProfile,
|
||||
context: {
|
||||
slug: uniId,
|
||||
limitNumber: postsPerPage,
|
||||
skipNumber: 0,
|
||||
pageIndex: 1,
|
||||
numberOfPages: numberOfUniPages,
|
||||
absolutePath: `/unicorns/${uniId}/`
|
||||
}
|
||||
});
|
||||
|
||||
for (const i of Array(numberOfUniPages).keys()) {
|
||||
if (i === 0) continue;
|
||||
const pageNum = i + 1;
|
||||
const skipNumber = postsPerPage * i;
|
||||
createPage({
|
||||
path: `/unicorns/${uniId}/page/${pageNum}/`,
|
||||
component: blogProfile,
|
||||
context: {
|
||||
slug: uniId,
|
||||
limitNumber: postsPerPage,
|
||||
skipNumber,
|
||||
pageIndex: pageNum,
|
||||
numberOfPages: numberOfUniPages,
|
||||
absolutePath: `/unicorns/${uniId}/`
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return null;
|
||||
});
|
||||
};
|
||||
@@ -1,82 +0,0 @@
|
||||
/**
|
||||
* Much of this code deals with dark mode. It's ripped straight from:
|
||||
* @see https://joshwcomeau.com/gatsby/dark-mode/
|
||||
*
|
||||
* Huge thanks to Josh for outlining how to do this
|
||||
*/
|
||||
import React from "react";
|
||||
import Terser from "terser";
|
||||
|
||||
import {
|
||||
COLOR_MODE_KEY,
|
||||
COLORS,
|
||||
INITIAL_COLOR_MODE_CSS_PROP
|
||||
} from "./src/constants";
|
||||
|
||||
/**
|
||||
* DARK MODE CODE
|
||||
*
|
||||
* Prevents the "flash" of light mode
|
||||
*/
|
||||
/**
|
||||
* Trust me, I know that it looks like we're reading entries from an emoji
|
||||
* but what's really happening is that this function is being converted to a
|
||||
* string, then mutated by "MagicScriptTag" in order to add in dynamic code
|
||||
* into that string. This way, we're able to avoid duplicating
|
||||
*/
|
||||
function setColorsByTheme() {
|
||||
const colors = "🌈";
|
||||
const colorModeKey = "🔑";
|
||||
const colorModeCssProp = "⚡️";
|
||||
|
||||
const mql = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
const prefersDarkFromMQ = mql.matches;
|
||||
const prefersDarkFromLocalStorage = localStorage.getItem(colorModeKey);
|
||||
|
||||
let colorMode = "light";
|
||||
|
||||
const hasUsedToggle = typeof prefersDarkFromLocalStorage === "string";
|
||||
|
||||
if (hasUsedToggle) {
|
||||
colorMode = prefersDarkFromLocalStorage;
|
||||
} else {
|
||||
colorMode = prefersDarkFromMQ ? "dark" : "light";
|
||||
}
|
||||
|
||||
let root = document.documentElement;
|
||||
|
||||
root.style.setProperty(colorModeCssProp, colorMode);
|
||||
|
||||
Object.entries(colors).forEach(([name, colorByTheme]) => {
|
||||
const cssVarName = `--${name}`;
|
||||
|
||||
root.style.setProperty(cssVarName, colorByTheme[colorMode]);
|
||||
});
|
||||
}
|
||||
|
||||
const MagicScriptTag = () => {
|
||||
const boundFn = String(setColorsByTheme)
|
||||
.replace('"🌈"', JSON.stringify(COLORS))
|
||||
.replace("🔑", COLOR_MODE_KEY)
|
||||
.replace("⚡️", INITIAL_COLOR_MODE_CSS_PROP);
|
||||
|
||||
let calledFunction = `(${boundFn})()`;
|
||||
|
||||
calledFunction = Terser.minify(calledFunction).code;
|
||||
|
||||
// eslint-disable-next-line react/no-danger
|
||||
return <script dangerouslySetInnerHTML={{ __html: calledFunction }} />;
|
||||
};
|
||||
|
||||
export const onRenderBody = ({
|
||||
setPreBodyComponents,
|
||||
setPostBodyComponents
|
||||
}) => {
|
||||
// Set the dark mode script
|
||||
setPreBodyComponents(<MagicScriptTag />);
|
||||
|
||||
// This must be set for ConvertKit to work properly
|
||||
setPostBodyComponents([
|
||||
<script src="https://f.convertkit.com/ckjs/ck.5.js" />
|
||||
]);
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
const { resolve } = require("path");
|
||||
|
||||
module.exports = {
|
||||
preset: 'ts-jest/presets/js-with-babel',
|
||||
testEnvironment: "jsdom",
|
||||
testMatch: ["**/__tests__/**/*.ts?(x)", "**/?(*.)+(test).ts?(x)"],
|
||||
moduleNameMapper: {
|
||||
".+\\.(css|styl|less|sass|scss)$": `identity-obj-proxy`,
|
||||
".+\\.svg$": `<rootDir>/__mocks__/svg-comp-mock.ts`,
|
||||
".+\\.(jpg|svg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": `<rootDir>/__mocks__/file-mock.ts`,
|
||||
"^__mocks__/(.*)$": resolve(__dirname, "./__mocks__/$1"),
|
||||
"^constants/(.*)$": resolve(__dirname, "./src/constants/$1"),
|
||||
"^types/(.*)$": resolve(__dirname, "./src/types/$1"),
|
||||
"^components/(.*)$": resolve(__dirname, "./src/components/$1"),
|
||||
"^utils/(.*)$": resolve(__dirname, "./src/utils/$1"),
|
||||
"^uu-types$": resolve(__dirname, "./src/types"),
|
||||
"^uu-utils$": resolve(__dirname, "./src/utils"),
|
||||
"^uu-constants$": resolve(__dirname, "./src/constants"),
|
||||
"^assets/(.*)": resolve(__dirname, "./src/assets/$1")
|
||||
},
|
||||
testPathIgnorePatterns: [`node_modules`, `.cache`],
|
||||
transformIgnorePatterns: [`node_modules/(?!(gatsby)/)`],
|
||||
globals: {
|
||||
__PATH_PREFIX__: ``,
|
||||
"ts-jest": {
|
||||
tsconfig: "tsconfig.json",
|
||||
babelConfig: true,
|
||||
}
|
||||
},
|
||||
setupFilesAfterEnv: ["<rootDir>/config/jest/setup-test-env.ts"],
|
||||
watchPlugins: [
|
||||
"jest-watch-typeahead/filename",
|
||||
"jest-watch-typeahead/testname"
|
||||
]
|
||||
};
|
||||
47
lib/api.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import fs from 'fs'
|
||||
import { join } from 'path'
|
||||
import matter from 'gray-matter'
|
||||
|
||||
export const postsDirectory = join(process.cwd(), 'content/blog')
|
||||
|
||||
export function getPostSlugs() {
|
||||
return fs.readdirSync(postsDirectory)
|
||||
}
|
||||
|
||||
export function getPostBySlug(slug: string, fields: string[] = []) {
|
||||
const realSlug = slug.replace(/\.md$/, '')
|
||||
const fullPath = join(postsDirectory, realSlug, `index.md`)
|
||||
const fileContents = fs.readFileSync(fullPath, 'utf8')
|
||||
const { data, content } = matter(fileContents)
|
||||
|
||||
type Items = {
|
||||
[key: string]: string
|
||||
}
|
||||
|
||||
const items: Items = {}
|
||||
|
||||
// Ensure only the minimal needed data is exposed
|
||||
fields.forEach((field) => {
|
||||
if (field === 'slug') {
|
||||
items[field] = realSlug
|
||||
}
|
||||
if (field === 'content') {
|
||||
items[field] = content
|
||||
}
|
||||
|
||||
if (typeof data[field] !== 'undefined') {
|
||||
items[field] = data[field]
|
||||
}
|
||||
})
|
||||
|
||||
return items
|
||||
}
|
||||
|
||||
export function getAllPosts(fields: string[] = []) {
|
||||
const slugs = getPostSlugs()
|
||||
const posts = slugs
|
||||
.map((slug) => getPostBySlug(slug, fields))
|
||||
// sort posts by date in descending order
|
||||
.sort((post1, post2) => (post1.date > post2.date ? -1 : 1))
|
||||
return posts
|
||||
}
|
||||
4
lib/constants.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const EXAMPLE_PATH = 'blog-starter-typescript'
|
||||
export const CMS_NAME = 'Markdown'
|
||||
export const HOME_OG_IMAGE_URL =
|
||||
'https://og-image.vercel.app/Next.js%20Blog%20Starter%20Example.png?theme=light&md=1&fontSize=100px&images=https%3A%2F%2Fassets.vercel.com%2Fimage%2Fupload%2Ffront%2Fassets%2Fdesign%2Fnextjs-black-logo.svg'
|
||||
12
lib/markdownToHtml.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import remark from 'remark'
|
||||
import html from 'remark-html'
|
||||
// TODO: Create types
|
||||
const behead = require('remark-behead')
|
||||
|
||||
export default async function markdownToHtml(markdown: string) {
|
||||
const result = await remark()
|
||||
.use(behead, { after: 0, depth: 1 })
|
||||
.use(html)
|
||||
.process(markdown)
|
||||
return result.toString()
|
||||
}
|
||||
6
next-env.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/types/global" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
28442
package-lock.json
generated
147
package.json
@@ -1,138 +1,31 @@
|
||||
{
|
||||
"name": "unicorn-utterances-site",
|
||||
"private": true,
|
||||
"description": "Learning programming from magically majestic words",
|
||||
"version": "0.1.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/unicorn-utterances/unicorn-utterances/issues"
|
||||
},
|
||||
"homepage": "https://unicorn-utterances.com",
|
||||
"keywords": [
|
||||
"blog",
|
||||
"education",
|
||||
"programming"
|
||||
],
|
||||
"license": "MPL-2.0",
|
||||
"main": "n/a",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/unicorn-utterances/unicorn-utterances.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "gatsby build",
|
||||
"build-beta": "cross-env BUILD_ENV=development npm run build",
|
||||
"debug": "gatsby clean && node --nolazy --inspect-brk --max-old-space-size=2000 ./node_modules/gatsby/dist/bin/gatsby.js develop",
|
||||
"develop": "cross-env BUILD_ENV=local gatsby develop",
|
||||
"format": "run-s format:**",
|
||||
"format:ts": "eslint --fix ./src/**/*.{ts,tsx}",
|
||||
"format:css": "stylelint --syntax=scss --fix \"./src/**/*.scss\"",
|
||||
"lint": "run-s lint:*",
|
||||
"lint:ts": "eslint ./src/**/*.{ts,tsx}",
|
||||
"lint:css": "stylelint --syntax=scss \"./src/**/*.scss\"",
|
||||
"start": "npm run develop",
|
||||
"serve": "gatsby serve",
|
||||
"test": "jest",
|
||||
"postinstall": "husky install"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx}": [
|
||||
"npm run format:ts"
|
||||
],
|
||||
"*.scss": [
|
||||
"npm run format:css"
|
||||
]
|
||||
"dev": "next",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@textlint/markdown-to-ast": "^6.3.4",
|
||||
"batteries-not-included": "0.1.0",
|
||||
"classnames": "^2.3.1",
|
||||
"disqus-react": "^1.1.2",
|
||||
"framer-motion": "^4.1.17",
|
||||
"gatsby": "^3.14.3",
|
||||
"gatsby-image": "^3.11.0",
|
||||
"gatsby-plugin-feed": "^3.14.0",
|
||||
"gatsby-plugin-google-analytics": "^3.14.0",
|
||||
"gatsby-plugin-image": "^1.14.1",
|
||||
"gatsby-plugin-lunr": "^1.5.2",
|
||||
"gatsby-plugin-manifest": "^3.14.0",
|
||||
"gatsby-plugin-offline": "^4.14.0",
|
||||
"gatsby-plugin-react-helmet": "^4.14.0",
|
||||
"gatsby-plugin-react-svg": "^3.0.1",
|
||||
"gatsby-plugin-robots-txt": "^1.6.13",
|
||||
"gatsby-plugin-sass": "^4.14.0",
|
||||
"gatsby-plugin-sharp": "^3.14.1",
|
||||
"gatsby-plugin-sitemap": "^4.10.0",
|
||||
"gatsby-plugin-typescript": "^3.14.0",
|
||||
"gatsby-plugin-web-font-loader": "^1.0.4",
|
||||
"gatsby-remark-autolink-headers": "^4.11.0",
|
||||
"gatsby-remark-behead": "^0.0.3",
|
||||
"gatsby-remark-copy-linked-files": "^4.11.0",
|
||||
"gatsby-remark-embedder": "^5.0.0",
|
||||
"gatsby-remark-external-links": "0.0.4",
|
||||
"gatsby-remark-images": "^5.11.0",
|
||||
"gatsby-remark-images-medium-zoom": "^1.7.0",
|
||||
"gatsby-remark-prismjs": "^5.11.0",
|
||||
"gatsby-remark-responsive-iframe": "^4.11.0",
|
||||
"gatsby-remark-series": "^1.0.3",
|
||||
"gatsby-remark-video": "^1.2.5",
|
||||
"gatsby-source-filesystem": "^3.14.0",
|
||||
"gatsby-transformer-json": "^3.14.0",
|
||||
"gatsby-transformer-remark": "^4.11.0",
|
||||
"gatsby-transformer-sharp": "^3.14.0",
|
||||
"github-slugger": "^1.4.0",
|
||||
"lodash.deburr": "^4.1.0",
|
||||
"medium-zoom": "^1.0.5",
|
||||
"prismjs": "^1.25.0",
|
||||
"classnames": "2.3.1",
|
||||
"date-fns": "2.21.3",
|
||||
"gray-matter": "4.0.3",
|
||||
"next": "latest",
|
||||
"next-mdx-remote": "^3.0.7",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-helmet": "^6.1.0",
|
||||
"react-paginate": "^7.1.3",
|
||||
"terser": "^4.8.0",
|
||||
"typescript": "^4.4.4",
|
||||
"unist-util-flat-filter": "^1.0.0",
|
||||
"unist-util-visit": "^2.0.2"
|
||||
"rehype-image-size": "^1.0.0",
|
||||
"rehype-img-size": "^0.0.1",
|
||||
"remark": "13.0.0",
|
||||
"remark-behead": "^2.3.3",
|
||||
"remark-html": "13.0.1",
|
||||
"remark-images": "^3.1.0",
|
||||
"typescript": "^4.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.15.8",
|
||||
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
||||
"@babel/plugin-transform-react-jsx": "^7.14.9",
|
||||
"@babel/plugin-transform-react-jsx-self": "^7.14.9",
|
||||
"@babel/preset-env": "^7.15.8",
|
||||
"@babel/preset-typescript": "^7.15.0",
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"@testing-library/react": "^12.1.2",
|
||||
"@types/jest-axe": "^3.5.3",
|
||||
"@types/react-dom": "^17.0.10",
|
||||
"@types/react-helmet": "^6.1.4",
|
||||
"@types/react-paginate": "^7.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.1.0",
|
||||
"@typescript-eslint/parser": "^5.1.0",
|
||||
"babel-jest": "^27.3.1",
|
||||
"babel-loader": "^8.2.3",
|
||||
"babel-preset-gatsby": "^1.14.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-config-react-app": "^6.0.0",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-react": "^7.26.1",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"husky": "^7.0.4",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^27.3.1",
|
||||
"jest-axe": "^5.0.1",
|
||||
"jest-watch-typeahead": "^1.0.0",
|
||||
"lint-staged": "^11.2.3",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.4.1",
|
||||
"sass": "^1.43.2",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-prettier": "^9.0.3",
|
||||
"stylelint-prettier": "^1.2.0",
|
||||
"ts-jest": "^27.0.7",
|
||||
"tsconfig-paths-webpack-plugin": "^3.5.1"
|
||||
"@types/jest": "^26.0.23",
|
||||
"@types/node": "^15.6.0",
|
||||
"@types/react": "^17.0.6",
|
||||
"@types/react-dom": "^17.0.5"
|
||||
}
|
||||
}
|
||||
|
||||
6
pages/_app.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { AppProps } from 'next/app'
|
||||
import '../styles/index.css'
|
||||
|
||||
export default function MyApp({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />
|
||||
}
|
||||
15
pages/_document.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
export default class MyDocument extends Document {
|
||||
render() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head />
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
}
|
||||
32
pages/index.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { getAllPosts } from '../lib/api'
|
||||
import Head from 'next/head'
|
||||
import { CMS_NAME } from '../lib/constants'
|
||||
import Post from '../types/post'
|
||||
|
||||
type Props = {
|
||||
allPosts: Post[]
|
||||
}
|
||||
|
||||
const Index = ({ allPosts }: Props) => {
|
||||
return (
|
||||
<>
|
||||
<p>Test</p>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Index
|
||||
|
||||
export const getStaticProps = async () => {
|
||||
const allPosts = getAllPosts([
|
||||
'title',
|
||||
'date',
|
||||
'slug',
|
||||
'author',
|
||||
'excerpt',
|
||||
])
|
||||
|
||||
return {
|
||||
props: { allPosts },
|
||||
}
|
||||
}
|
||||
77
pages/posts/[slug].tsx
Normal file
@@ -0,0 +1,77 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import ErrorPage from 'next/error'
|
||||
import {getPostBySlug, getAllPosts, postsDirectory} from '../../lib/api'
|
||||
import { serialize } from "next-mdx-remote/serialize";
|
||||
// TODO: Type
|
||||
import imageSize from "rehype-img-size";
|
||||
import {PostRenderer} from "../../components/PostRenderer";
|
||||
import remarkImages from "remark-images";
|
||||
import {join} from "path";
|
||||
|
||||
type Props = {
|
||||
compiledSource: string
|
||||
}
|
||||
|
||||
const Post = ({ compiledSource }: Props) => {
|
||||
// const router = useRouter()
|
||||
// if (!router.isFallback) {
|
||||
// return <ErrorPage statusCode={404} />
|
||||
// }
|
||||
return (
|
||||
// <p>test</p>
|
||||
<PostRenderer post={compiledSource} />
|
||||
)
|
||||
}
|
||||
|
||||
export default Post
|
||||
|
||||
type Params = {
|
||||
params: {
|
||||
slug: string
|
||||
}
|
||||
}
|
||||
|
||||
export async function getStaticProps({ params }: Params) {
|
||||
const post = getPostBySlug(params.slug, [
|
||||
'title',
|
||||
'slug',
|
||||
'content'
|
||||
])
|
||||
const markdown = post.content || '';
|
||||
|
||||
// pass your markdown string to the serialize function
|
||||
const {compiledSource} = await serialize(markdown, {
|
||||
mdxOptions: {
|
||||
// use the image size plugin, you can also specify which folder to load images from
|
||||
// in my case images are in /public/images/, so I just prepend 'public'
|
||||
// rehypePlugins: [[imageSize, { dir: "public" }]],
|
||||
remarkPlugins: [remarkImages],
|
||||
filepath: join(postsDirectory, post.slug)
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
props: {
|
||||
compiledSource,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = getAllPosts(['slug'])
|
||||
|
||||
console.log(posts)
|
||||
|
||||
const paths = posts.map((post) => {
|
||||
return {
|
||||
params: {
|
||||
slug: post.slug,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
paths,
|
||||
fallback: false,
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* While I would much MUCH rather utilize the existing AST manipulation from
|
||||
* the remarked plugin, we've hit a bit of a snag. The problem is explained here:
|
||||
* https://github.com/gatsbyjs/gatsby/issues/22287
|
||||
*
|
||||
* Once this issue is resolved/workedaround, we can move back to the code that
|
||||
* was previously confirmed working here:
|
||||
* https://github.com/unicorn-utterances/unicorn-utterances/tree/c6d64a44ee8a4e7d6cad1dbd2d01bc9a6ad78241/plugins/count-inline-code
|
||||
*/
|
||||
const flatFilter = require("unist-util-flat-filter");
|
||||
const parse = require("@textlint/markdown-to-ast").parse;
|
||||
|
||||
exports.createSchemaCustomization = ({ actions }) => {
|
||||
const { createTypes } = actions;
|
||||
const typeDefs = `
|
||||
type MarkdownRemarkFields implements Node {
|
||||
inlineCount: Int
|
||||
}
|
||||
`;
|
||||
createTypes(typeDefs);
|
||||
};
|
||||
exports.sourceNodes = ({ getNodesByType, actions }) => {
|
||||
const postNodes = getNodesByType(`MarkdownRemark`);
|
||||
const { createNodeField } = actions;
|
||||
postNodes.forEach(postNode => {
|
||||
const markdownAST = parse(postNode.rawMarkdownBody);
|
||||
const inlineCodeAST = flatFilter(markdownAST, node => node.type === "Code");
|
||||
let inlineWords = 0;
|
||||
if (inlineCodeAST && inlineCodeAST.children) {
|
||||
inlineWords = inlineCodeAST.children
|
||||
// Prevent grabbing from https://github.com/nullhook/gatsby-remark-video
|
||||
.filter(child => !child.value.startsWith("video:"))
|
||||
.reduce((numberOfInline, inlineCodeNode) => {
|
||||
const { value } = inlineCodeNode;
|
||||
const words = value.split(/\b/g);
|
||||
return numberOfInline + words.length;
|
||||
}, 0);
|
||||
}
|
||||
|
||||
createNodeField({
|
||||
name: `inlineCount`,
|
||||
node: postNode,
|
||||
value: inlineWords
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "count-inline-code",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@textlint/markdown-to-ast": "^6.1.7",
|
||||
"unist-util-flat-filter": "^1.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
/**
|
||||
* While I would much MUCH rather utilize the existing AST manipulation from
|
||||
* the remarked plugin, we've hit a bit of a snag. The problem is explained here:
|
||||
* https://github.com/gatsbyjs/gatsby/issues/22287
|
||||
*
|
||||
* Once this issue is resolved/workedaround, we can move back to the code that
|
||||
* was previously confirmed working here:
|
||||
* https://github.com/unicorn-utterances/unicorn-utterances/tree/4efc6216f0efc228ced5c6e5491cb8b77cb64c55/plugins/remarked-autolink-headers-and-add-id
|
||||
*/
|
||||
const flatFilter = require("unist-util-flat-filter");
|
||||
const parse = require("@textlint/markdown-to-ast").parse;
|
||||
const deburr = require(`lodash.deburr`);
|
||||
|
||||
exports.createSchemaCustomization = ({ actions }) => {
|
||||
const { createTypes } = actions;
|
||||
const typeDefs = `
|
||||
type MarkdownRemarkFields implements Node {
|
||||
headingsWithId: [HeadingsWithId]
|
||||
}
|
||||
type HeadingsWithId {
|
||||
value: String!
|
||||
depth: Int!
|
||||
slug: String!
|
||||
}
|
||||
`;
|
||||
createTypes(typeDefs);
|
||||
};
|
||||
|
||||
/**
|
||||
* Copied directly from the plugin source:
|
||||
* https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-remark-autolink-headers/src/index.js#L30-L49
|
||||
*/
|
||||
const getId = node => {
|
||||
let id;
|
||||
if (node.children.length > 0) {
|
||||
const last = node.children[node.children.length - 1];
|
||||
// This regex matches to preceding spaces and {#custom-id} at the end of a string.
|
||||
// Also, checks the text of node won't be empty after the removal of {#custom-id}.
|
||||
const match = /^(.*?)\s*\{#([\w-]+)\}$/.exec(toString(last));
|
||||
if (match && (match[1] || node.children.length > 1)) {
|
||||
id = match[2];
|
||||
// Remove the custom ID from the original text.
|
||||
if (match[1]) {
|
||||
last.value = match[1];
|
||||
} else {
|
||||
node.children.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!id) {
|
||||
const slug = slugs.slug(toString(node), true);
|
||||
id = deburr(slug);
|
||||
}
|
||||
return id;
|
||||
};
|
||||
|
||||
// Hand-written regex
|
||||
const anchorRegex = /^(.*?)(?:\s*\{#([\w-]+)\})?$/;
|
||||
|
||||
exports.sourceNodes = ({ getNodesByType, actions }) => {
|
||||
const postNodes = getNodesByType(`MarkdownRemark`);
|
||||
const { createNodeField } = actions;
|
||||
|
||||
postNodes.forEach(postNode => {
|
||||
const slugs = require(`github-slugger`)();
|
||||
|
||||
const markdownAST = parse(postNode.rawMarkdownBody);
|
||||
const values = flatFilter(markdownAST, node => node.type === "Header");
|
||||
|
||||
const headings = values.children.map(node => {
|
||||
const headingText = node.children
|
||||
.filter(child => child.value)
|
||||
.map(child => child.value)
|
||||
.join("");
|
||||
|
||||
let [_, headingTrueText, headerId] =
|
||||
anchorRegex.exec(headingText) || [];
|
||||
|
||||
if (!headerId) {
|
||||
const slug = slugs.slug(headingTrueText, true);
|
||||
headerId = deburr(slug);
|
||||
}
|
||||
|
||||
return {
|
||||
value: headingTrueText,
|
||||
depth: node.depth,
|
||||
// This is added by the `gatsby-remark-autolink-headers` plugin, we're just using it here
|
||||
// This means that it must come after that plugin in your config file
|
||||
slug: headerId
|
||||
};
|
||||
});
|
||||
|
||||
createNodeField({
|
||||
name: `headingsWithId`,
|
||||
node: postNode,
|
||||
value: headings
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "remarked-autolink-headers-and-add-id",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@textlint/markdown-to-ast": "^6.1.7",
|
||||
"github-slugger": "^1.2.1",
|
||||
"lodash.deburr": "^4.1.0",
|
||||
"unist-util-flat-filter": "^1.0.0"
|
||||
}
|
||||
}
|
||||
BIN
public/assets/blog/authors/jj.jpeg
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
public/assets/blog/authors/joe.jpeg
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
public/assets/blog/authors/tim.jpeg
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
public/assets/blog/dynamic-routing/cover.jpg
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
public/assets/blog/hello-world/cover.jpg
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
public/assets/blog/preview/cover.jpg
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
public/favicon/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/favicon/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/favicon/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
9
public/favicon/browserconfig.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/favicons/mstile-150x150.png"/>
|
||||
<TileColor>#000000</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
BIN
public/favicon/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 595 B |
BIN
public/favicon/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 880 B |
BIN
public/favicon/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/favicon/mstile-150x150.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
33
public/favicon/safari-pinned-tab.svg
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="1024.000000pt" height="1024.000000pt" viewBox="0 0 1024.000000 1024.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,1024.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M4785 10234 c-22 -2 -92 -9 -155 -14 -1453 -131 -2814 -915 -3676
|
||||
-2120 -480 -670 -787 -1430 -903 -2235 -41 -281 -46 -364 -46 -745 0 -381 5
|
||||
-464 46 -745 278 -1921 1645 -3535 3499 -4133 332 -107 682 -180 1080 -224
|
||||
155 -17 825 -17 980 0 687 76 1269 246 1843 539 88 45 105 57 93 67 -8 6 -383
|
||||
509 -833 1117 l-818 1105 -1025 1517 c-564 834 -1028 1516 -1032 1516 -4 1 -8
|
||||
-673 -10 -1496 -3 -1441 -4 -1499 -22 -1533 -26 -49 -46 -69 -88 -91 -32 -16
|
||||
-60 -19 -211 -19 l-173 0 -46 29 c-30 19 -52 44 -67 73 l-21 45 2 2005 3 2006
|
||||
31 39 c16 21 50 48 74 61 41 20 57 22 230 22 204 0 238 -8 291 -66 15 -16 570
|
||||
-852 1234 -1859 664 -1007 1572 -2382 2018 -3057 l810 -1227 41 27 c363 236
|
||||
747 572 1051 922 647 743 1064 1649 1204 2615 41 281 46 364 46 745 0 381 -5
|
||||
464 -46 745 -278 1921 -1645 3535 -3499 4133 -327 106 -675 179 -1065 223 -96
|
||||
10 -757 21 -840 13z m2094 -3094 c48 -24 87 -70 101 -118 8 -26 10 -582 8
|
||||
-1835 l-3 -1798 -317 486 -318 486 0 1307 c0 845 4 1320 10 1343 16 56 51 100
|
||||
99 126 41 21 56 23 213 23 148 0 174 -2 207 -20z"/>
|
||||
<path d="M7843 789 c-35 -22 -46 -37 -15 -20 22 13 58 40 52 41 -3 0 -20 -10
|
||||
-37 -21z"/>
|
||||
<path d="M7774 744 c-18 -14 -18 -15 4 -4 12 6 22 13 22 15 0 8 -5 6 -26 -11z"/>
|
||||
<path d="M7724 714 c-18 -14 -18 -15 4 -4 12 6 22 13 22 15 0 8 -5 6 -26 -11z"/>
|
||||
<path d="M7674 684 c-18 -14 -18 -15 4 -4 12 6 22 13 22 15 0 8 -5 6 -26 -11z"/>
|
||||
<path d="M7598 644 c-38 -20 -36 -28 2 -9 17 9 30 18 30 20 0 7 -1 6 -32 -11z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
19
public/favicon/site.webmanifest
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Next.js",
|
||||
"short_name": "Next.js",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/favicons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/favicons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#000000",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 179 KiB |
@@ -1,31 +0,0 @@
|
||||
import React, { SVGProps, useRef } from "react";
|
||||
import { genId } from "batteries-not-included/react/a11y";
|
||||
|
||||
export const Attachment = (props: Partial<SVGProps<any>>) => {
|
||||
const clipId = useRef<string>(`path-1-inside-1${genId()}`);
|
||||
|
||||
return (
|
||||
<svg
|
||||
width="36"
|
||||
height="36"
|
||||
viewBox="0 0 36 36"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<g clipPath={`url(#${clipId.current})`}>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M24.6893 7.31065C23.0659 5.6873 20.4339 5.6873 18.8106 7.31066L8.06059 18.0607C5.33267 20.7886 5.33267 25.2114 8.06059 27.9393C10.7885 30.6673 15.2113 30.6673 17.9393 27.9393L30.4393 15.4393C31.0251 14.8535 31.9748 14.8535 32.5606 15.4393C33.1464 16.0251 33.1464 16.9749 32.5606 17.5607L20.0606 30.0607C16.1611 33.9602 9.83876 33.9601 5.93927 30.0607C2.03978 26.1612 2.03977 19.8388 5.93927 15.9393L16.6893 5.18934C19.4842 2.39441 24.0157 2.39441 26.8106 5.18933C29.6055 7.98426 29.6055 12.5157 26.8106 15.3107L16.0606 26.0606C14.3702 27.751 11.6296 27.751 9.93927 26.0607C8.24891 24.3703 8.24891 21.6297 9.93927 19.9393L19.9393 9.93933C20.5251 9.35355 21.4748 9.35355 22.0606 9.93933C22.6464 10.5251 22.6464 11.4749 22.0606 12.0607L12.0606 22.0607C11.5418 22.5794 11.5418 23.4205 12.0606 23.9393C12.5794 24.4581 13.4205 24.4581 13.9393 23.9393L24.6893 13.1893C26.3126 11.566 26.3126 8.93401 24.6893 7.31065Z"
|
||||
fill="#153E67"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id={clipId.current}>
|
||||
<rect width="36" height="36" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M19.5607 9.06066C20.1464 8.47487 20.1464 7.52513 19.5607 6.93934C18.9749 6.35355 18.0251 6.35355 17.4393 6.93934L6.93934 17.4393C6.79553 17.5832 6.68702 17.7489 6.61382 17.9258C6.54048 18.1027 6.5 18.2966 6.5 18.5C6.5 18.7034 6.54048 18.8973 6.61382 19.0742C6.68702 19.2511 6.79553 19.4168 6.93934 19.5607L17.4393 30.0607C18.0251 30.6464 18.9749 30.6464 19.5607 30.0607C20.1464 29.4749 20.1464 28.5251 19.5607 27.9393L11.6213 20H29C29.8284 20 30.5 19.3284 30.5 18.5C30.5 17.6716 29.8284 17 29 17H11.6213L19.5607 9.06066Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 715 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M32.5607 6.43934C33.1464 7.02513 33.1464 7.97487 32.5607 8.56066L14.5607 26.5607C13.9749 27.1464 13.0251 27.1464 12.4393 26.5607L3.43934 17.5607C2.85355 16.9749 2.85355 16.0251 3.43934 15.4393C4.02513 14.8536 4.97487 14.8536 5.56066 15.4393L13.5 23.3787L30.4393 6.43934C31.0251 5.85355 31.9749 5.85355 32.5607 6.43934Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 513 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M16.9393 12.4393C17.5251 11.8536 18.4749 11.8536 19.0607 12.4393L28.0607 21.4393C28.6464 22.0251 28.6464 22.9749 28.0607 23.5607C27.4749 24.1464 26.5251 24.1464 25.9393 23.5607L18 15.6213L10.0607 23.5607C9.47487 24.1464 8.52513 24.1464 7.93934 23.5607C7.35355 22.9749 7.35355 22.0251 7.93934 21.4393L16.9393 12.4393Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 511 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M18 12C14.6863 12 12 14.6863 12 18C12 21.3137 14.6863 24 18 24C21.3137 24 24 21.3137 24 18C24 14.6863 21.3137 12 18 12ZM9 18C9 13.0294 13.0294 9 18 9C22.9706 9 27 13.0294 27 18C27 22.9706 22.9706 27 18 27C13.0294 27 9 22.9706 9 18Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 426 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 1000 1000">
|
||||
<path d="M0 500c0-90.667 22.334-174.333 67-251 44.667-76.667 105.334-137.333 182-182C325.667 22.333 409.334 0 500 0c90.667 0 174.334 22.333 251 67 76.667 44.667 137.334 105.333 182 182 44.667 76.667 67 160.333 67 251s-22.333 174.333-67 251c-44.666 76.667-105.333 137.333-182 182-76.666 44.667-160.333 67-251 67-90.666 0-174.333-22.333-251-67-76.666-44.667-137.333-105.333-182-182C22.334 674.333 0 590.667 0 500zm83 0c0 104 35 195.667 105 275 32-62.667 82.667-122.333 152-179 69.334-56.667 137-92.333 203-107-10-23.333-19.666-44.333-29-63-114.666 36.667-238.666 55-372 55-26 0-45.333-.333-58-1 0 2.667-.166 6-.5 10-.333 4-.5 7.333-.5 10zm13-103c14.667 1.333 36.334 2 65 2 111.334 0 217-15 317-45-50.666-90-106.333-165-167-225-52.666 26.667-97.833 63.667-135.5 111-37.666 47.333-64.166 99.667-79.5 157zm149 432c75.334 58.667 160.334 88 255 88 49.334 0 98.334-9.333 147-28-13.333-114-39.333-224.333-78-331-61.333 13.333-123.166 47-185.5 101C321.167 713 275 769.667 245 829zM398 97c58.667 60.667 113 136.333 163 227 90.667-38 159-86.333 205-145-77.333-64-166-96-266-96-34 0-68 4.667-102 14zm199 298c10 21.333 21.334 48.333 34 81 49.334-4.667 103-7 161-7 41.334 0 82.334 1 123 3-5.333-90.667-38-171.333-98-242-43.333 64.667-116.666 119.667-220 165zm59 151c34 98.667 57 200 69 304 52.667-34 95.667-77.667 129-131 33.334-53.333 53.334-111 60-173-48.666-3.333-93-5-133-5-36.666 0-78.333 1.667-125 5z" fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M16.9393 23.5605C17.5251 24.1463 18.4749 24.1463 19.0607 23.5605L28.0607 14.5605C28.6464 13.9748 28.6464 13.025 28.0607 12.4392C27.4749 11.8534 26.5251 11.8534 25.9393 12.4392L18 20.3786L10.0607 12.4392C9.47487 11.8534 8.52513 11.8534 7.93934 12.4392C7.35355 13.025 7.35355 13.9748 7.93934 14.5605L16.9393 23.5605Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 509 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M15.636 4.63604C17.3239 2.94821 19.3631 2 21.75 2H26.5C27.3284 2 28 2.67157 28 3.5V9.5C28 10.3284 27.3284 11 26.5 11H22V14H26.5448C27.0067 14 27.4428 14.2128 27.7271 14.5769C28.0114 14.941 28.112 15.4157 28 15.8638L26.5 21.8638C26.3331 22.5316 25.7331 23 25.0448 23H22V33.5C22 34.3284 21.3284 35 20.5 35H14.5C13.6716 35 13 34.3284 13 33.5V23H9.5C8.67157 23 8 22.3284 8 21.5V15.5C8 14.6716 8.67157 14 9.5 14H13V11C13 8.61305 13.9482 6.32387 15.636 4.63604ZM21.75 5C20.1587 5 18.8826 5.63214 17.7574 6.75736C16.6321 7.88258 16 9.4087 16 11V15.5C16 16.3284 15.3284 17 14.5 17H11V20H14.5C15.3284 20 16 20.6716 16 21.5V32H19V21.5C19 20.6716 19.6716 20 20.5 20H23.8736L24.6236 17H20.5C19.6716 17 19 16.3284 19 15.5V11C19 10.2043 19.3161 9.44129 19.8787 8.87868C20.4413 8.31607 21.2043 8 22 8H25V5H21.75Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 992 B |
@@ -1,29 +0,0 @@
|
||||
import React, { SVGProps, useRef } from "react";
|
||||
import { genId } from "batteries-not-included/react/a11y";
|
||||
|
||||
export const Feather = (props: Partial<SVGProps<any>>) => {
|
||||
const clipId = useRef<string>(`path-1-inside-1${genId()}`);
|
||||
|
||||
return (
|
||||
<svg
|
||||
width="36"
|
||||
height="36"
|
||||
viewBox="0 0 36 36"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<g clipPath={`url(#${clipId.current})`}>
|
||||
<path
|
||||
d="M1.43934 32.4393C0.853553 33.0251 0.853553 33.9749 1.43934 34.5607C2.02513 35.1464 2.97487 35.1464 3.56066 34.5607L1.43934 32.4393ZM24.0607 14.0607C24.6464 13.4749 24.6464 12.5251 24.0607 11.9393C23.4749 11.3536 22.5251 11.3536 21.9393 11.9393L24.0607 14.0607ZM8.67157 14.3284L7.61091 13.2678L8.67157 14.3284ZM14.5607 23.5607L24.0607 14.0607L21.9393 11.9393L12.4393 21.4393L14.5607 23.5607ZM26.5 21H13.5V24H26.5V21ZM3.56066 34.5607L8.56066 29.5607L6.43934 27.4393L1.43934 32.4393L3.56066 34.5607ZM8.56066 29.5607L14.5607 23.5607L12.4393 21.4393L6.43934 27.4393L8.56066 29.5607ZM7.5 30H18.8431V27H7.5V30ZM22.7322 28.3891L31.5607 19.5607L29.4393 17.4393L20.6109 26.2678L22.7322 28.3891ZM9 28.5V17.1569H6V28.5H9ZM9.73223 15.3891L18.5607 6.56066L16.4393 4.43934L7.61091 13.2678L9.73223 15.3891ZM18.5607 6.56066C21.5647 3.55659 26.4353 3.5566 29.4393 6.56066L31.5607 4.43934C27.385 0.263705 20.615 0.263698 16.4393 4.43934L18.5607 6.56066ZM9 17.1569C9 16.4938 9.26339 15.8579 9.73223 15.3891L7.61091 13.2678C6.57946 14.2992 6 15.6982 6 17.1569H9ZM31.5607 19.5607C35.7363 15.385 35.7363 8.61497 31.5607 4.43934L29.4393 6.56066C32.4434 9.56472 32.4434 14.4353 29.4393 17.4393L31.5607 19.5607ZM18.8431 30C20.3018 30 21.7008 29.4205 22.7322 28.3891L20.6109 26.2678C20.1421 26.7366 19.5062 27 18.8431 27V30Z"
|
||||
fill="#153E67"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id={clipId.current}>
|
||||
<rect width="36" height="36" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M12 12C11.1716 12 10.5 12.6716 10.5 13.5C10.5 14.3284 11.1716 15 12 15H13.5H15C15.8284 15 16.5 14.3284 16.5 13.5C16.5 12.6716 15.8284 12 15 12H13.5H12ZM10.5 19.5C10.5 18.6716 11.1716 18 12 18H24C24.8284 18 25.5 18.6716 25.5 19.5C25.5 20.3284 24.8284 21 24 21H12C11.1716 21 10.5 20.3284 10.5 19.5ZM10.5 25.5C10.5 24.6716 11.1716 24 12 24H24C24.8284 24 25.5 24.6716 25.5 25.5C25.5 26.3284 24.8284 27 24 27H12C11.1716 27 10.5 26.3284 10.5 25.5Z"
|
||||
fill="#153E67"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M27.5 32H8.5C7.67157 32 7 31.3284 7 30.5V5.5C7 4.67157 7.67157 4 8.5 4H19V9C19 11.7614 21.2386 14 24 14H29V30.5C29 31.3284 28.3284 32 27.5 32ZM31.8204 11C31.9376 11.2577 32 11.5399 32 11.8284V14V30.5C32 32.9853 29.9853 35 27.5 35H8.5C6.01472 35 4 32.9853 4 30.5V5.5C4 3.01472 6.01472 1 8.5 1H19H21.1716C21.4368 1 21.6966 1.05268 21.9369 1.15224C21.9581 1.16101 21.9791 1.17015 22 1.17964C22.216 1.27792 22.4148 1.41477 22.5858 1.58579L31.4142 10.4142C31.5852 10.5852 31.7221 10.784 31.8204 11ZM22 5.24264L27.7574 11H24C22.8954 11 22 10.1046 22 9V5.24264Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,7 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M4.5 11.5C4.5 10.6716 5.17157 10 6 10H30C30.8284 10 31.5 10.6716 31.5 11.5C31.5 12.3284 30.8284 13 30 13H6C5.17157 13 4.5 12.3284 4.5 11.5ZM4.5 17.5C4.5 16.6716 5.17157 16 6 16H24C24.8284 16 25.5 16.6716 25.5 17.5C25.5 18.3284 24.8284 19 24 19H6C5.17157 19 4.5 18.3284 4.5 17.5ZM6 22C5.17157 22 4.5 22.6716 4.5 23.5C4.5 24.3284 5.17157 25 6 25L17 25C17.8284 25 18.5 24.3284 18.5 23.5C18.5 22.6716 17.8284 22 17 22L6 22Z"
|
||||
fill="#153E67"/>
|
||||
<path class="filterDropdown" d="M27.5446 28.3215L31.0209 24.8452C31.41 24.456 31.5528 23.9645 31.5027 23.5C31.4178 22.7111 30.7769 22 29.8424 22H22.8897C21.4049 22 20.6613 23.7952 21.7112 24.8452L25.1875 28.3215C25.8384 28.9724 26.8937 28.9724 27.5446 28.3215Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 907 B |
@@ -1,4 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg" class="strokeicon">
|
||||
<path d="M13.5001 29.15C6.07223 31.0723 7.00784 25.5 3.5 25.5M13.5001 33.5V28C13.5001 28 13.4538 27.0811 13.793 26.1501C14.036 25.4833 14.5044 25.0107 14.9979 24.5008C10.2879 23.9158 5.50006 22.1279 5.50006 13.9979C5.48885 11.8881 6.04525 9.72326 7.50006 8.19521C6.81628 6.36297 6.86463 4.33773 7.63506 2.54021C7.63506 2.54021 9.25766 2.0536 13.5001 4.50002C15.1379 4.05612 16.818 4.02097 18.5001 4.00002C20.1821 4.02097 21.862 4.05612 23.4998 4.50002C27.7422 2.0536 29.3648 2.54021 29.3648 2.54021C30.1353 4.33773 30.1836 6.36297 29.4998 8.19521C30.9546 9.72326 31.5111 11.8881 31.4998 13.9979C31.4998 22.1279 26.712 23.9158 22.002 24.5008C22.4955 25.0107 22.9639 25.4833 23.2069 26.1501C23.5461 27.0811 23.4998 28 23.4998 28V33.5"
|
||||
stroke="#153E67" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 952 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M18 4.5C10.5442 4.5 4.5 10.5442 4.5 18C4.5 25.4558 10.5442 31.5 18 31.5C25.4558 31.5 31.5 25.4558 31.5 18C31.5 10.5442 25.4558 4.5 18 4.5ZM1.5 18C1.5 8.8873 8.8873 1.5 18 1.5C27.1127 1.5 34.5 8.8873 34.5 18C34.5 27.1127 27.1127 34.5 18 34.5C8.8873 34.5 1.5 27.1127 1.5 18ZM18 16.5C18.8284 16.5 19.5 17.1716 19.5 18V24C19.5 24.8284 18.8284 25.5 18 25.5C17.1716 25.5 16.5 24.8284 16.5 24V18C16.5 17.1716 17.1716 16.5 18 16.5ZM18 13.5C18.8284 13.5 19.5 12.8284 19.5 12C19.5 11.1716 18.8284 10.5 18 10.5C17.1716 10.5 16.5 11.1716 16.5 12C16.5 12.8284 17.1716 13.5 18 13.5Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 763 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M10.5 6H25.5C27.9853 6 30 8.01472 30 10.5V25.5C30 27.9853 27.9853 30 25.5 30H10.5C8.01472 30 6 27.9853 6 25.5V10.5C6 8.01472 8.01472 6 10.5 6ZM25.5 3H10.5C6.35786 3 3 6.35786 3 10.5V25.5C3 29.6421 6.35786 33 10.5 33H25.5C29.6421 33 33 29.6421 33 25.5V10.5C33 6.35786 29.6421 3 25.5 3ZM21.9567 17.4133C22.0801 18.2455 21.938 19.0955 21.5505 19.8423C21.163 20.5891 20.5499 21.1947 19.7984 21.5729C19.0468 21.9512 18.1952 22.0829 17.3645 21.9492C16.5339 21.8155 15.7665 21.4233 15.1716 20.8284C14.5767 20.2335 14.1845 19.4661 14.0508 18.6355C13.9171 17.8048 14.0488 16.9532 14.4271 16.2016C14.8053 15.4501 15.4109 14.837 16.1577 14.4495C16.9045 14.062 17.7545 13.9199 18.5867 14.0433C19.4357 14.1692 20.2216 14.5647 20.8284 15.1716C21.4353 15.7784 21.8308 16.5643 21.9567 17.4133ZM24.9243 16.9732C25.1402 18.4296 24.8915 19.9171 24.2134 21.224C23.5352 22.5309 22.4623 23.5907 21.1471 24.2526C19.832 24.9146 18.3416 25.145 16.8879 24.9111C15.4343 24.6772 14.0914 23.9909 13.0503 22.9497C12.0091 21.9086 11.3228 20.5657 11.0889 19.1121C10.855 17.6584 11.0854 16.168 11.7474 14.8529C12.4093 13.5377 13.4691 12.4648 14.776 11.7866C16.0829 11.1085 17.5704 10.8598 19.0268 11.0757C20.5124 11.296 21.8878 11.9883 22.9497 13.0503C24.0117 14.1122 24.704 15.4876 24.9243 16.9732Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M18 0C18.8284 0 19.5 0.671573 19.5 1.5V4.5C19.5 5.32843 18.8284 6 18 6C17.1716 6 16.5 5.32843 16.5 4.5V1.5C16.5 0.671573 17.1716 0 18 0ZM18 12C14.6863 12 12 14.6863 12 18C12 21.3137 14.6863 24 18 24C21.3137 24 24 21.3137 24 18C24 14.6863 21.3137 12 18 12ZM9 18C9 13.0294 13.0294 9 18 9C22.9706 9 27 13.0294 27 18C27 22.9706 22.9706 27 18 27C13.0294 27 9 22.9706 9 18ZM19.5 31.5C19.5 30.6716 18.8284 30 18 30C17.1716 30 16.5 30.6716 16.5 31.5V34.5C16.5 35.3284 17.1716 36 18 36C18.8284 36 19.5 35.3284 19.5 34.5V31.5ZM5.26893 5.2693C5.85472 4.68351 6.80446 4.68351 7.39025 5.2693L9.52025 7.3993C10.106 7.98508 10.106 8.93483 9.52025 9.52062C8.93446 10.1064 7.98472 10.1064 7.39893 9.52062L5.26893 7.39062C4.68314 6.80483 4.68314 5.85508 5.26893 5.2693ZM28.6012 26.4793C28.0154 25.8935 27.0657 25.8935 26.4799 26.4793C25.8941 27.0651 25.8941 28.0149 26.4799 28.6006L28.6099 30.7306C29.1957 31.3164 30.1454 31.3164 30.7312 30.7306C31.317 30.1449 31.317 29.1951 30.7312 28.6093L28.6012 26.4793ZM0 18C0 17.1716 0.671573 16.5 1.5 16.5H4.5C5.32843 16.5 6 17.1716 6 18C6 18.8284 5.32843 19.5 4.5 19.5H1.5C0.671573 19.5 0 18.8284 0 18ZM31.5 16.5C30.6716 16.5 30 17.1716 30 18C30 18.8284 30.6716 19.5 31.5 19.5H34.5C35.3284 19.5 36 18.8284 36 18C36 17.1716 35.3284 16.5 34.5 16.5H31.5ZM9.52025 26.4793C10.106 27.0651 10.106 28.0149 9.52025 28.6006L7.39025 30.7306C6.80446 31.3164 5.85472 31.3164 5.26893 30.7306C4.68314 30.1449 4.68314 29.1951 5.26893 28.6093L7.39893 26.4793C7.98472 25.8935 8.93446 25.8935 9.52025 26.4793ZM30.7312 7.39062C31.317 6.80483 31.317 5.85508 30.7312 5.2693C30.1454 4.68351 29.1957 4.68351 28.6099 5.2693L26.4799 7.3993C25.8941 7.98508 25.8941 8.93483 26.4799 9.52062C27.0657 10.1064 28.0154 10.1064 28.6012 9.52062L30.7312 7.39062Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,6 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.10021 27.8995C6.14759 25.9469 6.14759 22.7811 8.10021 20.8284L12.6964 16.2322C14.4538 14.4749 17.303 14.4749 19.0604 16.2322L20.121 17.2929C20.7068 17.8787 21.6566 17.8787 22.2423 17.2929C22.8281 16.7071 22.8281 15.7574 22.2423 15.1716L21.1817 14.1109C18.2528 11.182 13.504 11.182 10.5751 14.1109L5.97889 18.7071C2.85469 21.8313 2.85469 26.8966 5.97889 30.0208C9.10308 33.145 14.1684 33.145 17.2926 30.0208L18.3533 28.9602C18.939 28.3744 18.939 27.4246 18.3533 26.8388C17.7675 26.2531 16.8177 26.2531 16.2319 26.8388L15.1713 27.8995C13.2187 29.8521 10.0528 29.8521 8.10021 27.8995Z"
|
||||
fill="#153E67"/>
|
||||
<path d="M27.8992 8.10051C29.8518 10.0531 29.8518 13.219 27.8992 15.1716L23.303 19.7678C21.5456 21.5251 18.6964 21.5251 16.939 19.7678L15.8784 18.7071C15.2926 18.1213 14.3428 18.1213 13.7571 18.7071C13.1713 19.2929 13.1713 20.2426 13.7571 20.8284L14.8177 21.8891C17.7467 24.818 22.4954 24.818 25.4243 21.8891L30.0205 17.2929C33.1447 14.1687 33.1447 9.10339 30.0205 5.97919C26.8963 2.855 21.831 2.855 18.7068 5.97919L17.6461 7.03985C17.0604 7.62564 17.0604 8.57539 17.6461 9.16117C18.2319 9.74696 19.1817 9.74696 19.7675 9.16117L20.8281 8.10051C22.7808 6.14789 25.9466 6.14789 27.8992 8.10051Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M5 6.5C5 5.67157 5.67157 5 6.5 5C7.32843 5 8 5.67157 8 6.5C8 7.32843 7.32843 8 6.5 8C5.67157 8 5 7.32843 5 6.5ZM6.5 2C4.01472 2 2 4.01472 2 6.5C2 8.98528 4.01472 11 6.5 11C8.98528 11 11 8.98528 11 6.5C11 4.01472 8.98528 2 6.5 2ZM23.5 14.5C21.5109 14.5 19.6032 15.2902 18.1967 16.6967C16.7902 18.1032 16 20.0109 16 22V31H19V22C19 20.8065 19.4741 19.6619 20.318 18.818C21.1619 17.9741 22.3065 17.5 23.5 17.5C24.6935 17.5 25.8381 17.9741 26.682 18.818C27.5259 19.6619 28 20.8065 28 22V31H31V22C31 20.0109 30.2098 18.1032 28.8033 16.6967C27.3968 15.2902 25.4891 14.5 23.5 14.5ZM23.5 11.5C20.7152 11.5 18.0445 12.6062 16.0754 14.5754C14.1062 16.5445 13 19.2152 13 22V32.5C13 33.3284 13.6716 34 14.5 34H20.5C21.3284 34 22 33.3284 22 32.5V22C22 21.6022 22.158 21.2206 22.4393 20.9393C22.7206 20.658 23.1022 20.5 23.5 20.5C23.8978 20.5 24.2794 20.658 24.5607 20.9393C24.842 21.2206 25 21.6022 25 22V32.5C25 33.3284 25.6716 34 26.5 34H32.5C33.3284 34 34 33.3284 34 32.5V22C34 19.2152 32.8938 16.5445 30.9246 14.5754C28.9555 12.6062 26.2848 11.5 23.5 11.5ZM2 14.5C2 13.6716 2.67157 13 3.5 13H9.5C10.3284 13 11 13.6716 11 14.5V32.5C11 33.3284 10.3284 34 9.5 34H3.5C2.67157 34 2 33.3284 2 32.5V14.5ZM5 16V31H8V16H5Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M5.5 7H30.5C30.64 7 30.7755 7.01918 30.9041 7.05506L18.2881 15.9604C18.1153 16.0825 17.8843 16.0825 17.7115 15.9604L5.09562 7.05514C5.22427 7.01921 5.35989 7 5.5 7ZM1.04412 7.86737C1.01504 8.07407 1 8.28528 1 8.5V27.5C1 29.9853 3.01472 32 5.5 32H30.5C32.9853 32 35 29.9853 35 27.5V8.5C35 6.01472 32.9853 4 30.5 4H5.5C4.32427 4 3.25385 4.4509 2.45223 5.18921L2.45214 5.18915C1.70566 5.87663 1.19226 6.81333 1.04395 7.86725L1.04412 7.86737ZM4 9.95387L15.9814 18.4113C17.1915 19.2655 18.8081 19.2655 20.0182 18.4113L32 9.95359V27.5C32 28.3284 31.3284 29 30.5 29H5.5C4.67157 29 4 28.3284 4 27.5V9.95387Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 794 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M18.5 5C12.1488 5 7.00004 10.1487 7.00004 16.5C7.00004 18.9791 7.78278 21.2709 9.11475 23.1476C9.41339 23.5683 9.4748 24.1131 9.27735 24.5898L7.77125 28.2258L11.7739 26.5689C12.1902 26.3966 12.6618 26.4205 13.0585 26.634C14.677 27.5051 16.5285 28 18.5 28C24.8513 28 30 22.8513 30 16.5C30 10.1487 24.8513 5 18.5 5ZM4.00004 16.5C4.00004 8.49187 10.4919 2 18.5 2C26.5082 2 33 8.49187 33 16.5C33 24.5081 26.5082 31 18.5 31C16.2785 31 14.1704 30.4994 12.2854 29.6041L5.57376 32.3824C5.01326 32.6144 4.36817 32.486 3.93927 32.057C3.51036 31.628 3.38208 30.9828 3.61422 30.4224L6.19951 24.181C4.80583 21.9532 4.00004 19.3189 4.00004 16.5Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 826 B |
@@ -1,8 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg" class="strokeicon">
|
||||
<path d="M18 19.5C18.8284 19.5 19.5 18.8284 19.5 18C19.5 17.1716 18.8284 16.5 18 16.5C17.1716 16.5 16.5 17.1716 16.5 18C16.5 18.8284 17.1716 19.5 18 19.5Z"
|
||||
stroke="#153E67" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M18 9C18.8284 9 19.5 8.32843 19.5 7.5C19.5 6.67157 18.8284 6 18 6C17.1716 6 16.5 6.67157 16.5 7.5C16.5 8.32843 17.1716 9 18 9Z"
|
||||
stroke="#153E67" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M18 30C18.8284 30 19.5 29.3284 19.5 28.5C19.5 27.6716 18.8284 27 18 27C17.1716 27 16.5 27.6716 16.5 28.5C16.5 29.3284 17.1716 30 18 30Z"
|
||||
stroke="#153E67" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 852 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M24.9268 27.0476C22.6173 28.8952 19.6877 30 16.5 30C9.04416 30 3 23.9558 3 16.5C3 9.04416 9.04416 3 16.5 3C23.9558 3 30 9.04416 30 16.5C30 19.6874 28.8954 22.6168 27.0481 24.9262L32.5612 30.4394C33.147 31.0252 33.147 31.9749 32.5612 32.5607C31.9755 33.1465 31.0257 33.1465 30.4399 32.5607L24.9268 27.0476ZM6 16.5C6 10.701 10.701 6 16.5 6C22.299 6 27 10.701 27 16.5C27 19.3299 25.8805 21.8983 24.0602 23.7865C24.0098 23.8255 23.9612 23.8681 23.9149 23.9144C23.8686 23.9607 23.826 24.0093 23.787 24.0598C21.8987 25.8803 19.3301 27 16.5 27C10.701 27 6 22.299 6 16.5Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 758 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M27 12C28.6569 12 30 10.6569 30 9C30 7.34315 28.6569 6 27 6C25.3431 6 24 7.34315 24 9C24 10.6569 25.3431 12 27 12ZM27 15C30.3137 15 33 12.3137 33 9C33 5.68629 30.3137 3 27 3C23.6863 3 21 5.68629 21 9C21 12.3137 23.6863 15 27 15ZM13.5254 14.0602L21.1319 10.257C21.3477 11.2693 21.8188 12.1871 22.4746 12.9398L14.8681 16.743C14.9545 17.1484 15 17.5689 15 18C15 18.4311 14.9545 18.8517 14.8681 19.257L22.4746 23.0603C23.5745 21.7978 25.1941 21 27 21C30.3137 21 33 23.6863 33 27C33 30.3137 30.3137 33 27 33C23.6863 33 21 30.3137 21 27C21 26.0331 21.2287 25.1196 21.635 24.3106C21.4099 24.7589 21.2393 25.2392 21.1319 25.743L13.5254 21.9398C12.4254 23.2022 10.8059 24 9 24C5.68629 24 3 21.3137 3 18C3 14.6863 5.68629 12 9 12C10.8059 12 12.4254 12.7978 13.5254 14.0602ZM12 18C12 19.6569 10.6569 21 9 21C7.34315 21 6 19.6569 6 18C6 16.3431 7.34315 15 9 15C10.6569 15 12 16.3431 12 18ZM30 27C30 28.6569 28.6569 30 27 30C25.3431 30 24 28.6569 24 27C24 25.3431 25.3431 24 27 24C28.6569 24 30 25.3431 30 27Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,5 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M19.4445 2.06432C18.9687 2.02175 18.4869 2 18 2C17.5131 2 17.0313 2.02175 16.5555 2.06432C8.39581 2.79446 2 9.65032 2 18C2 26.3432 8.38589 33.1949 16.5365 33.934C17.0185 33.9777 17.5066 34 18 34C18.4934 34 18.9815 33.9777 19.4635 33.934C27.6141 33.1949 34 26.3432 34 18C34 9.65032 27.6042 2.79446 19.4445 2.06432ZM5.0856 16.5C5.66871 11.4247 9.17471 7.23843 13.8778 5.66715C11.8381 8.93408 10.4384 12.6855 10.0842 16.5H5.0856ZM5.0856 19.5H10.0841C10.4376 23.3081 11.832 27.0607 13.8651 30.3286C9.16839 28.754 5.66818 24.5708 5.0856 19.5ZM13.0993 19.5C13.5426 23.5878 15.3808 27.6876 17.9964 31L18 31L18.0036 31C20.6192 27.6876 22.4574 23.5878 22.9007 19.5H13.0993ZM30.9144 19.5C30.3318 24.5708 26.8316 28.754 22.1349 30.3286C24.168 27.0607 25.5624 23.3081 25.9159 19.5H30.9144ZM30.9144 16.5H25.9158C25.5616 12.6855 24.1619 8.93408 22.1222 5.66715C26.8253 7.23843 30.3313 11.4247 30.9144 16.5ZM18 5.01472C20.618 8.32549 22.4571 12.4141 22.9006 16.5H13.0994C13.5429 12.4141 15.382 8.32549 18 5.01472Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,8 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M19.5 15.5C19.5 14.6716 18.8284 14 18 14C17.1716 14 16.5 14.6716 16.5 15.5V20H12C11.1716 20 10.5 20.6716 10.5 21.5C10.5 22.3284 11.1716 23 12 23H16.5V27.5C16.5 28.3284 17.1716 29 18 29C18.8284 29 19.5 28.3284 19.5 27.5V23H24C24.8284 23 25.5 22.3284 25.5 21.5C25.5 20.6716 24.8284 20 24 20H19.5V15.5Z"
|
||||
fill="#153E67"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M27.5 32H8.5C7.67157 32 7 31.3284 7 30.5V5.5C7 4.67157 7.67157 4 8.5 4H19V9C19 11.7614 21.2386 14 24 14H29V30.5C29 31.3284 28.3284 32 27.5 32ZM31.8204 11C31.9376 11.2577 32 11.5399 32 11.8284V14V30.5C32 32.9853 29.9853 35 27.5 35H8.5C6.01472 35 4 32.9853 4 30.5V5.5C4 3.01472 6.01472 1 8.5 1H19H21.1716C21.4368 1 21.6966 1.05268 21.9369 1.15224C21.9581 1.16101 21.9791 1.17015 22 1.17964C22.216 1.27792 22.4148 1.41477 22.5858 1.58579L31.4142 10.4142C31.5852 10.5852 31.7221 10.784 31.8204 11ZM22 5.24264L27.7574 11H24C22.8954 11 22 10.1046 22 9V5.24264Z"
|
||||
fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,11 +0,0 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 2400 2800" height="36">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600
|
||||
V1300z" fill="#153E67"/>
|
||||
<rect x="1700" y="550" width="200" height="600" fill="#153E67"/>
|
||||
<rect x="1150" y="550" width="200" height="600" fill="#153E67"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 457 B |
|
Before Width: | Height: | Size: 37 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M27 6H9C7.34315 6 6 7.34315 6 9V27C6 28.6569 7.34315 30 9 30H27C28.6569 30 30 28.6569 30 27V9C30 7.34315 28.6569 6 27 6ZM9 3C5.68629 3 3 5.68629 3 9V27C3 30.3137 5.68629 33 9 33H27C30.3137 33 33 30.3137 33 27V9C33 5.68629 30.3137 3 27 3H9Z" fill="#153E67"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 180 KiB |