Remove everything
This commit is contained in:
parent
807f399e50
commit
8c66901bda
|
@ -1,6 +0,0 @@
|
|||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
public/
|
||||
.git/
|
||||
.cache/
|
|
@ -1,34 +0,0 @@
|
|||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
# Matches multiple files with brace expansion notation
|
||||
# Set default charset
|
||||
[*.{js,py}]
|
||||
charset = utf-8
|
||||
|
||||
# 4 space indentation
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# Tab indentation (no size specified)
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
# Indentation override for all JS under lib directory
|
||||
[lib/**.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Matches the exact files either package.json or .travis.yml
|
||||
[{package.json,.travis.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"standard",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "babel-eslint",
|
||||
"plugins": [
|
||||
"babel",
|
||||
"react"
|
||||
],
|
||||
"rules": {
|
||||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
|
||||
}
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '16 19 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
|
@ -1,72 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Typescript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# dotenv environment variable files
|
||||
.env*
|
||||
|
||||
# gatsby files
|
||||
.cache/
|
||||
public
|
||||
|
||||
# Mac files
|
||||
.DS_Store
|
||||
|
||||
# Yarn
|
||||
yarn-error.log
|
||||
.pnp/
|
||||
.pnp.js
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# Custom
|
||||
/content
|
|
@ -1,4 +0,0 @@
|
|||
.cache
|
||||
package.json
|
||||
package-lock.json
|
||||
public
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"arrowParens": "avoid",
|
||||
"semi": false
|
||||
}
|
14
LICENSE
14
LICENSE
|
@ -1,14 +0,0 @@
|
|||
The BSD Zero Clause License (0BSD)
|
||||
|
||||
Copyright (c) 2020 Gatsby Inc.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,8 +0,0 @@
|
|||
# Personal Website
|
||||
|
||||
This is a source code for my personal website. It's implemented using Gatsby.js
|
||||
|
||||
## TODO
|
||||
|
||||
* Light theme
|
||||
* Remove Google Fonts CDN
|
|
@ -1,12 +0,0 @@
|
|||
FROM node:16-alpine as front
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./ /app/
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn run build
|
||||
|
||||
FROM nginx:1.17.8-alpine
|
||||
RUN rm -rf /usr/share/nginx/html
|
||||
COPY --from=front /app/public/ /usr/share/nginx/html
|
||||
COPY ./docker/default.conf /etc/nginx/conf.d/default.conf
|
|
@ -1,21 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
index index.html;
|
||||
autoindex off;
|
||||
charset urtf-8;
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
location ~* \.(html)$ {
|
||||
add_header Cache-Control "no-store";
|
||||
expires off;
|
||||
}
|
||||
|
||||
rewrite ^([^.\?]*[^/])$ $1/ permanent;
|
||||
|
||||
try_files $uri $uri/ $uri/index.html =404;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
/**
|
||||
* Implement Gatsby's Browser APIs in this file.
|
||||
*
|
||||
* See: https://www.gatsbyjs.org/docs/browser-apis/
|
||||
*/
|
||||
|
||||
// You can delete this file if you're not using it
|
|
@ -1,72 +0,0 @@
|
|||
module.exports = {
|
||||
siteMetadata: {
|
||||
author: `Matúš Námešný`,
|
||||
user: "hello",
|
||||
hostname: "namesny.com",
|
||||
email: "matus@namesny.com",
|
||||
social: [
|
||||
{
|
||||
name: "github",
|
||||
link: "https://github.com/LordMathis",
|
||||
},
|
||||
{
|
||||
name: "linkedin",
|
||||
link: "https://www.linkedin.com/in/mat%C3%BA%C5%A1-n%C3%A1me%C5%A1n%C3%BD-3903b6128/",
|
||||
}
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `pages`,
|
||||
path: `${__dirname}/content/pages`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-transformer-remark`,
|
||||
options: {
|
||||
filter: node => node.sourceInstanceName === `pages`,
|
||||
type: `MarkdownPage`
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `posts`,
|
||||
path: `${__dirname}/content/posts/`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-transformer-remark`,
|
||||
options: {
|
||||
filter: node => node.sourceInstanceName === `posts`,
|
||||
excerpt_separator: `<!-- end -->`,
|
||||
type: `BlogPost`
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `images`,
|
||||
path: `${__dirname}/src/images`,
|
||||
},
|
||||
},
|
||||
`gatsby-transformer-sharp`,
|
||||
`gatsby-plugin-sharp`,
|
||||
`gatsby-plugin-react-helmet`,
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: `gatsby-starter-default`,
|
||||
short_name: `starter`,
|
||||
start_url: `/`,
|
||||
background_color: `#663399`,
|
||||
theme_color: `#663399`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/images/favicon-32x32.png`, // This path is relative to the root of the site.
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-sass`,
|
||||
],
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
const path = require(`path`)
|
||||
const { createFilePath } = require(`gatsby-source-filesystem`)
|
||||
|
||||
exports.onCreateNode = ({ node, getNode, actions }) => {
|
||||
const { createNodeField } = actions
|
||||
if (node.internal.type === `MarkdownRemark`) {
|
||||
const slug = createFilePath({ node, getNode, basePath: `pages` })
|
||||
const parent = getNode(node.parent)
|
||||
createNodeField({
|
||||
node,
|
||||
name: `slug`,
|
||||
value: slug,
|
||||
})
|
||||
createNodeField({
|
||||
node,
|
||||
name: 'collection',
|
||||
value: parent.sourceInstanceName,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
exports.createPages = async ({ graphql, actions, reporter }) => {
|
||||
const { createPage } = actions
|
||||
|
||||
// Posts query
|
||||
const posts = await graphql(
|
||||
`
|
||||
{
|
||||
allMarkdownRemark(filter:{frontmatter: {draft: {ne: true}}, fields: {collection: {eq: "posts"}}}) {
|
||||
edges {
|
||||
node {
|
||||
fields {
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
)
|
||||
|
||||
// Handle errors
|
||||
if (posts.errors) {
|
||||
reporter.panicOnBuild(`Error while running GraphQL query.`)
|
||||
return
|
||||
}
|
||||
|
||||
// Create pages for each markdown file.
|
||||
const blogPostTemplate = path.resolve(`src/templates/blog-post.js`)
|
||||
posts.data.allMarkdownRemark.edges.forEach(({ node }) => {
|
||||
createPage({
|
||||
path: `/posts${node.fields.slug}`,
|
||||
component: blogPostTemplate,
|
||||
context: {
|
||||
slug: node.fields.slug,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
const pages = await graphql(
|
||||
`
|
||||
{
|
||||
allMarkdownRemark(filter: {fields: {collection: {eq: "pages"}}}) {
|
||||
edges {
|
||||
node {
|
||||
fields {
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
)
|
||||
|
||||
// Handle errors
|
||||
if (pages.errors) {
|
||||
reporter.panicOnBuild(`Error while running GraphQL query.`)
|
||||
return
|
||||
}
|
||||
|
||||
// Create pages for each markdown file.
|
||||
const pageTemplate = path.resolve(`src/templates/page.js`)
|
||||
pages.data.allMarkdownRemark.edges.forEach(({ node }) => {
|
||||
createPage({
|
||||
path: node.fields.slug,
|
||||
component: pageTemplate,
|
||||
context: {
|
||||
slug: node.fields.slug,
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
/**
|
||||
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
|
||||
*
|
||||
* See: https://www.gatsbyjs.org/docs/ssr-apis/
|
||||
*/
|
||||
|
||||
// You can delete this file if you're not using it
|
51
package.json
51
package.json
|
@ -1,51 +0,0 @@
|
|||
{
|
||||
"name": "namesny.com",
|
||||
"private": true,
|
||||
"description": "Personal website",
|
||||
"version": "2.0.0",
|
||||
"author": "Matus Namesny <matus@namesny.com>",
|
||||
"dependencies": {
|
||||
"@fontsource/fira-mono": "^4.5.0",
|
||||
"@fontsource/open-sans": "^4.5.2",
|
||||
"gatsby": "^4.5.4",
|
||||
"gatsby-image": "^3.11.0",
|
||||
"gatsby-plugin-manifest": "^4.5.2",
|
||||
"gatsby-plugin-offline": "^5.5.2",
|
||||
"gatsby-plugin-react-helmet": "^5.5.0",
|
||||
"gatsby-plugin-sass": "^5.5.0",
|
||||
"gatsby-plugin-sharp": "^4.5.2",
|
||||
"gatsby-source-filesystem": "^4.5.2",
|
||||
"gatsby-transformer-remark": "^5.25.1",
|
||||
"gatsby-transformer-sharp": "^4.5.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-helmet": "^6.1.0",
|
||||
"sass": "^1.49.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^2.5.1"
|
||||
},
|
||||
"keywords": [
|
||||
"gatsby",
|
||||
"blog",
|
||||
"portfolio"
|
||||
],
|
||||
"license": "0BSD",
|
||||
"scripts": {
|
||||
"build": "gatsby build",
|
||||
"develop": "gatsby develop",
|
||||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
|
||||
"start": "npm run develop",
|
||||
"serve": "gatsby serve",
|
||||
"clean": "gatsby clean",
|
||||
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gatsbyjs/gatsby/issues"
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
import React from "react"
|
||||
import PostLink from "./post-link"
|
||||
import {header} from "../styles/blog.module.scss"
|
||||
|
||||
const Blog = ({ edges }) => {
|
||||
const Posts = edges
|
||||
.map(edge => <PostLink key={edge.node.id} post={edge.node} />)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className={header}>
|
||||
<h1>Blog</h1>
|
||||
</div>
|
||||
<div>
|
||||
{Posts}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Blog
|
|
@ -1,12 +0,0 @@
|
|||
import React from "react"
|
||||
import { footer, link } from '../styles/footer.module.scss'
|
||||
|
||||
const Footer = ({authorName}) => (
|
||||
<footer className={footer}>
|
||||
© {new Date().getFullYear()} {authorName}, Built with
|
||||
{` `}
|
||||
<a href="https://www.gatsbyjs.org" className={link}>Gatsby</a>
|
||||
</footer>
|
||||
)
|
||||
|
||||
export default Footer
|
|
@ -1,35 +0,0 @@
|
|||
import { Link } from "gatsby"
|
||||
import PropTypes from "prop-types"
|
||||
import React from "react"
|
||||
import { header, headerWrapper, terminal, links } from "../styles/header.module.scss"
|
||||
|
||||
const Header = ({ user, hostname }) => (
|
||||
<header className={headerWrapper}>
|
||||
<div className={header}>
|
||||
<div>
|
||||
<Link to="/" className={terminal}>{user}@{hostname} ~ $</Link>
|
||||
</div>
|
||||
<nav className={links}>
|
||||
<ul>
|
||||
<li key="about">
|
||||
<a href='/about'>
|
||||
<span>~/about</span>
|
||||
</a>
|
||||
</li>
|
||||
<li key="blog">
|
||||
<a href='/blog'>
|
||||
<span>~/blog</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
)
|
||||
|
||||
Header.propTypes = {
|
||||
user: PropTypes.string.isRequired,
|
||||
hostname: PropTypes.string.isRequired,
|
||||
}
|
||||
|
||||
export default Header
|
|
@ -1,32 +0,0 @@
|
|||
import React from "react"
|
||||
import { useStaticQuery, graphql } from "gatsby"
|
||||
import Img from "gatsby-image"
|
||||
|
||||
/*
|
||||
* This component is built using `gatsby-image` to automatically serve optimized
|
||||
* images with lazy loading and reduced file sizes. The image is loaded using a
|
||||
* `useStaticQuery`, which allows us to load the image from directly within this
|
||||
* component, rather than having to pass the image data down from pages.
|
||||
*
|
||||
* For more information, see the docs:
|
||||
* - `gatsby-image`: https://gatsby.dev/gatsby-image
|
||||
* - `useStaticQuery`: https://www.gatsbyjs.org/docs/use-static-query/
|
||||
*/
|
||||
|
||||
const Image = () => {
|
||||
const data = useStaticQuery(graphql`
|
||||
query {
|
||||
placeholderImage: file(relativePath: { eq: "gatsby-astronaut.png" }) {
|
||||
childImageSharp {
|
||||
fluid(maxWidth: 300) {
|
||||
...GatsbyImageSharpFluid
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
return <Img fluid={data.placeholderImage.childImageSharp.fluid} />
|
||||
}
|
||||
|
||||
export default Image
|
|
@ -1,19 +0,0 @@
|
|||
import { Link } from "gatsby"
|
||||
import PropTypes from "prop-types"
|
||||
import React from "react"
|
||||
import { indexWrapper, header } from "../styles/index.module.scss"
|
||||
import Social from "./social"
|
||||
|
||||
const Index = ({ author, social, email }) => (
|
||||
<div className={indexWrapper}>
|
||||
<div>
|
||||
<h1 className={header}>{ author }</h1>
|
||||
</div>
|
||||
<Social social={social} email={email}/>
|
||||
</div>
|
||||
)
|
||||
|
||||
Index.propTypes = {
|
||||
}
|
||||
|
||||
export default Index
|
|
@ -1,49 +0,0 @@
|
|||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { useStaticQuery, graphql } from "gatsby"
|
||||
|
||||
import Header from "./header"
|
||||
import Footer from "./footer"
|
||||
import { Helmet } from "react-helmet"
|
||||
import '../styles/global.scss';
|
||||
import { main, content, vertical, flexWrapper } from "../styles/layout.module.scss"
|
||||
|
||||
const Layout = ({ children, title, verticalLayout}) => {
|
||||
|
||||
const data = useStaticQuery(graphql`
|
||||
query SiteTitleQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
author
|
||||
user
|
||||
hostname
|
||||
}
|
||||
}
|
||||
}`)
|
||||
|
||||
const classes = verticalLayout ? `${content} ${vertical}` : content
|
||||
|
||||
return (
|
||||
<div className={flexWrapper}>
|
||||
<Helmet
|
||||
titleTemplate={`%s | ${data.site.siteMetadata.author}`}>
|
||||
<html lang="en" amp />
|
||||
<title>{title}</title>
|
||||
</Helmet>
|
||||
<Header
|
||||
user={data.site.siteMetadata.user}
|
||||
hostname={data.site.siteMetadata.hostname} />
|
||||
<div className={classes}>
|
||||
<main className={main}>{children}</main>
|
||||
</div>
|
||||
<Footer authorName={data.site.siteMetadata.author}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Layout.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
vertical: PropTypes.bool
|
||||
}
|
||||
|
||||
export default Layout
|
|
@ -1,28 +0,0 @@
|
|||
import React from "react"
|
||||
import { Link } from "gatsby"
|
||||
import { postTitle, postDate, postHeader, postListItem, postExcerpt } from '../styles/post-link.module.scss'
|
||||
|
||||
const PostLink = ({ post }) => {
|
||||
|
||||
const date = new Date(post.frontmatter.date)
|
||||
const options = { year: 'numeric', month: 'long', day: 'numeric' };
|
||||
const postDateString = date.toLocaleDateString('en', options);
|
||||
const postUrl = "/posts" + post.fields.slug
|
||||
|
||||
return (
|
||||
<Link to={postUrl}>
|
||||
<div className={postListItem} role="listitem">
|
||||
<div className={postHeader} >
|
||||
<span className={postTitle}>{post.frontmatter.title}</span>
|
||||
<span className={postDate}>{postDateString}</span>
|
||||
</div>
|
||||
<div className={postExcerpt}>
|
||||
<p>{post.excerpt}</p>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
export default PostLink
|
|
@ -1,43 +0,0 @@
|
|||
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { socialNavbar } from '../styles/social.module.scss'
|
||||
|
||||
export default class Social extends Component {
|
||||
static propTypes = {
|
||||
social: PropTypes.arrayOf(PropTypes.object),
|
||||
email: PropTypes.string
|
||||
}
|
||||
|
||||
render () {
|
||||
let key = 0
|
||||
|
||||
const socialLinks = this.props.social.map((val) => {
|
||||
const link = (
|
||||
<li key={key}>
|
||||
<a href={val.link} role="link">
|
||||
{val.name}
|
||||
</a>
|
||||
</li>
|
||||
)
|
||||
key += 1
|
||||
return link
|
||||
})
|
||||
|
||||
socialLinks.push(
|
||||
<li key={key}>
|
||||
<a href={`mailto:${this.props.email}`} role="link">
|
||||
e-mail
|
||||
</a>
|
||||
</li>
|
||||
)
|
||||
|
||||
return (
|
||||
<div className={socialNavbar} role="list">
|
||||
<ul>
|
||||
{socialLinks}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 433 B |
Binary file not shown.
Before Width: | Height: | Size: 887 B |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
|
@ -1,10 +0,0 @@
|
|||
import React from "react"
|
||||
|
||||
const NotFoundPage = () => (
|
||||
<Layout title="404: Not found" >
|
||||
<h1>NOT FOUND</h1>
|
||||
<p>You just hit a route that doesn't exist... the sadness.</p>
|
||||
</Layout>
|
||||
)
|
||||
|
||||
export default NotFoundPage
|
|
@ -1,39 +0,0 @@
|
|||
import React from "react"
|
||||
import { useStaticQuery, graphql } from "gatsby"
|
||||
|
||||
import Layout from "../components/layout"
|
||||
import Blog from "../components/blog"
|
||||
|
||||
const IndexPage = () => {
|
||||
|
||||
const data = useStaticQuery(graphql`
|
||||
query {
|
||||
allMarkdownRemark(
|
||||
sort: { order: DESC, fields: [frontmatter___date] }
|
||||
filter: {frontmatter: {draft: {ne: true}}, fields: {collection: {eq: "posts"}}}
|
||||
) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
excerpt
|
||||
frontmatter {
|
||||
date
|
||||
title
|
||||
}
|
||||
fields {
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
return (
|
||||
<Layout title="Blog">
|
||||
<Blog edges={data.allMarkdownRemark.edges}/>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
export default IndexPage
|
|
@ -1,31 +0,0 @@
|
|||
import React from "react"
|
||||
import { useStaticQuery, graphql } from "gatsby"
|
||||
|
||||
import Layout from "../components/layout"
|
||||
import Index from "../components"
|
||||
|
||||
const IndexPage = () => {
|
||||
|
||||
const data = useStaticQuery(graphql`
|
||||
query SiteDataQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
author
|
||||
email
|
||||
social {
|
||||
name
|
||||
link
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
return (
|
||||
<Layout title="Home" vertical={true} >
|
||||
<Index author={data.site.siteMetadata.author} social={data.site.siteMetadata.social} email={data.site.siteMetadata.email}/>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
export default IndexPage
|
|
@ -1,5 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
.blogPostWrapper {
|
||||
text-align: left;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
.header {
|
||||
text-align: left;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
.footer {
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
background-color: $backgroundDarker;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: $white;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
body, html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: $fontParagraph;
|
||||
color: $white;
|
||||
background-color: $backgroundDark;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
@for $i from 1 through 6 {
|
||||
h#{$i} {
|
||||
font-family: $fontHeader;
|
||||
}
|
||||
}
|
||||
|
||||
@-ms-viewport{
|
||||
width: device-width;
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
.header {
|
||||
font-family: $fontHeader;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
@media only screen and (min-width: $breakLarge) {
|
||||
width: $width;
|
||||
}
|
||||
}
|
||||
|
||||
.headerWrapper {
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
background-color: $backgroundDarker;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.links {
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
li {
|
||||
display: inline;
|
||||
margin: 5px;
|
||||
a {
|
||||
color: $white;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.terminal {
|
||||
color: $white;
|
||||
text-decoration: none;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
.indexWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
font-size: 3em;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
flex: 1 auto;
|
||||
padding: 20px;
|
||||
|
||||
@media only screen and (min-width: $breakLarge) {
|
||||
display: flex;
|
||||
width: $width;
|
||||
}
|
||||
}
|
||||
|
||||
.vertical {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.flexWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
.pageWrapper {
|
||||
text-align: left;
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
.postDate {
|
||||
float: right;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
.postTitle {
|
||||
color: $blue;
|
||||
text-decoration: none;
|
||||
text-transform: capitalize;
|
||||
font-family: $fontHeader;
|
||||
font-size: 1.2em;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.postHeader {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.postsList {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.postListItem {
|
||||
padding: 20px;
|
||||
background-color: $black;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.postExcerpt {
|
||||
text-align: initial;
|
||||
text-decoration: none;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
.headerContainer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.noDecoration {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a,
|
||||
a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active{
|
||||
text-decoration: none;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
@import "./variables.scss";
|
||||
|
||||
|
||||
.socialNavbar {
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
li {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
a {
|
||||
color: $white;
|
||||
text-shadow: $black 0px 0px 2px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
// Colors
|
||||
$darkGrey: #323232;
|
||||
$white: #f8f8ff;
|
||||
$black: #2f2f2f;
|
||||
$blue: #0f52bf;
|
||||
|
||||
$backgroundDarker: #252627;
|
||||
$backgroundDark: #292a2d;
|
||||
|
||||
//Fonts
|
||||
@import "~@fontsource/fira-mono/500.css";
|
||||
@import "~@fontsource/open-sans/index.css"; // Weight 400.
|
||||
$fontHeader: 'Fira Mono', monospace;
|
||||
$fontParagraph: 'Open Sans', sans-serif;
|
||||
|
||||
// Content
|
||||
$breakLarge: 992px;
|
||||
$width: 760px;
|
|
@ -1,27 +0,0 @@
|
|||
import React from "react"
|
||||
import { graphql } from "gatsby"
|
||||
import Layout from "../components/layout"
|
||||
import { blogPostWrapper } from "../styles/blog-post.module.scss"
|
||||
|
||||
export default function BlogPost({ data }) {
|
||||
const post = data.markdownRemark
|
||||
return (
|
||||
<Layout>
|
||||
<div className={blogPostWrapper}>
|
||||
<h1>{post.frontmatter.title}</h1>
|
||||
<div dangerouslySetInnerHTML={{ __html: post.html }} />
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
export const query = graphql`
|
||||
query($slug: String!) {
|
||||
markdownRemark(fields: { slug: { eq: $slug } }) {
|
||||
html
|
||||
frontmatter {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
|
@ -1,27 +0,0 @@
|
|||
import React from "react"
|
||||
import { graphql } from "gatsby"
|
||||
import Layout from "../components/layout"
|
||||
import {pageWrapper} from "../styles/page.module.scss"
|
||||
|
||||
export default function Page({ data }) {
|
||||
const page = data.markdownRemark
|
||||
return (
|
||||
<Layout>
|
||||
<div className={pageWrapper}>
|
||||
<h1>{page.frontmatter.title}</h1>
|
||||
<div dangerouslySetInnerHTML={{ __html: page.html }} />
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
export const query = graphql`
|
||||
query($slug: String!) {
|
||||
markdownRemark(fields: { slug: { eq: $slug } }) {
|
||||
html
|
||||
frontmatter {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
Loading…
Reference in New Issue