Skip to content

Commit

Permalink
chore: improve popup width
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Oct 11, 2024
1 parent 9b33292 commit ed2842c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ <h1 data-toc-skip>{{ page.title }}</h1>
</button>

<dialog id="toc-popup" class="p-0">
<div class="header d-flex flex-row align-items-center justify-content-between ps-4">
<div class="label text-truncate py-2">{{- page.title -}}</div>
<div class="header d-flex flex-row align-items-center justify-content-between">
<div class="label text-truncate py-2 ms-4">{{- page.title -}}</div>
<button id="toc-popup-close" type="button" class="btn btn-link">
<i class="fas fa-close fa-fw"></i>
</button>
Expand Down
6 changes: 5 additions & 1 deletion _sass/layout/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ header {
min-width: 20rem;
font-size: 1.05rem;

@media all and (min-width: 576px) {
max-width: 32rem;
}

&[open] {
-webkit-animation: $slide-in;
animation: $slide-in;
Expand All @@ -414,7 +418,6 @@ header {

.label {
font-family: $font-family-heading;
max-width: 25rem;
}
}

Expand Down Expand Up @@ -469,6 +472,7 @@ header {
#toc-popup-content {
overflow: auto;
max-height: calc(100vh - 4 * $topbar-height);
font-family: $font-family-heading;
}
}

Expand Down

0 comments on commit ed2842c

Please sign in to comment.