Skip to content

Commit 9f8f80f

Browse files
author
Julien Neuhart
committed
Add Theme documentation
1 parent e04f28c commit 9f8f80f

File tree

7 files changed

+102
-6
lines changed

7 files changed

+102
-6
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: BootstrapVue
3+
slug: /theme/bootstrap-vue
4+
---
5+
6+
The Symfony Boilerplate uses [BootstrapVue](https://bootstrap-vue.org/) as templating framework.
7+
8+
Of course, you may use another templating framework, although it will require some extra work.
9+
10+
## Add Plugin
11+
12+
Most of the components from [BootstrapVue](https://bootstrap-vue.org/) come in the form of plugins.
13+
14+
You have to add them manually in the *src/webapp/nuxt.config.js* file:
15+
16+
```js title="src/webapp/nuxt.config.js"
17+
bootstrapVue: {
18+
icons: true,
19+
css: false,
20+
bvCSS: false,
21+
componentPlugins: [
22+
'LayoutPlugin',
23+
// etc.
24+
},
25+
}
26+
```
27+
28+
## Change Colors
29+
30+
The file *src/webapp/assets/css/_variables.scss* is where you may define most of the colors.
31+
32+
A few other `.scss` files also contain colors definition.
33+
34+
For the Nuxt.js loading bar, its color is configurable in the *src/webapp/nuxt.config.js* file:
35+
36+
```js title="src/webapp/nuxt.config.js"
37+
loading: {
38+
color: '#a211fa',
39+
height: '3px',
40+
},
41+
```

docs/docs/15_Theme/1_Overview.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/docs/15_Theme/2_Layouts.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Layouts
3+
slug: /theme/layouts
4+
---
5+
6+
The Symfony Boilerplate provides many layouts you may use to design your pages.
7+
8+
:::note
9+
10+
📣  A layout is a sort of wrapper or skeleton around a page.
11+
12+
:::
13+
14+
## Default
15+
16+
The default layout is in use when you don't specify any layout for your page.
17+
18+
It centralizes the content of the page in the center.
19+
20+
![Default layout](/img/default_layout.png)
21+
22+
## Card
23+
24+
The card layout is for pages with a single `<b-card>`.
25+
26+
```js title="Vue component <script> block"
27+
export default {
28+
layout: 'card',
29+
}
30+
```
31+
32+
![Card layout](/img/card_layout.png)
33+
34+
## Dashboard
35+
36+
The dashboard layout works great for back-office pages.
37+
38+
```js title="Vue component <script> block"
39+
export default {
40+
layout: 'dashboard',
41+
}
42+
```
43+
44+
![Dashboard layout](/img/dashboard_layout.png)
45+
46+
## Empty
47+
48+
The empty layout is for pages that have a template of their own
49+
(and you don't want to create a dedicated layout for them).
50+
51+
```js title="Vue component <script> block"
52+
export default {
53+
layout: 'empty',
54+
}
55+
```
56+
57+
![Empty layout](/img/empty_layout.png)
58+
59+
## Error
60+
61+
The error layout is not actually a layout, but a special page for errors. It uses the empty layout.

docs/static/img/card_layout.png

142 KB
Loading
215 KB
Loading

docs/static/img/default_layout.png

208 KB
Loading

docs/static/img/empty_layout.png

102 KB
Loading

0 commit comments

Comments
 (0)