Skip to content

Commit

Permalink
make mentoring cards more like others
Browse files Browse the repository at this point in the history
  • Loading branch information
drmowinckels committed Jan 8, 2023
1 parent bd28a47 commit 5c7acb6
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 29 deletions.
Binary file added assets/mentoring/cotonou.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/mentoring/cotonou_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions content/activities/rladies-blogs/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@ type: "rladies-blogs"

Curated list of awesome blogs by R-Ladies, inspired by

<<<<<<< HEAD
{{< twitter 1362021673239785473 >}}

=======
{{< twitter id="1362021673239785473" user="RLadiesGlobal" >}}
>>>>>>> main
8 changes: 4 additions & 4 deletions data/mentoring/cotonou.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

{
"img": "cotonou.png",
"url": "https://www.google.com",
"url": "",
"statement": "I asked the speaker on that day to share her experience from choosing her topic to presenting! She ecstatically shared that and we immediately got volunteers for the next meetup",
"year": "2019",
"name": "Nadeja Sero",
"chapter": "R-Ladies Cotonou",
"twitter": "RLadiesCtn"
"mentee": "Nadeja Sero",
"mentor": "",
"chapter": "R-Ladies Cotonou"
}

34 changes: 28 additions & 6 deletions themes/hugo-rladies/assets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,6 @@ pre {
padding-bottom:.2rem;
z-index: 99;
text-align: right;


}


Expand Down Expand Up @@ -647,7 +645,6 @@ pre {
.card-expand-content {
padding: 10px;
}

}

.card-medium {
Expand All @@ -657,17 +654,25 @@ pre {
.card-expand-content {
padding: 20px;
}

}

.card-large {
height: 470px;
min-width: 200px;
min-width: 250px;
.card-expand-content {
padding: 30px;
}
}

.card-wide {
height: 370px;
min-width: 250px;

.card-expand-content {
padding: 10px;
}
}

.card-expand {
position: relative;
box-shadow: $box-shadow-sm;
Expand All @@ -676,6 +681,20 @@ pre {
margin-bottom: 10px;
font-size: 14px;

blockquote:before {
content: "\f10d";
font-family: FontAwesome;
color: $primary;
margin-right: 4px
}

blockquote:after {
content: "\f10e";
font-family: FontAwesome;
color: $primary;
margin-left: 4px
}

img {
display: block;
width: 100%;
Expand Down Expand Up @@ -732,6 +751,10 @@ pre {
opacity: 1 !important;
}

.card-expand-animate {
display: none;
}

.card-expand-category {
position: absolute;
top: -30px;
Expand Down Expand Up @@ -761,7 +784,6 @@ pre {
font-size: 14px;
color: darken($secondary, 30%);
line-height: 1.2em;
display: none;
}

.card-expand-up-title {
Expand Down
38 changes: 34 additions & 4 deletions themes/hugo-rladies/layouts/mentoring/single.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,41 @@
{{ define "main" }}
<div class="container" id="mentoring">
<div class="row row-cols-sm-1 row-cols-md-2 row-cols-lg-3">
{{ $data := newScratch }}

{{ .Content }}
<div class="container expand-grid" id="rladies-blogs">
<ul class="justify-content-center full-width row row-xl-2 row-lg-3 row-md-4 row-sm-6 row-9">
{{ $mentoring := ( .Scratch.Get "mentoring" ) }}
{{ range $name := $.Scratch.Get "ment" | shuffle }}
{{ $m := index $mentoring $name }}
{{ partial "mentoring/li.html" $m }}

{{ $data.Set "content" "" }}
{{ with $m.statement }}
{{ $data.Set "content" "<blockquote>" }}
{{ $data.Add "content" . }}
{{ $data.Add "content" "</blockquote>" }}
{{ end }}
{{ with $m.url }}
{{ $data.Add "content" (partial "funcs/read_more.html" . ) }}
{{ end }}

{{ with $m.mentee }}
{{ $data.Set "foot" (printf "<p>Mentee: %s</p>" . ) }}
{{ end }}
{{ with $m.mentor }}
{{ $data.Add "foot" (printf "<p>Mentor: %s</p>" . ) }}
{{ end }}

{{ $data.Set "img" "" }}
{{ with resources.GetMatch (printf "mentoring/%s" $m.img ) }}
{{ $img := . }}
{{ $img := $img.Fit "400x800" }}
{{ $data.Set "img" $img.Permalink }}
{{ end }}

{{ partial "funcs/card-expand.html" (dict "title" $m.chapter "img" ($data.Get "img") "size" "wide" "descr" ($data.Get "content") "category" $m.year "anim" false "foot" ( $data.Get "foot") "footcol" 2 )}}
{{ end }}
</div>
</ul>
</div>
{{ end }}


2 changes: 1 addition & 1 deletion themes/hugo-rladies/layouts/partials/footer/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<script>
$('.card-expand').hover(function() {
$(this).find('.card-expand-description').stop().animate({
$(this).find('.card-expand-animate').stop().animate({
height: "toggle",
opacity: "toggle"
}, 300);
Expand Down
11 changes: 5 additions & 6 deletions themes/hugo-rladies/layouts/partials/funcs/card-expand.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
{{ $image := $image | absURL }}
{{ $size := .size | default "medium" }}
{{ $footcol := .footcol | default 1 }}
{{ $id := .id }}
{{ $anim := .anim | default true }}


<li class="card-expand rounded card-{{ $size }} card" id="{{ $id | urlize }}">
<li class="card-expand rounded card-{{ $size }} card" {{ with .id }} id="{{ . | urlize }}" {{ end }} >
<div class="card-expand-img rounded-top">
<img src="{{ $image }}"/>
</div>
<div class="card-expand-content">
{{ with .category }}
<div class="card-expand-category rounded-right">{{ . }}</div>
<div class="card-expand-category rounded-right">{{ . | safeHTML }}</div>
{{ end }}
<h4 class="card-expand-title">
<a href="#{{ .id }}" class="name">{{ .title | safeHTML }}</a>
<a {{ with .id }} href="#{{ . }}" {{ end }} class="name">{{ .title | safeHTML }}</a>
</h4>
{{ with .subtitle }}
<h5 class="card-expand-subtitle">
{{ . | safeHTML }}
</h5>
{{ end }}
{{ with .descr }}
<div class="card-expand-description">
<div class="card-expand-description {{ if $anim }} card-expand-animate {{ end }}">
{{ . | safeHTML }}
</div>
{{ end }}
Expand Down
9 changes: 9 additions & 0 deletions themes/hugo-rladies/layouts/partials/funcs/read_more.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ $data := newScratch }}

{{ $data.Set "return" "<div class=\"read-more\">" }}
{{ $data.Add "return" (printf "<a href=\"%s\" class=\"read-more-link\">" . ) }}
{{ $data.Add "return" ( i18n "read_more" ) }}
{{ $data.Add "return" "</a></div>" }}

{{ return ( $data.Get "return") }}

4 changes: 1 addition & 3 deletions themes/hugo-rladies/layouts/partials/post/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ <h4 class="entry-title">
</header>
<div class="entry-content">
{{ .Summary }}
<div class="read-more">
<a href="{{ .RelPermalink }}" class="read-more-link">{{ i18n "read_more" }}</a>
</div>
{{ partial "funcs/read_more.html" .RelPermalink | safeHTML }}
</div>
</article>

0 comments on commit 5c7acb6

Please sign in to comment.