Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Bootstrap add css-link

Started by Christophe 8 years ago · 2 replies · 1366 views
8 years ago

Today follow a tutorial, making a theme.
Now i undertsand a bit, trying building my own Bootstrap 4 theme.
Founding this css-link from the Bootstrap website:
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">

Is it good adding so:
{% block stylesheets %}
{% do assets.addCss('https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css', 100) %}
{% endblock %}
{{ assets.css() }}

I don't know how adding this: 'integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous"' inside the link, or is it not necessary?

8 years ago

@dimitrilongo thanks for the info.
But i will try implement directly in the theme itself, so i learn building themes for my next projects.
It is the best way, learning how things works and implement in a GRAV-theme.
At the moment following a Bootstrap theme from the download section, so i learn also a lot ;-)

👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 198 2 months ago
Themes & Styling · by Ian, 2 months ago
3 94 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 455 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 48 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 128 3 months ago