Skip to content

Commit

Permalink
Merge pull request #10 from trento-project/theme-font-changes
Browse files Browse the repository at this point in the history
Theme Font Changes
  • Loading branch information
stefanotorresi authored May 15, 2024
2 parents 20a4603 + 32a5c83 commit 61c1e19
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
4 changes: 3 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ params:
# main pages options
mainPage:
# option to specify the main font of the theme
fontFamily: "Lato"
fontFamily: "Barlow"
# option to specify the body font of the theme
bodyFontFamily: "Lato"
sizes: [400, 700]

# sidebar options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $red: hsl(348, 100%, 61%) !default

// Typography
$family-sans-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default
$family-sans-serif: $fontBody, BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default
$family-monospace: monospace !default
$render-mode: optimizeLegibility !default

Expand Down
4 changes: 2 additions & 2 deletions themes/hugo-refresh/assets/fresh/partials/_sections.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Section Styles
height: 75vh !important;
}
.title, .subtitle {
font-family: 'Open Sans', sans-serif;
font-family: $fontMainPage, sans-serif;

}
.subtitle {
Expand All @@ -32,7 +32,7 @@ Section Styles
max-width: 500px;
margin: 0 auto;
.title, .subtitle {
font-family: 'Open Sans', sans-serif;
font-family: $fontMainPage, sans-serif;

}
.subtitle {
Expand Down
4 changes: 4 additions & 0 deletions themes/hugo-refresh/assets/style.sass
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$fontMainPage: "{{ .Site.Params.mainPage.fontFamily }}"
$fontSidebar: "{{ .Site.Params.sidebar.fontFamily }}"
$fontNavbar: "{{ .Site.Params.navbar.fontFamily }}"
$fontBody: "{{ .Site.Params.mainPage.bodyFontFamily }}"
$mainColour: {{ .Site.Params.mainColour }}

{{ $out_fo := "loader.svg" }}
Expand All @@ -15,6 +16,9 @@ $loadingImage: "{{- $img.Permalink | relURL }}"
@import "bulma/bulma"
@import "fresh/core"

h1, h2, h3, h4, h5, h6
font-family: $fontMainPage

a
color: #30BA78
&:hover
Expand Down
3 changes: 3 additions & 0 deletions themes/hugo-refresh/layouts/partials/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
{{- $font1 := replace .Site.Params.mainPage.fontFamily " " "+" -}}
{{- $font2 := replace .Site.Params.sidebar.fontFamily " " "+" -}}
{{- $font3 := replace .Site.Params.navbar.fontFamily " " "+" -}}
{{- $font4 := replace .Site.Params.mainPage.bodyFontFamily " " "+" -}}
{{- $fontSizes := delimit .Site.Params.mainPage.sizes "," -}}
{{- $fontUrl1 := printf "https://fonts.googleapis.com/css?family=%s:%s" $font1 $fontSizes -}}
{{- $fontUrl2 := printf "https://fonts.googleapis.com/css?family=%s:%s" $font2 $fontSizes -}}
{{- $fontUrl3 := printf "https://fonts.googleapis.com/css?family=%s:%s" $font3 $fontSizes -}}
{{- $fontUrl4 := printf "https://fonts.googleapis.com/css?family=%s:%s" $font4 $fontSizes -}}

<link href="{{- $fontUrl1 -}}" rel="stylesheet">
<link href="{{- $fontUrl2 -}}" rel="stylesheet">
<link href="{{- $fontUrl3 -}}" rel="stylesheet">
<link href="{{- $fontUrl4 -}}" rel="stylesheet">

{{- $css := resources.Get $sass | resources.ExecuteAsTemplate $scss . | toCSS $cssOpts -}}
{{- $css1 := resources.Get "css/monokai-sublime.9.15.8.min.css" -}}
Expand Down
6 changes: 3 additions & 3 deletions themes/hugo-refresh/layouts/partials/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<div class="hero-body">
<div class="container has-text-centered px-20">
<div class="columns is-centered">
<div class="column is-9">
<div class="column is-10">
<div class="landing-caption">
<h1 class="title is-2 is-bold is-spaced">
{{- $title -}}
</h1>
{{- with $subtitle -}}
<h2 class="subtitle is-4">
<p class="content is-medium xp-2">
{{ . }}
</h2>
</p>
{{- end -}}
{{/* <p>
<a class="button cta rounded primary-btn raised" href="{{- $buttonLink -}}">
Expand Down

0 comments on commit 61c1e19

Please sign in to comment.