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 'tan'; | |
// Some random units, as an example | |
$hexagonCoreLength: 100px; | |
$hexagonBorderThickness: 2px; | |
$computationAngle: $PI/6; | |
$adjacentLength: $hexagonCoreLength + 2 * $hexagonBorderThickness; | |
// Compute the hexagon length for the side before using it |
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
<!-- Add to your main view --> | |
<link rel="amphtml" href="/amp.html"> | |
<!-- Add to your referenced amp view --> | |
<link rel="canonical" href="/"> |
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
<head> | |
/* Only one style tag with amp-custom attribute per page */ | |
/* Also, it must be included in <head> */ | |
<style amp-custom> | |
/* All custom CSS goes here */ | |
html { | |
box-sizing: border-box | |
} | |
</style> | |
</head> |
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
<!doctype html> | |
<html ⚡ lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
<!-- Note the following 2 properties that you have to set in your markup --> | |
<title>%{title}</title> | |
<link rel="canonical" href="%{linkToNonAmpVersion}"> |
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
<!-- This is one way to configure amp-analytics for GA --> | |
<!-- Other vendor support for analyitcs in AMP can be found from here: https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/configure-analytics/analytics-vendors/?format=websites --> | |
<amp-analytics type="gtag" data-credentials="include"> | |
<script type="application/json"> | |
{ | |
"vars": { | |
"gtag_id": "UA-YOUR-ID-HERE", | |
"config": { | |
"UA-YOUR-ID-HERE": { "groups": "default" } |
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 Store from 'store' | |
const storeSingleton = new Store() | |
export default storeSingleton |
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
export default class StoreSingleton { | |
static _singleton = null | |
constructor() { | |
if (StoreSingleton._singleton === null) { | |
StoreSingleton._singleton = this | |
} | |
return StoreSingleton._singleton | |
} |
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 localKey = {} | |
export default class StoreSingleton { | |
static _singleton = null | |
constructor(key) { | |
if (key !== localKey) { | |
throw new Error('Use StoreSingleton.get() to get singleton instance instead') | |
} | |
} |
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
{ | |
"scripts": { | |
"start": "next" | |
} | |
} |
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
{ | |
"scripts": { | |
"start": "nodemon --exec 'next build && next start'" | |
}, | |
"devDependencies": { | |
"nodemon": "~1.19.1", | |
}, | |
"nodemonConfig": { | |
"ignore": [ | |
"node_modules/*", |