Skip to content

Commit

Permalink
update theme version v0.4.0 to v0.4.3 (#110)
Browse files Browse the repository at this point in the history
Signed-off-by: Jongseob Jeon <[email protected]>

Co-authored-by: Jongseob Jeon <[email protected]>
  • Loading branch information
Aiden-Jeon and Jongseob Jeon authored May 23, 2022
1 parent fe4f456 commit 689b749
Show file tree
Hide file tree
Showing 19 changed files with 1,437 additions and 2,864 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (c) 2018-present, Gridsome
Copyright 2021-presetn MLOps for ALL
Copyright (c) 2020-present, Henk Verlinde

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 0 additions & 2 deletions archetypes/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ weight: 50
images: ["{{ .Name | urlize }}.jpg"]
contributors: []
---

{{< img src="{{ .Name | urlize }}.jpg" alt="{{ replace .Name "-" " " | title }}" caption="{{ replace .Name "-" " " | title }}" class="wide" >}}
2 changes: 0 additions & 2 deletions archetypes/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ menu:
weight: 999
toc: true
---

{{< img src="{{ .Name | urlize }}.jpg" alt="{{ replace .Name "-" " " | title }}" caption="{{ replace .Name "-" " " | title }}" >}}
10 changes: 10 additions & 0 deletions archetypes/docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Docs"
description: ""
lead: ""
date: 2022-01-25T14:40:56+01:00
lastmod: 2022-01-25T14:40:56+01:00
draft: false
images: []
type: docs
---
10 changes: 10 additions & 0 deletions archetypes/docs/lorem/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Lorem"
description: ""
lead: ""
date: 2022-01-25T14:41:21+01:00
lastmod: 2022-01-25T14:41:21+01:00
draft: false
images: []
type: docs
---
15 changes: 15 additions & 0 deletions archetypes/docs/lorem/ipsum/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "Ipsum"
description: ""
lead: ""
date: 2022-01-25T14:41:39+01:00
lastmod: 2022-01-25T14:41:39+01:00
draft: false
images: []
type: docs
menu:
{{ .Section }}:
parent: "lorem"
weight: 100
toc: true
---
14 changes: 0 additions & 14 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +0,0 @@
// Adds scroll position lock for default docs sidebar

if (document.querySelector('#sidebar-default') !== null) {
let sidebar = document.getElementById('sidebar-default');

let pos = sessionStorage.getItem('sidebar-scroll');
if (pos !== null) {
sidebar.scrollTop = parseInt(pos, 10);
}

window.addEventListener('beforeunload', () => {
sessionStorage.setItem('sidebar-scroll', sidebar.scrollTop);
});
}
13 changes: 5 additions & 8 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Source:
{{ $list := (where .Site.Pages "Section" "docs") -}}
{{ $len := (len $list) -}}

index.add(
{{ range $index, $element := $list -}}
{{ range $index, $element := $list -}}
index.add(
{
id: {{ $index }},
href: "{{ .RelPermalink }}",
Expand All @@ -109,12 +109,9 @@ Source:
description: {{ .Summary | plainify | jsonify }},
{{ end -}}
content: {{ .Plain | jsonify }}
})
{{ if ne (add $index 1) $len -}}
.add(
{{ end -}}
{{ end -}}
;
}
);
{{ end -}}

search.addEventListener('input', show_results, true);

Expand Down
14 changes: 14 additions & 0 deletions assets/js/scroll-lock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Adds scroll position lock for default docs sidebar

if (document.querySelector('#sidebar-default') !== null) {
let sidebar = document.getElementById('sidebar-default');

let pos = sessionStorage.getItem('sidebar-scroll');
if (pos !== null) {
sidebar.scrollTop = parseInt(pos, 10);
}

window.addEventListener('beforeunload', () => {
sessionStorage.setItem('sidebar-scroll', sidebar.scrollTop);
});
}
19 changes: 15 additions & 4 deletions assets/scss/common/_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -528,20 +528,31 @@ $navbar-dark-active-color: $link-color-dark;
}
}

[data-dark-mode] .dropdown-menu.dropdown-menu-main {
[data-dark-mode] .dropdown-menu {
background: $body-overlay-dark;
}

[data-dark-mode] .dropdown-menu-main .dropdown-item {
[data-dark-mode] .dropdown-menu .dropdown-item {
color: $body-color-dark;
}

[data-dark-mode] .dropdown-menu-main .dropdown-item:hover {
[data-dark-mode] .dropdown-menu .dropdown-item:hover {
color: $link-color-dark;
background: $body-bg-dark;
}

[data-dark-mode] .dropdown-menu-main .dropdown-item.active {
[data-dark-mode] .dropdown-menu .dropdown-item.active,
[data-dark-mode] .dropdown-menu .dropdown-item:focus {
color: $link-color-dark;
background: $body-bg-dark;
}

[data-dark-mode] .doks-navbar .dropdown-item.current,
[data-dark-mode] .doks-subnavbar .dropdown-item.current {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23dee2e6' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 1rem top 0.6rem;
background-size: 0.75rem 0.75rem;
}

[data-dark-mode] details {
Expand Down
6 changes: 6 additions & 0 deletions assets/scss/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ pre {
width: 100%;
}

@include media-breakpoint-up(md) {
.dropdown-menu.dropdown-menu-main {
width: auto;
}
}

.dropdown-menu-main .dropdown-item {
color: inherit;
font-size: $font-size-base;
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/components/_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ details summary {

summary {
list-style: none;
display: inline;
display: inline-block;
width: calc(100% + 2rem);
margin: -0.5rem -1rem 0;
padding: 0.5rem 0.75rem;
Expand Down
1 change: 0 additions & 1 deletion assets/scss/layouts/_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

.anchor {
visibility: hidden;
padding-left: 0.5rem;
}

h1:hover a,
Expand Down
5 changes: 4 additions & 1 deletion layouts/partials/footer/script-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
{{ $slice = $slice | append $katexConfig -}}
{{ end -}}

{{ $scrollLock := resources.Get "js/scroll-lock.js" | js.Build -}}
{{ $slice = $slice | append $scrollLock -}}

{{ $js := $slice | resources.Concat "main.js" -}}

{{ if eq (hugo.Environment) "development" -}}
Expand Down Expand Up @@ -102,4 +105,4 @@
{{ if and (.Site.Params.options.flexSearch) (eq .Section "docs") -}}
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}}
{{ end -}}
{{ end -}}
2 changes: 1 addition & 1 deletion layouts/partials/header/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
</button>

<div class="offcanvas offcanvas-start border-0 py-md-1" tabindex="-1" id="offcanvasDoks" data-bs-backdrop="true" aria-labelledby="offcanvasDoksLabel">
<div class="offcanvas offcanvas-end border-0 py-md-1" tabindex="-1" id="offcanvasDoks" data-bs-backdrop="true" aria-labelledby="offcanvasDoksLabel">
<div class="header-bar d-md-none"></div>
<div class="offcanvas-header d-md-none">
<h2 class="h5 offcanvas-title ps-2" id="offcanvasDoksLabel"><a class="text-dark" href="{{ "/" | relLangURL }}">{{ .Site.Params.Title }}</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/sidebar/auto-collapsible-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ $currentPage := . -}}
{{ $section := $currentPage.Section -}}
{{ range (where .Site.Sections "Section" "in" $section) }}
{{ range .Sections.Reverse }}
{{ range .Sections.ByWeight.Reverse }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<li class="mb-1">
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
Expand Down
10 changes: 5 additions & 5 deletions layouts/partials/sidebar/auto-default-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ $currentPage := . -}}
{{ $section := $currentPage.Section -}}
{{ range (where .Site.Sections "Section" "in" $section) }}
{{ range .Sections.Reverse }}
{{ range .Sections.ByWeight.Reverse }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3>
<ul class="list-unstyled">
Expand All @@ -18,20 +18,20 @@ <h5 class="h6 text-uppercase mt-2 mb-2">{{ .Title }}</h5>
<ul class="list-unstyled ms-3">
{{ range .Pages }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ else }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
</ul>
{{ else }}
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ end }}
Loading

0 comments on commit 689b749

Please sign in to comment.