Skip to content

Commit 8ff5f17

Browse files
authored
Merge pull request #81 from webdevhome/jump-links-sidebar
Jump links sidebar
2 parents ba158da + 1fe139a commit 8ff5f17

File tree

82 files changed

+2868
-6124
lines changed

Some content is hidden

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

82 files changed

+2868
-6124
lines changed

.eslintrc

-5
This file was deleted.

.github/workflows/codeql-analysis.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ develop ]
16+
branches: [develop]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ develop ]
19+
branches: [develop]
2020
schedule:
2121
- cron: '37 7 * * 4'
2222

@@ -28,40 +28,40 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
language: [ 'javascript' ]
31+
language: ['javascript']
3232
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3333
# Learn more:
3434
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3535

3636
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v2
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
3939

40-
# Initializes the CodeQL tools for scanning.
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
43-
with:
44-
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v1
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4949

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
52-
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
5454

55-
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
5757

58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
6161

62-
#- run: |
63-
# make bootstrap
64-
# make release
62+
#- run: |
63+
# make bootstrap
64+
# make release
6565

66-
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v1

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"semi": false,
33
"singleQuote": true,
4-
"trailingComma": "all"
4+
"trailingComma": "all",
5+
"plugins": ["prettier-plugin-tailwindcss"]
56
}

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"comments": false,
66
"strings": true
77
}
8-
}
8+
}

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ This is a collection of links I, as a web developer, use very frequently. Maybe
1919

2020
To start WebdevHome locally run:
2121

22-
~~~
22+
```shell
2323
npm ci
24-
~~~
24+
```
2525

2626
and then:
2727

28-
~~~
28+
```shell
2929
npm run dev
30-
~~~
30+
```
3131

3232
This starts a watcher that builds the project every time you make some changes. Also, the local version of your app (running on localhost:3000) gets opened in your default browser automatically.
3333

@@ -37,19 +37,19 @@ End the watcher script by pressing `[Ctrl]` + `[C]` in your terminal.
3737

3838
If you want to run this app in your own Docker environment run the following commands from inside the project root directory:
3939

40-
~~~
40+
```shell
4141
docker-compose build
42-
~~~
42+
```
4343

4444
and then:
4545

46-
~~~
46+
```shell
4747
docker-compose up
48-
~~~
48+
```
4949

50-
*Or `docker-compose up -d` to run in detached mode.*
50+
_Or `docker-compose up -d` to run in detached mode._
5151

52-
*Halt the app in detached mode by running `docker-compose down`.*
52+
_Halt the app in detached mode by running `docker-compose down`._
5353

5454
If you make any changes, start again at `docker-compose build`.
5555

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "3.1"
1+
version: '3.1'
22

33
services:
44
wdh:

eslint.config.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
// TypeScript
4+
import tseslint from 'typescript-eslint'
5+
// React
6+
import reactPlugin from 'eslint-plugin-react'
7+
import reactHooksPlugin from 'eslint-plugin-react-hooks'
8+
9+
export default tseslint.config(
10+
{ ignores: ['dist/**/*'] },
11+
js.configs.recommended,
12+
{
13+
files: ['src/**/*.{js,jsx,ts,tsx}'],
14+
languageOptions: {
15+
globals: { ...globals.browser },
16+
},
17+
},
18+
19+
// TypeScript
20+
...tseslint.configs.recommended,
21+
22+
// React
23+
{
24+
...reactPlugin.configs.flat.recommended,
25+
settings: {
26+
react: {
27+
version: 'detect',
28+
},
29+
},
30+
},
31+
reactPlugin.configs.flat['jsx-runtime'],
32+
{
33+
files: ['src/**/*.{ts,tsx}'],
34+
plugins: {
35+
'react-hooks': reactHooksPlugin,
36+
},
37+
},
38+
)

index.css

+15-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@
33
@tailwind utilities;
44

55
@layer base {
6-
svg {
7-
@apply align-middle fill-current;
8-
}
6+
svg {
7+
@apply fill-current align-middle;
8+
}
99
}
1010

1111
@layer components {
12-
.px-page {
13-
@apply px-2 sm:px-4 lg:px-6;
14-
}
15-
}
12+
.px-page {
13+
@apply px-2 sm:px-4 lg:px-6;
14+
}
15+
16+
.py-page {
17+
@apply py-2 sm:py-4 lg:py-6;
18+
}
19+
20+
.p-page {
21+
@apply p-2 sm:p-4 lg:p-6;
22+
}
23+
}

index.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<!DOCTYPE html>
2-
<html lang="en" class="h-full">
1+
<!doctype html>
2+
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
@@ -12,6 +12,7 @@
1212
<title>&lt;WebdevHome /&gt;</title>
1313

1414
<link rel="stylesheet" href="./index.css" />
15+
1516
<style>
1617
@media (prefers-color-scheme: dark) {
1718
:root {
@@ -20,8 +21,8 @@
2021
}
2122
</style>
2223
</head>
23-
<body class="m-0 min-h-full bg-white dark:bg-gray-700">
24-
<div id="root" class="h-full"></div>
24+
<body class="bg-white dark:bg-gray-700">
25+
<div id="root"></div>
2526
<script type="module" src="/src/index.tsx"></script>
2627
</body>
2728
</html>

0 commit comments

Comments
 (0)