Skip to content

Commit 1eb5d11

Browse files
Install tailwind and add dark mode
1 parent bc46546 commit 1eb5d11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+6953
-637
lines changed

.browserslistrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Browsers that we support
2+
3+
> 1%
4+
last 2 versions
5+
not dead
6+
not ie 11
7+
not op_mini all

.github/workflows/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,24 @@ jobs:
1717
php-version: '8.3'
1818
tools: composer
1919

20-
- name: Install dependencies
20+
- name: Install PHP dependencies
2121
run: composer install
2222

2323
- name: Generate API Documentation
2424
run: composer build
2525

26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
cache: 'npm'
31+
32+
- name: Install Node.js dependencies
33+
run: npm ci
34+
35+
- name: Build CSS for production
36+
run: npm run build-css-prod
37+
2638
- name: Build and deploy
2739
uses: jenshaase/deploy-zola-via-lftp-action@main
2840
with:

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,22 @@
33
.cache/
44
public/
55
vendor/
6+
node_modules/
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
11+
.DS_Store
12+
Thumbs.db
13+
14+
/build/
15+
/dist/
616

717
.phel-repl-history
818
.phpunit.result.cache
919
static/api_search.js
1020
content/documentation/api.md
21+
/static/tailwind.css
22+
/css/tailwind.entry.css
23+
/static/syntax-theme-dark.css
24+
/static/syntax-theme-light.css

.prettierignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dependencies
2+
node_modules/
3+
vendor/
4+
5+
# Build outputs
6+
public/
7+
static/tailwind.css
8+
css/tailwind.entry.css
9+
10+
# Generated files
11+
*.lock
12+
*.log
13+
14+
# IDE
15+
.vscode/
16+
.idea/
17+
18+
# OS
19+
.DS_Store
20+
Thumbs.db
21+
22+
# Zola generated
23+
sitemap.xml
24+
atom.xml
25+
robots.txt
26+
27+
# Don't format minified files
28+
*.min.js
29+
*.min.css

.prettierrc.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"bracketSpacing": true,
8+
"arrowParens": "avoid",
9+
"endOfLine": "lf",
10+
"plugins": ["prettier-plugin-tailwindcss"],
11+
"overrides": [
12+
{
13+
"files": "*.html",
14+
"options": {
15+
"parser": "html",
16+
"printWidth": 120,
17+
"tabWidth": 2,
18+
"bracketSameLine": false
19+
}
20+
},
21+
{
22+
"files": "*.css",
23+
"options": {
24+
"parser": "css",
25+
"printWidth": 100
26+
}
27+
}
28+
]
29+
}

.stylelintrc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"extends": [
3+
"stylelint-config-standard",
4+
"stylelint-config-tailwindcss"
5+
],
6+
"rules": {
7+
"at-rule-no-unknown": [
8+
true,
9+
{
10+
"ignoreAtRules": [
11+
"tailwind",
12+
"apply",
13+
"variants",
14+
"responsive",
15+
"screen",
16+
"layer",
17+
"utility",
18+
"theme",
19+
"source",
20+
"custom-variant"
21+
]
22+
}
23+
],
24+
"declaration-block-trailing-semicolon": null,
25+
"no-descending-specificity": null,
26+
"function-no-unknown": [
27+
true,
28+
{
29+
"ignoreFunctions": ["theme"]
30+
}
31+
]
32+
}
33+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The documentation is build with [Zola](https://www.getzola.org/).
2424
#### Local development
2525

2626
```bash
27-
zola serve # build & serve
27+
npm run dev # serve and watch CSS changes
2828
```
2929

3030
#### Prod environment

config.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title = "The Phel Language"
55
description = "The official website of the Phel language. Phel is a functional programming language that compiles to PHP"
66

77
# Whether to automatically compile all Sass files in the sass directory
8-
compile_sass = true
8+
compile_sass = false
99

1010
# Whether to build a search index to be used later on by a JavaScript library
1111
build_search_index = false
@@ -16,7 +16,11 @@ generate_feeds = true
1616
# Whether to do syntax highlighting
1717
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
1818
highlight_code = true
19-
highlight_theme = "Tomorrow"
19+
highlight_theme = "css"
20+
highlight_themes_css = [
21+
{ theme = "base16-ocean-dark", filename = "syntax-theme-dark.css" },
22+
{ theme = "base16-ocean-light", filename = "syntax-theme-light.css" },
23+
]
2024
extra_syntaxes = ["syntaxes"]
2125
extra_syntaxes_and_themes = ["syntaxes"]
2226

0 commit comments

Comments
 (0)