This commit is contained in:
Rico Sta. Cruz 2017-08-25 16:10:51 +08:00
parent 6ddaf1041b
commit 4d7af5d276
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
6 changed files with 21 additions and 5 deletions

View File

@ -18,6 +18,10 @@ Tables support these:
{: .-shortcuts}
Pre's support these:
{: .-setup}
Each sheet supports these metadata:
```yml

View File

@ -28,6 +28,7 @@
display: flex;
}
// Desktop
@media (min-width: 541px) {
& {
align-items: flex-end; // bottom alighn
@ -40,6 +41,7 @@
// Advertisement
& > .ad {
flex: 0 1 auto;
margin-bottom: 16px;
}
}

View File

@ -49,6 +49,10 @@
}
}
.MarkdownBody pre.-setup {
background: $gray-bg;
}
/*
* Syntax kighlight
*/

View File

@ -4,7 +4,7 @@
margin-bottom: 16px;
padding-bottom: 16px;
margin-top: 64px;
border-bottom: solid 1px $line-color;
border-bottom: solid 1px $dark-line-color;
@media (max-width: 768px) {
margin: $gutter / 2;

View File

@ -18,6 +18,7 @@ Components
import React from 'react'
import ReactDOM from 'react-dom'
```
{: .-setup}
```jsx
class Hello extends React.Component {
@ -41,6 +42,7 @@ Use the [React.js jsfiddle](http://jsfiddle.net/reactjs/69z2wepo/) to start hack
```html
<Video fullscreen={true} />
```
{: .-setup}
```jsx
render () {
@ -140,7 +142,7 @@ class AlertBox extends React.Component {
```jsx
<AlertBox>
<h1>You have pending notifications</h1>
<h1>You have pending notifications</h1>
</AlertBox>
```
@ -243,6 +245,7 @@ Property validation
```js
import PropTypes from 'prop-types'
```
{: .-setup}
See: [Typechecking with PropTypes](https://facebook.github.io/react/docs/typechecking-with-proptypes.html)
@ -355,6 +358,7 @@ MyCo.propTypes = {
```html
<VideoPlayer src="video.mp4" />
```
{: .-setup}
```jsx
class VideoPlayer extends React.Component {
@ -425,6 +429,7 @@ class TodoList extends React.Component {
}
}
```
{: data-line="6-7"}
Always supply a `key` property.
@ -432,9 +437,9 @@ Always supply a `key` property.
```jsx
<div>
{showPopup
? <Popup />
: null}
{showPopup
? <Popup />
: null}
</div>
```

1
sh.md
View File

@ -2,6 +2,7 @@
title: Bash scripting
category: CLI
layout: 2017/sheet
ads: true
---
Getting started