Skip to content

Commit

Permalink
deploy: fcccad0
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-russo committed Sep 11, 2023
1 parent 3f5045d commit 5e242ae
Show file tree
Hide file tree
Showing 45 changed files with 5,397 additions and 2,736 deletions.
159 changes: 108 additions & 51 deletions 404.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion ayu-highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Original by Dempfi (https://github.com/dempfi/ayu)
overflow-x: auto;
background: #191f26;
color: #e6e1cf;
padding: 0.5em;
}

.hljs-comment,
Expand Down
380 changes: 239 additions & 141 deletions book.js

Large diffs are not rendered by default.

222 changes: 175 additions & 47 deletions css/chrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,67 @@

@import 'variables.css';

::-webkit-scrollbar {
background: var(--bg);
html {
scrollbar-color: var(--scrollbar) var(--bg);
}
::-webkit-scrollbar-thumb {
background: var(--scrollbar);
}

#searchresults a,
.content a:link,
a:visited,
a > .hljs {
color: var(--links);
}

/*
body-container is necessary because mobile browsers don't seem to like
overflow-x on the body tag when there is a <meta name="viewport"> tag.
*/
#body-container {
/*
This is used when the sidebar pushes the body content off the side of
the screen on small screens. Without it, dragging on mobile Safari
will want to reposition the viewport in a weird way.
*/
overflow-x: clip;
}

/* Menu Bar */

#menu-bar {
position: -webkit-sticky;
position: sticky;
top: 0;
#menu-bar,
#menu-bar-hover-placeholder {
z-index: 101;
margin: auto calc(0px - var(--page-padding));
}
#menu-bar > #menu-bar-sticky-container {
#menu-bar {
position: relative;
display: flex;
flex-wrap: wrap;
background-color: var(--bg);
border-bottom-color: var(--bg);
border-bottom-width: 1px;
border-bottom-style: solid;
}
.js #menu-bar > #menu-bar-sticky-container {
transition: none;
#menu-bar.sticky,
.js #menu-bar-hover-placeholder:hover + #menu-bar,
.js #menu-bar:hover,
.js.sidebar-visible #menu-bar {
position: -webkit-sticky;
position: sticky;
top: 0 !important;
}
#menu-bar-hover-placeholder {
position: sticky;
position: -webkit-sticky;
top: 0;
height: var(--menu-bar-height);
}
#menu-bar.bordered > #menu-bar-sticky-container {
#menu-bar.bordered {
border-bottom-color: var(--table-border-color);
}
#menu-bar i, #menu-bar .icon-button {
position: relative;
padding: 0 8px;
z-index: 10;
line-height: 50px;
line-height: var(--menu-bar-height);
cursor: pointer;
transition: color 0.5s;
}
Expand All @@ -63,12 +82,11 @@ a > .hljs {
margin: 0;
}

#print-button {
.right-buttons {
margin: 0 15px;
}

