Skip to content

Commit 1b77f8f

Browse files
committed
Converted the Burst tutorial
1 parent f95fce9 commit 1b77f8f

File tree

8 files changed

+2571
-16
lines changed

8 files changed

+2571
-16
lines changed

Guide to convert old pages to markdown.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
# Guide to convert jsx pages from the old mojs website to markdown
2+
In VS Code, use Find and Replace ()
23

34
## Use find and replace in the file:
4-
- `UniteLink` replace with `a`
5-
- `a link` replace with `a href`
6-
- `Cite` replace with `blockquote`
7-
- `<span className="highlight">(.+?)<\/span>` replace with `<code>$1</code>`
8-
- `<div className="post__header">(.+?)<\/div>` replace with `<h1>$1</h1>`
5+
- `<UniteLink link="(.+?)">(.+?)</UniteLink>` replace with `[$2]($1)`
6+
- `<Cite>` replace with `> ` (make sure to temove the newline too)
7+
- `</Cite>` replace with ``
8+
- `<span className="highlight">(.+?)</span>` replace with "`$1`"
9+
- `<div className="post__header">(.+?)</div>` replace with `# $1`
910
- `<ORXLine className="post__orx-line" />` replace with `<hr />`
1011
- `https://github.com/legomushroom/mojs/blob/master/api/` replace with `/api/`
11-
- `<Pen (.+?) />` replace with `<Pen $1></Pen>`
12+
- `<Pen pen="(.+?)" height="(.+?)" />` and `<Pen pen="(.+?)" height="(.+?)"></Pen>` replace with
13+
```
14+
<Codepen
15+
title="$1"
16+
pen="$1"
17+
user="sol0mka"
18+
height="$2"
19+
/>
20+
[Link to pen](https://codepen.io/sol0mka/pen/$1)
21+
```
1222
- `<Gif className="gif--50-width" src="(.+?)" />` replace with `<img src="/assets$1" alt="Example gif" />`
13-
- `<CodeSample` replace with `<pre><code>`
14-
- `</CodeSample>` replace with `</code></pre>`
23+
- `<CodeSample pen="(.+?)">` replace with `// pen $1 \n```js`
24+
- `</CodeSample>` replace with "```"
1525
- `<Pen (.+?)" height="500</Pen>` replace with `<pre><code>$1</code></pre>` code
1626
- `<Pen (.+?)</Pen>` replace with `<pre><code>$1</code></pre>`
1727

docs/.vuepress/components/MojsCode.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/*
2-
A simplified version of MojsInteractive that cant be edited,
2+
A simplified version of MojsInteractive that can't be edited,
33
but has more flexibility regarding the code.
44

55
Usage:
66
<MojsCode
77
id="unique_id"
88
height="200px"
9+
:dark="true"
910
code=
1011
"new mojs.Shape({
1112
parent: '#unique_id',
@@ -28,7 +29,7 @@ new mojs.Shape({
2829
<slot></slot>
2930
</div>
3031
<p v-if="notice" class="mojs-interactive__clicknotice">{{this.notice}}</p>
31-
<div :id="this.id" class="mojs-interactive__result" :class="this.className" :style="style">
32+
<div :id="this.id" :class="'mojs-interactive__result ' + (dark ? 'mojs-interactive__result--dark' : '')" :style="style">
3233
<div v-if="controller" :id="this.id + '_controller'" class="mojs-interactive__controller"></div>
3334
</div>
3435
</div>
@@ -43,7 +44,7 @@ new mojs.Shape({
4344
controller: { type: [String, Boolean], default: false },
4445
height: { type: String, default: '300px' },
4546
code: { type: [String, Boolean], default: '' },
46-
className: { type: String, default: '' },
47+
dark: { type: Boolean, default: false }, // if you want the demo to be dark 🕶
4748
notice: { type: [String, Boolean], default: false }, // to show a "click somewhere to activate animation" text
4849
},
4950

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = {
3939
'/tutorials/',
4040
'/tutorials/getting-started.md',
4141
'/tutorials/shape-swirl/',
42+
'/tutorials/burst/',
4243
]
4344
},
4445
{
13.2 KB
Loading

docs/api/syntax/property-maps.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
`Property Map` array was designed to express sequential values. Often used with `Burst` and `Stagger` modules to generate values that repeat over children length. Basically it is just an array that maps its values to children based on child index with `mod` function. So if you have `property map` with `3 values` and `5 children`, then `4`th and `5`th items will recieve `0`th and `1`st values from the map respecively. Works with any values inside the array.
66

7+
You can provide a `null` value if you wanna use the default value.
78

89
Full API reference:
910

1011
```javascript
1112
// ...
12-
property : [ 20, { 20 : 0 }, 'rand(0, 20)' ]
13+
property : [ 20, { 20 : 0 }, 'rand(0, 20)', null ]
1314
// ...
1415

1516
```

0 commit comments

Comments
 (0)