Skip to content

Commit c09f42d

Browse files
add swapable bootswatch themes from parameters
1 parent 25d691b commit c09f42d

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ Default global parameters are generated interactively during `composer install`
197197
- `app.contact_edit_delay (int)` Time before a contact is not editable anymore (in minutes)
198198
- `app.min_tag (int)` Minimum number of tag per sharable (0 is none)
199199
- `app.max_tag (int)` Maximum number of tag per sharable (0 is none)
200+
- `app.bootswatch_theme (string)` Name of the [Bootswatch theme](https://bootswatch.com/) to load (in lowercase)
200201

201202
### Administration
202203

config/packages/twig.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ twig:
55
siteName: '%app.site_name%'
66
siteDescription: '%app.site_description%'
77
siteAlert: '%app.site_alert%'
8+
bootswatchTheme: '%app.bootswatch_theme%'
89

910
# fix to look for translations in forms.
1011
# TODO: Remove when symfony is upgraded to 5.3

parameters.yaml.dist

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ parameters:
33
app.user_limit: 1000
44
app.invitation_duration: 24
55
app.site_name: 'Antilope'
6+
app.bootswatch_theme: darkly
67
app.sharabe_names:
78
en:
89
name: sharable

templates/base.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="description" content="{% block description %}{{ siteDescription }}{% endblock %}">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">-->
9-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.5.2/darkly/bootstrap.min.css">
9+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.5.2/{{ bootswatchTheme }}/bootstrap.min.css">
1010
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous" />
1111
<link rel="stylesheet" href="{{ asset('/antilope.css') }}" />
1212
{% block stylesheets %}

0 commit comments

Comments
 (0)