Skip to content

Commit

Permalink
Improved Panel. Fixes #134
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgef committed Jan 5, 2024
1 parent 682851f commit f2909e4
Show file tree
Hide file tree
Showing 115 changed files with 12,733 additions and 6,638 deletions.
110 changes: 57 additions & 53 deletions docs/assets/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

157 changes: 68 additions & 89 deletions docs/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* Light */
--light-color-background: #f2f4f8;
--light-color-background-secondary: #eff0f1;
--light-color-warning-text: #222;
--light-color-background-warning: #e6e600;
--light-color-icon-background: var(--light-color-background);
--light-color-accent: #c5c7c9;
--light-color-text: #222;
Expand All @@ -21,6 +23,8 @@
/* Dark */
--dark-color-background: #2b2e33;
--dark-color-background-secondary: #1e2024;
--dark-color-background-warning: #bebe00;
--dark-color-warning-text: #222;
--dark-color-icon-background: var(--dark-color-background-secondary);
--dark-color-accent: #9096a2;
--dark-color-text: #f5f5f5;
Expand All @@ -42,6 +46,8 @@
:root {
--color-background: var(--light-color-background);
--color-background-secondary: var(--light-color-background-secondary);
--color-background-warning: var(--light-color-background-warning);
--color-warning-text: var(--light-color-warning-text);
--color-icon-background: var(--light-color-icon-background);
--color-accent: var(--light-color-accent);
--color-text: var(--light-color-text);
Expand All @@ -64,6 +70,8 @@
:root {
--color-background: var(--dark-color-background);
--color-background-secondary: var(--dark-color-background-secondary);
--color-background-warning: var(--dark-color-background-warning);
--color-warning-text: var(--dark-color-warning-text);
--color-icon-background: var(--dark-color-icon-background);
--color-accent: var(--dark-color-accent);
--color-text: var(--dark-color-text);
Expand Down Expand Up @@ -93,6 +101,8 @@ body {
:root[data-theme="light"] {
--color-background: var(--light-color-background);
--color-background-secondary: var(--light-color-background-secondary);
--color-background-warning: var(--light-color-background-warning);
--color-warning-text: var(--light-color-warning-text);
--color-icon-background: var(--light-color-icon-background);
--color-accent: var(--light-color-accent);
--color-text: var(--light-color-text);
Expand All @@ -113,6 +123,8 @@ body {
:root[data-theme="dark"] {
--color-background: var(--dark-color-background);
--color-background-secondary: var(--dark-color-background-secondary);
--color-background-warning: var(--dark-color-background-warning);
--color-warning-text: var(--dark-color-warning-text);
--color-icon-background: var(--dark-color-icon-background);
--color-accent: var(--dark-color-accent);
--color-text: var(--dark-color-text);
Expand All @@ -130,6 +142,11 @@ body {
--color-scheme: var(--dark-color-scheme);
}

.always-visible,
.always-visible .tsd-signatures {
display: inherit !important;
}

h1,
h2,
h3,
Expand Down Expand Up @@ -248,35 +265,6 @@ dd {
padding-left: 0;
}

ul.tsd-descriptions > li > :first-child,
.tsd-panel > :first-child,
.col-8 > :first-child,
.col-4 > :first-child,
ul.tsd-descriptions > li > :first-child > :first-child,
.tsd-panel > :first-child > :first-child,
.col-8 > :first-child > :first-child,
.col-4 > :first-child > :first-child,
ul.tsd-descriptions > li > :first-child > :first-child > :first-child,
.tsd-panel > :first-child > :first-child > :first-child,
.col-8 > :first-child > :first-child > :first-child,
.col-4 > :first-child > :first-child > :first-child {
margin-top: 0;
}
ul.tsd-descriptions > li > :last-child,
.tsd-panel > :last-child,
.col-8 > :last-child,
.col-4 > :last-child,
ul.tsd-descriptions > li > :last-child > :last-child,
.tsd-panel > :last-child > :last-child,
.col-8 > :last-child > :last-child,
.col-4 > :last-child > :last-child,
ul.tsd-descriptions > li > :last-child > :last-child > :last-child,
.tsd-panel > :last-child > :last-child > :last-child,
.col-8 > :last-child > :last-child > :last-child,
.col-4 > :last-child > :last-child > :last-child {
margin-bottom: 0;
}

@keyframes fade-in {
from {
opacity: 0;
Expand Down Expand Up @@ -495,10 +483,9 @@ blockquote {
.has-menu .col-menu {
visibility: visible;
transform: translate(0, 0);
display: grid;
align-items: center;
grid-template-rows: auto 1fr;
grid-gap: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.5rem;
max-height: 100vh;
padding: 1rem 2rem;
}
Expand Down Expand Up @@ -854,6 +841,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark {
padding-left: 5.5rem;
}

#tsd-sidebar-links a {
margin-top: 0;
margin-bottom: 0.5rem;
line-height: 1.25rem;
}
#tsd-sidebar-links a:last-of-type {
margin-bottom: 0;
}

a.tsd-index-link {
margin: 0.25rem 0;
font-size: 1rem;
Expand Down Expand Up @@ -914,7 +910,7 @@ a.tsd-index-link {
margin-right: 0.8rem;
}

@media (min-width: 1024px) {
@media (min-width: 1025px) {
.col-content {
margin: 2rem auto;
}
Expand Down Expand Up @@ -971,7 +967,7 @@ a.tsd-index-link {
margin: 2rem 0;
}
.tsd-panel-group.tsd-index-group details {
margin: 4rem 0;
margin: 2rem 0;
}

#tsd-search {
Expand Down Expand Up @@ -1007,7 +1003,8 @@ a.tsd-index-link {
right: -40px;
}
#tsd-search .field input,
#tsd-search .title {
#tsd-search .title,
#tsd-toolbar-links a {
transition: opacity 0.2s;
}
#tsd-search .results {
Expand Down Expand Up @@ -1051,7 +1048,8 @@ a.tsd-index-link {
top: 0;
opacity: 1;
}
#tsd-search.has-focus .title {
#tsd-search.has-focus .title,
#tsd-search.has-focus #tsd-toolbar-links a {
z-index: 0;
opacity: 0;
}
Expand All @@ -1065,6 +1063,22 @@ a.tsd-index-link {
display: block;
}

#tsd-toolbar-links {
position: absolute;
top: 0;
right: 2rem;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
#tsd-toolbar-links a {
margin-left: 1.5rem;
}
#tsd-toolbar-links a:hover {
text-decoration: underline;
}

.tsd-signature {
margin: 0 0 1rem 0;
padding: 1rem 0.5rem;
Expand All @@ -1073,9 +1087,6 @@ a.tsd-index-link {
font-size: 14px;
overflow-x: auto;
}
.tsd-panel > .tsd-signature {
border-width: 1px 0;
}

.tsd-signature-symbol {
color: var(--color-text-aside);
Expand All @@ -1090,60 +1101,16 @@ a.tsd-index-link {
.tsd-signatures {
padding: 0;
margin: 0 0 1em 0;
border: 1px solid var(--color-accent);
list-style-type: none;
}
.tsd-signatures .tsd-signature {
margin: 0;
border-width: 1px 0 0 0;
transition: background-color 0.1s;
}
.tsd-signatures .tsd-signature:first-child {
border-top-width: 0;
}
.tsd-signatures .tsd-signature.current {
background-color: var(--color-background-secondary);
}
.tsd-signatures.active > .tsd-signature {
cursor: pointer;
}
.tsd-panel > .tsd-signatures {
border-color: var(--color-accent);
border-width: 1px 0;
transition: background-color 0.1s;
}
.tsd-panel > a.anchor + .tsd-signatures {
border-top-width: 0;
margin-top: -20px;
}

ul.tsd-descriptions {
position: relative;
overflow: hidden;
padding: 0;
list-style: none;
}
ul.tsd-descriptions.active > .tsd-description {
display: none;
}
ul.tsd-descriptions.active > .tsd-description.current {
display: block;
}
ul.tsd-descriptions.active > .tsd-description.fade-in {
animation: fade-in-delayed 0.3s;
}
ul.tsd-descriptions.active > .tsd-description.fade-out {
animation: fade-out-delayed 0.3s;
position: absolute;
display: block;
top: 0;
left: 0;
right: 0;
opacity: 0;
visibility: hidden;
}
ul.tsd-descriptions h4,
ul.tsd-descriptions .tsd-index-panel h3,
.tsd-index-panel ul.tsd-descriptions h3 {
font-size: 16px;
margin: 1em 0 0.5em 0;
.tsd-description .tsd-signatures .tsd-signature {
border-width: 1px;
}

ul.tsd-parameter-list,
Expand Down Expand Up @@ -1200,6 +1167,7 @@ ul.tsd-type-parameter-list h5 {
display: flex;
justify-content: space-between;
height: 2.5rem;
margin: 0 auto;
}
.tsd-page-toolbar .table-cell {
position: relative;
Expand All @@ -1209,6 +1177,11 @@ ul.tsd-type-parameter-list h5 {
.tsd-page-toolbar .table-cell:first-child {
width: 100%;
}
.tsd-page-toolbar .tsd-toolbar-icon {
box-sizing: border-box;
line-height: 0;
padding: 12px 0;
}

.tsd-page-toolbar--hide {
transform: translateY(-100%);
Expand Down Expand Up @@ -1280,6 +1253,12 @@ img {
text-decoration: line-through;
}

.warning {
padding: 1rem;
color: var(--color-warning-text);
background: var(--color-background-warning);
}

* {
scrollbar-width: thin;
scrollbar-color: var(--color-accent) var(--color-icon-background);
Expand Down
Binary file removed docs/assets/widgets.png
Binary file not shown.
Binary file removed docs/assets/[email protected]
Binary file not shown.
Loading

0 comments on commit f2909e4

Please sign in to comment.