You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Test database configuration: `docker-compose.yml`
@@ -100,6 +101,19 @@ To generate the HTML pages to be returned from our GET routes, we use Jinja2 tem
100
101
101
102
With Jinja2, we can use the `{% block %}` tag to define content blocks, and the `{% extends %}` tag to extend a base template. We can also use the `{% include %}` tag to include a component in a parent template. See the [Jinja2 documentation on template inheritance](https://jinja.palletsprojects.com/en/stable/templates/#template-inheritance) for more details.
102
103
104
+
### Bootstrap Sass Files
105
+
Install Node.js on your local machine if it is not there already.
106
+
Install sass, gulp, and gulp-sass on your local machine:
107
+
```bash
108
+
npm install sass gulp gulp-sass
109
+
```
110
+
Restart VS Code and press Run Task from the Terminal menu on the gulpfile.js. Choose gulp:default and select your option for output. This automates Sass compilation.
111
+
112
+
There is already a default styles.scss file in the `scss` folder. Here are customization instructions for Sass files that can be included in `sass`:
113
+
[Boostrap Customization with Sass](https://getbootstrap.com/docs/5.3/customize/sass/)
114
+
115
+
There are a lot of free templates available online, such as on [Start Bootstrap]|[https://startbootstrap.com]
116
+
103
117
#### Context variables
104
118
105
119
Context refers to Python variables passed to a template to populate the HTML. In a FastAPI GET route, we can pass context to a template using the `templates.TemplateResponse` method, which takes the request and any context data as arguments. For example:
0 commit comments