mirror of
https://github.com/kevinveenbirkenbach/homepage.veen.world.git
synced 2025-09-08 02:47:10 +02:00
Compare commits
3 Commits
5f2e7ef696
...
f8c2b4236b
Author | SHA1 | Date | |
---|---|---|---|
f8c2b4236b | |||
dc2626e020 | |||
46b0b744ca |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
app/config.yaml
|
||||
*__pycache__*
|
||||
app/static/cache/*
|
||||
.env
|
||||
.env
|
||||
app/cypress/screenshots/*
|
8
Makefile
8
Makefile
@@ -75,8 +75,8 @@ browse:
|
||||
# Open the application in the browser at http://localhost:$(PORT)
|
||||
chromium http://localhost:$(PORT)
|
||||
|
||||
# Cypress tests\ nCYPRESS_DIR := app
|
||||
.PHONY: test
|
||||
test: down prod
|
||||
# Run end-to-end tests with Cypress.
|
||||
npm-install:
|
||||
cd app && npm install
|
||||
|
||||
test: npm-install
|
||||
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;
|
||||
}
|
||||
|
||||
#navbar_logo.visible {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
|
||||
/* 1. Make sure headers and footers can collapse */
|
||||
header,
|
||||
footer {
|
||||
|
@@ -41,14 +41,11 @@ function enterFullscreen() {
|
||||
setFullWidth(true);
|
||||
updateUrlFullscreen(true);
|
||||
|
||||
// fade in logo… (unchanged)
|
||||
// Nur jetzt sichtbar machen
|
||||
const logo = document.getElementById('navbar_logo');
|
||||
if (logo) {
|
||||
// hide the navbar‐logo restore link in fullscreen
|
||||
logo.classList.add('d-none');
|
||||
logo.classList.add('visible');
|
||||
}
|
||||
|
||||
// now recalc in lock-step with the CSS collapse animation
|
||||
recalcWhileCollapsing();
|
||||
}
|
||||
|
||||
@@ -57,13 +54,11 @@ function exitFullscreen() {
|
||||
setFullWidth(false);
|
||||
updateUrlFullscreen(false);
|
||||
|
||||
// Jetzt wieder verstecken
|
||||
const logo = document.getElementById('navbar_logo');
|
||||
if (logo) {
|
||||
// show the navbar‐logo restore link again
|
||||
logo.classList.remove('d-none');
|
||||
logo.classList.remove('visible');
|
||||
}
|
||||
|
||||
// recalc while header/footer expand back
|
||||
recalcWhileCollapsing();
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav{{menu_type}}">
|
||||
{% 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
|
||||
src="{{ url_for('static', filename=platform.logo.cache) }}"
|
||||
alt="{{ platform.titel }}"
|
||||
|
Reference in New Issue
Block a user