mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-25 13:24:48 +02:00
Implemented different themes for Part-DB.
We use Bootswatch to provide different themed bootstrap CSS.
This commit is contained in:
parent
0ebc5bfdad
commit
0b69de332d
10 changed files with 157 additions and 7 deletions
|
@ -15,7 +15,25 @@
|
|||
|
||||
<title>{% apply trim %}{% block title %}{{ partdb_title}}{% endblock %}{% endapply %}</title>
|
||||
{% block stylesheets %}
|
||||
{# Include the main bootstrap theme based on user/global setting #}
|
||||
|
||||
|
||||
|
||||
{% if not app.user.theme %}
|
||||
{% set theme = global_theme %}
|
||||
{% else %}
|
||||
{% set theme = app.user.theme %}
|
||||
{% endif %}
|
||||
|
||||
{% if theme %}
|
||||
<link rel="stylesheet" href="{{ asset('build/themes/' ~ theme ~ '.css') }}">
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ asset('build/themes/bootstrap.css') }}">
|
||||
{% endif %}
|
||||
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body data-base-url="{{ url('homepage', {'_locale': app.request.locale}) }}">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue