Skip to content

Commit

Permalink
Merge pull request #567 from gethinode/develop
Browse files Browse the repository at this point in the history
Refine layout
  • Loading branch information
markdumay authored Oct 18, 2023
2 parents a08cdee + 918c043 commit 3a1e310
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 9 deletions.
1 change: 1 addition & 0 deletions assets/scss/app-dart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
@import "common/variables-dark.scss";

// Import Hinode theme styles
@import "components/abbr.scss";
@import "components/alert.scss";
@import "components/blockquote.scss";
@import "components/breadcrumb.scss";
Expand Down
1 change: 1 addition & 0 deletions assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import "common/variables-dark.scss";

// Import Hinode theme styles
@import "components/abbr.scss";
@import "components/alert.scss";
@import "components/blockquote.scss";
@import "components/breadcrumb.scss";
Expand Down
22 changes: 22 additions & 0 deletions assets/scss/components/_abbr.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@media (hover: none) {
abbr[title] {
position: relative;
text-decoration: underline dotted;
}

abbr[title]:hover::after,
abbr[title]:focus::after {
content: attr(title);
position: absolute;
left: 0;
bottom: -30px;
width: auto;
white-space: nowrap;
background-color: var(--bs-body-bg);
color: var(--bs-tooltip-color);
border-radius: 3px;
box-shadow: 1px 1px 5px 0 rgba(0,0,0,0.4);
font-size: 14px;
padding: 3px 5px;
}
}
4 changes: 4 additions & 0 deletions assets/scss/components/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
.toc-button {
--bs-btn-color: var(--bs-body-color);
--bs-btn-border-color: var(--bs-body-color);

&:hover {
background-color: transparent;
}
}

#toc-collapse {
Expand Down
1 change: 0 additions & 1 deletion exampleSite/hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@
"g-4",
"gap-1",
"gap-2",
"gap-3",
"gradient",
"h-100",
"h1",
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>

<div class="d-none-light">
<div class="hstack gap-3">
<div class="hstack gap-1">
{{ range (.GetTerms "tags") -}}
{{- $url := (path.Join .Page.RelPermalink) | relLangURL -}}
{{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "primary" "size" "sm" "outline" "true") }}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/assets/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<li class="nav-item dropdown {{ if $collapsed }}d-{{ $size }}-none{{ else }}d-none d-{{ $size }}-block{{ end }}">
<a class="nav-link dropdown-toggle" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "colorMode" }}" aria-expanded="false" id="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
<span class="theme-icon-active">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }}</span>{{ if $collapsed }} {{ T "colorMode" }} {{ end }}
<span class="theme-icon-active">{{- partial "assets/icon.html" (dict "icon" "fas sun fa-fw") }}</span>{{ if $collapsed }}&nbsp;{{ T "colorMode" }} {{ end }}
<span class="d-md-none"></span>
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="{{ $id }}-theme{{ if $collapsed }}-collapsed{{ end }}">
Expand Down Expand Up @@ -300,10 +300,10 @@
{{- $currentLang := $page.Language.Lang -}}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle d-{{ $size }}-none" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }} {{ T "languageSwitcherLabel" }}
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }}&nbsp;{{ T "languageSwitcherLabel" }}&nbsp;
</a>
<a class="nav-link dropdown-toggle d-none d-{{ $size }}-block" href="#!" role="button" data-bs-toggle="dropdown" aria-label="{{ T "languageSwitcherLabel" }}" aria-expanded="false">
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" false) }}
{{- partial "assets/icon.html" (dict "icon" "fas globe fa-fw" "spacing" true) }}
</a>
<ul class="dropdown-menu dropdown-menu-end ">
{{- if $page.IsTranslated -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/abbr.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
{{ end }}

{{ if not $error }}
<abbr {{ with $class }}class="{{ . }}"{{ end }} title="{{ $title }}">{{ $key }}</abbr>
<abbr {{ with $class }}class="{{ . }}"{{ end }} title="{{ $title }}" tabindex="0">{{ $key }}</abbr>
{{ end }}
{{ end }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.21.0-alpha4",
"version": "0.21.0-alpha5",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
Expand Down

0 comments on commit 3a1e310

Please sign in to comment.