-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated todo page (now issues)
we now display issues as todo, bug, fix etc. with leasot removed old TODO.md created component Label and Issue closes #12, closes #14
- Loading branch information
Marvin Heilemann
committed
Feb 5, 2020
1 parent
cf962d0
commit afaeb88
Showing
11 changed files
with
179 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
|
||
import { Link } from '../elements/Link' | ||
import Time from './Time' | ||
import Label from './Label' | ||
import { MDXRenderer } from 'gatsby-plugin-mdx' | ||
import DataType from './DataType' | ||
|
||
const Issue = ({ | ||
data: { | ||
tag, | ||
ref, | ||
modifiedTime, | ||
line, | ||
text, | ||
value, | ||
file: { relativePath }, | ||
}, | ||
}) => { | ||
const fileUrl = `https://github.com/muuvmuuv/portfolio/blob/master/${relativePath}` | ||
|
||
return ( | ||
<div className="issue"> | ||
<div className="issue__header"> | ||
<Label className="issue__label" text={tag} type={tag} /> | ||
<span className="issue__ref">({ref ? ref : <DataType type="null" />})</span> | ||
<span className="issue__separator">@</span> | ||
<Link className="issue__link" href={fileUrl} title={`Go to file`}> | ||
{relativePath}#{line} | ||
</Link> | ||
<Time className="issue__modified" date={modifiedTime} format="LLL" /> | ||
</div> | ||
<div className="issue__body"> | ||
<MDXRenderer>{value || text}</MDXRenderer> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
const Label = ({ text, type, className }) => { | ||
return <span className={`label label--${type.toLowerCase()} ${className}`}>{text}</span> | ||
} | ||
|
||
export default Label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: 'Privacy' | ||
--- | ||
|
||
Is in its makink. If you need informations, feel free to contact me via email (go to | ||
imprint). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.issue { | ||
margin-bottom: var(--spacing-sm); | ||
padding-bottom: var(--spacing-sm); | ||
|
||
&:not(:first-of-type) { | ||
border-bottom: 1px solid var(--divider-color); | ||
} | ||
|
||
&__header { | ||
display: grid; | ||
grid-template-areas: | ||
'label label ref time' | ||
'sep link link link'; | ||
grid-template-columns: auto auto auto 1fr; | ||
align-items: center; | ||
margin-bottom: var(--spacing-xs); | ||
column-gap: var(--spacing-xxs); | ||
user-select: none; | ||
font-feature-settings: 'case' 1; | ||
|
||
@include breakpoint-up(md) { | ||
grid-template-areas: 'label ref sep link time'; | ||
grid-template-columns: auto auto auto 1fr; | ||
} | ||
} | ||
|
||
&__label { | ||
grid-area: label; | ||
} | ||
|
||
&__ref { | ||
grid-area: ref; | ||
margin-top: 1px; | ||
color: var(--text-color-medium); | ||
font-size: var(--text-sm); | ||
} | ||
|
||
&__separator { | ||
grid-area: sep; | ||
color: var(--text-color-medium); | ||
cursor: default; | ||
} | ||
|
||
&__link { | ||
grid-area: link; | ||
} | ||
|
||
&__modified { | ||
grid-area: time; | ||
|
||
@include breakpoint-up(md) { | ||
justify-self: end; | ||
} | ||
} | ||
|
||
// we need to reset these because we are in an <Article /> | ||
&__body p { | ||
margin-bottom: 0; | ||
text-align: left; | ||
} | ||
} |
Oops, something went wrong.