Skip to content

Commit

Permalink
Merge pull request #65 from noesya/fix/chapo
Browse files Browse the repository at this point in the history
replace chapo by summary
  • Loading branch information
alexisben authored Jan 11, 2023
2 parents 74258a5 + 693f894 commit 7dcdb97
Show file tree
Hide file tree
Showing 47 changed files with 61 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.block-chapo
.block-summary
@include in-page-without-sidebar
padding-top: 0
margin-top: $spacing3
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/_theme/hugo-osuny.sass
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

// Blocks
@import "blocks/base"
@import "blocks/chapo"
@import "blocks/datatable"
@import "blocks/call_to_action"
@import "blocks/chapter"
Expand All @@ -46,6 +45,7 @@
@import "blocks/partners"
@import "blocks/posts"
@import "blocks/programs"
@import "blocks/summary"
@import "blocks/testimonials"
@import "blocks/timeline"
@import "blocks/video"
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
}}

{{ partial "pages/chapo.html" (dict
{{ partial "pages/summary.html" (dict
"context" .
"block_wrapped" true
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
}}

{{ partial "pages/chapo.html" (dict
{{ partial "pages/summary.html" (dict
"context" .
"block_wrapped" true
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/administrators/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="document-content">

{{ partial "persons/chapo.html" (dict
{{ partial "persons/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/authors/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="document-content">

{{ partial "persons/chapo.html" (dict
{{ partial "persons/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/categories/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
)
}}

{{ partial "posts/chapo.html" (dict
{{ partial "posts/summary.html" (dict
"context" .
"block_wrapped" true
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/diplomas/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="document-content">

{{ partial "diplomas/chapo.html" (dict
{{ partial "diplomas/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}}
{{- end -}}

{{ partial "home/chapo.html" (dict
{{ partial "home/summary.html" (dict
"block_wrapped" true
"context" .
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/organizations/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<div class="container">
<div itemprop="articleBody" class="rich-text">
{{ partial "pages/chapo.html" (dict
{{ partial "pages/summary.html" (dict
"context" .
) }}

Expand Down
2 changes: 1 addition & 1 deletion layouts/pages/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
}}

{{ partial "pages/chapo.html" (dict
{{ partial "pages/summary.html" (dict
"context" .
"block_wrapped" true
) }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/blocks/templates/organization_chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ <h1 class="name" itemprop="name">
<p itemprop="jobTitle">
{{- if (partial "GetTextFromHTML" .role) }}
{{ partial "PrepareHTML" .role }}
{{- else if partial "GetTextFromHTML" $person.Params.description_short }}
{{- partial "PrepareHTML" $person.Params.description_short -}}
{{- else if partial "GetTextFromHTML" $person.Params.summary }}
{{- partial "PrepareHTML" $person.Params.summary -}}
{{ else if (partial "GetTextFromHTML" $person.Content) }}
{{- partial "GetTruncateContent" ( dict "text" $person.Content ) -}}
{{ end -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/blocks/templates/pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
{{ end }}
{{ if site.Params.pages.list.truncate_description }}
{{- $main_description = partial "GetTruncateContent" ( dict
"text" .Params.description_short
"text" .Params.summary
"length" site.Params.pages.list.truncate_description
) -}}
{{ else }}
{{- $main_description = partial "PrepareHTML" .Params.description_short -}}
{{- $main_description = partial "PrepareHTML" .Params.summary -}}
{{ end }}
{{ end -}}

Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/blocks/templates/pages/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ <h1>
</a>
</h1>

{{ if and $show_descriptions .Params.description_short }}
{{ if and $show_descriptions .Params.summary }}
{{ if site.Params.pages.list.truncate_description }}
<p>{{ partial "GetTruncateContent" ( dict
"text" .Params.description_short
"text" .Params.summary
"length" site.Params.pages.list.truncate_description
) }}</p>
{{ else }}
<p>{{ partial "PrepareHTML" .Params.description_short }}</p>
<p>{{ partial "PrepareHTML" .Params.summary }}</p>
{{ end }}
{{ end }}

Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/blocks/templates/pages/grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ <h1>
{{- partial "PrepareHTML" .Title -}}
</a>
</h1>
{{ if and $show_descriptions .Params.description_short }}
{{ if and $show_descriptions .Params.summary }}
{{ if site.Params.pages.list.truncate_description }}
<p>{{ partial "GetTruncateContent" ( dict
"text" .Params.description_short
"text" .Params.summary
"length" site.Params.pages.list.truncate_description
) }}</p>
{{ else }}
<p>{{ partial "PrepareHTML" .Params.description_short }}</p>
<p>{{ partial "PrepareHTML" .Params.summary }}</p>
{{ end }}
{{ end }}
{{ if $show_images }}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/blocks/templates/posts/highlight.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ <h1 itemprop="headline"><a href="{{ .Permalink }}" title="{{ safeHTML (i18n "com
{{ if site.Params.posts.list.show_categories }}
{{- partial "posts/categories" . -}}
{{ end }}
{{- if (partial "GetTextFromHTML" .Params.description_short) -}}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
{{ if site.Params.posts.list.truncate_description }}
<p itemprop="articleBody">{{ partial "GetTruncateContent" ( dict
"text" .Params.description_short
"text" .Params.summary
"length" site.Params.posts.list.truncate_description
) }}</p>
{{ else }}
<p itemprop="articleBody">{{ partial "PrepareHTML" .Params.description_short }}</p>
<p itemprop="articleBody">{{ partial "PrepareHTML" .Params.summary }}</p>
{{ end }}
{{- end -}}
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time>
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/categories/chapo.html

This file was deleted.

1 change: 1 addition & 0 deletions layouts/partials/categories/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{{- $text := (partial "GetTextFromHTML" .context.Params.description_short) -}}
{{- $text := (partial "GetTextFromHTML" .context.Params.summary) -}}

{{- if $text -}}

{{- if .block_wrapped -}}
<section class="block block-chapo">
<section class="block block-summary">
<div class="container">
<div class="block-content">
{{- else if .with_container -}}
<div class="container">
{{- end -}}

<p class="lead">
{{ partial "PrepareHTML" .context.Params.description_short }}
{{ partial "PrepareHTML" .context.Params.summary }}
</p>

{{- if .block_wrapped -}}
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/diplomas/chapo.html

This file was deleted.

2 changes: 1 addition & 1 deletion layouts/partials/diplomas/diplomas.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</a>
<div class="content">
<div class="description">
{{- partial "PrepareHTML" .Params.description_short -}}
{{- partial "PrepareHTML" .Params.summary -}}
</div>

<ol class="programs">
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/diplomas/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
4 changes: 2 additions & 2 deletions layouts/partials/head/seo.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{- $seoDescription := "" -}}
{{- if .Params.description -}}
{{- $seoDescription = partial "PrepareHTML" .Params.description -}}
{{- else if .Params.description_short -}}
{{- $seoDescription = partial "PrepareHTML" .Params.description_short -}}
{{- else if .Params.summary -}}
{{- $seoDescription = partial "PrepareHTML" .Params.summary -}}
{{- else if .Content -}}
{{- $seoDescription = partial "GetTruncateContent" ( dict "text" .Content ) -}}
{{- else if .Params.legacy_text -}}
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/home/chapo.html

This file was deleted.

1 change: 1 addition & 0 deletions layouts/partials/home/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
1 change: 0 additions & 1 deletion layouts/partials/organizations/chapo.html

This file was deleted.

1 change: 1 addition & 0 deletions layouts/partials/organizations/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
1 change: 0 additions & 1 deletion layouts/partials/pages/chapo.html

This file was deleted.

4 changes: 2 additions & 2 deletions layouts/partials/pages/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
{{- partial "PrepareHTML" .Title -}}
</a>
{{- partial "PrepareHTML" (printf "</%s>" $heading) -}}
{{- if .Params.description_short }}
<p>{{ partial "PrepareHTML" .Params.description_short }}</p>
{{- if .Params.summary }}
<p>{{ partial "PrepareHTML" .Params.summary }}</p>
{{ end -}}
</div>
</article>
1 change: 1 addition & 0 deletions layouts/partials/pages/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
1 change: 0 additions & 1 deletion layouts/partials/persons/chapo.html

This file was deleted.

4 changes: 2 additions & 2 deletions layouts/partials/persons/list-item.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<li itemscope itemtype="https://schema.org/Person">
<p itemprop="name"><a href="{{ .Permalink }}">{{ partial "PrepareHTML" .Title }}</a></p>
{{- if partial "GetTextFromHTML" .Params.description_short }}
<p itemprop="jobTitle">{{- partial "PrepareHTML" .Params.description_short -}}</p>
{{- if partial "GetTextFromHTML" .Params.summary }}
<p itemprop="jobTitle">{{- partial "PrepareHTML" .Params.summary -}}</p>
{{ end -}}
</li>
4 changes: 2 additions & 2 deletions layouts/partials/persons/person.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="description">
{{- $title := partial "PrepareHTML" .Title }}
<p class="name"><a href="{{ .Permalink }}">{{- $title -}}</a></p>
{{- if partial "GetTextFromHTML" .Params.description_short }}
<p>{{- partial "PrepareHTML" .Params.description_short -}}</p>
{{- if partial "GetTextFromHTML" .Params.summary }}
<p>{{- partial "PrepareHTML" .Params.summary -}}</p>
{{ else if (partial "GetTextFromHTML" .Content) }}
<p>{{- partial "GetTruncateContent" ( dict "text" .Content ) -}}</p>
{{ end -}}
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/persons/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
1 change: 0 additions & 1 deletion layouts/partials/posts/chapo.html

This file was deleted.

6 changes: 3 additions & 3 deletions layouts/partials/posts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1 itemprop="headline"><a href="{{ .Permalink }}" title="{{ safeHTML (i18n "com
{{ if $.Site.Params.posts.list.show_categories }}
{{- partial "posts/categories" . -}}
{{ end }}
{{- if (partial "GetTextFromHTML" .Params.description_short) -}}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
{{ if $.Site.Params.posts.list.truncate_description }}
<p itemprop="articleBody">{{ partial "GetTruncateContent" ( dict
"text" .Params.description_short
"text" .Params.summary
"length" $.Site.Params.posts.list.truncate_description
) }}</p>
{{ else }}
<p itemprop="articleBody">{{ partial "PrepareHTML" .Params.description_short }}</p>
<p itemprop="articleBody">{{ partial "PrepareHTML" .Params.summary }}</p>
{{ end }}
{{- end -}}

Expand Down
1 change: 1 addition & 0 deletions layouts/partials/posts/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
1 change: 0 additions & 1 deletion layouts/partials/programs/chapo.html

This file was deleted.

2 changes: 1 addition & 1 deletion layouts/partials/programs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"context" .
)
}}
{{ partial "programs/chapo.html" (dict
{{ partial "programs/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/programs/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{- end -}}
{{- end -}}

{{ partial "programs/chapo.html" (dict
{{ partial "programs/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/programs/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "commons/summary.html" . -}}
10 changes: 5 additions & 5 deletions layouts/persons/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
)
}}

{{ $chapo_block := false }}
{{ $summary_block := false }}
{{ if .Params.blocks }}
{{ if gt (len .Params.blocks) 1 }}
{{ $chapo_block = true }}
{{ $summary_block = true }}
{{ end }}
{{ end }}

{{ partial "persons/chapo.html" (dict
{{ partial "persons/summary.html" (dict
"context" .
"with_container" (not $chapo_block)
"block_wrapped" $chapo_block
"with_container" (not $summary_block)
"block_wrapped" $summary_block
) }}

<div class="container">
Expand Down
4 changes: 2 additions & 2 deletions layouts/persons/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

<div class="informations">
<div>
{{ if (partial "GetTextFromHTML" .Params.description_short) }}
{{ if (partial "GetTextFromHTML" .Params.summary) }}
<div class="lead" itemprop="description">
{{ partial "PrepareHTML" .Params.description_short }}
{{ partial "PrepareHTML" .Params.summary }}
</div>
{{ end }}
{{ if (partial "GetTextFromHTML" .Content) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/posts/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="document-content">
{{ partial "commons/list-content.html" . }}

{{ partial "posts/chapo.html" (dict
{{ partial "posts/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<meta itemprop="headline" content="{{ partial "PrepareHTML" .Title }}">
<meta itemprop="url" content="{{ .Permalink }}">
{{ if .Date }}<meta itemprop="datePublished" content="{{ .Date.Format "2006-01-02T15:04" }}">{{ end }}
{{ if .Params.description_short }}<meta itemprop="abstract" content="{{ partial "PrepareHTML" .Params.description_short }}">{{ end }}
{{ if .Params.summary }}<meta itemprop="abstract" content="{{ partial "PrepareHTML" .Params.summary }}">{{ end }}
{{ if .Summary }}<meta itemprop="description" content="{{ partial "PrepareHTML" .Summary }}">{{ end }}

{{ partial "posts/sidebar.html" . }}

{{ partial "posts/chapo.html" (dict
{{ partial "posts/summary.html" (dict
"context" .
"block_wrapped" true
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/researchers/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="document-content">

{{ partial "persons/chapo.html" (dict
{{ partial "persons/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/teachers/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="document-content">

{{ partial "persons/chapo.html" (dict
{{ partial "persons/summary.html" (dict
"with_container" true
"context" .
) }}
Expand Down

0 comments on commit 7dcdb97

Please sign in to comment.