From c9d91b34597d051718e316d91cdd0d06adc3918d Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Thu, 16 Mar 2023 14:31:47 +0100 Subject: [PATCH] wip --- assets/sass/_theme/sections/papers.sass | 52 ++++---- layouts/papers/single.html | 18 +-- layouts/partials/papers/sidebar.html | 151 +++++++++++------------- 3 files changed, 100 insertions(+), 121 deletions(-) diff --git a/assets/sass/_theme/sections/papers.sass b/assets/sass/_theme/sections/papers.sass index 6e07beaa..9dbfd0aa 100644 --- a/assets/sass/_theme/sections/papers.sass +++ b/assets/sass/_theme/sections/papers.sass @@ -47,34 +47,34 @@ .papers__page - @include media-breakpoint-down(desktop) - .document-content - display: flex - flex-direction: column - aside - order: 2 - padding: 0 half($grid-gutter-sm) - @include media-breakpoint-up(desktop) - .paper-sidebar - @include container-margin-left - margin-top: 0 - top: 0 - left: 0 - height: 100% - position: absolute - width: col-outside-container(4) - > div - @include sticky($spacing1) - .toc-container - border-top: 1px solid $color-border - padding-top: $spacing1 - position: static - margin-left: 0 + // @include media-breakpoint-down(desktop) + // .document-content + // display: flex + // flex-direction: column + // aside + // order: 2 + // padding: 0 half($grid-gutter-sm) + // @include media-breakpoint-up(desktop) + // .paper-sidebar + // @include container-margin-left + // margin-top: 0 + // top: 0 + // left: 0 + // height: 100% + // position: absolute + // width: col-outside-container(4) + // > div + // @include sticky($spacing1) + // .toc-container + // border-top: 1px solid $color-border + // padding-top: $spacing1 + // position: static + // margin-left: 0 .document-content - // .container - // @include media-breakpoint-up(desktop) - // @include grid + .container + @include media-breakpoint-up(desktop) + @include grid .content @include media-breakpoint-up(desktop) grid-column: 5 / 12 diff --git a/layouts/papers/single.html b/layouts/papers/single.html index ce1e57e3..23f997ab 100644 --- a/layouts/papers/single.html +++ b/layouts/papers/single.html @@ -12,21 +12,11 @@ {{ partial "papers/sidebar.html" . }} <div class="container"> - - <div class="blocks"> - <div class="block"> - <div class="container"> - <div class="block-content"> - {{ partial "papers/abstract.html" . }} - {{ partial "papers/authors.html" . }} - {{ partial "papers/body.html" . }} - {{ partial "papers/references.html" . }} - </div> - </div> - </div> - </div> + {{ partial "papers/abstract.html" . }} + {{ partial "papers/authors.html" . }} + {{ partial "papers/body.html" . }} + {{ partial "papers/references.html" . }} {{ partial "blocks/list.html" . }} - </div> </div> diff --git a/layouts/partials/papers/sidebar.html b/layouts/partials/papers/sidebar.html index 9b1e9ff7..e2faae70 100644 --- a/layouts/partials/papers/sidebar.html +++ b/layouts/partials/papers/sidebar.html @@ -1,82 +1,71 @@ -<div class="paper-sidebar"> - <div> - <aside> - <dl> - {{ range .GetTerms "volumes" }} - <dt>{{ i18n "volumes.singular_name" }}</dt> - <dd itemprop="isPartOf" itemscope itemtype="https://schema.org/PublicationVolume"> - <a href="{{ .Permalink }}" itemprop="url"> - <span itemprop="name">{{ .Title }}</span> - <div class="media"> - {{- if .Params.image -}} - {{- partial "commons/image.html" - (dict - "image" .Params.image - "alt" .Title - "mobile" "327x388" - "tablet" "208x247" - "desktop" "408x485" - ) -}} - {{- else if site.Params.default_image.url -}} - {{- partial "commons/image-default.html" (dict "class" "img-fluid") -}} - {{- end -}} - </div> - </a> - </dd> - {{ end }} - - {{ if isset .Params "type" }} - <dt>{{ i18n "volumes.nature" }}</dt> - <dd>{{ partial "PrepareHTML" .Params.Type }}</dd> - {{ end }} +<aside class="document-nav"> + <dl> + {{ range .GetTerms "volumes" }} + <dt>{{ i18n "volumes.singular_name" }}</dt> + <dd itemprop="isPartOf" itemscope itemtype="https://schema.org/PublicationVolume"> + <a href="{{ .Permalink }}" itemprop="url"> + <span itemprop="name">{{ .Title }}</span> + <div class="media"> + {{- if .Params.image -}} + {{- partial "commons/image.html" + (dict + "image" .Params.image + "alt" .Title + "mobile" "327x388" + "tablet" "208x247" + "desktop" "408x485" + ) -}} + {{- else if site.Params.default_image.url -}} + {{- partial "commons/image-default.html" (dict "class" "img-fluid") -}} + {{- end -}} + </div> + </a> + </dd> + {{ end }} - {{ if isset .Params "keywords" }} - {{ if gt ( len .Params.keywords ) 0 }} - <dt>{{ i18n "volumes.keywords" }}</dt> - <dd itemprop="keywords">{{ delimit .Params.Keywords " " }}</dd> - {{ end }} - {{ end }} - - {{ if isset .Params "lang" }} - <dt>{{ i18n "commons.language" }}</dt> - <dd itemprop="inLanguage" content="{{ .Params.Lang_iso }}">{{ .Params.Lang }}</dd> - {{ end }} - - {{ if .Date }} - <dt>{{ i18n "commons.date" }}</dt> - <dd> - <time itemprop="datePublished" datetime="{{ .Date | time.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time> - </dd> - {{ end }} - - {{ with .Params.dates.published }} - <dt>{{ i18n "papers.dates.published" }}</dt> - <dd> - <time itemprop="datePublished" datetime="{{ . | time.Format "2006-01-02T15:04" }}">{{ . | time.Format ":date_long" }}</time> - </dd> - {{ end }} - - {{ with .Params.dates.accepted }} - <dt>{{ i18n "papers.dates.accepted" }}</dt> - <dd> - <time itemprop="datePublished" datetime="{{ . | time.Format "2006-01-02T15:04" }}">{{ . | time.Format ":date_long" }}</time> - </dd> - {{ end }} - - {{ with .Params.dates.received }} - <dt>{{ i18n "papers.dates.received" }}</dt> - <dd> - <time itemprop="datePublished" datetime="{{ . | time.Format "2006-01-02T15:04" }}">{{ . | time.Format ":date_long" }}</time> - </dd> - {{ end }} - </dl> - </aside> - - {{ partial "toc/container.html" - (dict - "toc" "toc/default.html" - "context" . - ) - }} - </div> -</div> + {{ if isset .Params "type" }} + <dt>{{ i18n "volumes.nature" }}</dt> + <dd>{{ partial "PrepareHTML" .Params.Type }}</dd> + {{ end }} + + {{ if isset .Params "keywords" }} + {{ if gt ( len .Params.keywords ) 0 }} + <dt>{{ i18n "volumes.keywords" }}</dt> + <dd itemprop="keywords">{{ delimit .Params.Keywords " " }}</dd> + {{ end }} + {{ end }} + + {{ if isset .Params "lang" }} + <dt>{{ i18n "commons.language" }}</dt> + <dd itemprop="inLanguage" content="{{ .Params.Lang_iso }}">{{ .Params.Lang }}</dd> + {{ end }} + + {{ if .Date }} + <dt>{{ i18n "commons.date" }}</dt> + <dd> + <time itemprop="datePublished" datetime="{{ .Date | time.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time> + </dd> + {{ end }} + + {{ with .Params.dates.published }} + <dt>{{ i18n "papers.dates.published" }}</dt> + <dd> + <time itemprop="datePublished" datetime="{{ . | time.Format "2006-01-02T15:04" }}">{{ . | time.Format ":date_long" }}</time> + </dd> + {{ end }} + + {{ with .Params.dates.accepted }} + <dt>{{ i18n "papers.dates.accepted" }}</dt> + <dd> + <time itemprop="datePublished" datetime="{{ . | time.Format "2006-01-02T15:04" }}">{{ . | time.Format ":date_long" }}</time> + </dd> + {{ end }} + + {{ with .Params.dates.received }} + <dt>{{ i18n "papers.dates.received" }}</dt> + <dd> + <time itemprop="datePublished" datetime="{{ . | time.Format "2006-01-02T15:04" }}">{{ . | time.Format ":date_long" }}</time> + </dd> + {{ end }} + </dl> +</aside> \ No newline at end of file -- GitLab