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
<amp-img src="https://loremflickr.com/300/300/architecture" alt="An image" | |
layout="responsive" width="1.6" height="1"> | |
</amp-img> |
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
<amp-layout layout="fixed-height" height="200" class="yellow"> | |
<amp-fit-text layout="fill"> | |
amp-layout component and attribute | |
</amp-fit-text> | |
</amp-layout> |
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
<amp-layout layout="fill" class="green"> | |
</amp-layout> |
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> | |
... | |
<style amp-custom> | |
body { | |
padding: 12px; | |
} | |
</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"> | |
<script async src="https://cdn.ampproject.org/v0.js"></script> | |
<link rel="canonical" href="thispage.html"> | |
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
<style amp-boilerplate>/* full amp.css style rules */</style> | |
<noscript><style amp-boilerplate>/* minimal amp-noscript.css style rules */</style></noscript> | |
</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 name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
<script async src="https://cdn.ampproject.org/v0.js"></script> | |
<script async custom-element="amp-carousel" | |
src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script> | |
</head> | |
<body> | |
<h1>An amp-img and an amp-carousel</h1> |
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 name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
<script async src="https://cdn.ampproject.org/v0.js"></script> | |
</head> | |
<body> | |
<h1>Just a basic built-in amp-img</h1> | |
<amp-img src="https://loremflickr.com/300/200/architecture" |
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
// How to persist the React Redux state store to the browser's localStorage | |
// Code taken from Dan Abramov's video | |
// https://egghead.io/lessons/javascript-redux-persisting-the-state-to-the-local-storage | |
/** | |
localStorage.js | |
*/ | |
export const loadState = () => { | |
try { | |
const serializedState = localStorage.getItem('state'); |
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> | |
<title>matches vs closest</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> |