Hi, how can I change the font of quark theme with a google fonts? I use windows OS... Thank you so much...
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Solved by pamtbaau View solution
@semplicewebsite There are several ways of doing it, these are just two of them.
Option 1: Using @import in css:
- I presume you already know your way in Google Fonts to find the @import statement.
- Create a child theme inherited from Quark if not already
-
Create file
'/user/themes/mytheme/css/custom.css'or use your existing css file and add:CSS@import url('https://fonts.googleapis.com/css?family=Open+Sans'); body { font-family: 'Open Sans', sans-serif; }Note: If you don't want to use a child theme, you can insert above code into 'user/themes/quark/css/custom.css'.
Option 2: Using <link> in template:
- I presume you already know your way in Google Fonts to find the
<link>statement. - Create a child theme inherited from Quark if not already
- Copy
'/user/themes/quark/templates/partials/base.html.twig'from Quark to your theme:'/user/themes/mytheme/templates/partials/ - Paste the link in template
'base.html.twig':TWIG{{ assets.css() }} <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> - Create file
'/user/themes/mytheme/css/custom.css'or use your existing css file and add:CSSbody { font-family: 'Open Sans', sans-serif; }
If you want to know which one is better, you're not the first to ask: @import vs link
Almost forgot... If you want to store the fonts on your server, you might find a solution in this reply and further down in a similar topic..
If you have any questions, don't hesitate to ask...
@pamtbaau:
Note: If you don’t want to use a child theme, you can insert above code into ‘user/themes/quark/css/custom.css’.
Thank you...it works!!! You are so gentle...and generous...
MI
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 125 | 19 hours ago | ||
| 1 | 89 | 24 hours ago | ||
| 0 | 73 | 2 days ago | ||
| 6 | 382 | 5 days ago | ||
| 3 | 69 | 6 days ago |