This file contains hidden or 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
a[href^='http'] { | |
border: 4px solid red !important; | |
} | |
a[href^='//'][target='_blank'] { | |
border: 4px solid blue !important; | |
} | |
a[href^='//'][rel='noopener noreferrer'] { | |
border: 4px solid green !important; |
This file contains hidden or 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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: "stable", |
This file contains hidden or 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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: "stable", |
This file contains hidden or 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
Schrödinger’s commit. 50% chance we fixed the bug | |
i tried my best | |
Please don't tell anyone I did this | |
Check the changes for yourself | |
Works on my machine |
This file contains hidden or 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
import * as React from 'react' | |
interface IState { | |
offSet: number | |
} | |
interface IProp { | |
force?: number | |
offsetComp?: number | |
children(offSet: number): React.ReactNode |
This file contains hidden or 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
.container { | |
display: flex; | |
flex-flow: column wrap; | |
align-content: space-between; | |
/* Your container needs a fixed height, and it | |
* needs to be taller than your tallest column. */ | |
height: 600px; | |
} | |
.item { |
This file contains hidden or 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
const { createFilePath } = require(`gatsby-source-filesystem`) | |
exports.onCreateNode = ({ node, actions, getNode }) => { | |
const { createNodeField } = actions | |
if (node.internal.type === `MarkdownRemark`) { | |
const value = createFilePath({ node, getNode }) | |
const [month, day, year] = new Date(node.frontmatter.date) | |
.toLocaleDateString("en-EN", { | |
year: "numeric", |
This file contains hidden or 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
const path = require(`path`) | |
// 1. This is called once the data layer is bootstrapped to let plugins create pages from data. | |
exports.createPages = ({ graphql, actions }) => { | |
// 1.1 Getting the method to create pages | |
const { createPage } = actions | |
// 1.2 Tell which layout Gatsby should use to thse pages | |
const blogLayout = path.resolve(`./src/layouts/blog-post.js`) | |
// 2 Return the method with the query |
This file contains hidden or 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
import React from "react" | |
import { graphql } from "gatsby" | |
const BlogPost = ({ data }) => { | |
const { markdownRemark } = data | |
const imageSource = markdownRemark.frontmatter.image.childImageSharp.fluid.src | |
return ( | |
<> | |
<img src={imageSource} alt={markdownRemark.frontmatter.title} /> |
This file contains hidden or 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
const blogListLayout = path.resolve(`./src/layouts/blog-list.js`) |