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 · 1439 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 Sebadamus, 7 days ago
5 151 22 hours ago
Themes & Styling · by martynfoster735, 1 week ago
1 193 1 week ago
Themes & Styling · by Justin Young, 3 weeks ago
1 241 3 weeks ago
Themes & Styling · by Slebeig, 1 month ago
4 376 1 month ago
Themes & Styling · by Pedro M, 4 months ago
4 747 3 months ago