Skip to content

Commit

Permalink
Add a new theme: Raspberry Mint
Browse files Browse the repository at this point in the history
  • Loading branch information
bartfeenstra committed Nov 20, 2024
1 parent 41bedb9 commit 156a5b4
Show file tree
Hide file tree
Showing 42 changed files with 1,706 additions and 5 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/raspberry-mint-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
pull_request:

# 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

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ./package.json

- name: npm install
working-directory: ./raspberry-mint-dev
run: npm install

- name: webpack
working-directory: ./raspberry-mint-dev
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './raspberry-mint-dev/build'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
prebuild/**/*
/raspberry-mint-dev/build
3 changes: 2 additions & 1 deletion .stylelintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ extends:
- stylelint-config-standard-scss
plugins:
- stylelint-no-unsupported-browser-features
- stylelint-scss
rules:
import-notation: string
no-descending-specificity: ~
scss/at-extend-no-missing-placeholder: null
scss/no-global-function-names: null
4 changes: 2 additions & 2 deletions bin/fix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ruff check --fix .
ruff format .

# Fix CSS code style violations.
./node_modules/.bin/stylelint --fix "./betty/**/*.css" "./betty/**/*.scss"
./node_modules/.bin/stylelint --fix "./betty/**/*.css" "./betty/**/*.scss" "./raspberry-mint-dev/**/*.css" "./raspberry-mint-dev/**/*.scss"

# Fix JS code style violations.
./node_modules/.bin/eslint --fix -c ./eslint.config.js ./betty ./playwright
./node_modules/.bin/eslint --fix -c ./eslint.config.js ./betty ./playwright ./raspberry-mint-dev
2 changes: 1 addition & 1 deletion bin/test-eslint
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ cd "$(dirname "$0")/.."

echo 'Running ESLint...'

./node_modules/.bin/eslint -c ./eslint.config.js ./betty ./playwright "$@"
./node_modules/.bin/eslint -c ./eslint.config.js ./betty ./playwright ./raspberry-mint-dev "$@"
2 changes: 1 addition & 1 deletion bin/test-stylelint
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ cd "$(dirname "$0")/.."

echo 'Running Stylelint...'

./node_modules/.bin/stylelint "./betty/**/*.css" "./betty/**/*.scss"
./node_modules/.bin/stylelint "./betty/**/*.css" "./betty/**/*.scss" "./raspberry-mint-dev/**/*.css" "./raspberry-mint-dev/**/*.scss"
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ const typescriptFiles = [
]

export default [
{
ignores: [
"raspberry-mint-dev/build",
],
},

// Webpack configuration files.
{
files: [
Expand Down
5 changes: 5 additions & 0 deletions raspberry-mint-dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/build
/cache
/node_modules
/package-lock.json

37 changes: 37 additions & 0 deletions raspberry-mint-dev/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"engines": {
"node": ">= 20"
},
"dependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@popperjs/core": "^2.11.8",
"babel-loader": "^9.2.1",
"bootstrap": "^5.3.3",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^12.0.2",
"core-js": "^3.38.1",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"file-loader": "^6.2.0",
"ionicons": "^7.4.0",
"mini-css-extract-plugin": "^2.9.1",
"postcss-loader": "^8.1.1",
"resolve-url-loader": "^5.0.0",
"sass": "^1.80.4",
"sass-loader": "^16.0.2",
"style-loader": "^4.0.0",
"terser-webpack-plugin": "^5.3.10",
"typescript": "^5.6.3",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0",
"html-webpack-plugin": "^5.6.3"
},
"scripts": {
"build": "webpack --mode development",
"serve": "webpack serve --mode development --open --watch"
},
"type": "module"
}
20 changes: 20 additions & 0 deletions raspberry-mint-dev/src/css/components/accordion.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.accordion-button {
@extend .h6;

margin-bottom: 0;

&:focus {
background-color: $focus;
box-shadow: 0 0 $focus, 0 2px $black;
color: $black !important;
text-decoration-color: $black;
}
}

.accordion-body {
@extend .mb-3;

// @todo This does not support RTL scripts.
border-right: $border-width solid $black;
margin-right: calc((1.5em - $border-width) / 2);
}
32 changes: 32 additions & 0 deletions raspberry-mint-dev/src/css/components/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.btn {
&:focus {
background-color: $focus;
border-color: $black;
color: $black;
}
}

@mixin button {
--bs-btn-active-bg: #{$primary-800};
--bs-btn-active-border-color: #{$primary-800};
--bs-btn-active-color: #{$white};
--bs-btn-hover-bg: #{$primary-700};
--bs-btn-hover-border-color: #{$primary-700};
--bs-btn-hover-color: #{$white};
}

.btn.btn-primary {
@include button;

--bs-btn-bg: #{$primary};
--bs-btn-border-color: #{$primary};
--bs-btn-color: #{$white};
}

.btn.btn-secondary {
@include button;

--bs-btn-bg: #{$white};
--bs-btn-border-color: #{$primary};
--bs-btn-color: #{$primary};
}
4 changes: 4 additions & 0 deletions raspberry-mint-dev/src/css/components/card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.card {
border: none;
box-shadow: $border-width $border-width $gray-300;
}
9 changes: 9 additions & 0 deletions raspberry-mint-dev/src/css/components/close.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.btn-close {
border: 3px solid $white;

&:focus {
background-color: $focus;
border-color: $black;
color: $black;
}
}
17 changes: 17 additions & 0 deletions raspberry-mint-dev/src/css/components/form-check.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.form-check {
&:focus-within {
.form-check-label {
background-color: $focus;
box-shadow: 0 0 $focus, 0 2px $black;
color: $black;
text-decoration-color: $black;
outline: none;

}

.form-check-input {
border-color: $black;
background-color: $focus;
}
}
}
17 changes: 17 additions & 0 deletions raspberry-mint-dev/src/css/components/form-control-text.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.form-control-text {
&:focus-within {
.form-label {
background-color: $focus;
box-shadow: 0 0 $focus, 0 2px $black;
color: $black;
text-decoration-color: $black;
outline: none;

}

.form-control {
border-color: $black;
background-color: $focus;
}
}
}
4 changes: 4 additions & 0 deletions raspberry-mint-dev/src/css/components/form.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Use `fieldset legend` to be more specific than Bootstrap's own `legend`.
fieldset legend {
@extend .h6;
}
70 changes: 70 additions & 0 deletions raspberry-mint-dev/src/css/components/header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.site-logo {
@include font-size($h5-font-size);

color: black;
box-shadow: none;
display: inline-block;
padding-right: 1rem;

img {
height: 1.5em;
vertical-align: top;
}
}

.header-entry-point {
@include button;
@include font-size($h5-font-size);

--bs-btn-bg: #{$white};
--bs-btn-border-color: #{$white};

height: 1lh;
text-indent: -999rem;
width: 1lh;

&:hover {
--bs-btn-hover-bg: #{$primary-700};
--bs-btn-hover-border-color: #{$primary-700};
--bs-btn-hover-color: #{$white};
}
}

.header-nav-link.active a {
box-shadow: 0 5px $black;
}

#header-entry-point-primary {
background-image: #{icon-primary-navigation($black)};

&:hover {
background-image: #{icon-primary-navigation($white)};
}
}

#header-entry-point-search {
background-image: #{icon-search($black)};

&:hover {
background-image: #{icon-search($white)};
}
}

#header-entry-point-language {
background-image: #{icon-language($black)};

&:hover {
background-image: #{icon-language($white)};
}
}

@include media-breakpoint-up(md) {
#nav-primary {
display: block;
}

.nav-primary-links {
display: flex;
flex-direction: row;
}
}
3 changes: 3 additions & 0 deletions raspberry-mint-dev/src/css/components/modal.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.modal-header .btn-close {
padding: 0;
}
5 changes: 5 additions & 0 deletions raspberry-mint-dev/src/css/components/references.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.reference {
&:target {
background-color: $focus;
}
}
31 changes: 31 additions & 0 deletions raspberry-mint-dev/src/css/components/section.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.section {
&:target {
box-shadow: -$border-width 0 0 0 $focus;
}

.section-permalink {
box-shadow: none;
display: inline-block;

&:hover .section-permalink-wrapper {
background-color: var(--bs-link-hover-color);
}

&:focus {
background-color: $focus;
box-shadow: 0 0 $focus, 0 2px $black;

.section-permalink-wrapper {
background-color: $black;
}
}

.section-permalink-wrapper {
background-color: var(--bs-link-color);
display: block;
height: 0.75em;
mask-image: icon-link($black);
width: 0.75em;
}
}
}
Loading

0 comments on commit 156a5b4

Please sign in to comment.