Skip to content

Commit

Permalink
Merge pull request #243 from noi-techpark/anchor_links_videos
Browse files Browse the repository at this point in the history
Anchor links videos
  • Loading branch information
dulvui authored Jul 11, 2024
2 parents 8444284 + 6d04877 commit 027240a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
6 changes: 4 additions & 2 deletions src/themes/odh-fbe/layouts/events/video-library/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{{ partial "title.html" .Params }}

{{ range site.Data.videos.sections }}
<a id="{{ .title }}"></a>
<section class="py-3">
<div class="container py-3">
<h3
Expand All @@ -19,8 +18,11 @@
aria-expanded="{{ .initially_expanded }}"
aria-controls="video-list-{{ sha1 .title }}"
class="d-inline video-section-title"
id="{{ .title | anchorize }}"
>
{{ .title | markdownify }}
<a href="#{{ .title | anchorize }}" class="anchor-link">
{{ .title | markdownify }}
</a>
<i class="fa fa-caret-up ms-1" aria-hidden="true"></i>
</h3>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/themes/odh-fbe/layouts/partials/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

{{ range .Site.Params.plugins.js}}
<script src="{{ .URL | absURL }}"></script>
{{ end }}
{{ end }}
36 changes: 20 additions & 16 deletions src/themes/odh-fbe/layouts/partials/video-text.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,26 @@
*/}}

{{"<!-- Double Column Imgs - Text -->" | safeHTML }}
<section class="imgs-icon-text">
<div class="container">
<div class="row gy-4 justify-content-between align-items-center py-4">
<div class="col-12 col-lg-4 m-lg-0 d-flex justify-content-center">
{{ partial "video-iframe.html" . }}
</div>
<div class="col-12 col-lg-6 m-lg-0">
{{ with .subtitle }}<span class="fw-semibold fs-5">{{ . | markdownify }}</span>{{ end }}
<h2 class="mt-2">{{ .title | markdownify }}</h2>
<p>{{ .description | markdownify }}</p>
<section class="imgs-icon-text" id="{{ .title | anchorize }}">
<div class="container">
<div class="row gy-4 justify-content-between align-items-center py-4">
<div class="col-12 col-lg-4 m-lg-0 d-flex justify-content-center">
{{ partial "video-iframe.html" . }}
</div>
<div class="col-12 col-lg-6 m-lg-0">
{{ with .subtitle }}<span class="fw-semibold fs-5">{{ . | markdownify }}</span>{{ end }}
<h2 class="mt-2">
<a href="#{{ .title | anchorize }}" class="anchor-link">
{{ .title | markdownify }}
</a>
</h2>
<p>{{ .description | markdownify }}</p>

{{ if and (isset . "btn_link") (isset . "btn_label") }}
<a {{ if .target_blank }}target="_blank"{{ end }} href="{{.btn_link}}" class="btn btn-primary">{{ .btn_label | markdownify }}</a>
{{ end }}
</div>
</div>
</div>
{{ if and (isset . "btn_link") (isset . "btn_label") }}
<a {{ if .target_blank }}target="_blank"{{ end }} href="{{.btn_link}}" class="btn btn-primary">{{ .btn_label | markdownify }}</a>
{{ end }}
</div>
</div>
</div>
</section>
{{"<!-- /Double Column Imgs - Text -->" | safeHTML }}

0 comments on commit 027240a

Please sign in to comment.