Skip to content

Commit 11462d8

Browse files
committed
Add examples.
1 parent b9b814d commit 11462d8

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

_layouts/docs.liquid

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ title: page.title
99
<a href="/docs/event-handling" {% if page.url contains "/docs/event-handling" %}class="-active"{% endif %}>Event handling</a>
1010
<a href="/docs/components" {% if page.url contains "/docs/components" %}class="-active"{% endif %}>Components</a>
1111
<a href="/docs/directives" {% if page.url contains "/docs/directives" %}class="-active"{% endif %}>Directives</a>
12+
<a href="/docs/examples" {% if page.url contains "/docs/examples" %}class="-active"{% endif %}>Examples</a>
1213
<a href="/docs/api" {% if page.url contains "/docs/api" %}class="-active"{% endif %}>API Reference</a>
1314
</div>
1415
<div class="content docs">

dist/bundle.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ That's it!
7878

7979
`:show`, `:fadeIn`, `:onclick` and other directives can be found in [monkberry-directives](https://github.com/monkberry/directives).
8080

81-
[Next →](/docs/api)
81+
[Next →](/docs/examples)
8282
{% endraw %}

docs/examples.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: docs
3+
permalink: /docs/examples
4+
title: Examples
5+
---
6+
{% raw %}
7+
# Examples
8+
9+
You can play this whose examples on jsfiddle.
10+
11+
## Hello world
12+
13+
<div class="example">
14+
<iframe width="100%" height="300" src="//jsfiddle.net/medv/z8pzsdyv/embedded/result,js,html/dark/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
15+
</div>
16+
<a class="example-link" href="//jsfiddle.net/medv/z8pzsdyv/">Play on JSFiddle</a>
17+
18+
## Todos
19+
20+
<div class="example">
21+
<iframe width="100%" height="300" src="//jsfiddle.net/medv/kq950d9L/embedded/result,js,html/dark/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
22+
</div>
23+
<a class="example-link" href="//jsfiddle.net/medv/kq950d9L/">Play on JSFiddle</a>
24+
25+
## TodoMVC
26+
27+
Here is example of todo app with Monkberry and Redux: [monkberry/todomvc](https://github.com/monkberry/todomvc).
28+
It supports hot module replacement and shows use of source maps.
29+
30+
[Next →](/docs/api)
31+
{% endraw %}

style/content.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ h1 {
4141

4242
h2 {
4343
font-size: 28px;
44+
margin-top: 50px;
4445
margin-bottom: 30px;
4546
}
4647

@@ -104,6 +105,19 @@ code {
104105
clear: both;
105106
}
106107

108+
.example {
109+
@include mobile {
110+
display: none;
111+
}
112+
}
113+
114+
.example-link {
115+
display: none;
116+
@include mobile {
117+
display: block;
118+
}
119+
}
120+
107121
footer {
108122
@extend .content;
109123
display: flex;

0 commit comments

Comments
 (0)