Skip to content

Commit

Permalink
Remove off-brand transitions and mobile UI breaking link
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Mar 26, 2024
1 parent c2dcbe0 commit 2e7c0c4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 39 deletions.
2 changes: 0 additions & 2 deletions src/tour.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,6 @@ const css_defaults_code = [css_syntax_highlight, css_scheme_atom_one]
/// Renders the navbar with common links
fn render_navbar() -> Html {
widgets.navbar(titled: "Gleam Language Tour", links: [
// TODO: find better label
Link(label: "Tour index", to: path_everything),
Link(label: "gleam.run", to: "http://gleam.run"),
])
}
Expand Down
38 changes: 15 additions & 23 deletions static/css/pages/everything.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ h3 {
height: var(--gap-triple);
top: 0;
background: var(--color-background);
transition: background 150ms linear 0s, color 150ms linear 0s;
transition:
background 150ms linear 0s,
color 150ms linear 0s;
z-index: 3;
}

Expand All @@ -144,7 +146,9 @@ h3 {
position: sticky;
top: var(--gap-triple);
background: var(--color-background);
transition: background 150ms linear 0s, color 150ms ease-out 0s;
transition:
background 150ms linear 0s,
color 150ms ease-out 0s;
color: var(--color-link);
z-index: 2;
padding: var(--gap) 0;
Expand All @@ -165,7 +169,9 @@ h3 {
margin-top: var(--gap-double);
position: relative;
background: var(--code-background);
transition: background 150ms linear 0s, box-shadow 150ms linear 0s;
transition:
background 150ms linear 0s,
box-shadow 150ms linear 0s;
box-shadow: var(--drop-shadow);
}

Expand Down Expand Up @@ -198,24 +204,6 @@ h3 {
transition: all 300ms ease-out 0s;
}

#everything-lessons .lesson-snippet-link:hover {
color: var(--color-link);
background: var(--color-background);
transition: all 150ms ease-in 0s;
outline-color: var(--color-accent);
}

#everything-lessons .snippet-link-icon {
color: var(--color-accent);
transition: color 150ms ease-in 0s;
font-weight: bold;
text-decoration: none;
}

#everything-lessons .lesson-snippet-link:hover .snippet-link-icon {
color: var(--color-accent-hot);
}

#everything-lessons hr {
width: 100%;
height: 1px;
Expand Down Expand Up @@ -260,7 +248,9 @@ h3 {
grid-column: 1 / span 2;
padding-left: calc(var(--gap) + var(--gap-quad) * 2);
transform: translateX(-100%);
transition: transform 300ms ease-in 0s, overflow-y 0s linear 600ms,
transition:
transform 300ms ease-in 0s,
overflow-y 0s linear 600ms,
background 150ms linear 0s;
z-index: 10;
overflow: unset;
Expand Down Expand Up @@ -300,7 +290,9 @@ h3 {
background: var(--color-background-dim);
z-index: 60;
opacity: 1;
transition: opacity 300ms ease-out 450ms, background 150ms linear,
transition:
opacity 300ms ease-out 450ms,
background 150ms linear,
color 150ms linear 0s;
pointer-events: all;
box-sizing: border-box;
Expand Down
20 changes: 6 additions & 14 deletions static/css/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ a code {
color: inherit;
}


/*
* Nav bar & Nav links
*/
Expand Down Expand Up @@ -165,21 +164,14 @@ html.theme-light .theme-button.-light {
color: var(--color-text-accent);
text-decoration: underline;
text-decoration-color: var(--color-accent-muted);
transition: background 150ms linear 0s, color 150ms ease-out 0s, text-decoration-color 150ms ease-out 0s;
}

.link:hover {
color: var(--color-link);
background: var(--color-accent-muted);
text-decoration-color: var(--color-accent);
}

.navbar .link:hover {
background: var(--color-accent-light);
text-decoration-color: var(--color-accent-hot);
transition:
background 150ms linear 0s,
color 150ms ease-out 0s,
text-decoration-color 150ms ease-out 0s;
}

.link.padded,
.navbar .link {
padding: calc(var(--gap-quarter) * 0.5) var(--gap-quarter) 0;
}
}

0 comments on commit 2e7c0c4

Please sign in to comment.