ui(resources): tweak resource page for mobile

This commit is contained in:
Jean-Philippe Sirois
2019-09-04 21:21:01 -04:00
parent 9202824d44
commit 1a717cda18
3 changed files with 25 additions and 2 deletions
@@ -4,6 +4,11 @@ import styled from "styled-components"
export const ResourceBreadcrumbWrapper = styled.div` export const ResourceBreadcrumbWrapper = styled.div`
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
@media screen and (max-width: 767px) {
flex-wrap: wrap;
margin-bottom: 16px;
}
` `
export const LinkWrapper = styled.div` export const LinkWrapper = styled.div`
+2 -2
View File
@@ -65,9 +65,9 @@ export function ResourceHeader({
<SC.Title>{title}</SC.Title> <SC.Title>{title}</SC.Title>
<SC.Top> <SC.Top>
<StackedAvatars authors={authors} />
<SC.Meta> <SC.Meta>
{authors.length} contributor{authors.lenght > 1 && "s"} <StackedAvatars authors={authors} /> {authors.length} contributor
{authors.lenght > 1 && "s"}
</SC.Meta> </SC.Meta>
<SC.Meta>{dateToHuman}</SC.Meta> <SC.Meta>{dateToHuman}</SC.Meta>
<SC.Meta> <SC.Meta>
+18
View File
@@ -11,6 +11,11 @@ export const ResourceHeaderWrapper = styled.div`
export const Top = styled.div` export const Top = styled.div`
display: flex; display: flex;
align-items: center; align-items: center;
@media screen and (max-width: 767px) {
flex-direction: column;
align-items: flex-start;
}
` `
export const Title = styled.h1` export const Title = styled.h1`
@@ -22,10 +27,23 @@ export const Title = styled.h1`
` `
export const Meta = styled.div` export const Meta = styled.div`
display: flex;
align-items: center;
& + &::before { & + &::before {
content: "•"; content: "•";
margin: 0 8px; margin: 0 8px;
} }
@media screen and (max-width: 767px) {
& + & {
margin-top: 8px;
}
& + &::before {
display: none;
}
}
` `
const ExtraLinks = styled.div` const ExtraLinks = styled.div`