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

Bootstrap add css-link

Started by Christophe 8 years ago · 2 replies · 1464 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 stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 317 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago