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