mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
ui: rework sidebar heading
This commit is contained in:
@@ -113,7 +113,7 @@ export const ExpandIcon = styled(Expand)`
|
||||
|
||||
export const ExpandResources = styled.div`
|
||||
padding-right: 15px;
|
||||
margin: 20px 0;
|
||||
margin-bottom: 20px;
|
||||
`
|
||||
|
||||
export const ExpandResourcesHeader = styled.div`
|
||||
@@ -130,13 +130,13 @@ export const ExpandResourcesHeader = styled.div`
|
||||
`
|
||||
|
||||
export const StyledResourceList = styled.div`
|
||||
padding-top: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
overflow: hidden;
|
||||
|
||||
& + & {
|
||||
padding-top: 16px;
|
||||
margin-top: 16px;
|
||||
border-top: 1px solid
|
||||
${(props) => transparentize(0.8, props.theme.sidebar.foreground)};
|
||||
|
||||
@@ -25,13 +25,17 @@ export const Sidebar: FC<PropsWithChildren<HTMLAttributes<HTMLDivElement>>> = (
|
||||
return (
|
||||
<SC.SidebarWrapper {...restProps}>
|
||||
<Scrollbar>
|
||||
<SC.Title to="/">
|
||||
The
|
||||
<br />
|
||||
Programmer's
|
||||
<br />
|
||||
Hangout
|
||||
</SC.Title>
|
||||
<SC.Header to="/">
|
||||
<SC.Logo>
|
||||
<SC.StyledLogo />
|
||||
</SC.Logo>
|
||||
<SC.Title>
|
||||
The Programmer's
|
||||
<br />
|
||||
Hangout
|
||||
</SC.Title>
|
||||
</SC.Header>
|
||||
|
||||
<SC.Inner>
|
||||
{children}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Link } from "gatsby"
|
||||
import styled, { css } from "styled-components"
|
||||
import { transparentize } from "polished"
|
||||
import { fontFamily } from "../../design/typography"
|
||||
import TPHLogo from "../../images/tph-logo.svg"
|
||||
|
||||
export const SidebarWrapper = styled.div`
|
||||
box-sizing: border-box;
|
||||
@@ -29,21 +30,43 @@ export const SidebarWrapper = styled.div`
|
||||
}
|
||||
`
|
||||
|
||||
export const Title = styled(Link)`
|
||||
display: block;
|
||||
color: ${(props) => props.theme.sidebar.foreground};
|
||||
font-size: 30px;
|
||||
line-height: 34px;
|
||||
font-weight: 700;
|
||||
padding: 20px 0 0 20px;
|
||||
export const Header = styled(Link)`
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
text-decoration: none;
|
||||
font-family: ${fontFamily.header};
|
||||
|
||||
&:hover {
|
||||
&:hover > * {
|
||||
opacity: 0.85;
|
||||
}
|
||||
`
|
||||
|
||||
export const Logo = styled.div`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #0b0f13;
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
flex: 0 0 74px;
|
||||
`
|
||||
|
||||
export const StyledLogo = styled(TPHLogo)`
|
||||
height: 50px;
|
||||
`
|
||||
|
||||
export const Title = styled.div`
|
||||
background: #263440;
|
||||
display: flex;
|
||||
flex: 1 0 auto;
|
||||
align-items: center;
|
||||
color: ${(props) => transparentize(0.1, props.theme.sidebar.foreground)};
|
||||
font-size: 20px;
|
||||
line-height: 24px;
|
||||
font-weight: 700;
|
||||
padding-left: 20px;
|
||||
font-family: ${fontFamily.header};
|
||||
`
|
||||
|
||||
export const Inner = styled.div`
|
||||
padding: 20px 0 30px 20px;
|
||||
`
|
||||
|
||||
@@ -30,12 +30,12 @@ export const darkTheme: ITheme = {
|
||||
...baseColors,
|
||||
name: "dark",
|
||||
sidebar: {
|
||||
background: "#22323f",
|
||||
background: "#19222A",
|
||||
foreground: "#FFFFFF",
|
||||
active: "#00FCFF",
|
||||
},
|
||||
main: {
|
||||
background: "#16212b",
|
||||
background: "#202C36",
|
||||
foreground: "#FFFFFF",
|
||||
link: "#04B0A6",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user