1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-01 21:47:46 +00:00

Scroll the top bar when can't show it all, make the scrollbar at the top

This commit is contained in:
RGBCube 2024-01-09 13:11:32 +03:00
parent 7873a98fb0
commit f346f35166
No known key found for this signature in database
2 changed files with 15 additions and 12 deletions

View file

@ -27,11 +27,13 @@ pub fn create(title: Option<&str>, page: Page, body: &Markup) -> Markup {
html! { html! {
.not-flex { .not-flex {
nav { nav {
.content {
a.home href="/" { "HOME" } a.home href="/" { "HOME" }
a.about href="/about" { "ABOUT" } a.about href="/about" { "ABOUT" }
a.blog href="/blog" { "BLOG" } a.blog href="/blog" { "BLOG" }
a.contact href="/contact" { "CONTACT" } a.contact href="/contact" { "CONTACT" }
} }
}
(body) (body)

View file

@ -9,7 +9,7 @@ body {
.not-flex { .not-flex {
font-size: large; font-size: large;
word-break: break-all; overflow-x: hidden;
display: initial; display: initial;
width: min(100vw - 1em, 50em); width: min(100vw - 1em, 50em);
@ -17,17 +17,22 @@ body {
margin: 0 1em; margin: 0 1em;
} }
.content,
nav {
transform: rotateX(180deg);
}
nav { nav {
font-size: larger; font-size: larger;
word-break: normal; word-break: normal;
overflow-x: hidden; overflow-x: auto;
background-color: white; background-color: white;
padding: .3em .6em; padding: .3em .6em;
border-bottom-left-radius: 1em; border-top-left-radius: 1em;
border-bottom-right-radius: 1em; border-top-right-radius: 1em;
} }
nav a { nav a {
@ -36,10 +41,6 @@ nav a {
margin-right: .6em; margin-right: .6em;
} }
nav a:last-child {
margin-right: 0;
}
a { a {
color: yellow; color: yellow;
} }