mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
Make the header layout better on phones
This commit is contained in:
parent
f275946b00
commit
5399ce0c96
2 changed files with 17 additions and 7 deletions
|
|
@ -140,7 +140,7 @@ hr {
|
||||||
header.primary {
|
header.primary {
|
||||||
background-color: #151515;
|
background-color: #151515;
|
||||||
color: #f7f7f7;
|
color: #f7f7f7;
|
||||||
padding: 0.8rem 2.5rem;
|
padding: 0.8rem 1.2rem;
|
||||||
border-bottom: solid 1px #888888;
|
border-bottom: solid 1px #888888;
|
||||||
box-shadow: 0 0 12px 2px #222;
|
box-shadow: 0 0 12px 2px #222;
|
||||||
}
|
}
|
||||||
|
|
@ -186,12 +186,18 @@ header.primary h4 a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
header.primary nav {
|
header.primary nav.local {
|
||||||
|
float: left;
|
||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header.primary nav.remote {
|
||||||
|
float: right;
|
||||||
|
margin-left: 1.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 35.5rem) {
|
@media (min-width: 35.5rem) {
|
||||||
header.primary nav {
|
header.primary nav.local {
|
||||||
float: right;
|
float: right;
|
||||||
clear: none;
|
clear: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,16 +43,20 @@ enum Template {
|
||||||
.br(),
|
.br(),
|
||||||
.h4(.text("By "), .a(.href(context.url(for: "about")), .text(context.site.author)))
|
.h4(.text("By "), .a(.href(context.url(for: "about")), .text(context.site.author)))
|
||||||
),
|
),
|
||||||
.nav(
|
.nav(.class("remote"),
|
||||||
.ul(
|
.ul(
|
||||||
.li(.a(.href(context.url(for: "about")), "About")),
|
|
||||||
.li(.a(.href(context.url(for: "posts")), "Archive")),
|
|
||||||
.li(.a(.href(context.url(for: "projects")), "Projects")),
|
|
||||||
.li(.class("mastodon"), .a(.attribute(named: "rel", value: "me"), .href("https://techhub.social/@sjs"), .i(.class("fab fa-mastodon")))),
|
.li(.class("mastodon"), .a(.attribute(named: "rel", value: "me"), .href("https://techhub.social/@sjs"), .i(.class("fab fa-mastodon")))),
|
||||||
.li(.class("github"), .a(.href("https://github.com/samsonjs"), .i(.class("fab fa-github")))),
|
.li(.class("github"), .a(.href("https://github.com/samsonjs"), .i(.class("fab fa-github")))),
|
||||||
.li(.class("rss"), .a(.href(context.url(for: "feed.xml")), .i(.class("fa fa-rss"))))
|
.li(.class("rss"), .a(.href(context.url(for: "feed.xml")), .i(.class("fa fa-rss"))))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
.nav(.class("local"),
|
||||||
|
.ul(
|
||||||
|
.li(.a(.href(context.url(for: "about")), "About")),
|
||||||
|
.li(.a(.href(context.url(for: "posts")), "Archive")),
|
||||||
|
.li(.a(.href(context.url(for: "projects")), "Projects"))
|
||||||
|
)
|
||||||
|
),
|
||||||
.div(.class("clearfix"))
|
.div(.class("clearfix"))
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue