Skip to content

Commit

Permalink
up sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-lemeur committed Apr 22, 2024
1 parent a9e6b51 commit 793e8de
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 16 deletions.
29 changes: 25 additions & 4 deletions assets/sass/_custom.sass
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// we recommend not editing this file directly. Instead, create an `assets/sass/_custom.sass` file at the root level of your site.
// if you edit this file directly, you will have to resolve git conflicts when and if you decide to pull changes we make on the theme
$main-blue: #1b3c6c
$text-color: #e9ebf1

.excerpt
display: grid
grid-template-columns: repeat(2, 1fr)
Expand Down Expand Up @@ -62,6 +65,21 @@
background-color: #1b3c6c
font-weight: bold

.content
padding-top: 8rem


.sidebar_inner::before
background: $text-color
padding: 1px
top: 30px

.search
input
background-color: $text-color
padding: 1rem
box-shadow: unset

.footer
height: fit-content
background-color: #f4f8fe
Expand Down Expand Up @@ -122,12 +140,15 @@
font-size: 1em

.membersCounter
background-color: #0077b8
color: white
border-radius: 1.5rem
color: $main-blue
border: 1px solid $main-blue
border-radius: 40px
width: fit-content
padding: 5px 15px
padding: 20px
margin: 30px auto
font-size: 20px
width: 100%
text-align: center

.button_tally
padding: 0.2rem 0.75rem
Expand Down
10 changes: 0 additions & 10 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,8 @@
{{- $image := $scratch.Get "image" }}
{{- $bg := absLangURL (path.Join "images" $image) }}
{{ $taxonomyObject := .Site.Taxonomies.active }}
{{ $uniqueCountries := slice }}
{{ range .Site.RegularPages }}
{{ $pageCountries := .Params.geographies }}
{{ range $pageCountries }}
{{ if not (in $uniqueCountries .) }}
{{ $uniqueCountries = $uniqueCountries | append . }}
{{ end }}
{{ end }}
{{ end }}
<div class="{{ if ne $p.singleColumn true }}grid-inverse {{ end }}wrap content">
<article class="post_content">
<h2 class="membersCounter"><strong>{{ $taxonomyObject.Count "true" }}</strong> members in <strong>{{ len $uniqueCountries }}</strong> countries</h2>
<div class="post_body">
{{- .Content }}

Expand Down
15 changes: 13 additions & 2 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{{ $s := site.Params }}
{{ $taxonomyObject := .Site.Taxonomies.active }}
{{ $uniqueCountries := slice }}
{{ range .Site.RegularPages }}
{{ $pageCountries := .Params.geographies }}
{{ range $pageCountries }}
{{ if not (in $uniqueCountries .) }}
{{ $uniqueCountries = $uniqueCountries | append . }}
{{ end }}
{{ end }}
{{ end }}
<aside class="sidebar">
<section class="sidebar_inner">
<br>
{{ partial "search/widget" . }}
<h2 class="membersCounter"><strong>{{ $taxonomyObject.Count "true" }} members in {{ len $uniqueCountries }} countries</strong></h2>
{{- $introDescription := $s.introDescription }}
{{- with .Params.introDescription }}
{{- $introDescription = . }}
Expand All @@ -16,7 +27,7 @@
{{- $showAuthorPhoto = true }}
{{- end }}
{{- end }}
{{- if $showAuthorPhoto }}
<!-- {{- if $showAuthorPhoto }}
<div class="author_header">
<img src="{{ absURL $author.photo }}" alt="{{ $author.name }} photo">
<h2>{{ $author.name }}</h2>
Expand All @@ -26,7 +37,7 @@ <h2>{{ if $fullAuthor }}{{ $author.name }}{{ else }}{{ $author }}{{ end }}</h2>
{{- end }}
<div class="author_bio">
{{ markdownify $introDescription }}
</div>
</div> -->
<!-- {{- if ( ne $s.introURL false ) }}
{{- $r := T "read_more" }}
<a href='{{ absLangURL (default "about/" $s.introURL) }}' class="button mt-1" role="button" title='{{ $r }}'>{{ $r }}</a>
Expand Down

0 comments on commit 793e8de

Please sign in to comment.