mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-29 07:05:13 -07:00
docs: add context json for playground default demo, #764
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"people": [
|
||||||
|
"alice",
|
||||||
|
"bob",
|
||||||
|
"carol"
|
||||||
|
]
|
||||||
|
}
|
||||||
-2
@@ -1,5 +1,3 @@
|
|||||||
{% assign people = "alice, bob, carol" | split: ", " -%}
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{%- for person in people %}
|
{%- for person in people %}
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
+12
-5
@@ -2,12 +2,19 @@
|
|||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<h1 class="inner">{{__('playground.title')}}</h1>
|
<h1 class="inner">{{__('playground.title')}}</h1>
|
||||||
<div class="loader" role=status aria-busy=true></div>
|
<div class="loader" role=status aria-busy=true></div>
|
||||||
<div id="editors" class="row inner hide" aria-hide=true>
|
<div id="editors" class="inner hide" aria-hide=true>
|
||||||
<div class="col">
|
<div class="area-tpl editor-wrapper">
|
||||||
<div id="editorEl">{{ raw('partial/demo.liquid') }}</div>
|
<h2>Template</h2>
|
||||||
<div id="dataEl">{}</div>
|
<div class="editor" id="editorEl">{{ raw('partial/demo.liquid') }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="area-data editor-wrapper">
|
||||||
|
<h2>Context</h2>
|
||||||
|
<div class="editor" id="dataEl">{{ raw('partial/demo.json') }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="area-output editor-wrapper">
|
||||||
|
<h2>Output</h2>
|
||||||
|
<div class="editor" id="previewEl">{{__('playground.loading')}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col" id="previewEl">{{__('playground.loading')}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="inner version"></p>
|
<p class="inner version"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+22
-21
@@ -8,28 +8,29 @@
|
|||||||
font-weight: 300
|
font-weight: 300
|
||||||
margin: 40px 0 24px
|
margin: 40px 0 24px
|
||||||
|
|
||||||
.row
|
#editors
|
||||||
|
display: grid
|
||||||
|
overflow: hidden
|
||||||
|
margin-bottom: 16px
|
||||||
|
height: 75vh
|
||||||
|
grid-template-columns: auto auto
|
||||||
|
grid-template-rows: 60% 40%
|
||||||
|
grid-gap: 16px
|
||||||
|
.area-tpl
|
||||||
|
grid-row: 1
|
||||||
|
grid-column: 1
|
||||||
|
.area-data
|
||||||
|
grid-row: 2
|
||||||
|
grid-column: 1
|
||||||
|
.area-output
|
||||||
|
grid-column: 2
|
||||||
|
grid-row: 1 / -1
|
||||||
|
.editor-wrapper
|
||||||
display: flex
|
display: flex
|
||||||
flex-wrap: wrap;
|
gap: 8px
|
||||||
justify-content: space-between
|
flex-direction: column
|
||||||
font-size: 1em
|
.editor
|
||||||
.col
|
flex-grow: 1
|
||||||
flex: 1 1 100%
|
|
||||||
margin-bottom: 10px
|
|
||||||
|
|
||||||
@media mq-normal
|
|
||||||
.row
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
.col:first-child
|
|
||||||
margin-right: 15px
|
|
||||||
|
|
||||||
#editorEl
|
|
||||||
height: 40vh
|
|
||||||
#dataEl
|
|
||||||
height: 28vh
|
|
||||||
margin-top: 2vh
|
|
||||||
#previewEl
|
|
||||||
height: 70vh
|
|
||||||
.hide
|
.hide
|
||||||
display: none
|
display: none
|
||||||
.loader
|
.loader
|
||||||
|
|||||||
Reference in New Issue
Block a user