Compare commits
6 Commits
c1714e9654
...
ddbb5bc09b
Author | SHA1 | Date | |
---|---|---|---|
ddbb5bc09b
|
|||
53a0881051
|
|||
68b752e15f
|
|||
b524091d38
|
|||
29887ab25c
|
|||
1e0ab6b0c8
|
2
.env
2
.env
@ -1,3 +1,3 @@
|
||||
DOMAIN="martials.no"
|
||||
GIT_URL=https://git.$DOMAIN
|
||||
GIT_URL=https://code.$DOMAIN
|
||||
STATUS_URL="https://status.$DOMAIN/status/home"
|
@ -4,9 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -15,5 +13,9 @@ jobs:
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Run docker-compose
|
||||
run: docker compose up -d --build
|
||||
- name: Build production
|
||||
run: docker compose up -d --build prod
|
||||
if: gitea.ref == 'refs/heads/master'
|
||||
- name: Build develop
|
||||
run: docker compose up -d --build dev
|
||||
if: gitea.ref == 'refs/heads/develop'
|
@ -1,9 +1,20 @@
|
||||
services:
|
||||
web:
|
||||
container_name: martials.no
|
||||
prod:
|
||||
hostname: martials.no
|
||||
container_name: "martials.no"
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "4321:4321"
|
||||
- "4321:4321"
|
||||
|
||||
dev:
|
||||
hostname: dev.martials.no
|
||||
container_name: "dev.martials.no"
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "4322:4321"
|
19
package.json
19
package.json
@ -36,25 +36,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"daisyui": "^5.0.43",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"prettier-plugin-svelte": "^3.4.0",
|
||||
"vite": "^7.0.0"
|
||||
},
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
"singleQuote": false,
|
||||
"plugins": [
|
||||
"prettier-plugin-astro",
|
||||
"prettier-plugin-svelte"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "**/*.astro",
|
||||
"options": {
|
||||
"parser": "astro"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
29
pnpm-lock.yaml
generated
29
pnpm-lock.yaml
generated
@ -63,15 +63,6 @@ importers:
|
||||
daisyui:
|
||||
specifier: ^5.0.43
|
||||
version: 5.0.43
|
||||
prettier:
|
||||
specifier: ^3.6.2
|
||||
version: 3.6.2
|
||||
prettier-plugin-astro:
|
||||
specifier: ^0.14.1
|
||||
version: 0.14.1
|
||||
prettier-plugin-svelte:
|
||||
specifier: ^3.4.0
|
||||
version: 3.4.0(prettier@3.6.2)(svelte@5.34.9)
|
||||
vite:
|
||||
specifier: ^7.0.0
|
||||
version: 7.0.0(jiti@2.4.2)(lightningcss@1.30.1)(yaml@2.5.1)
|
||||
@ -2527,12 +2518,6 @@ packages:
|
||||
resolution: {integrity: sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==}
|
||||
engines: {node: ^14.15.0 || >=16.0.0}
|
||||
|
||||
prettier-plugin-svelte@3.4.0:
|
||||
resolution: {integrity: sha512-pn1ra/0mPObzqoIQn/vUTR3ZZI6UuZ0sHqMK5x2jMLGrs53h0sXhkVuDcrlssHwIMk7FYrMjHBPoUSyyEEDlBQ==}
|
||||
peerDependencies:
|
||||
prettier: ^3.0.0
|
||||
svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0
|
||||
|
||||
prettier@2.8.7:
|
||||
resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
@ -6383,16 +6368,13 @@ snapshots:
|
||||
'@astrojs/compiler': 2.10.3
|
||||
prettier: 3.6.2
|
||||
sass-formatter: 0.7.9
|
||||
|
||||
prettier-plugin-svelte@3.4.0(prettier@3.6.2)(svelte@5.34.9):
|
||||
dependencies:
|
||||
prettier: 3.6.2
|
||||
svelte: 5.34.9
|
||||
optional: true
|
||||
|
||||
prettier@2.8.7:
|
||||
optional: true
|
||||
|
||||
prettier@3.6.2: {}
|
||||
prettier@3.6.2:
|
||||
optional: true
|
||||
|
||||
prismjs@1.30.0: {}
|
||||
|
||||
@ -6618,7 +6600,8 @@ snapshots:
|
||||
dependencies:
|
||||
queue-microtask: 1.2.3
|
||||
|
||||
s.color@0.0.15: {}
|
||||
s.color@0.0.15:
|
||||
optional: true
|
||||
|
||||
safe-buffer@5.2.1: {}
|
||||
|
||||
@ -6627,6 +6610,7 @@ snapshots:
|
||||
sass-formatter@0.7.9:
|
||||
dependencies:
|
||||
suf-log: 2.5.3
|
||||
optional: true
|
||||
|
||||
sax@1.4.1: {}
|
||||
|
||||
@ -6795,6 +6779,7 @@ snapshots:
|
||||
suf-log@2.5.3:
|
||||
dependencies:
|
||||
s.color: 0.0.15
|
||||
optional: true
|
||||
|
||||
svelte2tsx@0.7.40(svelte@5.34.9)(typescript@5.8.3):
|
||||
dependencies:
|
||||
|
@ -16,7 +16,10 @@ interface Props {
|
||||
const { project } = Astro.props
|
||||
|
||||
const entry = await getEntry("projects", project)
|
||||
const { Content } = await render(entry!)
|
||||
if (!entry) {
|
||||
throw new Error("Project not found")
|
||||
}
|
||||
const { Content } = await render(entry)
|
||||
const {
|
||||
lang,
|
||||
title,
|
||||
@ -28,7 +31,7 @@ const {
|
||||
source,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
} = entry!.data
|
||||
} = entry.data
|
||||
|
||||
function localeDateString(isoString: string): string {
|
||||
let template = "DD-MM-YYYY"
|
||||
|
@ -52,9 +52,8 @@ export function localizePathname(
|
||||
const rest = pathnameParts.slice(2)
|
||||
if (rest.length > 0) {
|
||||
return `${localizedPathname}/${rest.join("/")}`
|
||||
} else {
|
||||
return localizedPathname
|
||||
}
|
||||
return localizedPathname
|
||||
}
|
||||
return pathname
|
||||
}
|
||||
@ -71,13 +70,14 @@ export function isAbsolutePathname(path: string): path is AbsolutePathname {
|
||||
}
|
||||
|
||||
export function isNavLink(path: string): path is NavLink {
|
||||
let basePath = path
|
||||
if (path.startsWith("/en")) {
|
||||
path = path.slice(2)
|
||||
basePath = path.slice(2)
|
||||
}
|
||||
if (paths.has(path as NavLink)) {
|
||||
if (paths.has(basePath as NavLink)) {
|
||||
return true
|
||||
}
|
||||
const pathSplit = path.split("/").slice(1)
|
||||
const pathSplit = basePath.split("/").slice(1)
|
||||
return (
|
||||
pathSplit.length === 2 &&
|
||||
pathSplit[0] === "projects" &&
|
||||
|
Reference in New Issue
Block a user