Skip to content

Commit

Permalink
Merge pull request #56 from noesya/style/organization
Browse files Browse the repository at this point in the history
organization
  • Loading branch information
alexisben authored Dec 28, 2022
2 parents 3ddf76e + f161dca commit 33f07a9
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 21 deletions.
1 change: 0 additions & 1 deletion assets/sass/_theme/_configuration.sass
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ $breadcrumb-color: $hero-color !default
$breadcrumb-icon: "caret-right" !default
$breadcrumb-icon-color: $color-text-alt !default


// Icons
$icons: ()
$icons: map-merge($icons, ("arrow": "\e905"))
Expand Down
12 changes: 12 additions & 0 deletions assets/sass/_theme/design-system/typography.sass
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,30 @@ small, .small

@mixin blockquote
margin: 0
font-family: $quote-font-family
font-size: $quote-size
font-weight: $quote-weight
font-style: $quote-style
line-height: $quote-line-height
@include media-breakpoint-up(desktop)
font-size: $quote-size-desktop-long
cite
font-size: px2rem(18)
font-style: normal

blockquote, .blockquote
@include blockquote
font-style: italic

p
margin-top: 0
margin-bottom: 0
+ p
margin-top: $spacing0

p:empty
display: none

p + ul
margin-top: 0

Expand Down
67 changes: 56 additions & 11 deletions assets/sass/_theme/sections/organizations.sass
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,59 @@
margin-top: $spacing2

.organizations__page
.content
margin-top: $spacing2
@include grid(2, md)
.media
max-width: 200px
.contacts-list
padding-left: 0
li
list-style-type: none
span
display: block
.document-content
padding-bottom: $spacing3
.organization-meta
.logo
figcaption
text-align: right
@include meta
margin-bottom: $spacing0
picture
aspect-ratio: 1/1
background: $color-background-alt
display: block
padding: $spacing2
margin-bottom: half($spacing0)
img
width: 100%
height: 100%
object-fit: contain
object-position: center
.contacts-list
@include list-reset
padding-left: 0
text-align: right
margin-top: $spacing1
li
list-style-type: none
+ li
margin-top: $spacing1
span
@include meta
display: block
@include media-breakpoint-down(desktop)
.document-content
.organization-meta
margin-top: $spacing3
.logo
display: flex
justify-content: space-between
picture
width: 66.6%
.contacts-list
li
display: flex
justify-content: space-between
align-items: baseline

@include media-breakpoint-up(desktop)
.document-content
> .container
display: flex
justify-content: space-between
gap: $grid-gutter
[itemprop="articleBody"]
width: col(8)
.organization-meta
width: col(3)
2 changes: 2 additions & 0 deletions i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ formats:
zip: Compressed archive
gz: Compressed archive
tar: Compressed archive
organizations:
logo: Logo
page_not_found: 404 page not found
pages:
details: Details
Expand Down
2 changes: 2 additions & 0 deletions i18n/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ formats:
zip: Compressed archive
gz: Compressed archive
tar: Compressed archive
organizations:
logo: Logo
page_not_found: 404 page non trouvée
pages:
details: En détail
Expand Down
19 changes: 13 additions & 6 deletions layouts/organizations/single.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{{ define "main" }}
{{ partial "organizations/hero.html" . }}

<div class="document-content container">
<div class="content">
<div>
<div class="document-content">

{{ partial "toc/container.html"
(dict
"toc" "toc/default.html"
"context" .
)
}}

<div class="container">
{{ partial "organizations/content.html" . }}
<div class="organization-meta">
{{ partial "organizations/logo.html" . }}
</div>
<div>
{{ partial "organizations/content.html" . }}
{{ partial "organizations/contacts.html" . }}
</div>
</div>
{{ partial "blocks/list.html" . }}
</div>
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/organizations/content.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if (partial "GetTextFromHTML" .Content) }}
<div itemprop="articleBody">
<div itemprop="articleBody" class="rich-text">
{{
partial "PrepareHTML" (
partial "H2AddId" .Content
Expand Down
5 changes: 3 additions & 2 deletions layouts/partials/organizations/logo.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- if .Params.logo -}}
<div class="media">
<figure class="logo">
<figcaption>{{ i18n "organizations.logo" }}</figcaption>
{{- partial "commons/image.html"
(dict
"image" .Params.logo
Expand All @@ -8,5 +9,5 @@
"tablet" "196"
"desktop" "396"
) -}}
</div>
</figure>
{{- end -}}

0 comments on commit 33f07a9

Please sign in to comment.