mirror of
https://github.com/kevinveenbirkenbach/homepage.veen.world.git
synced 2026-04-08 05:42:19 +00:00
Compare commits
8 Commits
5f2e7ef696
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f6c90cc3c | |||
| 69c4f15ce7 | |||
| 56c1b0d0cd | |||
| 91e9caea48 | |||
| feb6af28ef | |||
| f8c2b4236b | |||
| dc2626e020 | |||
| 46b0b744ca |
93
.github/workflows/ci.yml
vendored
Normal file
93
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags-ignore:
|
||||||
|
- "**"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-and-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
PORT: "5000"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: pip install -r app/requirements.txt
|
||||||
|
|
||||||
|
- name: Prepare app config for CI
|
||||||
|
run: cp app/config.sample.yaml app/config.yaml
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: app/package.json
|
||||||
|
|
||||||
|
- name: Install Node dependencies
|
||||||
|
working-directory: app
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Run Cypress tests
|
||||||
|
uses: cypress-io/github-action@v6
|
||||||
|
with:
|
||||||
|
working-directory: app
|
||||||
|
install: false
|
||||||
|
start: python app.py
|
||||||
|
wait-on: http://127.0.0.1:5000
|
||||||
|
wait-on-timeout: 120
|
||||||
|
|
||||||
|
- name: Detect semver tag on current commit
|
||||||
|
id: semver
|
||||||
|
run: |
|
||||||
|
SEMVER_TAG="$(git tag --points-at "$GITHUB_SHA" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1 || true)"
|
||||||
|
if [ -n "$SEMVER_TAG" ]; then
|
||||||
|
echo "found=true" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "raw_tag=$SEMVER_TAG" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "version=${SEMVER_TAG#v}" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "found=false" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Compute image name
|
||||||
|
if: steps.semver.outputs.found == 'true'
|
||||||
|
id: image
|
||||||
|
run: echo "name=ghcr.io/$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
if: steps.semver.outputs.found == 'true'
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to GHCR
|
||||||
|
if: steps.semver.outputs.found == 'true'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and publish image
|
||||||
|
if: steps.semver.outputs.found == 'true'
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.image.outputs.name }}:${{ steps.semver.outputs.version }}
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ app/config.yaml
|
|||||||
*__pycache__*
|
*__pycache__*
|
||||||
app/static/cache/*
|
app/static/cache/*
|
||||||
.env
|
.env
|
||||||
|
app/cypress/screenshots/*
|
||||||
4
CHANGELOG.md
Normal file
4
CHANGELOG.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
## [1.0.0] - 2026-02-19
|
||||||
|
|
||||||
|
* Official Release🥳
|
||||||
|
|
||||||
8
Makefile
8
Makefile
@@ -75,8 +75,8 @@ browse:
|
|||||||
# Open the application in the browser at http://localhost:$(PORT)
|
# Open the application in the browser at http://localhost:$(PORT)
|
||||||
chromium http://localhost:$(PORT)
|
chromium http://localhost:$(PORT)
|
||||||
|
|
||||||
# Cypress tests\ nCYPRESS_DIR := app
|
npm-install:
|
||||||
.PHONY: test
|
cd app && npm install
|
||||||
test: down prod
|
|
||||||
# Run end-to-end tests with Cypress.
|
test: npm-install
|
||||||
cd app && npx cypress run --spec "cypress/e2e/**/*.spec.js"
|
cd app && npx cypress run --spec "cypress/e2e/**/*.spec.js"
|
||||||
|
|||||||
32
app/cypress/e2e/navbar_logo_visibility.spec.js
Normal file
32
app/cypress/e2e/navbar_logo_visibility.spec.js
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
describe('Navbar Logo Visibility', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.visit('/');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have #navbar_logo present in the DOM', () => {
|
||||||
|
cy.get('#navbar_logo').should('exist');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be invisible (opacity 0) by default', () => {
|
||||||
|
cy.get('#navbar_logo')
|
||||||
|
.should('exist')
|
||||||
|
.and('have.css', 'opacity', '0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should become visible (opacity 1) after entering fullscreen', () => {
|
||||||
|
cy.window().then(win => {
|
||||||
|
win.fullscreen();
|
||||||
|
});
|
||||||
|
cy.get('#navbar_logo', { timeout: 4000 })
|
||||||
|
.should('have.css', 'opacity', '1');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should become invisible again (opacity 0) after exiting fullscreen', () => {
|
||||||
|
cy.window().then(win => {
|
||||||
|
win.fullscreen();
|
||||||
|
win.exitFullscreen();
|
||||||
|
});
|
||||||
|
cy.get('#navbar_logo', { timeout: 4000 })
|
||||||
|
.should('have.css', 'opacity', '0');
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -173,6 +173,11 @@ iframe{
|
|||||||
transition: opacity var(--anim-duration) ease-in-out;
|
transition: opacity var(--anim-duration) ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#navbar_logo.visible {
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 1. Make sure headers and footers can collapse */
|
/* 1. Make sure headers and footers can collapse */
|
||||||
header,
|
header,
|
||||||
footer {
|
footer {
|
||||||
|
|||||||
@@ -41,14 +41,11 @@ function enterFullscreen() {
|
|||||||
setFullWidth(true);
|
setFullWidth(true);
|
||||||
updateUrlFullscreen(true);
|
updateUrlFullscreen(true);
|
||||||
|
|
||||||
// fade in logo… (unchanged)
|
// Nur jetzt sichtbar machen
|
||||||
const logo = document.getElementById('navbar_logo');
|
const logo = document.getElementById('navbar_logo');
|
||||||
if (logo) {
|
if (logo) {
|
||||||
// hide the navbar‐logo restore link in fullscreen
|
logo.classList.add('visible');
|
||||||
logo.classList.add('d-none');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// now recalc in lock-step with the CSS collapse animation
|
|
||||||
recalcWhileCollapsing();
|
recalcWhileCollapsing();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,13 +54,11 @@ function exitFullscreen() {
|
|||||||
setFullWidth(false);
|
setFullWidth(false);
|
||||||
updateUrlFullscreen(false);
|
updateUrlFullscreen(false);
|
||||||
|
|
||||||
|
// Jetzt wieder verstecken
|
||||||
const logo = document.getElementById('navbar_logo');
|
const logo = document.getElementById('navbar_logo');
|
||||||
if (logo) {
|
if (logo) {
|
||||||
// show the navbar‐logo restore link again
|
logo.classList.remove('visible');
|
||||||
logo.classList.remove('d-none');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// recalc while header/footer expand back
|
|
||||||
recalcWhileCollapsing();
|
recalcWhileCollapsing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbarNav{{menu_type}}">
|
<div class="collapse navbar-collapse" id="navbarNav{{menu_type}}">
|
||||||
{% if menu_type == "header" %}
|
{% if menu_type == "header" %}
|
||||||
<a class="navbar-brand d-flex align-items-center d-none js-restore" id="navbar_logo" href="#">
|
<a class="navbar-brand align-items-center d-flex js-restore" id="navbar_logo" href="#">
|
||||||
<img
|
<img
|
||||||
src="{{ url_for('static', filename=platform.logo.cache) }}"
|
src="{{ url_for('static', filename=platform.logo.cache) }}"
|
||||||
alt="{{ platform.titel }}"
|
alt="{{ platform.titel }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user