Skip to content

Commit

Permalink
feat: Dodanie trybu nocnego
Browse files Browse the repository at this point in the history
  • Loading branch information
matiusz committed Dec 10, 2024
1 parent 1e24fff commit 9f7afb6
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 10 deletions.
31 changes: 24 additions & 7 deletions songbook/src/flask/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,23 @@
text-align: center;
font-size: 14px;
}

.nav-side-menu .toggle-btn {
display: none;
}

.nav-side-menu .btn {
display: block;
padding: 3px;
width: 40px;
}

.brand button {
margin-top: 4px;
margin-right: 15px;
float: right;
}

.nav-side-menu .song {
padding-left: 10px;
}
Expand Down Expand Up @@ -126,15 +140,15 @@
}
.nav-side-menu .toggle-btn {
display: block;
}

.nav-side-menu .btn {
cursor: pointer;
position: absolute;
right: 7vw;
top: 15px;
z-index: 10 !important;
padding: 3px;
background-color: #ffffff;
color: #000;
width: 40px;
text-align: center;
}
.brand {
Expand Down Expand Up @@ -218,10 +232,9 @@ body {
width: 100%;
margin-bottom: 10px;
}
.nav-side-menu .sub-menu .toggle-btn {
.nav-side-menu .sub-menu .btn {
display: block;
cursor: pointer;
position: absolute;
right: 10px;
top: 10px;
z-index: 10 !important;
Expand Down Expand Up @@ -292,10 +305,9 @@ body {
width: 100%;
margin-bottom: 10px;
}
.sub-line .toggle-btn {
.sub-line .btn {
display: block;
cursor: pointer;
position: absolute;
right: 10px;
top: 10px;
z-index: 10 !important;
Expand Down Expand Up @@ -333,4 +345,9 @@ body {

.container {
width: 100vw;
}

.dark-mode {
background-color: #2e353d;
color: #e1ffff;
}
11 changes: 10 additions & 1 deletion songbook/src/flask/templates/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1086,4 +1086,13 @@ function getArtifact() {
}
}
})
}
}

function darkMode() {
var element = document.body;
element.classList.toggle("dark-mode");
}

function collapse() {
$("#menu-content").collapse('toggle');
}
21 changes: 19 additions & 2 deletions songbook/src/flask/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@

<body>
<div class="p-2 nav-side-menu">
<div class="brand">Śpiewnik HK</div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class="brand">Śpiewnik HK
<button onclick="collapse()" class="toggle-btn"><i class="fa fa-bars fa-2x btn"></i></button>
<button onclick="darkMode()"><i class="fa fa-moon-o fa-2x btn"></i></button>
</div>
<div class="menu-list">
<ul id="menu-content" class="menu-content collapse out {{'show' if filterString else ''}}">
<li data-toggle="collapse" data-target="#search">
Expand Down Expand Up @@ -59,6 +61,21 @@
</div>
</div>
{% autoescape false %}















<div class="main" style="overflow: auto;">
{% if song %}
<div class="d-flex flex-column">
Expand Down

0 comments on commit 9f7afb6

Please sign in to comment.