Skip to content

Commit

Permalink
theme color update in settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoexe committed Sep 28, 2024
1 parent 58c824f commit 1fb1c31
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// set theme color
document.head.querySelector("meta[name=theme-color]").content = getComputedStyle(document.body).getPropertyValue('--color-accent')
3 changes: 3 additions & 0 deletions sostituzioni/view/static/scripts/impostazioni.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ let modifiche = []

let sezioni = document.getElementsByClassName('sezione-header');

// set theme color
document.head.querySelector("meta[name=theme-color]").content = getComputedStyle(document.body).getPropertyValue('--color-accent')

for (let index = 0; index < sezioni.length; index++) {
sezioni[index].addEventListener('click', () => {
sezioni[index].classList.toggle('expanded');
Expand Down
4 changes: 2 additions & 2 deletions sostituzioni/view/templates/gestione_impostazioni/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<!-- <meta name="theme-color" content="#C00F19" /> -->
<meta name="theme-color" content="#ffffff" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="view-transition" content="same-origin" />
<title>{% block title %}{% endblock %}</title>
Expand Down Expand Up @@ -61,7 +61,7 @@ <h2 id="popup-conferma-titolo"></h2>
},
],
})" defer></script>
<!-- <script src="{{ url_for('static', filename='scripts/gestione_impostazioni/base.js') }}" defer></script> -->
<script src="{{ url_for('static', filename='scripts/gestione_impostazioni/base.js') }}"></script>
{% block scripts %}
{% endblock %}
</body>
Expand Down
2 changes: 1 addition & 1 deletion sostituzioni/view/templates/impostazioni.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<head>
<meta charset="UTF-8" />
<!-- <meta name="theme-color" content="#C00F19" /> -->
<meta name="theme-color" content="#ffffff" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="view-transition" content="same-origin" />
<title>Impostazioni</title>
Expand Down

0 comments on commit 1fb1c31

Please sign in to comment.