mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-18 20:19:30 -07:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6a576246f | ||
|
|
93629a4e6b | ||
|
|
a909afee97 | ||
|
|
9c15a367ea | ||
|
|
73ee16c6fb | ||
|
|
91b0314c5d | ||
|
|
d1a1dba210 | ||
|
|
110ff665e7 | ||
|
|
b39d563e77 | ||
|
|
0e74655820 | ||
|
|
8926caed69 | ||
|
|
19f54640f9 | ||
|
|
56b87d6393 | ||
|
|
75d8310953 | ||
|
|
a9f164f2af | ||
|
|
7773f184aa | ||
|
|
bc501934ae | ||
|
|
44b619e49b | ||
|
|
024d013219 | ||
|
|
268159e7d2 |
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -36,13 +36,18 @@ jobs:
|
||||
build:
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
name: Build (Hugo ${{ matrix.hugo-version }})
|
||||
name: Build (Hugo ${{ matrix.hugo-label }})
|
||||
needs: [filter]
|
||||
if: |
|
||||
github.event.repository.fork == false
|
||||
strategy:
|
||||
matrix:
|
||||
hugo-version: ['latest', '0.114.0']
|
||||
include:
|
||||
- hugo-version: latest
|
||||
hugo-label: Latest
|
||||
- hugo-version: '0.114.0'
|
||||
hugo-label: 'v0.114.0'
|
||||
steps:
|
||||
- name: Set current date as env variable
|
||||
run: |
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -27,4 +27,4 @@ jsconfig.json
|
||||
*.css.map
|
||||
|
||||
# dummmy file
|
||||
assets/bundled/critical.js
|
||||
bundled/js/critical.js
|
||||
|
||||
@@ -3,5 +3,4 @@ static/
|
||||
exmapleSite/
|
||||
single.json
|
||||
pnpm-lock.yaml
|
||||
assets/bundled/
|
||||
assets/bundled/
|
||||
bundled/
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
position: fixed;
|
||||
top: var(--nav-height);
|
||||
z-index: var(--z-nav-gallery);
|
||||
overflow: hidden;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -25,8 +26,9 @@
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: calc(var(--window-height) - 2 * var(--nav-height));
|
||||
max-width: 100%;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
@@ -49,6 +51,21 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.navClose {
|
||||
cursor: pointer;
|
||||
z-index: calc(var(--z-nav-gallery) + 1);
|
||||
|
||||
min-width: 25%;
|
||||
height: calc(var(--nav-height) * 2.5);
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
margin-right: calc(var(--space-standard) * -1);
|
||||
padding-right: var(--space-standard);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ export default function GalleryNav(props: {
|
||||
<span class="num">{indexLength()[2]}</span>
|
||||
<span class="num">{indexLength()[3]}</span>
|
||||
</div>
|
||||
<div onClick={onClick} onKeyDown={onClick}>
|
||||
<div class="navClose" onClick={onClick} onKeyDown={onClick}>
|
||||
{capitalizeFirstLetter(props.closeText)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
1
bundled/css/main.css
Normal file
1
bundled/css/main.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -12,13 +12,7 @@ export default defineConfig([
|
||||
tseslint.configs.recommended,
|
||||
importPlugin.flatConfigs.recommended,
|
||||
solid,
|
||||
globalIgnores([
|
||||
'node_modules/',
|
||||
'static/',
|
||||
'exampleSite/',
|
||||
'*.mjs',
|
||||
'assets/bundled/'
|
||||
]),
|
||||
globalIgnores(['node_modules/', 'static/', 'exampleSite/', '*.mjs', 'bundled/']),
|
||||
{
|
||||
...love,
|
||||
...prettier,
|
||||
|
||||
18
hugo.toml
Normal file
18
hugo.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[[module.mounts]]
|
||||
source = 'archetypes'
|
||||
target = 'archetypes'
|
||||
[[module.mounts]]
|
||||
source = 'assets'
|
||||
target = 'assets'
|
||||
[[module.mounts]]
|
||||
source = 'layouts'
|
||||
target = 'layouts'
|
||||
[[module.mounts]]
|
||||
source = 'static'
|
||||
target = 'static'
|
||||
[[module.mounts]]
|
||||
source = "bundled"
|
||||
target = "assets/bundled"
|
||||
[[module.mounts]]
|
||||
source = "bundled"
|
||||
target = "static/bundled"
|
||||
@@ -2,7 +2,7 @@
|
||||
{{- $fingerprint := .Scratch.Get "fingerprint" | default "" -}}
|
||||
|
||||
{{- /* critical style */ -}}
|
||||
{{- $style := dict "Source" "bundled/critical.css" "Fingerprint" $fingerprint -}}
|
||||
{{- $style := dict "Source" "bundled/css/critical.css" "Fingerprint" $fingerprint -}}
|
||||
{{- $options := dict "enableSourceMap" false -}}
|
||||
{{- $style = dict "Context" . "ToCSS" $options "Inline" true "Template" true | merge $style -}}
|
||||
{{- partial "plugin/style.html" $style -}}
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
"homepage": "https://github.com/Sped0n/bridget#readme",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@types/node": "^24.10.0",
|
||||
"@typescript-eslint/parser": "^8.46.4",
|
||||
"@types/node": "^24.10.1",
|
||||
"@typescript-eslint/parser": "^8.48.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-love": "^133.0.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
@@ -55,8 +55,8 @@
|
||||
"prettier-plugin-organize-imports": "^4.3.0",
|
||||
"sass-embedded": "^1.93.3",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.46.4",
|
||||
"vite": "^7.2.2",
|
||||
"typescript-eslint": "^8.48.0",
|
||||
"vite": "^7.2.4",
|
||||
"vite-plugin-solid": "^2.11.10"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
544
pnpm-lock.yaml
generated
544
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
node_modules_generated_dir="./node_modules/exampleSite/resources/_gen"
|
||||
project_generated_dir="./exampleSite/resources/_gen"
|
||||
node_modules_generated_dir="./node_modules/exampleSite/resources/_gen/images"
|
||||
project_generated_dir="./exampleSite/resources/_gen/images"
|
||||
|
||||
copy_generated_assets_to_project() {
|
||||
if [ -d "${node_modules_generated_dir}" ]; then
|
||||
@@ -16,7 +16,8 @@ copy_generated_assets_to_project() {
|
||||
}
|
||||
|
||||
run_site_build() {
|
||||
pnpm run vite:build && hugo --logLevel info --source=exampleSite --gc --minify
|
||||
rm -rf bundled
|
||||
pnpm run build
|
||||
}
|
||||
|
||||
copy_generated_assets_to_node_modules() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import solidPlugin from 'vite-plugin-solid'
|
||||
export default defineConfig({
|
||||
plugins: [solidPlugin()],
|
||||
build: {
|
||||
outDir: './',
|
||||
outDir: './bundled',
|
||||
watch: process.env.DISABLE_WATCH
|
||||
? null
|
||||
: {
|
||||
@@ -17,15 +17,9 @@ export default defineConfig({
|
||||
},
|
||||
output: {
|
||||
format: 'es',
|
||||
entryFileNames: (chunkInfo) =>
|
||||
chunkInfo.name === 'critical'
|
||||
? 'assets/bundled/[name].js'
|
||||
: 'static/bundled/js/[name].js',
|
||||
chunkFileNames: 'static/bundled/js/[hash:6].js',
|
||||
assetFileNames: (assetInfo) =>
|
||||
assetInfo.names[0]?.startsWith('critical')
|
||||
? 'assets/bundled/[name].[ext]'
|
||||
: 'static/bundled/[ext]/[name].[ext]',
|
||||
entryFileNames: 'js/[name].js',
|
||||
chunkFileNames: 'js/[hash:6].js',
|
||||
assetFileNames: '[ext]/[name].[ext]',
|
||||
compact: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user