Update to the page content header

This commit is contained in:
Gabe Kangas
2022-08-16 17:49:21 -07:00
parent fa1c680f6e
commit 6ffe720d90
10 changed files with 197 additions and 167 deletions

View File

@@ -0,0 +1,57 @@
.root {
position: relative;
display: grid;
}
.buttonsLogoTitleSection {
// margin-left: 1.5vw;
// margin-right: 1.5vw;
}
.row {
margin-bottom: 7px;
}
.logoTitleSection {
display: flex;
@media (max-width: 768px) {
flex-direction: column;
.logo {
margin-left: auto;
margin-right: auto;
margin-bottom: 10px;
}
}
}
.titleSection {
display: flex;
flex-direction: column;
.title {
font-size: 32px;
font-weight: bold;
color: black;
text-transform: uppercase;
line-height: 30px;
}
.subtitle {
font-size: 24px;
font-weight: 400;
line-height: 22px;
color: var(--theme-text-secondary);
}
}
.tagList {
font-family: var(--theme-text-display-font-family);
color: var(--theme-text-primary);
span {
display: inline-block;
margin-right: 8px;
font-size: 14px;
font-weight: 300;
}
}

View File

@@ -0,0 +1,36 @@
import cn from 'classnames';
import { ServerLogo } from '../../ui';
import SocialLinks from '../../ui/SocialLinks/SocialLinks';
import { SocialLink } from '../../../interfaces/social-link.model';
import s from './ContentHeader.module.scss';
interface Props {
name: string;
title: string;
summary: string;
tags: string[];
links: SocialLink[];
logo: string;
}
export default function ContentHeader({ name, title, summary, logo, tags, links }: Props) {
return (
<div className={s.root}>
<div className={s.logoTitleSection}>
<div className={s.logo}>
<ServerLogo src={logo} />
</div>
<div className={s.titleSection}>
<div className={cn(s.title, s.row)}>{name}</div>
<div className={cn(s.subtitle, s.row)}>{title || summary}</div>
<div className={cn(s.tagList, s.row)}>
{tags.length > 0 && tags.map(tag => <span key={tag}>#{tag}&nbsp;</span>)}
</div>
<div className={cn(s.socialLinks, s.row)}>
<SocialLinks links={links} />
</div>
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1 @@
export { default } from './ContentHeader';