Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to CSS variables #94

Draft
wants to merge 38 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8248ef5
Upgrade and fix eleventy
Taeir Jul 24, 2023
474157b
Add missing assets
Taeir Jul 24, 2023
bf51394
Remove comment
Taeir Jul 24, 2023
5b1425f
Symlink files rather than copying them
Taeir Jul 24, 2023
9d6596b
Remove duplicated compiled stuff
Taeir Jul 24, 2023
c748c1a
Switch commands to original naming convention
Taeir Jul 24, 2023
75bb6f2
Switch from blacklist to whitelist for files to include
Taeir Jul 24, 2023
a4debe6
Add proper dev server setup
Taeir Jul 24, 2023
0788bba
Use eleventy passthrough to skip docs rebuild upon css/js change
Taeir Jul 24, 2023
2170162
Create ci-workflow for github actions
Taeir Jul 25, 2023
1331f56
Add CI build job
Taeir Jul 25, 2023
e8246a5
Fix GHActions CI job
Taeir Jul 25, 2023
c0b4100
Cleanup package json and eleventy config
Taeir Jul 25, 2023
9defdbc
Set the path prefix for GH pages
Taeir Jul 25, 2023
946ec03
Also pass through source maps
Taeir Jul 25, 2023
f0263fe
Pass through source maps
Taeir Jul 25, 2023
fcd5fb6
Only run on master
Taeir Jul 25, 2023
970d5b3
Add CI workflow for pull requests to develop
Taeir Jul 25, 2023
fe882a1
Cleanup templates
Taeir Jul 25, 2023
8010fd6
Fix install/improve instructions to match new setup
Taeir Jul 25, 2023
01580a0
Delete and ignore compiled files
Taeir Jul 25, 2023
f5e3e7b
Cleanup gitignore and improve patterns
Taeir Jul 25, 2023
f733695
Remove unused setup script
Taeir Jul 25, 2023
b22ba42
Add danger, warning, success and info colors
Taeir Jul 25, 2023
11ad9b4
Switch to CSS variables for links
Taeir Jul 25, 2023
f9e52ab
Improve link descriptions
Taeir Jul 25, 2023
6504ad1
Refactor links variables
Taeir Jul 25, 2023
1969d41
Add quotes and tables
Taeir Jul 25, 2023
4553cab
Add code block colors
Taeir Jul 25, 2023
6a4144c
Add badge colors
Taeir Jul 25, 2023
ae92a6c
Add buttons
Taeir Jul 25, 2023
ddc6a28
Consistently use plural
Taeir Jul 25, 2023
36b36a4
Migrate form colors
Taeir Jul 25, 2023
af76fd3
Migrate modals
Taeir Jul 25, 2023
66f6234
Migrate headers
Taeir Jul 25, 2023
0db59a2
Migrate footer
Taeir Jul 25, 2023
b374bdb
Migrate item lists
Taeir Jul 25, 2023
20e72f1
Migrate notices
Taeir Jul 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,26 @@ function escapeHtml(unsafe) {
.replace(/'/g, "'");
}


const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");

module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);

eleventyConfig.addLayoutAlias('home', 'layouts/home.html');
eleventyConfig.addLayoutAlias('page', 'layouts/page.html');
eleventyConfig.addLayoutAlias('playground', 'layouts/playground.html');

// When the linked css or javascript changes and we are in dev mode, update in the browser
eleventyConfig.setServerPassthroughCopyBehavior("passthrough");

// Make sure to either copy (or passthrough from original location for dev server) needed files
eleventyConfig.addPassthroughCopy("assets/**/*");
eleventyConfig.addPassthroughCopy("dist/**/*");
eleventyConfig.addPassthroughCopy("js/**/*.js");

// For source maps, pass through scss as well
eleventyConfig.addPassthroughCopy("src/**/*.scss");

eleventyConfig.addPairedShortcode("example", function (content, id, application_notice, further_preview_class) {
content = content.trim();
if (application_notice) {
Expand All @@ -30,6 +43,7 @@ module.exports = function (eleventyConfig) {
});

return {
pathPrefix: process.env.ELEVENTY_PATH_PREFIX || "",
dir: {
input: "docs_src",
output: "docs"
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/build-deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Pages

on:
push:
branches: [ "master" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Set-up Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build Docs Site
run: npm run build
env:
ELEVENTY_PATH_PREFIX: ${{ steps.pages.outputs.base_path }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./docs

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build

on:
pull_request:
branches: [ "develop" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Set-up Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build all
run: npm run build
env:
ELEVENTY_PATH_PREFIX: ${{ steps.pages.outputs.base_path }}
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
node_modules/*
node_modules/
scratch/*
.idea/*
.idea/

# Do not put from-MD-compiled-HTML into the repo
/docs/
!/docs/CNAME

# Do not put from-SASS-compiled-CSS into the repo
/dist/

# Do not put from-TS-compiled-JS into the repo
/js/
5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ To set up, simply run:

npm install

and to build the files, run
and to build all the files, run

npm run build

If you only want to rebuild CSS/JS/Docs, run one of

npm run css_build
npm run js_build
npm run docs_build

### Development

For easy development, run

npm run dev

and it will host the documentation at http://localhost:8080.
The site will automatically update when you make changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion dist/codidact.css

This file was deleted.

1 change: 0 additions & 1 deletion dist/codidact.css.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/common/common.css

This file was deleted.

1 change: 0 additions & 1 deletion dist/common/common.css.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/specific/specific.css

This file was deleted.

1 change: 0 additions & 1 deletion dist/specific/specific.css.map

This file was deleted.

Loading