Compare commits
34
Commits
cd00fbaaa9
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6454dc949f | ||
|
|
7651374e3d | ||
|
|
eaf936f846 | ||
|
|
e7ed9f047f | ||
|
|
c0b75c341a | ||
|
|
8976d56495 | ||
|
|
921659a2c2 | ||
|
|
e20d4b45b6 | ||
|
|
2d9225d625 | ||
|
|
febbc63f35 | ||
|
|
d291409097 | ||
|
|
d6e3864fb8 | ||
|
|
19ce567030 | ||
|
|
b0e7add6a4 | ||
|
|
1c27bc3c92 | ||
|
|
ff3a78a4c7 | ||
|
|
95fdff48b7 | ||
|
|
a8dfbb624f | ||
|
|
cbccacd023 | ||
|
|
da635fc773 | ||
|
|
ba93594cac | ||
|
|
67575b3cb7 | ||
|
|
f11d27eaf6 | ||
|
|
3ebc771cb1 | ||
|
|
b57044dbdc | ||
|
|
bb58e37de8 | ||
|
|
ac85beaf74 | ||
|
|
e77a447e8e | ||
|
|
de8e0f9473 | ||
|
|
7f2e8863fb | ||
|
|
a0d9f88b1a | ||
|
|
e12e4f96d5 | ||
|
|
3def7a9936 | ||
|
|
36501d3096 |
No files matched your search
@@ -0,0 +1,119 @@
|
|||||||
|
name: Frontend CI/CD
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '.gitignore'
|
||||||
|
- '**.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
- 'renovate.json'
|
||||||
|
- '.github/workflows/**'
|
||||||
|
- '.gitea/workflows/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '.gitignore'
|
||||||
|
- '**.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
- 'renovate.json'
|
||||||
|
- '.github/workflows/**'
|
||||||
|
- '.gitea/workflows/**'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASES_DIR: /srv/itzmineydev/releases
|
||||||
|
CURRENT_LINK: /srv/itzmineydev/web
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-and-build:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
npm ci
|
||||||
|
|
||||||
|
- name: Build frontend
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
npm run build
|
||||||
|
test -d dist/itzmineydev/browser
|
||||||
|
test -d dist/itzmineydev/server
|
||||||
|
deploy:
|
||||||
|
needs: test-and-build
|
||||||
|
runs-on: self-hosted
|
||||||
|
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
|
||||||
|
- name: Install dependencies & Build release
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Deploy release
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
mkdir -p $HOME/.ssh
|
||||||
|
echo "$SSH_PRIVATE_KEY" > $HOME/.ssh/deploy_key
|
||||||
|
chmod 600 $HOME/.ssh/deploy_key
|
||||||
|
|
||||||
|
SSH_ARGS="-i $HOME/.ssh/deploy_key -o StrictHostKeyChecking=no"
|
||||||
|
|
||||||
|
RELEASE_ID="web-$(date -u +%Y%m%d-%H%M%S)"
|
||||||
|
TARGET_DIR="$RELEASES_DIR/$RELEASE_ID"
|
||||||
|
|
||||||
|
ssh $SSH_ARGS itzmineydev@localhost "mkdir -p $TARGET_DIR"
|
||||||
|
|
||||||
|
rsync -az -e "ssh $SSH_ARGS" ./dist/itzmineydev/ itzmineydev@localhost:"$TARGET_DIR/"
|
||||||
|
|
||||||
|
ssh $SSH_ARGS itzmineydev@localhost "test -d $TARGET_DIR/browser && test -d $TARGET_DIR/server"
|
||||||
|
ssh $SSH_ARGS itzmineydev@localhost "ln -sfn $TARGET_DIR $CURRENT_LINK"
|
||||||
|
|
||||||
|
ssh $SSH_ARGS itzmineydev@localhost "sudo systemctl restart itzmineydev-ssr.service"
|
||||||
|
|
||||||
|
echo "Successfully published frontend release $RELEASE_ID"
|
||||||
|
|
||||||
|
- name: Cleanup old releases
|
||||||
|
run: |
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
mkdir -p $HOME/.ssh
|
||||||
|
echo "$SSH_PRIVATE_KEY" > $HOME/.ssh/deploy_key
|
||||||
|
chmod 600 $HOME/.ssh/deploy_key
|
||||||
|
|
||||||
|
ssh -i $HOME/.ssh/deploy_key -o StrictHostKeyChecking=no itzmineydev@localhost << 'EOF'
|
||||||
|
set -eux
|
||||||
|
RELEASES_DIR="/srv/itzmineydev/releases"
|
||||||
|
|
||||||
|
old_releases="$(find "$RELEASES_DIR" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' \
|
||||||
|
| grep -E '^web-[0-9]{8}-[0-9]{6}$' || true)"
|
||||||
|
|
||||||
|
if [ -n "$old_releases" ]; then
|
||||||
|
printf '%s\n' "$old_releases" \
|
||||||
|
| sort \
|
||||||
|
| head -n -5 \
|
||||||
|
| while read -r old_release; do
|
||||||
|
rm -rf "$RELEASES_DIR/$old_release"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
+14
-3
@@ -17,8 +17,7 @@
|
|||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"browser": "src/main.ts",
|
"browser": "src/main.ts",
|
||||||
"polyfills": [
|
"polyfills": [
|
||||||
"zone.js",
|
"zone.js"
|
||||||
"@angular/localize/init"
|
|
||||||
],
|
],
|
||||||
"tsConfig": "tsconfig.app.json",
|
"tsConfig": "tsconfig.app.json",
|
||||||
"assets": [
|
"assets": [
|
||||||
@@ -33,9 +32,21 @@
|
|||||||
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/brands.min.css",
|
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/brands.min.css",
|
||||||
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/solid.min.css"
|
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/solid.min.css"
|
||||||
],
|
],
|
||||||
"scripts": [
|
"scripts": [],
|
||||||
|
"server": "src/main.server.ts",
|
||||||
|
"outputMode": "server",
|
||||||
|
"security": {
|
||||||
|
"allowedHosts": [
|
||||||
|
"localhost",
|
||||||
|
"localhost:4000",
|
||||||
|
"itzminey.dev",
|
||||||
|
"*.itzminey.dev"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"ssr": {
|
||||||
|
"entry": "src/server.ts"
|
||||||
|
}
|
||||||
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"budgets": [
|
"budgets": [
|
||||||
|
|||||||
Generated
+3334
-3746
File diff suppressed because it is too large.
Load diff
+21
-27
@@ -4,45 +4,39 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build && node ./scripts/prerender-meta.js",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development"
|
"watch": "ng build --watch --configuration development",
|
||||||
|
"serve:ssr:itzmineydev": "node dist/itzmineydev/server/server.mjs"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^21.2.4",
|
"@angular/common": "^22.2.5",
|
||||||
"@angular/common": "^21.2.4",
|
"@angular/compiler": "^22.2.5",
|
||||||
"@angular/compiler": "^21.2.4",
|
"@angular/core": "^22.2.5",
|
||||||
"@angular/core": "^21.2.4",
|
"@angular/forms": "^22.2.5",
|
||||||
"@angular/forms": "^21.2.4",
|
"@angular/platform-browser": "^22.2.5",
|
||||||
"@angular/localize": "^21.2.4",
|
"@angular/platform-server": "^22.2.5",
|
||||||
"@angular/platform-browser": "^21.2.4",
|
"@angular/router": "^22.2.5",
|
||||||
"@angular/router": "^21.2.4",
|
"@angular/ssr": "^22.2.6",
|
||||||
"@ngx-translate/core": "^16.0.4",
|
"@ngx-translate/core": "^16.0.4",
|
||||||
"@ngx-translate/http-loader": "^16.0.1",
|
"@ngx-translate/http-loader": "^16.0.1",
|
||||||
"axios": "^1.13.5",
|
"express": "^5.1.0",
|
||||||
"marked": "^17.0.4",
|
"marked": "^17.0.4",
|
||||||
"ngx-markdown": "^21.1.0",
|
"ngx-markdown": "^22.0.0",
|
||||||
"parallax-js": "^3.1.0",
|
"parallax-js": "^3.1.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"zone.js": "~0.15.0"
|
"zone.js": "~0.15.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/build": "^21.2.2",
|
"@angular/build": "^22.2.6",
|
||||||
"@angular/cli": "^21.2.2",
|
"@angular/cli": "^22.2.6",
|
||||||
"@angular/compiler-cli": "^21.2.4",
|
"@angular/compiler-cli": "^22.2.5",
|
||||||
"@types/node": "^18.18.0",
|
"@types/express": "^5.0.1",
|
||||||
|
"@types/node": "^22.12.0",
|
||||||
"@types/parallax-js": "^3.1.3",
|
"@types/parallax-js": "^3.1.3",
|
||||||
"typescript": "~5.9.3"
|
"istanbul-lib-instrument": "^6.0.3",
|
||||||
|
"typescript": "~6.0.3"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {}
|
||||||
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
||||||
"tar": "^7.5.7",
|
|
||||||
"hono": "^4.11.7",
|
|
||||||
"ajv": "^8.17.1",
|
|
||||||
"ajv-formats": "^3.0.1",
|
|
||||||
"undici": "^7.23.0",
|
|
||||||
"picomatch": "^4.0.3",
|
|
||||||
"vite": "^7.3.1"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 171 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 53 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="512" height="512" viewBox="0 0 50 50">
|
||||||
|
<path d="M 25 3 C 12.85 3 3 12.85 3 25 C 3 37.15 12.85 47 25 47 C 37.15 47 47 37.15 47 25 C 47 12.85 37.15 3 25 3 z M 38 18 L 40 18 L 40 26 L 38 26 L 38 18 z M 14.048828 20.898438 C 14.523828 20.898438 14.995078 20.968719 15.455078 21.136719 C 16.701078 21.591719 17.454875 22.528516 17.796875 23.853516 C 17.936875 24.396516 17.994047 24.950641 17.998047 25.556641 C 17.988047 26.368641 17.875859 27.204516 17.505859 27.978516 C 16.940859 29.161516 16.01125 29.820578 14.78125 30.017578 C 14.50125 30.063578 14.222359 30.087891 13.943359 30.087891 C 13.484359 30.087891 13.028078 30.022094 12.580078 29.871094 C 11.402078 29.474094 10.664438 28.608531 10.273438 27.394531 C 10.019438 26.604531 9.9594844 25.791844 10.021484 24.964844 C 10.082484 24.155844 10.271641 23.3835 10.681641 22.6875 C 11.270641 21.6865 12.138375 21.129891 13.234375 20.962891 C 13.506375 20.921891 13.777828 20.898437 14.048828 20.898438 z M 23.263672 20.90625 C 23.311672 20.90625 23.359203 20.90525 23.408203 20.90625 C 24.174203 20.92025 24.914719 21.08175 25.636719 21.34375 C 25.684719 21.36075 25.731656 21.369172 25.722656 21.451172 C 25.658656 22.018172 25.52025 22.562172 25.28125 23.076172 C 25.27625 23.086172 25.269531 23.095703 25.269531 23.095703 C 24.905531 22.985703 24.559125 22.862297 24.203125 22.779297 C 23.960125 22.723297 23.71475 22.689453 23.46875 22.689453 C 23.26175 22.689453 23.055609 22.712625 22.849609 22.765625 C 22.612609 22.827625 22.399594 22.935172 22.308594 23.201172 C 22.187594 23.553172 22.304859 23.909688 22.630859 24.054688 C 22.986859 24.213687 23.360562 24.325984 23.726562 24.458984 C 24.047563 24.575984 24.377453 24.674453 24.689453 24.814453 C 25.518453 25.186453 25.930234 25.872547 25.990234 26.810547 C 26.041234 27.598547 25.862562 28.307344 25.351562 28.902344 C 24.908562 29.416344 24.344703 29.716391 23.720703 29.900391 C 23.262703 30.035391 22.796125 30.082031 22.328125 30.082031 C 22.101125 30.082031 21.875438 30.071687 21.648438 30.054688 C 21.046437 30.010687 20.466391 29.857625 19.900391 29.640625 C 19.837391 29.616625 19.815266 29.587625 19.822266 29.515625 C 19.882266 28.935625 20.028906 28.381609 20.253906 27.849609 C 20.260906 27.831609 20.269203 27.815156 20.283203 27.785156 C 20.325203 27.801156 20.36625 27.814078 20.40625 27.830078 C 20.99625 28.065078 21.599516 28.220703 22.228516 28.220703 C 22.290516 28.220703 22.352062 28.218844 22.414062 28.214844 C 22.734063 28.198844 23.046984 28.147422 23.333984 27.982422 C 23.717984 27.761422 23.861719 27.434531 23.761719 27.019531 C 23.722719 26.859531 23.647813 26.721391 23.507812 26.650391 C 23.278813 26.534391 23.045687 26.421891 22.804688 26.337891 C 22.370687 26.184891 21.926188 26.06125 21.492188 25.90625 C 21.171187 25.79125 20.884047 25.604047 20.623047 25.373047 C 20.258047 25.050047 20.085391 24.624625 20.025391 24.140625 C 19.957391 23.593625 19.985219 23.054016 20.199219 22.541016 C 20.485219 21.854016 21.003391 21.434781 21.650391 21.175781 C 22.170391 20.966781 22.713672 20.90625 23.263672 20.90625 z M 29.070312 21.007812 C 29.437313 21.007812 29.805781 21.040375 30.175781 21.109375 L 30.175781 21.267578 C 30.176781 22.859578 30.170594 24.450969 30.183594 26.042969 C 30.186594 26.363969 30.236641 26.690906 30.306641 27.003906 C 30.447641 27.634906 30.835828 27.986312 31.423828 28.070312 C 31.580828 28.092312 31.738531 28.103516 31.894531 28.103516 C 32.159531 28.103516 32.422547 28.073578 32.685547 28.017578 C 32.780547 27.997578 32.810547 27.958609 32.810547 27.849609 C 32.807547 25.654609 32.808594 23.460625 32.808594 21.265625 L 32.808594 21.109375 C 33.173594 21.040375 33.534484 21.007812 33.896484 21.007812 C 34.261484 21.007812 34.627094 21.041375 34.996094 21.109375 L 34.996094 21.236328 C 34.996094 23.963328 34.995047 26.690969 34.998047 29.417969 C 34.998047 29.514969 34.972625 29.550125 34.890625 29.578125 C 33.934625 29.898125 32.962703 30.082031 31.970703 30.082031 C 31.778703 30.082031 31.586578 30.0765 31.392578 30.0625 C 30.877578 30.0245 30.361094 29.973344 29.871094 29.777344 C 28.944094 29.407344 28.421156 28.647578 28.160156 27.642578 C 28.006156 27.050578 27.96975 26.442078 27.96875 25.830078 C 27.96575 24.293078 27.96875 22.75575 27.96875 21.21875 C 27.96875 21.18475 27.970656 21.150375 27.972656 21.109375 C 28.339656 21.041375 28.705312 21.007812 29.070312 21.007812 z M 13.972656 22.787109 C 13.914656 22.787109 13.856828 22.789922 13.798828 22.794922 C 13.297828 22.833922 12.904734 23.075594 12.677734 23.558594 C 12.573734 23.780594 12.490547 24.019766 12.435547 24.259766 C 12.284547 24.920766 12.287609 25.592672 12.349609 26.263672 C 12.386609 26.669672 12.472437 27.064594 12.648438 27.433594 C 12.814438 27.780594 13.057109 28.039156 13.412109 28.160156 C 13.606109 28.226156 13.801094 28.259766 13.996094 28.259766 C 14.199094 28.259766 14.401516 28.223391 14.603516 28.150391 C 15.060516 27.985391 15.307891 27.61225 15.462891 27.15625 C 15.642891 26.62625 15.681453 26.073266 15.689453 25.447266 C 15.683453 25.3Line truncated
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
+60
-40
@@ -1,34 +1,54 @@
|
|||||||
{
|
{
|
||||||
"NAV_ABOUT": "Über",
|
"common": {
|
||||||
"FOOTER_LINK": "Impressum & Datenschutzerklärung",
|
"time": {
|
||||||
|
"format": "H:mm",
|
||||||
|
"prefix": "um ",
|
||||||
|
"suffix": " Uhr"
|
||||||
|
},
|
||||||
|
"btn": {
|
||||||
|
"about": "Über",
|
||||||
|
"share": "Teilen",
|
||||||
|
"back": "Zurück"
|
||||||
|
},
|
||||||
|
"footer": { "linktext": "Impressum & Datenschutzerklärung" }
|
||||||
|
},
|
||||||
|
|
||||||
"TECHSTACK_LANGS": "Sprachen",
|
"about": {
|
||||||
"TECHSTACK_DBS": "Datenbanken",
|
"subtext": "Web-Entwickler & Grafik Designer",
|
||||||
|
"terminal": {
|
||||||
|
"intro": "<p>Hallo! Ich bin Michael. Ich lebe im alpinen Land des Schnitzels (von manchen auch unter dem eher groben Namen Österreich bekannt) und programmiere und gestalte gerne Grafiken. Diese Leidenschaft begleitet mich schon seit vielen Jahren und ich bin damit aufgewachsen. Auf dem Weg habe ich viel gelernt – aber in der sich ständig weiterentwickelnden Welt der Technik hört man nie auf, neue Dinge zu entdecken!</p><p>Meine Stärke liegt im Frontend-Webdevelopment, also darin, Webseiten zu entwickeln und passende Grafiken dafür zu gestalten. Diese gesamte Seite wurde übrigens von mir selbst erstellt und ist ein gutes Beispiel dafür, wie ich Dinge designe. Alle Grafiken (bis auf ein paar Font Awesome Icons) stammen ebenfalls von mir!<br>Wenn du noch mehr Beispiele sehen möchtest, schau dir gerne mein <a href=\"/portfolio\" class=\"green\">Portfolio</a> an!</p>",
|
||||||
|
"langs": "Sprachen",
|
||||||
|
"dbs": "Datenbanken"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"ABOUT_SUB": "Web-Entwickler & Grafik Designer",
|
"portf": {
|
||||||
"ABOUT": "Hallo! Ich bin Michael. Ich lebe im alpinen Land des Schnitzels (von manchen auch unter dem eher groben Namen Österreich bekannt) und programmiere und gestalte gerne Grafiken. Diese Leidenschaft begleitet mich schon seit vielen Jahren und ich bin damit aufgewachsen. Auf dem Weg habe ich viel gelernt – aber in der sich ständig weiterentwickelnden Welt der Technik hört man nie auf, neue Dinge zu entdecken!</p><p>Meine Stärke liegt im Frontend-Webdevelopment, also darin, Webseiten zu entwickeln und passende Grafiken dafür zu gestalten. Diese gesamte Seite wurde übrigens von mir selbst erstellt und ist ein gutes Beispiel dafür, wie ich Dinge designe. Alle Grafiken (bis auf ein paar Font Awesome Icons) stammen ebenfalls von mir!<br>Wenn du noch mehr Beispiele sehen möchtest, schau dir gerne mein <a href=\"/portfolio\" class=\"green\">Portfolio</a> an!</p>",
|
"title": "Mein Portfolio",
|
||||||
|
"subtext": "Projekte & Designs",
|
||||||
|
"intro": "Willkommen zu meinem Portfolio!<br><br>Ich mache seit einigen Jahren Grafikdesign, aber werde auch langsam besser im programmieren und du wirst bald vielleicht ein paar Projekte von meinem <a href=\"https://github.com/itzminey\" target=\"_blank\">GitHub</a> hier sehen! Einige davon sind auch schon auf meiner selbstgehosteten <a href=\"https://git.itzminey.dev/itzminey\" target=\"_blank\">Gitea</a> Instanz verfügbar!"
|
||||||
|
},
|
||||||
|
|
||||||
"PORTF_TITLE": "Mein Portfolio",
|
"socials": {
|
||||||
"PORTF_SUB": "Projekte & Designs",
|
"subtext": "Man kann mich an vielen Orten finden",
|
||||||
"PORTFOLIO": "Willkommen zu meinem Portfolio!<br><br>Ich mache seit einigen Jahren Grafikdesign, aber werde auch langsam besser im programmieren und du wirst bald vielleicht ein paar Projekte von meinem <a href=\"https://github.com/itzminey\" target=\"_blank\">GitHub</a> hier sehen!<br>Wenn du magst was ich erstelle, würde ich mich freuen wenn du mir auf meinen <a href=\"/socials\">Socials</a> folgs und wenn du dich sehr großzügig fühlst kannst du mir eine kleine Spende auf meinem <a href=\"https://ko-fi.com/itzminey\" target=\"_blank\">Ko-Fi</a> hinterlassen!",
|
"games": "Spiele"
|
||||||
|
},
|
||||||
|
|
||||||
"SOCIALS_SUB": "Man kann mich an vielen Orten finden",
|
"blog": {
|
||||||
"SOCIALS_GAMES": "Spiele",
|
"subtext": "(Sehr) irreguläre updates",
|
||||||
"SOCIALS_COMMS": "Spenden & Freelancing Aufträge",
|
"list": {
|
||||||
|
"empty": "Noch keine Artikel!",
|
||||||
"BLOG_SUB": "(Sehr) irreguläre updates",
|
"err": "Error: Konnte keine Artikel laden!"
|
||||||
|
},
|
||||||
"ARTICLE_BACK": "Zurück zur Übersicht",
|
"article": {
|
||||||
"ARTICLES_NONE": "Noch keine Artikel!",
|
"err": "Artikel wurde nicht gefunden!",
|
||||||
"ARTICLE_NOTFOUND": "Artikel wurde nicht gefunden!",
|
"created": "Publikationsdatum",
|
||||||
"CREATED_AT": "Erstellt:",
|
"updated": "Letzte Änderung"
|
||||||
|
}
|
||||||
"IMP_TITLE": "Impressum",
|
},
|
||||||
"IMPRINT": "Diese Website wird betrieben von Michael Reisinger in Österreich, erreichbar unter:",
|
|
||||||
|
|
||||||
"privacy": {
|
"privacy": {
|
||||||
"title": "Datenschutzerklärung",
|
"title": "Datenschutzerklärung",
|
||||||
"lastUpdated": "Zuletzt aktualisiert: 22. März 2026",
|
"lastUpdated": "Zuletzt aktualisiert: GTA 6 Release-Day (19. November 2026)",
|
||||||
"nav": {
|
"nav": {
|
||||||
"controller": "1. Impressum & Verantwortlicher",
|
"controller": "1. Impressum & Verantwortlicher",
|
||||||
"whatData": "2. Welche Daten wir erfassen",
|
"whatData": "2. Welche Daten wir erfassen",
|
||||||
@@ -40,40 +60,40 @@
|
|||||||
},
|
},
|
||||||
"controller": {
|
"controller": {
|
||||||
"title": "1. Impressum & Verantwortlicher",
|
"title": "1. Impressum & Verantwortlicher",
|
||||||
"content": "Diese Website wird betrieben von:<br><br><b>Michael Reisinger</b><br><a href=\"mailto:michael@itzminey.dev\">michael@itzminey.dev</a><br>Standort: Österreich<br><br>Dies ist eine persönliche Website, die zu Portfolio- und Informationszwecken genutzt wird.<br><br>Als Betreiber dieser Website bin ich auch der Verantwortliche für die Verarbeitung personenbezogener Daten gemäß der DSGVO."
|
"content": "Diese Website wird betrieben von:<br><br><b>Michael Reisinger</b><br><a href=\"mailto:michael@itzminey.dev\">michael@itzminey.dev</a><br>Ansässig in Österreich<br><br>Dies ist eine persönliche Website zu Portfolio- und Informationszwecken.<br><br>Als Betreiber dieser Website bin ich zugleich Verantwortlicher für die Verarbeitung personenbezogener Daten im Sinne der DSGVO."
|
||||||
},
|
},
|
||||||
"whatData": {
|
"whatData": {
|
||||||
"title": "2. Welche Daten wir erfassen",
|
"title": "2. Welche Daten wir erfassen",
|
||||||
"websiteUsageTitle": "a) Nutzungsdaten der Website",
|
"websiteUsageTitle": "a) Website-Nutzungsdaten",
|
||||||
"websiteUsage": "Beim Besuch bestimmter Seiten, wie z. B. beim Aufruf von Artikeln, kann Ihre IP-Adresse vorübergehend verarbeitet werden. Dies erfolgt ausschließlich zum Schutz der Integrität von Aufrufzahlen und zur Vermeidung automatisierter Zugriffe. Diese Daten werden sicher verarbeitet und nicht länger als notwendig gespeichert.",
|
"websiteUsage": "Beim Aufruf bestimmter Seiten (z. B. zur Zählung von Artikelaufrufen) verarbeiten wir vorübergehend Ihre IP-Adresse. Dies dient ausschließlich dem Schutz der Integrität unserer Aufrufzahlen sowie der Verhinderung automatisierter Missbräuche. Diese Daten werden sicher verarbeitet und nicht länger als nötig gespeichert.",
|
||||||
"noCookies": "Wir verwenden keine Cookies zu Tracking- oder Analysezwecken.",
|
"noCookies": "Wir verwenden keine Cookies zu Tracking-, Werbe- oder Analysezwecken. Es kommt ausschließlich technisch notwendiger Browser-Speicher (z. B. zum Speichern Ihrer Spracheinstellung) zum Einsatz, der für die grundlegende Funktionalität der Website erforderlich ist.",
|
||||||
"emailInquiriesTitle": "b) Kontaktaufnahme per E-Mail",
|
"emailInquiriesTitle": "b) E-Mail-Anfragen",
|
||||||
"emailInquiries": "Wenn Sie uns über die auf der Website angegebene E-Mail-Adresse kontaktieren, können wir Ihre Nachricht sowie Ihre Kontaktdaten speichern, um auf Ihre Anfrage zu antworten. Diese Daten werden vertraulich behandelt und ohne Ihre Zustimmung nicht an Dritte weitergegeben.",
|
"emailInquiries": "Wenn Sie uns über die auf der Website angegebene E-Mail-Adresse kontaktieren, speichern wir Ihre Nachricht und Kontaktdaten, um Ihre Anfrage zu bearbeiten. Diese Daten werden vertraulich behandelt und ohne Ihre Einwilligung nicht an Dritte weitergegeben.",
|
||||||
"thirdPartyTitle": "c) Drittanbieter-Dienste (Cloudflare, Google Search Console)",
|
"thirdPartyTitle": "c) Drittanbieter-Dienste (Cloudflare, Google Search Console)",
|
||||||
"thirdParty": "Wir nutzen vertrauenswürdige Drittanbieter-Dienste, um die Sicherheit, Stabilität und Sichtbarkeit unserer Website zu gewährleisten.<br><br>Cloudflare, Inc. bietet Schutz vor DDoS-Angriffen, sichere DNS-Auflösung und Leistungsoptimierung. Im Rahmen dieser Dienste kann Cloudflare technische Daten wie Ihre IP-Adresse und HTTP-Anfrageheader verarbeiten. Diese Verarbeitung erfolgt automatisch und ausschließlich zu Sicherheits- und Betriebszwecken.<br><br>Google Search Console, ein Dienst von Google LLC, hilft uns dabei, die Präsenz unserer Website in den Google-Suchergebnissen zu überwachen und zu verbessern. Es werden aggregierte, nicht personenbezogene Leistungsdaten (wie Suchanfragen, Impressionen und Indexierungsinformationen) bereitgestellt, ohne dass personenbezogene Daten von Besuchern gespeichert werden.<br><br>Sowohl Cloudflare als auch Google handeln als eigenständige Datenverarbeiter gemäß den geltenden Datenschutzbestimmungen. Weitere Informationen finden Sie in der <a href=\"https://www.cloudflare.com/privacypolicy/\" target=\"_blank\">Datenschutzerklärung von Cloudflare</a> und der <a href=\"https://policies.google.com/privacy\" target=\"_blank\">Datenschutzerklärung von Google</a>."
|
"thirdParty": "Wir nutzen vertrauenswürdige Drittanbieter-Dienste, um die Sicherheit, Stabilität und Auffindbarkeit unserer Website zu gewährleisten.<br><br>Cloudflare, Inc. (101 Townsend St., San Francisco, CA 94107, USA) stellt DDoS-Schutz, sichere DNS-Auflösung und Leistungsoptimierung bereit. Im Rahmen dieser Dienste verarbeitet Cloudflare technische Daten wie Ihre IP-Adresse und HTTP-Request-Header und setzt gegebenenfalls technisch notwendige Sicherheits-Cookies (wie z. B. <code>__cf_bm</code>), um legitime Besucher von automatisierten Bots zu unterscheiden. Cloudflare handelt als unser Auftragsverarbeiter im Rahmen eines Auftragsverarbeitungsvertrags (DPA), und Datenübermittlungen in die USA sind durch das EU-US Data Privacy Framework abgesichert.<br><br>Die Google Search Console, ein Dienst der Google LLC, hilft uns dabei, die Präsenz unserer Website in den Google-Suchergebnissen zu überwachen und zu pflegen. Sie liefert ausschließlich aggregierte, nicht personenbezogene Leistungsdaten (wie Suchanfragen, Impressionen und Indexierungsinformationen) und erfasst oder speichert keine personenbezogenen Daten oder Cookies auf den Geräten der Besucher.<br><br>Weitere Informationen finden Sie in der <a href=\"https://cloudflare.com\" target=\"_blank\" rel=\"noopener noreferrer\">Datenschutzerklärung von Cloudflare</a> sowie in der <a href=\"https://google.com\" target=\"_blank\" rel=\"noopener noreferrer\">Datenschutzerklärung von Google</a>."
|
||||||
},
|
},
|
||||||
"purpose": {
|
"purpose": {
|
||||||
"title": "3. Zweck und Rechtsgrundlage",
|
"title": "3. Zweck und Rechtsgrundlage",
|
||||||
"intro": "Wir verarbeiten personenbezogene Daten auf Grundlage unseres berechtigten Interesses (Art. 6 Abs. 1 lit. f DSGVO), insbesondere:",
|
"intro": "Wir verarbeiten personenbezogene Daten auf Grundlage unseres berechtigten Interesses (Art. 6 Abs. 1 lit. f DSGVO), nämlich:",
|
||||||
"points": [
|
"points": [
|
||||||
"Zur Aufrechterhaltung und zum Schutz der Integrität unserer Website",
|
"Zur Aufrechterhaltung und zum Schutz der Integrität unserer Website",
|
||||||
"Zur Beantwortung von Anfragen"
|
"Zur Beantwortung Ihrer Anfragen"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dataRetention": {
|
"dataRetention": {
|
||||||
"title": "4. Speicherdauer",
|
"title": "4. Speicherdauer",
|
||||||
"content": "Personenbezogene Daten werden nur so lange gespeichert, wie es für die genannten Zwecke erforderlich ist. E-Mail-Korrespondenz kann aus rechtlichen oder administrativen Gründen sowie zur Nachverfolgung der Kommunikation gespeichert werden."
|
"content": "Personenbezogene Daten werden nur so lange gespeichert, wie es für die genannten Zwecke erforderlich ist. E-Mail-Korrespondenz kann aus rechtlichen oder administrativen Gründen sowie zur Nachvollziehbarkeit der Kommunikation aufbewahrt werden."
|
||||||
},
|
},
|
||||||
"yourRights": {
|
"yourRights": {
|
||||||
"title": "5. Ihre Rechte",
|
"title": "5. Ihre Rechte",
|
||||||
"intro": "Im Rahmen der DSGVO haben Sie folgende Rechte:",
|
"intro": "Nach der DSGVO haben Sie das Recht auf:",
|
||||||
"rights": [
|
"rights": [
|
||||||
"Auskunft über Ihre gespeicherten personenbezogenen Daten",
|
"Auskunft über Ihre personenbezogenen Daten",
|
||||||
"Berichtigung oder Löschung Ihrer Daten zu verlangen",
|
"Berichtigung oder Löschung Ihrer Daten",
|
||||||
"Widerspruch gegen die Verarbeitung einzulegen oder diese einzuschränken",
|
"Einschränkung der Verarbeitung oder Widerspruch gegen die Verarbeitung",
|
||||||
"Beschwerde bei einer Datenschutzbehörde einzureichen (in Österreich: <b>DSB - Datenschutzbehörde</b>)"
|
"Beschwerde bei Ihrer zuständigen Datenschutzbehörde (in Österreich: <b>DSB – Österreichische Datenschutzbehörde</b>)"
|
||||||
],
|
],
|
||||||
"footer": "Zur Ausübung dieser Rechte können Sie uns unter der oben angegebenen E-Mail-Adresse kontaktieren."
|
"footer": "Zur Ausübung dieser Rechte kontaktieren Sie uns bitte unter der oben angegebenen E-Mail-Adresse (Hinweis: Da wir keinerlei Besucherdaten dauerhaft speichern, ist die E-Mail, mit der Sie uns kontaktieren, in der Regel ohnehin das einzige personenbezogene Datum, das wir tatsächlich löschen müssen)."
|
||||||
},
|
},
|
||||||
"security": {
|
"security": {
|
||||||
"title": "6. Sicherheit",
|
"title": "6. Sicherheit",
|
||||||
@@ -81,7 +101,7 @@
|
|||||||
},
|
},
|
||||||
"changes": {
|
"changes": {
|
||||||
"title": "7. Änderungen",
|
"title": "7. Änderungen",
|
||||||
"content": "Diese Datenschutzerklärung kann gelegentlich aktualisiert werden, um Änderungen unserer Verfahren widerzuspiegeln. Die jeweils aktuelle Version ist stets auf dieser Seite verfügbar."
|
"content": "Diese Datenschutzerklärung kann gelegentlich aktualisiert werden, um Änderungen unserer Praktiken abzubilden. Die jeweils aktuelle Version finden Sie stets auf dieser Seite."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+46
-24
@@ -1,32 +1,54 @@
|
|||||||
{
|
{
|
||||||
"NAV_ABOUT": "About",
|
"common": {
|
||||||
"FOOTER_LINK": "Imprint & Privacy Policy",
|
"time": {
|
||||||
|
"format": "shortTime",
|
||||||
|
"prefix": "at ",
|
||||||
|
"suffix": ""
|
||||||
|
},
|
||||||
|
"btn": {
|
||||||
|
"about": "About",
|
||||||
|
"share": "Share",
|
||||||
|
"back": "Back"
|
||||||
|
},
|
||||||
|
"footer": { "linktext": "Imprint & Privacy Policy"}
|
||||||
|
},
|
||||||
|
|
||||||
"TECHSTACK_LANGS": "Languages",
|
"about": {
|
||||||
"TECHSTACK_DBS": "Databases",
|
"subtext": "Web developer & Graphic designer",
|
||||||
|
"terminal": {
|
||||||
|
"intro": "<p>Hello there I'm Michael! I live in the alpine land of the Schnitzel (to some also known under the crude name Austria) and I like to code and make graphics. This is a passion I've followed since many years and grew up with, I learned a lot along the way – but you never stop finding new things in the always advancing world of tech!</p><p>What I'm best at is frontend web development, designing graphics that can go along well with it. This entire page is done by me actually and a great example of how I design stuff, with all of the graphics (except for some Font Awesome icons) done by myself!<br>If you want some more examples of my work, feel free to take a look through my <a href=\"/portfolio\" class=\"green\">Portfolio</a>!</p>",
|
||||||
|
"langs": "Languages",
|
||||||
|
"dbs": "Databases"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"ABOUT_SUB": "Web developer & Graphic designer",
|
"portf": {
|
||||||
"ABOUT": "Hello there I'm Michael! I live in the alpine land of the Schnitzel (to some also known under the crude name Austria) and I like to code and make graphics. This is a passion I've followed since many years and grew up with, I learned a lot along the way – but you never stop finding new things in the always advancing world of tech!</p><p>What I'm best at is frontend web development, designing graphics that can go along well with it. This entire page is done by me actually and a great example of how I design stuff, with all of the graphics (except for some Font Awesome icons) done by myself!<br>If you want some more examples of my work, feel free to take a look through my <a href=\"/portfolio\" class=\"green\">Portfolio</a>!</p>",
|
"title": "My Portfolio",
|
||||||
"ABOUT_OUTRO": "",
|
"subtext": "Projects & Designs",
|
||||||
|
"intro": "Welcome to my portfolio!<br><br>I mostly do modern graphic designs since a couple years now, but I'm also getting better at coding and you might soon see a couple little coding projects from my <a href=\"https://github.com/itzminey\" target=\"_blank\">GitHub</a> listed here too! You can also find a couple on my self-hosted <a href=\"https://git.itzminey.dev/itzminey\" target=\"_blank\">Gitea</a> instance as well now!"
|
||||||
|
},
|
||||||
|
|
||||||
"PORTF_TITLE": "My Portfolio",
|
"socials": {
|
||||||
"PORTF_SUB": "Projects & Designs",
|
"subtext": "You can find me in a lotta places",
|
||||||
"PORTFOLIO": "Welcome to my portfolio!<br><br>I mostly do modern graphic designs since a couple years now, but I'm also getting better at coding and you might soon see a couple little coding projects from my <a href=\"https://github.com/itzminey\" target=\"_blank\">GitHub</a> listed here too!<br>If you like what I do consider following me on my <a href=\"/socials\">Socials</a> and if you feel really generous leave a tip on my <a href=\"https://ko-fi.com/itzminey\" target=\"_blank\">Ko-Fi</a>!",
|
"games": "Games"
|
||||||
|
},
|
||||||
|
|
||||||
"SOCIALS_SUB": "You can find me in a lotta places",
|
"blog": {
|
||||||
"SOCIALS_GAMES": "Games",
|
"subtext": "Some (very) irregular updates",
|
||||||
"SOCIALS_COMMS": "Donations & Commissions",
|
"list": {
|
||||||
|
"empty": "No Articles yet!",
|
||||||
"BLOG_SUB": "Some (very) irregular updates",
|
"err": "Error: Couldn't fetch articles!"
|
||||||
|
},
|
||||||
"ARTICLE_BACK": "Back to Overview",
|
"article": {
|
||||||
"ARTICLES_NONE": "No Articles yet!",
|
"err": "Article not found!",
|
||||||
"ARTICLE_NOTFOUND": "Article not found!",
|
"created": "Publishing Date",
|
||||||
"CREATED_AT": "Created At:",
|
"updated": "Last Update"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"privacy": {
|
"privacy": {
|
||||||
"title": "Privacy Policy",
|
"title": "Privacy Policy",
|
||||||
"lastUpdated": "Last updated: 22nd March 2026",
|
"lastUpdated": "Last updated: GTA 6 Release-Day (19th November 2026)",
|
||||||
"nav": {
|
"nav": {
|
||||||
"controller": "1. Imprint & Controller of the Data",
|
"controller": "1. Imprint & Controller of the Data",
|
||||||
"whatData": "2. What Data We Collect",
|
"whatData": "2. What Data We Collect",
|
||||||
@@ -44,11 +66,11 @@
|
|||||||
"title": "2. What Data We Collect",
|
"title": "2. What Data We Collect",
|
||||||
"websiteUsageTitle": "a) Website Usage Data",
|
"websiteUsageTitle": "a) Website Usage Data",
|
||||||
"websiteUsage": "We may temporarily process your IP address when you visit certain pages, such as article views. This is done solely to protect the integrity of view counts and prevent automated abuse. This data is stored securely and is not retained longer than necessary.",
|
"websiteUsage": "We may temporarily process your IP address when you visit certain pages, such as article views. This is done solely to protect the integrity of view counts and prevent automated abuse. This data is stored securely and is not retained longer than necessary.",
|
||||||
"noCookies": "We do not use cookies for tracking or analytics purposes.",
|
"noCookies": "We do not use cookies for tracking, advertising, or analytics purposes. We only use strictly necessary browser storage (such as saving your language preference) required for basic site functionality.",
|
||||||
"emailInquiriesTitle": "b) Email Inquiries",
|
"emailInquiriesTitle": "b) Email Inquiries",
|
||||||
"emailInquiries": "If you contact us via the email address provided on the website, we may store your message and contact information in order to respond to your inquiry. This data is treated as confidential and will not be shared with third parties without your consent.",
|
"emailInquiries": "If you contact us via the email address provided on the website, we may store your message and contact information in order to respond to your inquiry. This data is treated as confidential and will not be shared with third parties without your consent.",
|
||||||
"thirdPartyTitle": "c) Third-Party Services (Cloudflare, Google Search Console)",
|
"thirdPartyTitle": "c) Third-Party Services (Cloudflare, Google Search Console)",
|
||||||
"thirdParty": "We use trusted third-party services to ensure the security, stability, and visibility of our website.<br><br>Cloudflare, Inc. provides DDoS protection, secure DNS resolution, and performance optimization. As part of these services, Cloudflare may process technical data such as your IP address and HTTP request headers. This processing occurs automatically and solely for security and operational purposes.<br><br>Google Search Console, a service provided by Google LLC, helps us monitor and maintain our website’s presence in Google Search results. It provides aggregated, non-personal performance data (such as search queries, impressions, and indexing information) and does not collect or store any personal data from visitors.<br><br>Both Cloudflare and Google act as independent data processors under applicable privacy regulations. For more information, see the <a href=\"https://www.cloudflare.com/privacypolicy/\" target=\"_blank\">Cloudflare Privacy Policy</a> and the <a href=\"https://policies.google.com/privacy\" target=\"_blank\">Google Privacy Policy</a>."
|
"thirdParty": "We use trusted third-party services to ensure the security, stability, and visibility of our website.<br><br>Cloudflare, Inc. (101 Townsend St., San Francisco, CA 94107, USA) provides DDoS protection, secure DNS resolution, and performance optimization. As part of these services, Cloudflare processes technical data such as your IP address and HTTP request headers, and may place strictly necessary security cookies (such as <code>__cf_bm</code>) to distinguish legitimate visitors from automated bots. Cloudflare acts as our Data Processor under a Data Processing Addendum, and data transfers to the United States are safeguarded under the EU-U.S. Data Privacy Framework.<br><br>Google Search Console, a service provided by Google LLC, helps us monitor and maintain our website’s presence in Google Search results. It provides aggregated, non-personal performance data (such as search queries, impressions, and indexing information) and does not collect or store any personal data or set cookies on visitors' devices.<br><br>For more information, see the <a href=\"https://www.cloudflare.com/privacypolicy/\" target=\"_blank\" rel=\"noopener noreferrer\">Cloudflare Privacy Policy</a> and the <a href=\"https://policies.google.com/privacy\" target=\"_blank\" rel=\"noopener noreferrer\">Google Privacy Policy</a>."
|
||||||
},
|
},
|
||||||
"purpose": {
|
"purpose": {
|
||||||
"title": "3. Purpose and Legal Basis",
|
"title": "3. Purpose and Legal Basis",
|
||||||
@@ -71,7 +93,7 @@
|
|||||||
"Object to or restrict processing",
|
"Object to or restrict processing",
|
||||||
"Lodge a complaint with your local data protection authority (in Austria, <b>DSB - Datenschutzbehörde</b>)"
|
"Lodge a complaint with your local data protection authority (in Austria, <b>DSB - Datenschutzbehörde</b>)"
|
||||||
],
|
],
|
||||||
"footer": "To exercise these rights, please contact us at the email listed above."
|
"footer": "To exercise these rights, please contact us at the email listed above (note: since we don't permanently store any visitor data, any email you send us is usually the only personal data we'll actually have to delete)."
|
||||||
},
|
},
|
||||||
"security": {
|
"security": {
|
||||||
"title": "6. Security",
|
"title": "6. Security",
|
||||||
|
|||||||
+9
-5
@@ -1,7 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": ["config:recommended"],
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"dependencyDashboard": true,
|
"extends": [
|
||||||
"labels": ["dependencies"],
|
"config:recommended",
|
||||||
"prHourlyLimit": 2,
|
"security:only-security-updates"
|
||||||
"prConcurrentLimit": 5
|
],
|
||||||
|
"vulnerabilityAlerts": {
|
||||||
|
"enabled": true,
|
||||||
|
"labels": ["security"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+10
-37
@@ -8,98 +8,71 @@ const staticMeta = {
|
|||||||
description: 'Welcome to itzMiney\'s Homepage! Here you can find my portfolio and other cool stuff.',
|
description: 'Welcome to itzMiney\'s Homepage! Here you can find my portfolio and other cool stuff.',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/about',
|
url: 'https://itzminey.dev/about',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
'/about': {
|
'/about': {
|
||||||
title: 'itzMiney\'s Home',
|
title: 'itzMiney\'s Home',
|
||||||
description: 'Welcome to itzMiney\'s Homepage! Here you can find my portfolio and other cool stuff.',
|
description: 'Welcome to itzMiney\'s Homepage! Here you can find my portfolio and other cool stuff.',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/about',
|
url: 'https://itzminey.dev/about',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
'/portfolio': {
|
'/portfolio': {
|
||||||
title: 'Portfolio | itzMiney',
|
title: 'Portfolio | itzMiney',
|
||||||
description: 'This is my portfolio where you can find examples of my designs and other projects!',
|
description: 'This is my portfolio where you can find examples of my designs and other projects!',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/portfolio',
|
url: 'https://itzminey.dev/portfolio',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
'/socials': {
|
'/socials': {
|
||||||
title: 'Socials | itzMiney',
|
title: 'Socials | itzMiney',
|
||||||
description: 'Here you can find links to all the places I hang around in!',
|
description: 'Here you can find links to all the places I hang around in!',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/socials',
|
url: 'https://itzminey.dev/socials',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
'/services': {
|
|
||||||
title: 'Services | itzMiney',
|
|
||||||
description: 'All the Services I offer are listed here!',
|
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
|
||||||
url: 'https://itzminey.dev/services',
|
|
||||||
color: '#eb284c'
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
'/blog': {
|
'/blog': {
|
||||||
title: 'Blog | itzMiney',
|
title: 'Blog | itzMiney',
|
||||||
description: 'Welcome to my blog! I\'ll post occasional updates here on the stuff I\'m currently up to.',
|
description: 'Welcome to my blog! I\'ll post occasional updates here on the stuff I\'m currently up to.',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/blog',
|
url: 'https://itzminey.dev/blog',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
'/login': {
|
'/login': {
|
||||||
title: 'Login | itzMiney',
|
title: 'Login | itzMiney',
|
||||||
description: 'Admin Panel Login',
|
description: 'Admin Panel Login',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/login',
|
url: 'https://itzminey.dev/login',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
'/admin': {
|
'/admin': {
|
||||||
title: 'Admin Panel | itzMiney',
|
title: 'Admin Panel | itzMiney',
|
||||||
description: 'Admin Panel',
|
description: 'Admin Panel',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/admin',
|
url: 'https://itzminey.dev/admin',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
'/404': {
|
'/404': {
|
||||||
title: '404 | Page Not Found',
|
title: '404 | Page Not Found',
|
||||||
description: 'How the hell did you end up here?',
|
description: 'How the hell did you end up here?',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/404',
|
url: 'https://itzminey.dev/404',
|
||||||
color: '#eb284c',
|
color: '#0095a4',
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
'/tos': {
|
|
||||||
title: 'Terms of Service | itzMiney',
|
|
||||||
description: 'My Terms of Service for the Freelancing work I provide',
|
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
|
||||||
url: 'https://itzminey.dev/tos',
|
|
||||||
color: '#eb284c'
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
'/privacy': {
|
'/privacy': {
|
||||||
title: 'Privacy Policy | itzMiney',
|
title: 'Privacy Policy | itzMiney',
|
||||||
description: 'My Privacy Policy for the data collected on this site',
|
description: 'My Privacy Policy for the data collected on this site',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/tos',
|
url: 'https://itzminey.dev/tos',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
},
|
||||||
'/imprint': {
|
'/imprint': {
|
||||||
title: 'Imprint | itzMiney',
|
title: 'Imprint | itzMiney',
|
||||||
description: 'Imprint and Contact',
|
description: 'Imprint and Contact',
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
||||||
url: 'https://itzminey.dev/imprint',
|
url: 'https://itzminey.dev/imprint',
|
||||||
color: '#eb284c'
|
color: '#0095a4'
|
||||||
},
|
|
||||||
/*
|
|
||||||
'/shortener': {
|
|
||||||
title: 'Shortener | itzMiney',
|
|
||||||
description: 'URL Shortener',
|
|
||||||
image: 'https://meta.itzminey.dev/assets/ogimg.png',
|
|
||||||
url: 'https://itzminey.dev/shortener',
|
|
||||||
color: '#eb284c'
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Output directory for pre-rendered metadata
|
// Output directory for pre-rendered metadata
|
||||||
|
|||||||
@@ -142,7 +142,13 @@ a {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.terminal {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 900px;
|
||||||
|
}
|
||||||
|
|
||||||
.terminal-window {
|
.terminal-window {
|
||||||
|
width: 100%;
|
||||||
background: #1b1920;
|
background: #1b1920;
|
||||||
height: 520px;
|
height: 520px;
|
||||||
max-width: 900px;
|
max-width: 900px;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="landing-container">
|
<div class="landing-container">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
<h1 [ngStyle]="{'font-size': isNarrow ? '4rem' : '5rem'}"><code>itzMiney</code></h1>
|
<h1 [ngStyle]="{'font-size': isNarrow ? '4rem' : '5rem'}"><code>itzMiney</code></h1>
|
||||||
<p class="subtitle">{{ 'ABOUT_SUB' | translate}}</p>
|
<p class="subtitle">{{ 'about.subtext' | translate}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="down-arrow" (click)="scrollDown()">
|
<div class="down-arrow" (click)="scrollDown()">
|
||||||
<i class="fa-solid fa-angle-down"></i>
|
<i class="fa-solid fa-angle-down"></i>
|
||||||
@@ -17,11 +17,11 @@
|
|||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
<section id="content" #contentTrigger></section>
|
<section id="content" #contentTrigger></section>
|
||||||
<div class="about-container">
|
<div class="about-container">
|
||||||
<div class="terminal" [ngStyle]="{'margin': isNarrow ? '10px;' : '25px'}">
|
<div class="terminal" [ngStyle]="{'margin': isNarrow ? '10px' : '25px'}">
|
||||||
<div class="titlebar">
|
<div class="titlebar">
|
||||||
<div class="window-title"><p><code>Konsole</code></p></div> <div class="window-actions"><p>🟡 🟣 🔴</p></div>
|
<div class="window-title"><p><code>Konsole</code></p></div> <div class="window-actions"><p>🟡 🟣 🔴</p></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="terminal-window" [ngStyle]="{'width': isNarrow ? '100%' : '900px' }">
|
<div class="terminal-window">
|
||||||
<app-terminal-emulator [bootOnVisible]="terminalShouldBoot"></app-terminal-emulator>
|
<app-terminal-emulator [bootOnVisible]="terminalShouldBoot"></app-terminal-emulator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
import {AfterViewInit, Component, ElementRef, HostListener, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';
|
import {
|
||||||
|
AfterViewInit, Component, ElementRef, HostListener, OnInit, ViewChild, ViewEncapsulation, ChangeDetectionStrategy,
|
||||||
|
inject, PLATFORM_ID
|
||||||
|
} from '@angular/core';
|
||||||
|
import { isPlatformBrowser } from '@angular/common';
|
||||||
import {ViewportService} from '../shared/services/viewport.service';
|
import {ViewportService} from '../shared/services/viewport.service';
|
||||||
import {Title} from '@angular/platform-browser';
|
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
import {NgStyle} from '@angular/common';
|
import {NgStyle} from '@angular/common';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {TerminalEmulatorComponent} from '../shared/terminal-emulator/terminal-emulator.component';
|
import {TerminalEmulatorComponent} from '../shared/terminal-emulator/terminal-emulator.component';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-about',
|
selector: 'app-about',
|
||||||
@@ -18,9 +22,11 @@ import {TerminalEmulatorComponent} from '../shared/terminal-emulator/terminal-em
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
TerminalEmulatorComponent
|
TerminalEmulatorComponent
|
||||||
],
|
],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrls: ['./about.component.css']
|
styleUrls: ['./about.component.css']
|
||||||
})
|
})
|
||||||
export class AboutComponent implements OnInit, AfterViewInit {
|
export class AboutComponent implements OnInit, AfterViewInit {
|
||||||
|
private platformId = inject(PLATFORM_ID);
|
||||||
isNarrow: boolean = false;
|
isNarrow: boolean = false;
|
||||||
terminalShouldBoot: boolean = false;
|
terminalShouldBoot: boolean = false;
|
||||||
|
|
||||||
@@ -28,23 +34,37 @@ export class AboutComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private deviceService: ViewportService,
|
private deviceService: ViewportService,
|
||||||
private titleService: Title
|
private seo: SeoService,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('itzMiney\'s Home');
|
this.seo.update({
|
||||||
|
title: 'itzMiney\'s Home',
|
||||||
|
desc: 'Welcome to itzMiney\'s Homepage! Here you can find my portfolio and other cool stuff.',
|
||||||
|
suffix: false,
|
||||||
|
buttons: [
|
||||||
|
{ label: 'About', url: this.seo.getpath('root') },
|
||||||
|
{ label: 'Portfolio', url: this.seo.getpath('portfolio') },
|
||||||
|
{ label: 'Socials', url: this.seo.getpath('socials') },
|
||||||
|
{ label: 'Blog', url: this.seo.getpath('blog') }
|
||||||
|
]
|
||||||
|
});
|
||||||
this.isNarrow = this.deviceService.isNarrow;
|
this.isNarrow = this.deviceService.isNarrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
if (isPlatformBrowser(this.platformId)) {
|
||||||
this.checkTerminalTrigger();
|
this.checkTerminalTrigger();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@HostListener('window:scroll')
|
@HostListener('window:scroll')
|
||||||
onWindowScroll() {
|
onWindowScroll() {
|
||||||
|
if (isPlatformBrowser(this.platformId)) {
|
||||||
this.checkTerminalTrigger();
|
this.checkTerminalTrigger();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private checkTerminalTrigger() {
|
private checkTerminalTrigger() {
|
||||||
if (this.terminalShouldBoot || !this.contentTrigger) return;
|
if (this.terminalShouldBoot || !this.contentTrigger) return;
|
||||||
@@ -57,6 +77,8 @@ export class AboutComponent implements OnInit, AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
scrollDown() {
|
scrollDown() {
|
||||||
|
if (isPlatformBrowser(this.platformId)) {
|
||||||
document.getElementById('content')?.scrollIntoView({behavior: 'smooth'});
|
document.getElementById('content')?.scrollIntoView({behavior: 'smooth'});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -113,6 +113,16 @@ form {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#thumbUrl {
|
||||||
|
margin: 0 0 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar.mobile #thumbUrl {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
#submitBtn,
|
#submitBtn,
|
||||||
#modeSel {
|
#modeSel {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -29,6 +29,14 @@
|
|||||||
[required]="articleMode === 'create'"
|
[required]="articleMode === 'create'"
|
||||||
[disabled]="articleMode === 'delete' || (articleMode === 'edit' && !editArticleLoaded)"
|
[disabled]="articleMode === 'delete' || (articleMode === 'edit' && !editArticleLoaded)"
|
||||||
/>
|
/>
|
||||||
|
<input
|
||||||
|
id="thumbUrl"
|
||||||
|
type="url"
|
||||||
|
name="thumb_url"
|
||||||
|
[(ngModel)]="thumb_url"
|
||||||
|
placeholder="Thumbnail URL"
|
||||||
|
[disabled]="articleMode === 'delete' || (articleMode === 'edit' && !editArticleLoaded)"
|
||||||
|
/>
|
||||||
<div class="mode-select-button" [ngStyle]="{'justify-content': isNarrow ? 'left' : 'center'}">
|
<div class="mode-select-button" [ngStyle]="{'justify-content': isNarrow ? 'left' : 'center'}">
|
||||||
<div
|
<div
|
||||||
id=modeSel (click)="toggleDropdown()"
|
id=modeSel (click)="toggleDropdown()"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import {Component, OnDestroy, OnInit} from '@angular/core';
|
import {Component, OnDestroy, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {Router, RouterLink} from '@angular/router';
|
import {Router, RouterLink} from '@angular/router';
|
||||||
import {ArticleService} from '../shared/services/article.service';
|
import {ArticleService} from '../shared/services/article.service';
|
||||||
import {UserService} from '../shared/services/user.service';
|
import {UserService} from '../shared/services/user.service';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
import {NgClass, NgStyle, TitleCasePipe} from '@angular/common';
|
import {NgClass, NgStyle, TitleCasePipe} from '@angular/common';
|
||||||
import {Observer, Subscription, interval} from 'rxjs';
|
import {Observer, Subscription, interval} from 'rxjs';
|
||||||
import {FormsModule, NgForm} from '@angular/forms';
|
import {FormsModule, NgForm} from '@angular/forms';
|
||||||
import {ViewportService} from '../shared/services/viewport.service';
|
import {ViewportService} from '../shared/services/viewport.service';
|
||||||
import {Title} from '@angular/platform-browser';
|
|
||||||
import {ModalComponent} from '../shared/modal/modal.component';
|
import {ModalComponent} from '../shared/modal/modal.component';
|
||||||
import {AuthService} from '../shared/services/auth.service';
|
import {AuthService} from '../shared/services/auth.service';
|
||||||
import {ShortenerComponent} from '../shared/shortener/shortener.component';
|
import {ShortenerComponent} from '../shared/shortener/shortener.component';
|
||||||
@@ -17,6 +17,7 @@ interface Article {
|
|||||||
title: string;
|
title: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
content: string;
|
content: string;
|
||||||
|
thumb_url: string | null;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
views: number;
|
views: number;
|
||||||
@@ -28,6 +29,7 @@ interface Article {
|
|||||||
selector: 'app-admin',
|
selector: 'app-admin',
|
||||||
templateUrl: './admin.component.html',
|
templateUrl: './admin.component.html',
|
||||||
styleUrls: ['./admin.component.css'],
|
styleUrls: ['./admin.component.css'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [
|
imports: [
|
||||||
FormsModule,
|
FormsModule,
|
||||||
NgStyle,
|
NgStyle,
|
||||||
@@ -50,6 +52,8 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
title: string = '';
|
title: string = '';
|
||||||
content: string = '';
|
content: string = '';
|
||||||
|
thumb_url: string = '';
|
||||||
|
originalThumbUrl = '';
|
||||||
|
|
||||||
modalTitle: string = '';
|
modalTitle: string = '';
|
||||||
isUserModalOpen: boolean = false;
|
isUserModalOpen: boolean = false;
|
||||||
@@ -85,13 +89,18 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
private articleService: ArticleService,
|
private articleService: ArticleService,
|
||||||
private userService: UserService,
|
private userService: UserService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private seo: SeoService,
|
||||||
private deviceService: ViewportService,
|
private deviceService: ViewportService,
|
||||||
private titleService: Title,
|
|
||||||
protected authService: AuthService
|
protected authService: AuthService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Admin Panel | itzMiney')
|
this.seo.update({
|
||||||
|
title: 'Admin Panel',
|
||||||
|
desc: 'Management & Administration Panel',
|
||||||
|
buttons: [{ label: 'Log-in', url: this.seo.getpath('root')}]
|
||||||
|
});
|
||||||
|
|
||||||
this.isNarrow = this.deviceService.isNarrow;
|
this.isNarrow = this.deviceService.isNarrow;
|
||||||
this.startTokenValidation();
|
this.startTokenValidation();
|
||||||
this.loadArticles();
|
this.loadArticles();
|
||||||
@@ -111,7 +120,7 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
createArticle(title:string, content: string) {
|
createArticle(title:string, content: string, thumb_url?: string) {
|
||||||
if (!title?.trim() || !content?.trim()) {
|
if (!title?.trim() || !content?.trim()) {
|
||||||
alert('Both title and content are required!');
|
alert('Both title and content are required!');
|
||||||
return;
|
return;
|
||||||
@@ -122,7 +131,12 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
const token = this.authService.token!;
|
const token = this.authService.token!;
|
||||||
|
|
||||||
this.articleService.postArticle(token, title.trim(), content.trim()).subscribe({
|
this.articleService.postArticle(
|
||||||
|
token,
|
||||||
|
title.trim(),
|
||||||
|
content.trim(),
|
||||||
|
thumb_url?.trim() || null
|
||||||
|
).subscribe({
|
||||||
next: () => {
|
next: () => {
|
||||||
alert('Article created successfully.');
|
alert('Article created successfully.');
|
||||||
this.articleIdValue = null;
|
this.articleIdValue = null;
|
||||||
@@ -137,7 +151,7 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
editArticle(articleId: number, title?: string, content?: string): void {
|
editArticle(articleId: number, title?: string, content?: string, thumb_url?: string ): void {
|
||||||
if (!articleId || isNaN(Number(articleId))) {
|
if (!articleId || isNaN(Number(articleId))) {
|
||||||
alert('Invalid input. Please enter a valid article ID.');
|
alert('Invalid input. Please enter a valid article ID.');
|
||||||
return;
|
return;
|
||||||
@@ -156,12 +170,15 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
const titleChanged = updatedTitle !== this.originalTitle;
|
const titleChanged = updatedTitle !== this.originalTitle;
|
||||||
const contentChanged = updatedContent !== this.originalContent;
|
const contentChanged = updatedContent !== this.originalContent;
|
||||||
|
|
||||||
if (!titleChanged && !contentChanged) {
|
const updatedThumbUrl = thumb_url?.trim() ?? '';
|
||||||
|
const thumbUrlChanged = updatedThumbUrl !== this.originalThumbUrl;
|
||||||
|
|
||||||
|
if (!titleChanged && !contentChanged && !thumbUrlChanged) {
|
||||||
alert('No changes detected.');
|
alert('No changes detected.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const updates: { title?: string; content?: string } = {};
|
const updates: { title?: string; content?: string, thumb_url?: string | null } = {};
|
||||||
|
|
||||||
if (titleChanged) {
|
if (titleChanged) {
|
||||||
updates.title = updatedTitle;
|
updates.title = updatedTitle;
|
||||||
@@ -171,6 +188,10 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
updates.content = updatedContent;
|
updates.content = updatedContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thumbUrlChanged) {
|
||||||
|
updates.thumb_url = updatedThumbUrl || null;
|
||||||
|
}
|
||||||
|
|
||||||
this.authService.validateToken().subscribe({
|
this.authService.validateToken().subscribe({
|
||||||
next: (valid) => {
|
next: (valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
@@ -192,6 +213,11 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
this.content = updatedContent;
|
this.content = updatedContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thumbUrlChanged) {
|
||||||
|
this.originalThumbUrl = updatedThumbUrl;
|
||||||
|
this.thumb_url = updatedThumbUrl;
|
||||||
|
}
|
||||||
|
|
||||||
this.loadedArticle = {
|
this.loadedArticle = {
|
||||||
...this.loadedArticle,
|
...this.loadedArticle,
|
||||||
...response
|
...response
|
||||||
@@ -258,6 +284,9 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
this.title = this.originalTitle;
|
this.title = this.originalTitle;
|
||||||
this.content = this.originalContent;
|
this.content = this.originalContent;
|
||||||
|
|
||||||
|
this.originalThumbUrl = article.thumb_url ?? '';
|
||||||
|
this.thumb_url = this.originalThumbUrl;
|
||||||
|
|
||||||
this.editArticleLoaded = true;
|
this.editArticleLoaded = true;
|
||||||
this.loadingEditArticle = false;
|
this.loadingEditArticle = false;
|
||||||
this.articleNotFound = false;
|
this.articleNotFound = false;
|
||||||
@@ -483,8 +512,10 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
this.articleNotFound = false;
|
this.articleNotFound = false;
|
||||||
this.originalTitle = '';
|
this.originalTitle = '';
|
||||||
this.originalContent = '';
|
this.originalContent = '';
|
||||||
|
this.originalThumbUrl = '';
|
||||||
this.title = '';
|
this.title = '';
|
||||||
this.content = '';
|
this.content = '';
|
||||||
|
this.thumb_url = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
markArticleNotFound(): void {
|
markArticleNotFound(): void {
|
||||||
@@ -523,10 +554,12 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
this.loadedArticle = article;
|
this.loadedArticle = article;
|
||||||
this.originalTitle = article.title ?? '';
|
this.originalTitle = article.title ?? '';
|
||||||
this.originalContent = article.content ?? '';
|
this.originalContent = article.content ?? '';
|
||||||
|
this.originalThumbUrl = article.thumb_url ?? '';
|
||||||
|
|
||||||
if (this.articleMode === 'edit') {
|
if (this.articleMode === 'edit') {
|
||||||
this.title = this.originalTitle;
|
this.title = this.originalTitle;
|
||||||
this.content = this.originalContent;
|
this.content = this.originalContent;
|
||||||
|
this.thumb_url = this.originalThumbUrl;
|
||||||
this.editArticleLoaded = true;
|
this.editArticleLoaded = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -539,7 +572,11 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get hasArticleChanges(): boolean {
|
get hasArticleChanges(): boolean {
|
||||||
return this.title !== this.originalTitle || this.content !== this.originalContent;
|
return (
|
||||||
|
this.title !== this.originalTitle ||
|
||||||
|
this.content !== this.originalContent ||
|
||||||
|
this.thumb_url !== this.originalThumbUrl
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
isArticleSubmitDisabled(): boolean {
|
isArticleSubmitDisabled(): boolean {
|
||||||
@@ -564,9 +601,9 @@ export class AdminComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
submitArticle() {
|
submitArticle() {
|
||||||
if (this.articleMode === 'create') {
|
if (this.articleMode === 'create') {
|
||||||
this.createArticle(this.title, this.content);
|
this.createArticle(this.title, this.content, this.thumb_url);
|
||||||
} else if (this.articleMode === 'edit') {
|
} else if (this.articleMode === 'edit') {
|
||||||
this.editArticle(Number(this.articleIdValue), this.title, this.content);
|
this.editArticle(Number(this.articleIdValue), this.title, this.content, this.thumb_url);
|
||||||
} else if (this.articleMode === 'delete') {
|
} else if (this.articleMode === 'delete') {
|
||||||
this.deleteArticle(Number(this.articleIdValue));
|
this.deleteArticle(Number(this.articleIdValue));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import { RouterOutlet} from '@angular/router';
|
import { RouterOutlet} from '@angular/router';
|
||||||
import {TranslateService} from '@ngx-translate/core';
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
|
||||||
@@ -6,6 +6,7 @@ import {TranslateService} from '@ngx-translate/core';
|
|||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
imports: [RouterOutlet],
|
imports: [RouterOutlet],
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './app.component.css',
|
styleUrl: './app.component.css',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
|
||||||
|
import { provideServerRendering, withRoutes } from '@angular/ssr';
|
||||||
|
import { appConfig } from './app.config';
|
||||||
|
import { serverRoutes } from './app.routes.server';
|
||||||
|
|
||||||
|
const serverConfig: ApplicationConfig = {
|
||||||
|
providers: [
|
||||||
|
provideServerRendering(withRoutes(serverRoutes))
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
export const config = mergeApplicationConfig(appConfig, serverConfig);
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import {ApplicationConfig, importProvidersFrom, provideZoneChangeDetection} from '@angular/core';
|
import {ApplicationConfig, importProvidersFrom, provideZoneChangeDetection} from '@angular/core';
|
||||||
import {provideRouter, withInMemoryScrolling, withViewTransitions} from '@angular/router';
|
import {provideRouter, withInMemoryScrolling, withViewTransitions} from '@angular/router';
|
||||||
import {routes} from './app.routes';
|
import {routes} from './app.routes';
|
||||||
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
|
import {provideClientHydration, withEventReplay, withNoIncrementalHydration} from '@angular/platform-browser';
|
||||||
import {HttpClient, provideHttpClient} from '@angular/common/http';
|
import {HttpClient, provideHttpClient, withXhr} from '@angular/common/http';
|
||||||
import {AuthService} from './shared/services/auth.service';
|
import {AuthService} from './shared/services/auth.service';
|
||||||
import {AuthInterceptor} from './auth.interceptor';
|
import {AuthInterceptor} from './auth.interceptor';
|
||||||
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
||||||
@@ -23,8 +23,8 @@ export const appConfig: ApplicationConfig = {
|
|||||||
anchorScrolling: 'enabled'
|
anchorScrolling: 'enabled'
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
provideClientHydration(withEventReplay()),
|
provideClientHydration(withEventReplay(), withNoIncrementalHydration()),
|
||||||
provideHttpClient(),
|
provideHttpClient(withXhr()),
|
||||||
provideMarkdown({
|
provideMarkdown({
|
||||||
markedOptions: {
|
markedOptions: {
|
||||||
provide: MARKED_OPTIONS,
|
provide: MARKED_OPTIONS,
|
||||||
@@ -43,6 +43,6 @@ export const appConfig: ApplicationConfig = {
|
|||||||
deps: [HttpClient]
|
deps: [HttpClient]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
),
|
), provideClientHydration(),
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { RenderMode, ServerRoute } from '@angular/ssr';
|
||||||
|
|
||||||
|
export const serverRoutes: ServerRoute[] = [
|
||||||
|
{
|
||||||
|
path: 'admin',
|
||||||
|
renderMode: RenderMode.Client
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'login',
|
||||||
|
renderMode: RenderMode.Client
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '**',
|
||||||
|
renderMode: RenderMode.Server
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 50%, rgb(0, 0, 0) 100%);
|
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 50%, rgb(0, 0, 0) 100%);
|
||||||
padding: 30px;
|
padding: 30px 10px;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 2.5rem;
|
position: relative;
|
||||||
background: linear-gradient(to top, #a0eddb 0%, #ffffff 100%);
|
background: linear-gradient(to top, #a0eddb 0%, #ffffff 100%);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
@@ -32,6 +32,7 @@ h1 {
|
|||||||
margin-top: 120px;
|
margin-top: 120px;
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-content {
|
.article-content {
|
||||||
@@ -46,66 +47,157 @@ h1 {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-content.narrow h1 {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content.narrow h2 {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content.narrow h3 {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content.narrow h4 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content.narrow h5 {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-content.narrow h6 {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
.article-content p {
|
.article-content p {
|
||||||
margin: 0.7rem 0;
|
margin: 0.7rem 0;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-thumb {
|
||||||
|
width: 70%;
|
||||||
|
max-width: 1200px;
|
||||||
|
aspect-ratio: 2.5 / 1;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 25px 25px 0 0;
|
||||||
|
margin: 67px auto -200px auto;
|
||||||
|
z-index: -100;
|
||||||
|
|
||||||
|
-webkit-mask-image: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
black 0%,
|
||||||
|
rgba(0, 0, 0, 0.95) 50%,
|
||||||
|
rgba(0, 0, 0, 0.7) 70%,
|
||||||
|
rgba(0, 0, 0, 0.3) 85%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
mask-image: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
black 0%,
|
||||||
|
rgba(0, 0, 0, 0.95) 50%,
|
||||||
|
rgba(0, 0, 0, 0.7) 70%,
|
||||||
|
rgba(0, 0, 0, 0.3) 85%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
|
||||||
|
filter: brightness(0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-thumb.narrow {
|
||||||
|
width: 100%;
|
||||||
|
margin: 50px auto -160px auto;
|
||||||
|
}
|
||||||
|
|
||||||
.article-meta {
|
.article-meta {
|
||||||
font-size: 1rem;
|
display: flex;
|
||||||
color: #D6DAEFBD;
|
flex-direction: row;
|
||||||
|
gap: 3rem;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
color: rgb(168 168 211);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 25px 0;
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta strong, .article-meta .meta-left i {
|
||||||
|
color: rgb(214 217 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta .meta-left, .article-meta .meta-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-buttons {
|
.article-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
color: white;
|
||||||
|
gap: 3rem;
|
||||||
|
margin: 0 0 15px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-buttons button {
|
.article-buttons i {
|
||||||
background-color: #444893FF;
|
|
||||||
color: #fff;
|
|
||||||
border: none;
|
|
||||||
padding: 10px 20px;
|
|
||||||
font-size: 1rem;
|
|
||||||
cursor: pointer;
|
|
||||||
border-radius: 25px;
|
|
||||||
transition: background-color 0.3s;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.article-buttons button:hover {
|
|
||||||
background-color: #707ec5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#shareBtn {
|
|
||||||
background-color: transparent;
|
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-buttons .buttons-left {
|
||||||
|
display: inline-flex;
|
||||||
|
gap: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-buttons .buttons-right {
|
||||||
|
display: inline-flex;
|
||||||
|
margin-left: 15px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-buttons .buttons-right i {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-buttons .buttons-right p {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-buttons a {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
transition: all ease-in-out 0.2s;
|
transition: all ease-in-out 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#shareBtn:hover {
|
.article-buttons #shareBtn:hover {
|
||||||
color: #cfd7f8;
|
color: #b9ecff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#shareBtn.copied {
|
.article-buttons #shareBtn:focus, #shareBtn.copied {
|
||||||
color: #8798dc;
|
color: #5ee0ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-btn {
|
.article-buttons #backBtn:hover {
|
||||||
display: flex;
|
color: #ffb2b6;
|
||||||
width: 100%;
|
}
|
||||||
margin-right: 64px;
|
|
||||||
justify-content: center;
|
.article-buttons #backBtn:focus {
|
||||||
|
color: #c62d46;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-message h1 {
|
.error-message h1 {
|
||||||
font-size: 10rem;
|
font-size: 10rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: white;
|
color: #ffd0d0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-message p {
|
.error-message p {
|
||||||
|
|||||||
@@ -15,23 +15,48 @@
|
|||||||
<!-- Article -->
|
<!-- Article -->
|
||||||
<div class="article-container">
|
<div class="article-container">
|
||||||
<div>
|
<div>
|
||||||
<h1>{{ article.title }}</h1>
|
<img
|
||||||
|
class="article-thumb"
|
||||||
|
[src]="article.thumb_url || defaultThumbUrl"
|
||||||
|
[alt]="article.title + ' thumbnail'"
|
||||||
|
[ngClass]="{ 'narrow': isNarrow }"
|
||||||
|
/>
|
||||||
|
<h1 [ngStyle]="{'font-size': isNarrow ? '2rem' : 'font-size: 2.5rem'}">{{ article.title }}</h1>
|
||||||
<div class="content-container" [ngStyle]="{'width': isNarrow ? '100%' : '70%'}">
|
<div class="content-container" [ngStyle]="{'width': isNarrow ? '100%' : '70%'}">
|
||||||
<markdown
|
<markdown
|
||||||
class="article-content"
|
class="article-content"
|
||||||
[data]="renderedContent"
|
[data]="renderedContent"
|
||||||
|
[ngClass]="{ 'narrow': isNarrow }"
|
||||||
(click)="onArticleContentClick($event)"
|
(click)="onArticleContentClick($event)"
|
||||||
></markdown>
|
></markdown>
|
||||||
<div class="article-buttons">
|
<div class="article-buttons">
|
||||||
<button id="shareBtn" (click)="copyLink()" [class.copied]="copied" class="fa-solid fa-share"></button>
|
<div class="buttons-left">
|
||||||
<div class="back-btn">
|
<a id="backBtn" [title]="'common.btn.back' | translate" href="/blog"><i class="fa-solid fa-turn-up fa-rotate-270"></i></a>
|
||||||
<a href="/blog"><button id="backBtn">{{ 'ARTICLE_BACK' | translate }}</button></a>
|
<a id="shareBtn" [title]="'common.btn.share' | translate" (click)="shareArticle()" [class.copied]="copied"><i class="fa-solid fa-share-nodes"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="buttons-right">
|
||||||
|
<p><strong>{{ article.views }}</strong> Views</p>
|
||||||
|
<i class="fa-solid fa-eye"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="article-meta">
|
<div class="article-meta">
|
||||||
<p><strong>Author:</strong> {{ article.authorName}}</p>
|
<div class="meta-left">
|
||||||
<p><strong>Views:</strong> {{ article.views }}</p>
|
<p title="Author"><i class="fa-solid fa-user"></i><strong> {{ article.authorName}}</strong></p>
|
||||||
<p><strong>{{ 'CREATED_AT' | translate }}</strong> {{ article.createdAt | date:'MMM dd, yyyy, HH:mm' }}</p>
|
<p [title]="'blog.article.created' | translate">
|
||||||
|
{{ article.createdAt | date: 'mediumDate' }}<br>
|
||||||
|
{{ 'common.time.prefix' | translate}}
|
||||||
|
{{ article.createdAt | date:('common.time.format' | translate) }}
|
||||||
|
{{ 'common.time.suffix' | translate }}</p>
|
||||||
|
</div>
|
||||||
|
@if (article.updatedAt) {
|
||||||
|
<div class="meta-right">
|
||||||
|
<p><strong>{{ 'blog.article.updated' | translate }}</strong></p>
|
||||||
|
<p>{{ article.updatedAt | date:'mediumDate' }}<br>
|
||||||
|
{{ 'common.time.prefix' | translate}}
|
||||||
|
{{ article.updatedAt | date:('common.time.format' | translate) }}
|
||||||
|
{{ 'common.time.suffix' | translate }}</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,8 +82,8 @@
|
|||||||
<!-- Error Message -->
|
<!-- Error Message -->
|
||||||
<div class="error-message">
|
<div class="error-message">
|
||||||
<h1>404</h1>
|
<h1>404</h1>
|
||||||
<p>{{ 'ARTICLE_NOTFOUND' | translate }}</p>
|
<p>{{ 'blog.article.err' | translate }}</p>
|
||||||
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
|
<a href="/blog"><button>{{ 'common.btn.back' | translate }}</button></a>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
import {Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import { DatePipe, NgStyle } from '@angular/common';
|
import {DatePipe, NgClass, NgStyle} from '@angular/common';
|
||||||
import {ArticleService} from '../../shared/services/article.service';
|
import {ArticleService} from '../../shared/services/article.service';
|
||||||
|
import { SeoService } from '../../shared/services/seo.service';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {Title} from '@angular/platform-browser';
|
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {ParallaxComponent} from '../../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../../shared/parallax/parallax.component';
|
||||||
import {MarkdownModule} from 'ngx-markdown';
|
import {MarkdownModule} from 'ngx-markdown';
|
||||||
|
import {MarkdownService} from '../../shared/services/markdown.service';
|
||||||
import {ViewportService} from '../../shared/services/viewport.service';
|
import {ViewportService} from '../../shared/services/viewport.service';
|
||||||
|
|
||||||
interface Article {
|
interface Article {
|
||||||
@@ -13,6 +14,7 @@ interface Article {
|
|||||||
title: string;
|
title: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
content: string;
|
content: string;
|
||||||
|
thumb_url: string | null;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
views: number;
|
views: number;
|
||||||
@@ -28,9 +30,11 @@ interface Article {
|
|||||||
NgStyle,
|
NgStyle,
|
||||||
TranslatePipe,
|
TranslatePipe,
|
||||||
ParallaxComponent,
|
ParallaxComponent,
|
||||||
MarkdownModule
|
MarkdownModule,
|
||||||
|
NgClass
|
||||||
],
|
],
|
||||||
templateUrl: './article-page.component.html',
|
templateUrl: './article-page.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './article-page.component.css'
|
styleUrl: './article-page.component.css'
|
||||||
})
|
})
|
||||||
export class ArticlePageComponent implements OnInit {
|
export class ArticlePageComponent implements OnInit {
|
||||||
@@ -42,14 +46,15 @@ export class ArticlePageComponent implements OnInit {
|
|||||||
loading: boolean = true;
|
loading: boolean = true;
|
||||||
|
|
||||||
renderedContent: string = '';
|
renderedContent: string = '';
|
||||||
|
|
||||||
isNarrow: boolean = false;
|
isNarrow: boolean = false;
|
||||||
|
defaultThumbUrl: string = '';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private articleService: ArticleService,
|
private articleService: ArticleService,
|
||||||
private titleService: Title,
|
private seo: SeoService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private viewportService: ViewportService
|
private viewportService: ViewportService,
|
||||||
|
private markdownService: MarkdownService,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,6 +62,8 @@ export class ArticlePageComponent implements OnInit {
|
|||||||
this.route.params.subscribe((params) => {
|
this.route.params.subscribe((params) => {
|
||||||
const slug = params['slug'];
|
const slug = params['slug'];
|
||||||
|
|
||||||
|
this.defaultThumbUrl = this.seo.getpath('assets/ogimg.png');
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.error = false;
|
this.error = false;
|
||||||
this.article = null;
|
this.article = null;
|
||||||
@@ -64,7 +71,9 @@ export class ArticlePageComponent implements OnInit {
|
|||||||
this.isNarrow = this.viewportService.isNarrow;
|
this.isNarrow = this.viewportService.isNarrow;
|
||||||
|
|
||||||
if (!slug) {
|
if (!slug) {
|
||||||
this.titleService.setTitle('Error | itzMiney');
|
this.seo.update({ title: 'Error', desc: 'Page not found' });
|
||||||
|
this.error = true;
|
||||||
|
this.loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,13 +83,31 @@ export class ArticlePageComponent implements OnInit {
|
|||||||
this.article = null;
|
this.article = null;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.error = true;
|
this.error = true;
|
||||||
|
this.seo.update({
|
||||||
|
title: '404 | Article Not Found',
|
||||||
|
desc: 'The requested article could not be found.',
|
||||||
|
suffix: false
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.article = article;
|
this.article = article;
|
||||||
this.renderedContent = this.transformCustomBlocks(article.content);
|
this.renderedContent = this.markdownService.transformCustomBlocks(article.content);
|
||||||
this.titleService.setTitle(`${article.title} | itzMiney`);
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
|
const thumbUrl = article.thumb_url || this.defaultThumbUrl;
|
||||||
|
|
||||||
|
this.seo.update({
|
||||||
|
title: article.title,
|
||||||
|
desc: article.content.substring(0, 150).replace(/[#*`_]/g, '') + '...',
|
||||||
|
gallery: [{
|
||||||
|
url: thumbUrl
|
||||||
|
}],
|
||||||
|
buttons: [
|
||||||
|
{ label: 'Read Post', url: this.seo.getpath() },
|
||||||
|
{ label: 'View All', url: this.seo.getpath('blog') }
|
||||||
|
]
|
||||||
|
});
|
||||||
},
|
},
|
||||||
error: (error) => {
|
error: (error) => {
|
||||||
console.error('Error fetching article:', error);
|
console.error('Error fetching article:', error);
|
||||||
@@ -89,6 +116,11 @@ export class ArticlePageComponent implements OnInit {
|
|||||||
|
|
||||||
if (error.status === 404) {
|
if (error.status === 404) {
|
||||||
this.error = true;
|
this.error = true;
|
||||||
|
this.seo.update({
|
||||||
|
title: '404 | Article Not Found',
|
||||||
|
desc: 'The requested article could not be found.',
|
||||||
|
suffix: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -104,35 +136,6 @@ export class ArticlePageComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
transformCustomBlocks(content: string): string {
|
|
||||||
let result = content;
|
|
||||||
|
|
||||||
result = result.replace(
|
|
||||||
/\[gallery\]\s*([\s\S]*?)\s*\[\/gallery\]/g,
|
|
||||||
(_, inner) => {
|
|
||||||
const urls = inner
|
|
||||||
.split('\n')
|
|
||||||
.map((line: string) => line.trim())
|
|
||||||
.filter((line: string) => line.length > 0);
|
|
||||||
|
|
||||||
const images = urls
|
|
||||||
.map((url: string) => `<img src="${url}" alt="Gallery image">`)
|
|
||||||
.join('');
|
|
||||||
|
|
||||||
return `<div class="gallery">${images}</div>`;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
result = result.replace(
|
|
||||||
/\[center\]\s*([\s\S]*?)\s*\[\/center\]/g,
|
|
||||||
(_, inner) => {
|
|
||||||
return `<div class="centered-text">${inner}</div>`;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
openPreview(src: string) {
|
openPreview(src: string) {
|
||||||
this.selectedImage = src;
|
this.selectedImage = src;
|
||||||
}
|
}
|
||||||
@@ -141,15 +144,33 @@ export class ArticlePageComponent implements OnInit {
|
|||||||
this.selectedImage = null;
|
this.selectedImage = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
copyLink() {
|
async shareArticle() {
|
||||||
const slug = this.route.snapshot.paramMap.get('slug') || '';
|
const shareUrl = this.seo.getpath();
|
||||||
const shareLink: string = 'https://itzminey.dev/blog/' + slug;
|
|
||||||
this.copied = true;
|
|
||||||
|
|
||||||
|
if (navigator.share) {
|
||||||
|
try {
|
||||||
|
await navigator.share({
|
||||||
|
title: document.title,
|
||||||
|
url: shareUrl
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} catch (err) {
|
||||||
|
if ((err as Error).name !== 'AbortError') {
|
||||||
|
console.error('Error sharing:', err);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(shareUrl);
|
||||||
|
this.copied = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.copied = false;
|
this.copied = false;
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
} catch (err) {
|
||||||
navigator.clipboard.writeText(shareLink).then()
|
console.error('Failed to copy link:', err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,6 +50,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.article-card {
|
.article-card {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 18px;
|
||||||
|
text-align: left;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
background: rgba(40, 41, 89, 0.5);
|
background: rgba(40, 41, 89, 0.5);
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
@@ -61,11 +65,40 @@
|
|||||||
transition: background-color 0.3s, transform 0.2s;
|
transition: background-color 0.3s, transform 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-card.narrow {
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: center;
|
||||||
|
width: 90%;
|
||||||
|
max-width: 90%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.article-card:hover {
|
.article-card:hover {
|
||||||
background: linear-gradient(135deg, #4637cd, #282959);
|
background: linear-gradient(135deg, #4637cd, #282959);
|
||||||
transform: translateY(-5px);
|
transform: translateY(-5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-card-thumb {
|
||||||
|
width: 200px;
|
||||||
|
aspect-ratio: 3 / 2;
|
||||||
|
flex-shrink: 0;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 28px 12px;
|
||||||
|
filter: brightness(0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-card-thumb.narrow {
|
||||||
|
width: 100%;
|
||||||
|
aspect-ratio: 2 / 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-card-content {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
color: white;
|
color: white;
|
||||||
|
|||||||
@@ -8,22 +8,41 @@
|
|||||||
<div class="height-container">
|
<div class="height-container">
|
||||||
<div class="blog-header" [ngStyle]="{'margin-top': isNarrow ? '72px' : '112px'}">
|
<div class="blog-header" [ngStyle]="{'margin-top': isNarrow ? '72px' : '112px'}">
|
||||||
<h1>Blog</h1>
|
<h1>Blog</h1>
|
||||||
<p class="subtitle">{{ 'BLOG_SUB' | translate }}</p>
|
<p class="subtitle">{{ 'blog.subtext' | translate }}</p>
|
||||||
</div>
|
</div>
|
||||||
<hr class="rounded">
|
<hr class="rounded">
|
||||||
<div class="blog-container">
|
<div class="blog-container">
|
||||||
|
@if (hasError) {
|
||||||
|
<div class="error-state">
|
||||||
|
<h2>{{ 'blog.list.err' | translate }}</h2>
|
||||||
|
</div>
|
||||||
|
} @else {
|
||||||
@if (articles$ | async; as articles) {
|
@if (articles$ | async; as articles) {
|
||||||
|
@if (articles.length === 0) {
|
||||||
|
<div class="empty-state">
|
||||||
|
<h2>{{ 'blog.list.empty' | translate }}</h2>
|
||||||
|
</div>
|
||||||
|
} @else {
|
||||||
<div>
|
<div>
|
||||||
@for (article of articles.slice(); track article) {
|
@for (article of articles.slice(); track article) {
|
||||||
<div (click)="navigateToArticle(article.slug)" class="article-card">
|
<div (click)="navigateToArticle(article.slug)" class="article-card" [ngClass]="{ 'narrow': isNarrow }">
|
||||||
|
<img
|
||||||
|
class="article-card-thumb"
|
||||||
|
[src]="article.thumb_url || defaultThumbUrl"
|
||||||
|
[alt]="article.title + ' thumbnail'"
|
||||||
|
(error)="onThumbError($event)"
|
||||||
|
[ngClass]="{ 'narrow': isNarrow}"
|
||||||
|
/>
|
||||||
|
<div class="article-card-content">
|
||||||
<h2>{{ (article.title | slice:0:45) + (article.title.length > 40 ? '...' : '')}}</h2>
|
<h2>{{ (article.title | slice:0:45) + (article.title.length > 40 ? '...' : '')}}</h2>
|
||||||
<p>{{ truncateContent(article.content, 80) }}</p>
|
<p>{{ truncateContent(article.content, 80) }}</p>
|
||||||
<p><small>By {{ article.authorName }} | {{ article.createdAt | date: 'dd/MM/yy, HH:mm' }}</small></p>
|
<p><small>By {{ article.authorName }} | {{ article.createdAt | date: 'dd/MM/yy, HH:mm' }}</small></p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
} @else {
|
}
|
||||||
<h2>{{ 'ARTICLES_NONE' | translate }}</h2>
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {ViewportService} from '../shared/services/viewport.service'
|
import {ViewportService} from '../shared/services/viewport.service'
|
||||||
import { DatePipe, AsyncPipe, SlicePipe, NgStyle } from '@angular/common';
|
import {DatePipe, AsyncPipe, SlicePipe, NgStyle, NgClass} from '@angular/common';
|
||||||
import { ArticleService } from '../shared/services/article.service';
|
import { ArticleService } from '../shared/services/article.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable, of} from 'rxjs';
|
||||||
import {Title} from '@angular/platform-browser';
|
import {catchError} from 'rxjs/operators';
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-blog',
|
selector: 'app-blog',
|
||||||
@@ -16,25 +17,49 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
|||||||
SlicePipe,
|
SlicePipe,
|
||||||
NgStyle,
|
NgStyle,
|
||||||
TranslatePipe,
|
TranslatePipe,
|
||||||
ParallaxComponent
|
ParallaxComponent,
|
||||||
|
NgClass
|
||||||
],
|
],
|
||||||
templateUrl: './blog.component.html',
|
templateUrl: './blog.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './blog.component.css'
|
styleUrl: './blog.component.css'
|
||||||
})
|
})
|
||||||
export class BlogComponent implements OnInit {
|
export class BlogComponent implements OnInit {
|
||||||
articles$: Observable<any[]> | undefined;
|
articles$: Observable<any[]> | undefined;
|
||||||
|
hasError: boolean = false;
|
||||||
isNarrow: boolean = false;
|
isNarrow: boolean = false;
|
||||||
|
readonly defaultThumbUrl = '/assets/ogimg.png';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private deviceService: ViewportService,
|
private deviceService: ViewportService,
|
||||||
private articleService: ArticleService,
|
private articleService: ArticleService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private titleService: Title
|
private seo: SeoService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Blog | itzMiney')
|
this.seo.update({
|
||||||
|
title: 'Blog',
|
||||||
|
desc: 'I post updates on the stuff I do here! (sometimes)',
|
||||||
|
buttons: [{ label: 'View Posts', url: this.seo.getpath() }]
|
||||||
|
});
|
||||||
this.isNarrow = this.deviceService.isNarrow;
|
this.isNarrow = this.deviceService.isNarrow;
|
||||||
this.articles$ = this.articleService.getAllArticles();
|
|
||||||
|
this.articles$ = this.articleService.getAllArticles().pipe(
|
||||||
|
catchError((err) => {
|
||||||
|
console.error('Failed to fetch articles from API:', err);
|
||||||
|
this.hasError = true;
|
||||||
|
return of([]);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
onThumbError(event: Event): void {
|
||||||
|
const img = event.target as HTMLImageElement;
|
||||||
|
|
||||||
|
if (img.src.endsWith(this.defaultThumbUrl)) return;
|
||||||
|
|
||||||
|
img.src = this.defaultThumbUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
navigateToArticle(slug: string): void {
|
navigateToArticle(slug: string): void {
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {AuthService} from '../shared/services/auth.service';
|
import {AuthService} from '../shared/services/auth.service';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {ViewportService} from '../shared/services/viewport.service';
|
import {ViewportService} from '../shared/services/viewport.service';
|
||||||
import { Title } from '@angular/platform-browser';
|
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
templateUrl: './login.component.html',
|
templateUrl: './login.component.html',
|
||||||
styleUrls: ['./login.component.css'],
|
styleUrls: ['./login.component.css'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [
|
imports: [
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ParallaxComponent
|
ParallaxComponent
|
||||||
@@ -26,11 +27,15 @@ export class LoginComponent implements OnInit {
|
|||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private deviceService: ViewportService,
|
private deviceService: ViewportService,
|
||||||
private titleService: Title,
|
private seo: SeoService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Login | itzMiney')
|
this.seo.update({
|
||||||
|
title: 'Admin Panel',
|
||||||
|
desc: 'Management & Administration Panel',
|
||||||
|
buttons: [{ label: 'Log-in', url: this.seo.getpath() }]
|
||||||
|
})
|
||||||
this.isNarrow = this.deviceService.isNarrow;
|
this.isNarrow = this.deviceService.isNarrow;
|
||||||
|
|
||||||
if (this.authService.token) {
|
if (this.authService.token) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {Title} from '@angular/platform-browser';
|
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-not-found',
|
selector: 'app-not-found',
|
||||||
@@ -8,17 +8,23 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
|||||||
ParallaxComponent
|
ParallaxComponent
|
||||||
],
|
],
|
||||||
templateUrl: './not-found.component.html',
|
templateUrl: './not-found.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './not-found.component.css',
|
styleUrl: './not-found.component.css',
|
||||||
})
|
})
|
||||||
|
|
||||||
export class NotFoundComponent implements OnInit {
|
export class NotFoundComponent implements OnInit {
|
||||||
isNarrow: boolean = false;
|
isNarrow: boolean = false;
|
||||||
constructor(
|
constructor(
|
||||||
private titleService: Title,
|
private seo: SeoService,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('404 | Page Not Found')
|
this.seo.update({
|
||||||
|
title: '404 | Page Not Found',
|
||||||
|
desc: 'How the hell did you end up here?',
|
||||||
|
suffix: false,
|
||||||
|
buttons: [{ label: 'Visit Homepage', url: this.seo.getpath('root') }]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,28 +78,6 @@
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kofi-button {
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 30px;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ko-fi-btn {
|
|
||||||
background-color: #fff;
|
|
||||||
color: #ff5a78;
|
|
||||||
border: none;
|
|
||||||
padding: 12px 25px;
|
|
||||||
font-size: 1.2rem;
|
|
||||||
border-radius: 25px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ko-fi-btn:hover {
|
|
||||||
background-color: #fff4f4;
|
|
||||||
color: #ff5a78;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-content p {
|
.text-content p {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -8,17 +8,12 @@
|
|||||||
<div class="height-container">
|
<div class="height-container">
|
||||||
<div class="portfolio-container">
|
<div class="portfolio-container">
|
||||||
<div class="portfolio-header" [ngStyle]="{'margin-top': isNarrow ? '60px' : '120px'}">
|
<div class="portfolio-header" [ngStyle]="{'margin-top': isNarrow ? '60px' : '120px'}">
|
||||||
<h1>{{ 'PORTF_TITLE' | translate }}</h1>
|
<h1>{{ 'portf.title' | translate }}</h1>
|
||||||
<p class="subtitle">{{ 'PORTF_SUB' | translate }}</p>
|
<p class="subtitle">{{ 'portf.subtext' | translate }}</p>
|
||||||
</div>
|
</div>
|
||||||
<hr class="rounded">
|
<hr class="rounded">
|
||||||
<div class="text-content">
|
<div class="text-content">
|
||||||
<p [innerHTML]="'PORTFOLIO' | translate"></p>
|
<p [innerHTML]="'portf.intro' | translate"></p>
|
||||||
</div>
|
|
||||||
<div class="kofi-button">
|
|
||||||
<a href="https://ko-fi.com/itzminey" target="_blank">
|
|
||||||
<button class="ko-fi-btn"><i class="fa-solid fa-mug-hot"></i> Ko-Fi Donations</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="portfolio-gallery" [@staggerGallery]>
|
<div class="portfolio-gallery" [@staggerGallery]>
|
||||||
@for (item of galleryItems; track item) {
|
@for (item of galleryItems; track item) {
|
||||||
@@ -52,7 +47,7 @@
|
|||||||
animate.leave="modal-leave"
|
animate.leave="modal-leave"
|
||||||
(click)="$event.stopPropagation()"
|
(click)="$event.stopPropagation()"
|
||||||
>
|
>
|
||||||
<img [src]="selectedItem?.src" [alt]="selectedItem?.alt">
|
<img [src]="$safeNavigationMigration(selectedItem?.src)" [alt]="$safeNavigationMigration(selectedItem?.alt)">
|
||||||
<h2>{{ selectedItem?.label }}</h2>
|
<h2>{{ selectedItem?.label }}</h2>
|
||||||
<button (click)="closeModal()">Close</button>
|
<button (click)="closeModal()">Close</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
import {Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {ViewportService} from '../shared/services/viewport.service';
|
import {ViewportService} from '../shared/services/viewport.service';
|
||||||
import { CommonModule, NgStyle } from '@angular/common';
|
import { CommonModule, NgStyle } from '@angular/common';
|
||||||
import {Title} from '@angular/platform-browser';
|
|
||||||
import {AudioPlayerComponent} from '../shared/audio-player/audio-player.component';
|
import {AudioPlayerComponent} from '../shared/audio-player/audio-player.component';
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-portfolio',
|
selector: 'app-portfolio',
|
||||||
@@ -17,6 +17,7 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
|||||||
ParallaxComponent
|
ParallaxComponent
|
||||||
],
|
],
|
||||||
templateUrl: './portfolio.component.html',
|
templateUrl: './portfolio.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './portfolio.component.css'
|
styleUrl: './portfolio.component.css'
|
||||||
})
|
})
|
||||||
export class PortfolioComponent implements OnInit {
|
export class PortfolioComponent implements OnInit {
|
||||||
@@ -46,11 +47,15 @@ export class PortfolioComponent implements OnInit {
|
|||||||
isNarrow: boolean = false;
|
isNarrow: boolean = false;
|
||||||
constructor(
|
constructor(
|
||||||
private deviceService: ViewportService,
|
private deviceService: ViewportService,
|
||||||
private titleService: Title,
|
private seo: SeoService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Portfolio | itzMiney');
|
this.seo.update({
|
||||||
|
title: 'Portfolio',
|
||||||
|
desc: 'This is my portfolio where you can find examples of my designs and other projects!',
|
||||||
|
buttons: [{ label: 'View Projects', url: this.seo.getpath() }]
|
||||||
|
})
|
||||||
this.isNarrow = this.deviceService.isNarrow;
|
this.isNarrow = this.deviceService.isNarrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<p>{{ 'privacy.purpose.intro' | translate }}</p>
|
<p>{{ 'privacy.purpose.intro' | translate }}</p>
|
||||||
<ul>
|
<ul>
|
||||||
@for (point of ['privacy.purpose.points' | translate]; track point) {
|
@for (point of ( 'privacy.purpose.points' | translate ); track point) {
|
||||||
<li>{{ point }}</li>
|
<li>{{ point }}</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {AfterViewInit, Component, OnInit} from '@angular/core';
|
import {AfterViewInit, Component, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {ViewportService} from '../shared/services/viewport.service';
|
import {ViewportService} from '../shared/services/viewport.service';
|
||||||
import {Title} from '@angular/platform-browser';
|
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-services',
|
selector: 'app-services',
|
||||||
@@ -11,6 +11,7 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
|||||||
ParallaxComponent
|
ParallaxComponent
|
||||||
],
|
],
|
||||||
templateUrl: './privacy.component.html',
|
templateUrl: './privacy.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './privacy.component.css'
|
styleUrl: './privacy.component.css'
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ export class PrivacyComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private deviceService: ViewportService,
|
private deviceService: ViewportService,
|
||||||
private titleService: Title,
|
private seo: SeoService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
scrollToSection(event: Event, targetId: string): void {
|
scrollToSection(event: Event, targetId: string): void {
|
||||||
@@ -38,7 +39,10 @@ export class PrivacyComponent implements OnInit, AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Privacy Policy | itzMiney');
|
this.seo.update({
|
||||||
|
title: 'Privacy Policy',
|
||||||
|
desc: 'Information about the data collected on this site and how it is used.'
|
||||||
|
});
|
||||||
this.isNarrow = this.deviceService.isNarrow;
|
this.isNarrow = this.deviceService.isNarrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component, AfterViewInit, signal, OnInit} from '@angular/core';
|
import {Component, AfterViewInit, signal, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {ViewportService} from '../services/viewport.service';
|
import {ViewportService} from '../services/viewport.service';
|
||||||
import {NgClass} from '@angular/common';
|
import {NgClass} from '@angular/common';
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@ declare global {
|
|||||||
NgClass
|
NgClass
|
||||||
],
|
],
|
||||||
templateUrl: './audio-player.component.html',
|
templateUrl: './audio-player.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './audio-player.component.css'
|
styleUrl: './audio-player.component.css'
|
||||||
})
|
})
|
||||||
export class AudioPlayerComponent implements AfterViewInit, OnInit {
|
export class AudioPlayerComponent implements AfterViewInit, OnInit {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<footer>
|
<footer>
|
||||||
<p>© {{ currentYear }} Michael Reisinger</p>
|
<p>© {{ currentYear }} Michael Reisinger</p>
|
||||||
<p><a href="/privacy">{{ 'FOOTER_LINK' | translate }}</a></p>
|
<p><a href="/privacy">{{ 'common.footer.linktext' | translate }}</a></p>
|
||||||
|
|
||||||
<div class="social-icons">
|
<div class="social-icons">
|
||||||
<a href="https://linktr.ee/itzminey" target="_blank" aria-label="Twitter">
|
<a href="https://linktr.ee/itzminey" target="_blank" aria-label="Twitter">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -7,6 +7,7 @@ import {TranslatePipe} from '@ngx-translate/core';
|
|||||||
TranslatePipe
|
TranslatePipe
|
||||||
],
|
],
|
||||||
templateUrl: './footer.component.html',
|
templateUrl: './footer.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './footer.component.css'
|
styleUrl: './footer.component.css'
|
||||||
})
|
})
|
||||||
export class FooterComponent {
|
export class FooterComponent {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import {Component, forwardRef, OnInit} from '@angular/core';
|
import {Component, forwardRef, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||||
import {MarkdownModule} from 'ngx-markdown';
|
import {MarkdownModule} from 'ngx-markdown';
|
||||||
|
import {MarkdownService} from '../services/markdown.service'
|
||||||
import { ViewportService} from '../services/viewport.service';
|
import { ViewportService} from '../services/viewport.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -9,6 +10,7 @@ import { ViewportService} from '../services/viewport.service';
|
|||||||
imports: [CommonModule, FormsModule, MarkdownModule],
|
imports: [CommonModule, FormsModule, MarkdownModule],
|
||||||
templateUrl: './markdown-editor.component.html',
|
templateUrl: './markdown-editor.component.html',
|
||||||
styleUrl: './markdown-editor.component.css',
|
styleUrl: './markdown-editor.component.css',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: NG_VALUE_ACCESSOR,
|
provide: NG_VALUE_ACCESSOR,
|
||||||
@@ -25,7 +27,10 @@ export class MarkdownEditorComponent implements ControlValueAccessor, OnInit {
|
|||||||
|
|
||||||
isNarrow: boolean = false;
|
isNarrow: boolean = false;
|
||||||
|
|
||||||
constructor(private viewportService: ViewportService) { }
|
constructor(
|
||||||
|
private viewportService: ViewportService,
|
||||||
|
private markdownService: MarkdownService,
|
||||||
|
) { }
|
||||||
|
|
||||||
private onChange: (value: string) => void = () => {};
|
private onChange: (value: string) => void = () => {};
|
||||||
private onTouched: () => void = () => {};
|
private onTouched: () => void = () => {};
|
||||||
@@ -189,33 +194,6 @@ export class MarkdownEditorComponent implements ControlValueAccessor, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get previewContent(): string {
|
get previewContent(): string {
|
||||||
return this.transformCustomBlocks(this.value);
|
return this.markdownService.transformCustomBlocks(this.value);
|
||||||
}
|
|
||||||
|
|
||||||
transformCustomBlocks(content: string): string {
|
|
||||||
let result = content;
|
|
||||||
|
|
||||||
result = result.replace(
|
|
||||||
/\[gallery\]\s*([\s\S]*?)\s*\[\/gallery\]/g,
|
|
||||||
(_, inner) => {
|
|
||||||
const urls = inner
|
|
||||||
.split('\n')
|
|
||||||
.map((line: string) => line.trim())
|
|
||||||
.filter((line: string) => line.length > 0);
|
|
||||||
|
|
||||||
const images = urls
|
|
||||||
.map((url: string) => `<img src="${url}" alt="Gallery image">`)
|
|
||||||
.join('');
|
|
||||||
|
|
||||||
return `<div class="gallery">${images}</div>`;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
result = result.replace(
|
|
||||||
/\[center\]\s*([\s\S]*?)\s*\[\/center\]/g,
|
|
||||||
(_, inner) => `<div class="centered-text">${inner}</div>`
|
|
||||||
);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
>
|
>
|
||||||
<button class="close-icon" (click)="toggleMenu()">✖</button>
|
<button class="close-icon" (click)="toggleMenu()">✖</button>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a [routerLink]="'/'" [class.active]="activeLink === '/'"><i class="fa-solid fa-address-card"></i> {{ 'NAV_ABOUT' | translate }}</a></li>
|
<li><a [routerLink]="'/'" [class.active]="activeLink === '/'"><i class="fa-solid fa-address-card"></i> {{ 'common.btn.about' | translate }}</a></li>
|
||||||
<li><a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'"><i class="fa-solid fa-image"></i> Portfolio</a></li>
|
<li><a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'"><i class="fa-solid fa-image"></i> Portfolio</a></li>
|
||||||
<li><a [routerLink]="'/socials'" [class.active]="activeLink === '/socials'"><i class="fa-solid fa-hashtag"></i> Socials</a></li>
|
<li><a [routerLink]="'/socials'" [class.active]="activeLink === '/socials'"><i class="fa-solid fa-hashtag"></i> Socials</a></li>
|
||||||
<!-- <li><a [routerLink]="'/services'" [class.active]="activeLink === '/services'"><i class="fa-solid fa-money-bill"></i> {{ 'NAV_SERVICES' | translate }}</a></li> -->
|
<!-- <li><a [routerLink]="'/services'" [class.active]="activeLink === '/services'"><i class="fa-solid fa-money-bill"></i> {{ 'NAV_SERVICES' | translate }}</a></li> -->
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {ViewportService} from '../services/viewport.service';
|
import {ViewportService} from '../services/viewport.service';
|
||||||
|
|
||||||
import {NavigationEnd, Router, RouterLink} from '@angular/router';
|
import {NavigationEnd, Router, RouterLink} from '@angular/router';
|
||||||
@@ -11,6 +11,7 @@ import {TranslatePipe, TranslateService} from '@ngx-translate/core';
|
|||||||
TranslatePipe
|
TranslatePipe
|
||||||
],
|
],
|
||||||
templateUrl: './mobile-navbar.component.html',
|
templateUrl: './mobile-navbar.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './mobile-navbar.component.css'
|
styleUrl: './mobile-navbar.component.css'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-modal',
|
selector: 'app-modal',
|
||||||
templateUrl: './modal.component.html',
|
templateUrl: './modal.component.html',
|
||||||
styleUrls: ['./modal.component.css'],
|
styleUrls: ['./modal.component.css'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: []
|
imports: []
|
||||||
})
|
})
|
||||||
export class ModalComponent {
|
export class ModalComponent {
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<div class="navbar-links">
|
<div class="navbar-links">
|
||||||
<a [routerLink]="'/'" [class.active]="activeLink === '/'">{{ 'NAV_ABOUT' | translate }}</a>
|
<a [routerLink]="'/'" [class.active]="activeLink === '/'">{{ 'common.btn.about' | translate }}</a>
|
||||||
<a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'">Portfolio</a>
|
<a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'">Portfolio</a>
|
||||||
<a [routerLink]="'/socials'" [class.active]="activeLink === '/socials'">Socials</a>
|
<a [routerLink]="'/socials'" [class.active]="activeLink === '/socials'">Socials</a>
|
||||||
<!-- <a [routerLink]="'/services'" [class.active]="activeLink === '/services'">{{ 'NAV_SERVICES' | translate }}</a> -->
|
|
||||||
<a [routerLink]="'/blog'" [class.active]="activeLink === '/blog'">Blog</a>
|
<a [routerLink]="'/blog'" [class.active]="activeLink === '/blog'">Blog</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="language-switch" [attr.data-active]="currentLang">
|
<div class="language-switch" [attr.data-active]="currentLang">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {NavigationEnd, Router, RouterLink} from '@angular/router';
|
import {NavigationEnd, Router, RouterLink} from '@angular/router';
|
||||||
import {ViewportService} from '../services/viewport.service';
|
import {ViewportService} from '../services/viewport.service';
|
||||||
import {filter} from 'rxjs/operators';
|
import {filter} from 'rxjs/operators';
|
||||||
@@ -8,6 +8,7 @@ import {TranslatePipe, TranslateService} from '@ngx-translate/core';
|
|||||||
selector: 'app-navbar',
|
selector: 'app-navbar',
|
||||||
templateUrl: './navbar.component.html',
|
templateUrl: './navbar.component.html',
|
||||||
styleUrls: ['./navbar.component.css'],
|
styleUrls: ['./navbar.component.css'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
imports: [
|
imports: [
|
||||||
RouterLink,
|
RouterLink,
|
||||||
TranslatePipe
|
TranslatePipe
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {AfterViewInit, Component, ElementRef, Inject, OnDestroy, OnInit, PLATFORM_ID, ViewChild, Input} from '@angular/core';
|
import {AfterViewInit, Component, ElementRef, Inject, OnDestroy, OnInit, PLATFORM_ID, ViewChild, Input, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {ViewportService} from '../services/viewport.service';
|
import {ViewportService} from '../services/viewport.service';
|
||||||
import {isPlatformBrowser} from '@angular/common';
|
import {isPlatformBrowser} from '@angular/common';
|
||||||
import Parallax from 'parallax-js';
|
import Parallax from 'parallax-js';
|
||||||
@@ -7,6 +7,7 @@ import Parallax from 'parallax-js';
|
|||||||
selector: 'app-parallax',
|
selector: 'app-parallax',
|
||||||
imports: [],
|
imports: [],
|
||||||
templateUrl: './parallax.component.html',
|
templateUrl: './parallax.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './parallax.component.css',
|
styleUrl: './parallax.component.css',
|
||||||
})
|
})
|
||||||
export class ParallaxComponent implements OnInit, OnDestroy, AfterViewInit {
|
export class ParallaxComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||||
import { RouterOutlet } from '@angular/router';
|
import { RouterOutlet } from '@angular/router';
|
||||||
import { NavbarComponent } from '../navbar/navbar.component';
|
import { NavbarComponent } from '../navbar/navbar.component';
|
||||||
import { MobileNavbarComponent } from '../mobile-navbar/mobile-navbar.component';
|
import { MobileNavbarComponent } from '../mobile-navbar/mobile-navbar.component';
|
||||||
@@ -9,6 +9,7 @@ import { ViewportService } from '../services/viewport.service';
|
|||||||
selector: 'app-public-layout',
|
selector: 'app-public-layout',
|
||||||
imports: [RouterOutlet, NavbarComponent, MobileNavbarComponent, FooterComponent],
|
imports: [RouterOutlet, NavbarComponent, MobileNavbarComponent, FooterComponent],
|
||||||
templateUrl: './public-layout.component.html',
|
templateUrl: './public-layout.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './public-layout.component.css',
|
styleUrl: './public-layout.component.css',
|
||||||
})
|
})
|
||||||
export class PublicLayoutComponent implements OnInit {
|
export class PublicLayoutComponent implements OnInit {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ interface Article {
|
|||||||
title: string;
|
title: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
content: string;
|
content: string;
|
||||||
|
thumb_url: string | null;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
views: number;
|
views: number;
|
||||||
@@ -46,10 +47,16 @@ export class ArticleService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
postArticle(token: string, title: string, content: string ): Observable<any[]> {
|
postArticle(
|
||||||
|
token: string,
|
||||||
|
title: string,
|
||||||
|
content: string ,
|
||||||
|
thumb_url?: string | null
|
||||||
|
): Observable<any> {
|
||||||
return this.http.post<any[]>(this.apiUrl, {
|
return this.http.post<any[]>(this.apiUrl, {
|
||||||
title,
|
title,
|
||||||
content
|
content,
|
||||||
|
thumb_url: thumb_url?.trim() || null,
|
||||||
},{
|
},{
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${token}`
|
'Authorization': `Bearer ${token}`
|
||||||
@@ -70,7 +77,7 @@ export class ArticleService {
|
|||||||
editArticle(
|
editArticle(
|
||||||
id: number,
|
id: number,
|
||||||
token: string | null,
|
token: string | null,
|
||||||
updates: { title?: string; content?: string }
|
updates: { title?: string; content?: string, thumb_url?: string | null }
|
||||||
): Observable<any> {
|
): Observable<any> {
|
||||||
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
|
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
|
||||||
return this.http.put<any>(`${this.apiUrl}/${id}`, updates, { headers });
|
return this.http.put<any>(`${this.apiUrl}/${id}`, updates, { headers });
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class MarkdownService {
|
||||||
|
transformCustomBlocks(content: string): string {
|
||||||
|
if (!content) return '';
|
||||||
|
|
||||||
|
return content
|
||||||
|
.replace(/\[gallery\]\s*([\s\S]*?)\s*\[\/gallery\]/g, (_, inner: string) => {
|
||||||
|
const images = inner
|
||||||
|
.split('\n')
|
||||||
|
.map((line) => this.sanitizeImageUrl(line))
|
||||||
|
.filter((url): url is string => url !== null)
|
||||||
|
.map((url) => `<img src="${this.escapeHtmlAttr(url)}" alt="Gallery image" loading="lazy">`)
|
||||||
|
.join('');
|
||||||
|
|
||||||
|
return `<div class="gallery">${images}</div>`;
|
||||||
|
})
|
||||||
|
.replace(
|
||||||
|
/\[center\]\s*([\s\S]*?)\s*\[\/center\]/g,
|
||||||
|
(_, inner: string) => `<div class="centered-text">${inner}</div>`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private sanitizeImageUrl(rawUrl: string): string | null {
|
||||||
|
const trimmed = rawUrl.trim();
|
||||||
|
if (trimmed.startsWith('/')) {
|
||||||
|
return trimmed;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const parsed = new URL(trimmed);
|
||||||
|
if (parsed.protocol === 'https:' || parsed.protocol === 'http:') {
|
||||||
|
return parsed.href;
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private escapeHtmlAttr(value: string): string {
|
||||||
|
return value
|
||||||
|
.replace(/&/g, '&')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
import {Inject, Injectable} from '@angular/core';
|
||||||
|
import {Meta, Title} from '@angular/platform-browser';
|
||||||
|
import {Router} from '@angular/router';
|
||||||
|
import {DOCUMENT} from '@angular/common';
|
||||||
|
|
||||||
|
export interface DiscordButton {
|
||||||
|
label: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DiscordGalleryItem {
|
||||||
|
url: string;
|
||||||
|
description?: string;
|
||||||
|
spoiler?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SeoConfig {
|
||||||
|
title: string;
|
||||||
|
desc: string;
|
||||||
|
img?: string;
|
||||||
|
url?: string;
|
||||||
|
col?: string;
|
||||||
|
suffix?: boolean;
|
||||||
|
buttons?: DiscordButton[];
|
||||||
|
gallery?: DiscordGalleryItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
|
||||||
|
export class SeoService {
|
||||||
|
constructor(
|
||||||
|
private titleService: Title,
|
||||||
|
private metaService: Meta,
|
||||||
|
private router: Router,
|
||||||
|
@Inject(DOCUMENT) private document: Document
|
||||||
|
) {}
|
||||||
|
|
||||||
|
private readonly defaultColor = '#0095a4';
|
||||||
|
private readonly rootDomain = 'https://itzminey.dev';
|
||||||
|
|
||||||
|
getpath(path?: string ) {
|
||||||
|
if (!path) return `${this.rootDomain}${this.router.url}`;
|
||||||
|
if (path === 'root') return this.rootDomain;
|
||||||
|
return `${this.rootDomain}/${path.replace(/^\//, '')}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly defaultImage = this.getpath('assets/ogimg.png');
|
||||||
|
private readonly siteThumb = this.getpath('assets/thumb.png');
|
||||||
|
|
||||||
|
update(config: SeoConfig) {
|
||||||
|
const siteName = 'itzMiney';
|
||||||
|
const appendSuffix = config.suffix ?? true;
|
||||||
|
|
||||||
|
const title = appendSuffix && !config.title.endsWith(`| ${siteName}`)
|
||||||
|
? `${config.title} | ${siteName}`
|
||||||
|
: config.title;
|
||||||
|
|
||||||
|
const description = config.desc;
|
||||||
|
const image = config.img || this.defaultImage;
|
||||||
|
const currentUrl = this.getpath();
|
||||||
|
const siteColor = config.col || this.defaultColor;
|
||||||
|
const gallery = config.gallery;
|
||||||
|
|
||||||
|
this.titleService.setTitle(title);
|
||||||
|
|
||||||
|
this.metaService.updateTag({ name: 'description', content: description });
|
||||||
|
this.metaService.updateTag({ property: 'og:title', content: title });
|
||||||
|
this.metaService.updateTag({ property: 'og:description', content: description });
|
||||||
|
this.metaService.updateTag({ property: 'og:image', content: image });
|
||||||
|
this.metaService.updateTag({ property: 'og:url', content: currentUrl });
|
||||||
|
this.metaService.updateTag({ name: 'theme-color', content: siteColor });
|
||||||
|
|
||||||
|
this.injectDiscordComponentEmbed(config.buttons, gallery, {
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
image,
|
||||||
|
currentUrl,
|
||||||
|
siteColor
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private injectDiscordComponentEmbed(
|
||||||
|
buttons?: DiscordButton[],
|
||||||
|
gallery?: DiscordGalleryItem[],
|
||||||
|
meta?: {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
image: string;
|
||||||
|
currentUrl: string;
|
||||||
|
siteColor: string
|
||||||
|
},
|
||||||
|
) {
|
||||||
|
const existingScript = this.document.getElementById('discord:component-embed');
|
||||||
|
if (existingScript) {
|
||||||
|
existingScript.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
const thumb = this.siteThumb;
|
||||||
|
const siteColor = meta?.siteColor || this.defaultColor;
|
||||||
|
|
||||||
|
const containerComponents: any[] = [];
|
||||||
|
|
||||||
|
containerComponents.push({
|
||||||
|
type: 9,
|
||||||
|
components: [
|
||||||
|
{
|
||||||
|
type: 10,
|
||||||
|
content: `### [${meta?.title ?? ''}](${meta?.currentUrl ?? ''})\n${meta?.description ?? ''}`
|
||||||
|
}
|
||||||
|
],
|
||||||
|
accessory: {
|
||||||
|
type: 11,
|
||||||
|
media: {
|
||||||
|
url: thumb
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (gallery && gallery.length > 0) {
|
||||||
|
containerComponents.push({
|
||||||
|
type: 12,
|
||||||
|
items: gallery.map(item => {
|
||||||
|
const galleryItem: any = {
|
||||||
|
media: {
|
||||||
|
url: item.url
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (item.description) galleryItem.description = item.description;
|
||||||
|
if (item.spoiler !== undefined) galleryItem.spoiler = item.spoiler;
|
||||||
|
return galleryItem;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buttons && buttons.length > 0) {
|
||||||
|
containerComponents.push({
|
||||||
|
type: 1,
|
||||||
|
components: buttons.map(btn => ({
|
||||||
|
type: 2,
|
||||||
|
label: btn.label,
|
||||||
|
style: 5,
|
||||||
|
url: btn.url
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const componentPayload = {
|
||||||
|
flags: 32768,
|
||||||
|
component: {
|
||||||
|
type: 17,
|
||||||
|
accent_color: parseInt(siteColor.replace('#', ''), 16),
|
||||||
|
components: containerComponents
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const script = this.document.createElement('script');
|
||||||
|
script.id = 'discord:component-embed';
|
||||||
|
script.type = 'application/json';
|
||||||
|
script.text = JSON.stringify(componentPayload, null, 2);
|
||||||
|
this.document.head.appendChild(script);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
|
import {Component, OnInit, Input, Output, EventEmitter, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import {ShortenerService} from '../services/shortener.service';
|
import {ShortenerService} from '../services/shortener.service';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import { SlicePipe } from '@angular/common';
|
import { SlicePipe } from '@angular/common';
|
||||||
@@ -11,6 +11,7 @@ import {AuthService} from '../services/auth.service';
|
|||||||
SlicePipe
|
SlicePipe
|
||||||
],
|
],
|
||||||
templateUrl: './shortener.component.html',
|
templateUrl: './shortener.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './shortener.component.css'
|
styleUrl: './shortener.component.css'
|
||||||
})
|
})
|
||||||
export class ShortenerComponent implements OnInit {
|
export class ShortenerComponent implements OnInit {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<ng-template #aboutTemplate>
|
<ng-template #aboutTemplate>
|
||||||
<p class="fade-in" [innerHTML]="'ABOUT' | translate"></p>
|
<div class="fade-in" [innerHTML]="'about.terminal.intro' | translate"></div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template #catTemplate>
|
<ng-template #catTemplate>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<h4>{{ 'TECHSTACK_LANGS' | translate }}</h4>
|
<h4>{{ 'about.terminal.langs' | translate }}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<a href="https://www.typescriptlang.org/" target="_blank"><li>TypeScript</li></a>
|
<a href="https://www.typescriptlang.org/" target="_blank"><li>TypeScript</li></a>
|
||||||
<a href="https://go.dev/" target="_blank"><li>Go</li></a>
|
<a href="https://go.dev/" target="_blank"><li>Go</li></a>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<h4>{{ 'TECHSTACK_DBS' | translate }}</h4>
|
<h4>{{ 'about.terminal.dbs' | translate }}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<a href="https://www.mysql.com/" target="_blank"><li>MySQL</li></a>
|
<a href="https://www.mysql.com/" target="_blank"><li>MySQL</li></a>
|
||||||
<a href="https://mariadb.org/" target="_blank"><li>MariaDB</li></a>
|
<a href="https://mariadb.org/" target="_blank"><li>MariaDB</li></a>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, TemplateRef, ViewChild, ViewEncapsulation} from '@angular/core';
|
import {Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, TemplateRef, ViewChild, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
@@ -23,6 +23,7 @@ interface TerminalEntry {
|
|||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [FormsModule, TranslatePipe, NgTemplateOutlet],
|
imports: [FormsModule, TranslatePipe, NgTemplateOutlet],
|
||||||
templateUrl: './terminal-emulator.component.html',
|
templateUrl: './terminal-emulator.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './terminal-emulator.component.css'
|
styleUrl: './terminal-emulator.component.css'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -52,15 +52,18 @@
|
|||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
|
line-height: 1;
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 12px 20px;
|
padding: 10px 18px 10px 10px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display:inline-flex;
|
display: inline-flex;
|
||||||
align-items:center;
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
vertical-align: middle;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,14 +72,36 @@
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn span {
|
||||||
|
color: #c3c9e8;
|
||||||
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
margin: 30px 0 10px 0;
|
margin: 30px 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#username {
|
.dc-usertile {
|
||||||
font-size: 1.2rem;
|
display: inline-flex;
|
||||||
|
align-items: start;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dc-usertile span {
|
||||||
|
font-size: 1rem;
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
color: #cdcdcd;
|
background-color: #ffffff;
|
||||||
|
color: black;
|
||||||
|
border-radius: 99px 99px 99px 0;
|
||||||
|
padding: 2px 6px 3px 3px;
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dc-usertile img {
|
||||||
|
display: inline-flex;
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 2.2rem;
|
||||||
|
border-radius: 100%;
|
||||||
|
margin: 10px 6px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr.rounded {
|
hr.rounded {
|
||||||
@@ -86,11 +111,14 @@ hr.rounded {
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn img { height: 1.7rem; padding: 0; align-content: center; }
|
||||||
|
.btn i { font-size: 1.7rem; padding: 0; align-content: center; }
|
||||||
|
|
||||||
.discord { background-color: #5865F2; }
|
.discord { background-color: #5865F2; }
|
||||||
.discord:hover { background-color: #818aec; }
|
.discord:hover { background-color: #818aec; }
|
||||||
|
|
||||||
.youtube { background-color: #f25858; }
|
.youtube { background-color: #f25858; }
|
||||||
.youtube:hover { background-color: #ff7474; }
|
.youtube:hover { background-color: #fa7a7a; }
|
||||||
|
|
||||||
.twitter { background-color: #58adf2; }
|
.twitter { background-color: #58adf2; }
|
||||||
.twitter:hover { background-color: #8bcefd; }
|
.twitter:hover { background-color: #8bcefd; }
|
||||||
@@ -99,13 +127,11 @@ hr.rounded {
|
|||||||
.twitch:hover { background-color: #a76bff; }
|
.twitch:hover { background-color: #a76bff; }
|
||||||
|
|
||||||
.steam { background-color: #1c1c1c; }
|
.steam { background-color: #1c1c1c; }
|
||||||
.steam:hover { background-color: #202020; }
|
.steam:hover { background-color: #292929; }
|
||||||
|
|
||||||
.osu { background-color: #ff66aa; transform: translateY( +3px);}
|
.osu { background-color: #ff66aa; }
|
||||||
.osu:hover { background-color: #fd83b9; }
|
.osu:hover { background-color: #fd83b9; }
|
||||||
|
|
||||||
.kofi { background-color: #fff; color: #ff5a78;}
|
.tux { background-color: #3facc1; }
|
||||||
.kofi:hover { background-color: #fff4f4; color: #ff5a78;}
|
.tux:hover { background-color: #45c6df; }
|
||||||
|
.tux.toggled { background-color: #a32e32; cursor: not-allowed; }
|
||||||
.kofi-comms { background-color: #fff; color: #39354a;}
|
|
||||||
.kofi-comms:hover { background-color: #fff4f4; color: #39354a;}
|
|
||||||
@@ -11,14 +11,18 @@
|
|||||||
<div class="socials-container">
|
<div class="socials-container">
|
||||||
<div class="socials-header" [ngStyle]="{'margin-top': isNarrow ? '80px' : '120px'}">
|
<div class="socials-header" [ngStyle]="{'margin-top': isNarrow ? '80px' : '120px'}">
|
||||||
<h1>Socials</h1>
|
<h1>Socials</h1>
|
||||||
<p class="subtitle">{{ 'SOCIALS_SUB' | translate }}</p>
|
<p class="subtitle">{{ 'socials.subtext' | translate }}</p>
|
||||||
</div>
|
</div>
|
||||||
<hr class="rounded">
|
<hr class="rounded">
|
||||||
<div class="social-links">
|
<div class="social-links">
|
||||||
|
<h3>Discord</h3>
|
||||||
<a href="https://discord.gg/RstBa88" target="_blank" class="btn discord">
|
<a href="https://discord.gg/RstBa88" target="_blank" class="btn discord">
|
||||||
<i class="fa-brands fa-discord"></i> Discord Server
|
<i class="fa-brands fa-discord"></i> Join <span>itzMiney's Hideout</span>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="dc-usertile">
|
||||||
|
<img src="https://avifetch.itz.sh/api/users/350713200389652480"/>
|
||||||
<span id="username">@itzminey</span>
|
<span id="username">@itzminey</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3>Social Media</h3>
|
<h3>Social Media</h3>
|
||||||
<a href="https://youtube.com/@itzMiney" target="_blank" class="btn youtube">
|
<a href="https://youtube.com/@itzMiney" target="_blank" class="btn youtube">
|
||||||
@@ -31,30 +35,19 @@
|
|||||||
<i class="fa-brands fa-twitch"></i> Twitch
|
<i class="fa-brands fa-twitch"></i> Twitch
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h3>{{ 'SOCIALS_GAMES' | translate }}</h3>
|
<h3>{{ 'socials.games' | translate }}</h3>
|
||||||
<a href="https://steamcommunity.com/id/itzMiney/" target="_blank" class="btn steam">
|
<a href="https://steamcommunity.com/id/itzMiney/" target="_blank" class="btn steam">
|
||||||
<i class="fa-brands fa-steam"></i> Steam
|
<i class="fa-brands fa-steam"></i> Steam
|
||||||
</a>
|
</a>
|
||||||
<a href="https://osu.ppy.sh/users/16470989" target="_blank" class="btn osu">
|
<a href="https://osu.ppy.sh/users/16470989" target="_blank" class="btn osu">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="20" height="20" viewBox="0 0 50 50">
|
<img src="assets/osu.svg" /> osu!
|
||||||
<path d="M 25 3 C 12.85 3 3 12.85 3 25 C 3 37.15 12.85 47 25 47 C 37.15 47 47 37.15 47 25 C 47 12.85 37.15 3 25 3 z M 38 18 L 40 18 L 40 26 L 38 26 L 38 18 z M 14.048828 20.898438 C 14.523828 20.898438 14.995078 20.968719 15.455078 21.136719 C 16.701078 21.591719 17.454875 22.528516 17.796875 23.853516 C 17.936875 24.396516 17.994047 24.950641 17.998047 25.556641 C 17.988047 26.368641 17.875859 27.204516 17.505859 27.978516 C 16.940859 29.161516 16.01125 29.820578 14.78125 30.017578 C 14.50125 30.063578 14.222359 30.087891 13.943359 30.087891 C 13.484359 30.087891 13.028078 30.022094 12.580078 29.871094 C 11.402078 29.474094 10.664438 28.608531 10.273438 27.394531 C 10.019438 26.604531 9.9594844 25.791844 10.021484 24.964844 C 10.082484 24.155844 10.271641 23.3835 10.681641 22.6875 C 11.270641 21.6865 12.138375 21.129891 13.234375 20.962891 C 13.506375 20.921891 13.777828 20.898437 14.048828 20.898438 z M 23.263672 20.90625 C 23.311672 20.90625 23.359203 20.90525 23.408203 20.90625 C 24.174203 20.92025 24.914719 21.08175 25.636719 21.34375 C 25.684719 21.36075 25.731656 21.369172 25.722656 21.451172 C 25.658656 22.018172 25.52025 22.562172 25.28125 23.076172 C 25.27625 23.086172 25.269531 23.095703 25.269531 23.095703 C 24.905531 22.985703 24.559125 22.862297 24.203125 22.779297 C 23.960125 22.723297 23.71475 22.689453 23.46875 22.689453 C 23.26175 22.689453 23.055609 22.712625 22.849609 22.765625 C 22.612609 22.827625 22.399594 22.935172 22.308594 23.201172 C 22.187594 23.553172 22.304859 23.909688 22.630859 24.054688 C 22.986859 24.213687 23.360562 24.325984 23.726562 24.458984 C 24.047563 24.575984 24.377453 24.674453 24.689453 24.814453 C 25.518453 25.186453 25.930234 25.872547 25.990234 26.810547 C 26.041234 27.598547 25.862562 28.307344 25.351562 28.902344 C 24.908562 29.416344 24.344703 29.716391 23.720703 29.900391 C 23.262703 30.035391 22.796125 30.082031 22.328125 30.082031 C 22.101125 30.082031 21.875438 30.071687 21.648438 30.054688 C 21.046437 30.010687 20.466391 29.857625 19.900391 29.640625 C 19.837391 29.616625 19.815266 29.587625 19.822266 29.515625 C 19.882266 28.935625 20.028906 28.381609 20.253906 27.849609 C 20.260906 27.831609 20.269203 27.815156 20.283203 27.785156 C 20.325203 27.801156 20.36625 27.814078 20.40625 27.830078 C 20.99625 28.065078 21.599516 28.220703 22.228516 28.220703 C 22.290516 28.220703 22.352062 28.218844 22.414062 28.214844 C 22.734063 28.198844 23.046984 28.147422 23.333984 27.982422 C 23.717984 27.761422 23.861719 27.434531 23.761719 27.019531 C 23.722719 26.859531 23.647813 26.721391 23.507812 26.650391 C 23.278813 26.534391 23.045687 26.421891 22.804688 26.337891 C 22.370687 26.184891 21.926188 26.06125 21.492188 25.90625 C 21.171187 25.79125 20.884047 25.604047 20.623047 25.373047 C 20.258047 25.050047 20.085391 24.624625 20.025391 24.140625 C 19.957391 23.593625 19.985219 23.054016 20.199219 22.541016 C 20.485219 21.854016 21.003391 21.434781 21.650391 21.175781 C 22.170391 20.966781 22.713672 20.90625 23.263672 20.90625 z M 29.070312 21.007812 C 29.437313 21.007812 29.805781 21.040375 30.175781 21.109375 L 30.175781 21.267578 C 30.176781 22.859578 30.170594 24.450969 30.183594 26.042969 C 30.186594 26.363969 30.236641 26.690906 30.306641 27.003906 C 30.447641 27.634906 30.835828 27.986312 31.423828 28.070312 C 31.580828 28.092312 31.738531 28.103516 31.894531 28.103516 C 32.159531 28.103516 32.422547 28.073578 32.685547 28.017578 C 32.780547 27.997578 32.810547 27.958609 32.810547 27.849609 C 32.807547 25.654609 32.808594 23.460625 32.808594 21.265625 L 32.808594 21.109375 C 33.173594 21.040375 33.534484 21.007812 33.896484 21.007812 C 34.261484 21.007812 34.627094 21.041375 34.996094 21.109375 L 34.996094 21.236328 C 34.996094 23.963328 34.995047 26.690969 34.998047 29.417969 C 34.998047 29.514969 34.972625 29.550125 34.890625 29.578125 C 33.934625 29.898125 32.962703 30.082031 31.970703 30.082031 C 31.778703 30.082031 31.586578 30.0765 31.392578 30.0625 C 30.877578 30.0245 30.361094 29.973344 29.871094 29.777344 C 28.944094 29.407344 28.421156 28.647578 28.160156 27.642578 C 28.006156 27.050578 27.96975 26.442078 27.96875 25.830078 C 27.96575 24.293078 27.96875 22.75575 27.96875 21.21875 C 27.96875 21.18475 27.970656 21.150375 27.972656 21.109375 C 28.339656 21.041375 28.705312 21.007812 29.070312 21.007812 z M 13.972656 22.787109 C 13.914656 22.787109 13.856828 22.789922 13.798828 22.794922 C 13.297828 22.833922 12.904734 23.075594 12.677734 23.558594 C 12.573734 23.780594 12.490547 24.019766 12.435547 24.259766 C 12.284547 24.920766 12.287609 25.592672 12.349609 26.263672 C 12.386609 26.669672 12.472437 27.064594 12.648438 27.433594 C 12.814438 27.780594 13.057109 28.039156 13.412109 28.160156 C 13.606109 28.226156 13.801094 28.259766 13.996094 28.259766 C 14.199094 28.259766 14.401516 28.223391 14.603516 28.150391 C 15.060516 27.985391 15.307891 27.61225 15.462891 27.15625 C 15.642891 26.62625 15.681453 26.073266 15.689453 25.447266 C 15.683Line truncated
|
|
||||||
</svg> osu!
|
|
||||||
</a>
|
</a>
|
||||||
<h3>{{ 'SOCIALS_COMMS' | translate }}</h3>
|
<a class="btn tux" (click)="toggleTux()" [class.toggled]="tuxToggled()">
|
||||||
<a href="https://ko-fi.com/itzMiney" target="_blank" class="btn kofi">
|
@if (tuxToggled()) {
|
||||||
<i class="fa-solid fa-mug-hot"></i> Ko-Fi Donations
|
<i class="fa-solid fa-skull-crossbones"></i> Club penguin is kil
|
||||||
</a>
|
} @else {
|
||||||
<a
|
<img src="assets/clubpenguin.png" /> Club Penguin
|
||||||
[href]="commissionsOpen ? 'https://ko-fi.com/itzMiney/commissions' : null"
|
}
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
class="btn kofi-comms"
|
|
||||||
[class.disabled]="!commissionsOpen"
|
|
||||||
(click)="!commissionsOpen && $event.preventDefault()"
|
|
||||||
[attr.title]="!commissionsOpen ? 'Commissions currently closed' : null"
|
|
||||||
>
|
|
||||||
<i class="fa-solid fa-mug-hot"></i>
|
|
||||||
 Ko-Fi Commissions
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ChangeDetectionStrategy, signal} from '@angular/core';
|
||||||
import {NgStyle} from '@angular/common';
|
import {NgStyle} from '@angular/common';
|
||||||
import {ViewportService} from '../shared/services/viewport.service';
|
import {ViewportService} from '../shared/services/viewport.service';
|
||||||
import {Title} from '@angular/platform-browser';
|
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
import {SeoService} from '../shared/services/seo.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-socials',
|
selector: 'app-socials',
|
||||||
@@ -13,19 +13,27 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
|||||||
ParallaxComponent
|
ParallaxComponent
|
||||||
],
|
],
|
||||||
templateUrl: './socials.component.html',
|
templateUrl: './socials.component.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.Eager,
|
||||||
styleUrl: './socials.component.css'
|
styleUrl: './socials.component.css'
|
||||||
})
|
})
|
||||||
export class SocialsComponent implements OnInit {
|
export class SocialsComponent implements OnInit {
|
||||||
isNarrow: boolean = false;
|
isNarrow: boolean = false;
|
||||||
commissionsOpen = false;
|
tuxToggled= signal(false);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private deviceService: ViewportService,
|
private deviceService: ViewportService,
|
||||||
private titleService: Title
|
private seo: SeoService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Socials | itzMiney');
|
this.seo.update({
|
||||||
|
title: 'Socials',
|
||||||
|
desc: 'Here you can find links to all the places I exist on!'
|
||||||
|
})
|
||||||
this.isNarrow = this.deviceService.isNarrow;
|
this.isNarrow = this.deviceService.isNarrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toggleTux() {
|
||||||
|
this.tuxToggled.set(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
|
||||||
|
import { AppComponent } from './app/app.component';
|
||||||
|
import { config } from './app/app.config.server';
|
||||||
|
|
||||||
|
const bootstrap = (context: BootstrapContext) =>
|
||||||
|
bootstrapApplication(AppComponent, config, context);
|
||||||
|
|
||||||
|
export default bootstrap;
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import {
|
||||||
|
AngularNodeAppEngine,
|
||||||
|
createNodeRequestHandler,
|
||||||
|
isMainModule,
|
||||||
|
writeResponseToNodeResponse,
|
||||||
|
} from '@angular/ssr/node';
|
||||||
|
import express from 'express';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
const browserDistFolder = join(import.meta.dirname, '../browser');
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
const angularApp = new AngularNodeAppEngine();
|
||||||
|
|
||||||
|
app.use(express.json());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Proxy /api requests to backend API server on port 7020
|
||||||
|
*/
|
||||||
|
app.use('/api', async (req, res) => {
|
||||||
|
try {
|
||||||
|
const backendUrl = `http://127.0.0.1:7020${req.originalUrl}`;
|
||||||
|
const headers = new Headers();
|
||||||
|
|
||||||
|
for (const [key, value] of Object.entries(req.headers)) {
|
||||||
|
if (value && key !== 'host' && key !== 'connection') {
|
||||||
|
headers.set(key, Array.isArray(value) ? value.join(', ') : value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const fetchOptions: RequestInit = {
|
||||||
|
method: req.method,
|
||||||
|
headers,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!['GET', 'HEAD'].includes(req.method)) {
|
||||||
|
fetchOptions.body = JSON.stringify(req.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
const apiRes = await fetch(backendUrl, fetchOptions);
|
||||||
|
res.status(apiRes.status);
|
||||||
|
|
||||||
|
apiRes.headers.forEach((val, key) => {
|
||||||
|
res.setHeader(key, val);
|
||||||
|
});
|
||||||
|
|
||||||
|
const buffer = await apiRes.arrayBuffer();
|
||||||
|
res.send(Buffer.from(buffer));
|
||||||
|
} catch (err) {
|
||||||
|
res.status(500).json({ error: 'SSR API Proxy failed', details: String(err) });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serve static files from /browser
|
||||||
|
*/
|
||||||
|
app.use(
|
||||||
|
express.static(browserDistFolder, {
|
||||||
|
maxAge: '1y',
|
||||||
|
index: false,
|
||||||
|
redirect: false,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle all other requests by rendering the Angular application.
|
||||||
|
*/
|
||||||
|
app.use((req, res, next) => {
|
||||||
|
angularApp
|
||||||
|
.handle(req)
|
||||||
|
.then((response) =>
|
||||||
|
response ? writeResponseToNodeResponse(response, res) : next(),
|
||||||
|
)
|
||||||
|
.catch(next);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start the server if this module is the main entry point, or it is ran via PM2.
|
||||||
|
* The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.
|
||||||
|
*/
|
||||||
|
if (isMainModule(import.meta.url) || process.env['pm_id'] || process.env['NODE_ENV'] === 'production') {
|
||||||
|
const port = process.env['PORT'] || 4000;
|
||||||
|
app.listen(port, (error) => {
|
||||||
|
if (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`Node Express server listening on http://localhost:${port}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request handler used by the Angular CLI (for dev-server and during build) or Firebase Cloud Functions.
|
||||||
|
*/
|
||||||
|
export const reqHandler = createNodeRequestHandler(app);
|
||||||
+13
-3
@@ -5,13 +5,23 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/app",
|
"outDir": "./out-tsc/app",
|
||||||
"types": [
|
"types": [
|
||||||
"@angular/localize"
|
"node"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src/main.ts"
|
"src/main.ts",
|
||||||
|
"src/main.server.ts",
|
||||||
|
"src/server.ts"
|
||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.d.ts"
|
"src/**/*.d.ts"
|
||||||
]
|
],
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"extendedDiagnostics": {
|
||||||
|
"checks": {
|
||||||
|
"nullishCoalescingNotNullable": "suppress",
|
||||||
|
"optionalChainNotNullable": "suppress"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user