Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-01-04 23:18:19 +01:00
parent a0f1799114
commit c2dbe618c7
25 changed files with 571 additions and 488 deletions

View File

@ -1,32 +0,0 @@
import { Component } from "react";
import { type } from "os";
import '../styl/styl.styl'
export enum ButtonType {
NORMAL = "",
OUTLINE = "outline",
GHOST = "ghost"
}
interface Props {
text: string
type?: ButtonType
// src: string
// alt?: string
// layout?: string
}
export default class DWButton extends Component<Props, {}> {
constructor(props: Props) {
super(props)
}
render() {
return (
<button className={this.props.type}>{this.props.text}</button>
)
}
}

View File

@ -39,7 +39,7 @@ export default class Element extends React.Component<Props, {}> {
const t = `${date.getDate()} ${months[date.getMonth()]} ${date.getFullYear()}`
return (
<div>
<Link href={this.props.link}>
<Link href="/[category]/[slug]" as={this.props.link}>
{this.props.image ? (
<a><img src={this.props.image} alt={this.props.alt}/></a>
) : (
@ -49,10 +49,10 @@ export default class Element extends React.Component<Props, {}> {
<i>Le {t}</i>
<span>
<Link href={this.props.link}>
<Link href="/[category]/[slug]" as={this.props.link}>
<a>{this.props.title}</a>
</Link>
<Link as={this.props.link} href="/[category]/[slug]">
<Link href="/[category]/[slug]" as={this.props.link}>
<a><ChevronRight size={48}/></a>
</Link>
</span>

View File

@ -2,6 +2,7 @@ import React from 'react'
import Link from 'next/link'
import '../styl/styl.styl'
import { ChevronRight, ChevronDown } from 'react-feather'
import config from '../config'
interface Props {
categories?: string[]
@ -106,7 +107,7 @@ export default class Filters extends React.Component<Props, States> {
display: block;
padding: 20px;
margin: 10px 0;
background: linear-gradient(90deg, #45CAFC 0%, #4285F4 92.19%);
background: linear-gradient(90deg, ${config.colors[400]} 0%, ${config.colors[600]} 92.19%);
color: white;
font-size: 24px;
text-transform: uppercase;

View File

@ -1,6 +1,7 @@
import React from 'react'
import { PhoneCall, Mail, GitHub, Twitter, Linkedin } from 'react-feather'
import Link from 'next/link'
import config from '../config'
interface Props {}
@ -17,19 +18,19 @@ export default class Footer extends React.Component<Props, States> {
<div className="footer">
<span>
<a href="mailto:contact@avior.me" target="_blank">
<Mail color="#4285F4" />
<Mail color={config.colors[500]} />
</a>
<a href="tel:+33672292683" target="_blank">
<PhoneCall color="#4285F4" />
<PhoneCall color={config.colors[500]} />
</a>
<a href="https://git.delta-wings.net" target="_blank">
<GitHub color="#4285F4" />
<GitHub color={config.colors[500]} />
</a>
<a href="https://twitter.com/aviortheking" target="_blank">
<Twitter color="#4285F4" />
<Twitter color={config.colors[500]} />
</a>
<a href="https://www.linkedin.com/in/florian-bouillon/" target="_blank">
<Linkedin color="#4285F4" />
<Linkedin color={config.colors[500]} />
</a>
</span>
</div>

View File

@ -1,4 +1,5 @@
import React from 'react'
import config from '../config'
interface Props {
}
@ -14,7 +15,7 @@ export default class Header extends React.Component<Props, {}> {
<style jsx>{`
div {
position: relative;
background: url('/clouds.svg'), linear-gradient(90deg, #45CAFC 0%, #4285F4 92.19%);
background: url('/clouds.svg'), linear-gradient(90deg, ${config.colors[400]} 0%, ${config.colors[600]} 92.19%);
background-repeat: repeat-x;
background-position: bottom;
min-height: 207px;

View File

@ -3,6 +3,7 @@ import Navbar from './Navbar'
import Menu from './Menu'
import Header from './Header'
import Footer from './Footer'
import config from '../config'
interface Props {
hasHeader?: boolean
@ -37,7 +38,7 @@ export default class Layout extends React.Component<Props, {}> {
height: 100%;
}
::selection {
background: #4285F4;
background: ${config.colors[500]};
color: #FFF;
}
body {

View File

@ -1,5 +1,6 @@
import React from 'react'
import Link from 'next/link'
import config from '../config'
interface Props {
}
@ -37,7 +38,7 @@ export default class Menu extends React.Component<Props, {}> {
}
a:hover {
background: #45CAFC20
background: ${config.colors[500]}20
}
`}</style>
</ul>

View File

@ -1,7 +1,7 @@
import React from 'react'
import { Menu } from 'react-feather'
import { timingSafeEqual } from 'crypto'
import Link from 'next/link'
import config from '../config'
interface Props {
height?: number
@ -36,6 +36,9 @@ export default class Navbar extends React.Component<Props, States> {
}
componentDidMount() {
if (window.location.origin !== config.domain) {
window.location.replace(`${config.domain}${window.location.pathname}`)
}
window.addEventListener('scroll', this.onScroll)
}
@ -103,7 +106,7 @@ export default class Navbar extends React.Component<Props, States> {
height: 10px;
margin: 0;
border: none;
background: linear-gradient(90deg, #45CAFC 0%, #4285F4 92.19%);
background: linear-gradient(90deg, ${config.colors[400]} 0%, ${config.colors[600]} 92.19%);
}
.menu {
opacity: 0;

View File

@ -16,6 +16,8 @@ export interface PostHeader {
date: Date
url?: string
tags?: string[]
modifiedDate?: Date
short?: string
}
export default class Post implements PostInterface {