html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-container {
transform: translateY(-60px);
.right-buttons a {
text-decoration: none;
}

.left-buttons {
Expand All @@ -82,8 +100,8 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
.menu-title {
display: inline-block;
font-weight: 200;
font-size: 20px;
line-height: 50px;
font-size: 2.4rem;
line-height: var(--menu-bar-height);
text-align: center;
margin: 0;
flex: 1;
Expand Down Expand Up @@ -121,7 +139,7 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
text-decoration: none;

position: fixed;
top: 50px; /* Height of menu-bar */
top: 0;
bottom: 0;
margin: 0;
max-width: 150px;
Expand All @@ -132,10 +150,14 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
align-content: center;
flex-direction: column;

transition: color 0.5s;
transition: color 0.5s, background-color 0.5s;
}

.nav-chapters:hover { text-decoration: none; }
.nav-chapters:hover {
text-decoration: none;
background-color: var(--theme-hover);
transition: background-color 0.15s, color 0.15s;
}

.nav-wrapper {
margin-top: 50px;
Expand Down Expand Up @@ -173,11 +195,14 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
/* Inline code */

:not(pre) > .hljs {
display: inline-block;
vertical-align: middle;
display: inline;
padding: 0.1em 0.3em;
border-radius: 3px;
}

:not(pre):not(a) > .hljs {
color: var(--inline-code-color);
overflow-x: initial;
}

a:hover > .hljs {
Expand All @@ -190,24 +215,63 @@ pre {
pre > .buttons {
position: absolute;
z-index: 100;
right: 5px;
top: 5px;
right: 0px;
top: 2px;
margin: 0px;
padding: 2px 0px;

color: var(--sidebar-fg);
cursor: pointer;
visibility: hidden;
opacity: 0;
transition: visibility 0.1s linear, opacity 0.1s linear;
}
pre:hover > .buttons {
visibility: visible;
opacity: 1
}
pre > .buttons :hover {
color: var(--sidebar-active);
border-color: var(--icons-hover);
background-color: var(--theme-hover);
}
pre > .buttons i {
margin-left: 8px;
}
pre > .buttons button {
color: inherit;
background: transparent;
border: none;
cursor: inherit;
margin: 0px 5px;
padding: 3px 5px;
font-size: 14px;

border-style: solid;
border-width: 1px;
border-radius: 4px;
border-color: var(--icons);
background-color: var(--theme-popup-bg);
transition: 100ms;
transition-property: color,border-color,background-color;
color: var(--icons);
}
@media (pointer: coarse) {
pre > .buttons button {
/* On mobile, make it easier to tap buttons. */
padding: 0.3rem 1rem;
}
}
pre > code {
padding: 1rem;
}

/* FIXME: ACE editors overlap their buttons because ACE does absolute
positioning within the code block which breaks padding. The only solution I
can think of is to move the padding to the outer pre tag (or insert a div
wrapper), but that would require fixing a whole bunch of CSS rules.
*/
.hljs.ace_editor {
padding: 0rem 0rem;
}

pre > .result {
margin-top: 10px;
}
Expand Down Expand Up @@ -242,7 +306,7 @@ mark.fade-out {
width: 100%;
margin: 5px auto 0px auto;
padding: 10px 16px;
transition: none;
transition: box-shadow 300ms ease-in-out;
border: 1px solid var(--searchbar-border-color);
border-radius: 3px;
background-color: var(--searchbar-bg);
Expand Down Expand Up @@ -298,21 +362,46 @@ ul#searchresults span.teaser em {
top: 0;
bottom: 0;
width: var(--sidebar-width);
overflow-y: auto;
padding: 10px 10px;
font-size: 0.875em;
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
overscroll-behavior-y: contain;
background-color: var(--sidebar-bg);
color: var(--sidebar-fg);
}
.js .sidebar {
transition: none;
.sidebar-resizing {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.js:not(.sidebar-resizing) .sidebar {
transition: transform 0.3s; /* Animation: slide away */
}
.sidebar code {
line-height: 2em;
}
.sidebar .sidebar-scrollbox {
overflow-y: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 10px 10px;
}
.sidebar .sidebar-resize-handle {
position: absolute;
cursor: col-resize;
width: 0;
right: 0;
top: 0;
bottom: 0;
}
.js .sidebar .sidebar-resize-handle {
cursor: col-resize;
width: 5px;
}
.sidebar-hidden .sidebar {
transform: translateX(calc(0px - var(--sidebar-width)));
}
Expand All @@ -338,22 +427,57 @@ ul#searchresults span.teaser em {
padding-left: 0;
line-height: 2.2em;
}

.chapter ol {
width: 100%;
}

.chapter li {
display: flex;
color: var(--sidebar-non-existant);
}
.chapter li a {
color: var(--sidebar-fg);
display: block;
padding: 0;
text-decoration: none;
color: var(--sidebar-fg);
}
.chapter li a:hover { text-decoration: none }
.chapter li .active,
a:hover {
/* Animate color change */

.chapter li a:hover {
color: var(--sidebar-active);
}

.chapter li a.active {
color: var(--sidebar-active);
}

.chapter li > a.toggle {
cursor: pointer;
display: block;
margin-left: auto;
padding: 0 10px;
user-select: none;
opacity: 0.68;
}

.chapter li > a.toggle div {
transition: transform 0.5s;
}

/* collapse the section */
.chapter li:not(.expanded) + li > ol {
display: none;
}

.chapter li.chapter-item {
line-height: 1.5em;
margin-top: 0.6em;
}

.chapter li.expanded > a.toggle div {
transform: rotate(90deg);
}

.spacer {
width: 100%;
height: 3px;
Expand All @@ -379,7 +503,7 @@ a:hover {
.theme-popup {
position: absolute;
left: 10px;
top: 50px;
top: var(--menu-bar-height);
z-index: 1000;
border-radius: 4px;
font-size: 0.7em;
Expand All @@ -390,6 +514,8 @@ a:hover {
padding: 0;
list-style: none;
display: none;
/* Don't let the children's background extend past the rounded corners. */
overflow: hidden;
}
.theme-popup .default {
color: var(--icons);
Expand All @@ -398,7 +524,7 @@ a:hover {
width: 100%;
border: 0;
margin: 0;
padding: 2px 10px;
padding: 2px 20px;
line-height: 25px;
white-space: nowrap;
text-align: left;
Expand All @@ -410,8 +536,10 @@ a:hover {
.theme-popup .theme:hover {
background-color: var(--theme-hover);
}
.theme-popup .theme:hover:first-child,
.theme-popup .theme:hover:last-child {
border-top-left-radius: inherit;
border-top-right-radius: inherit;

.theme-selected::before {
display: inline-block;
content: "✓";
margin-left: -14px;
width: 14px;
}
Loading

0 comments on commit 5e242ae

Please sign in to comment.