mirror of
https://github.com/sstent/node.git
synced 2026-01-26 23:22:28 +00:00
updated app
This commit is contained in:
16
node_modules/derby-examples/sink/views/404.html
generated
vendored
Normal file
16
node_modules/derby-examples/sink/views/404.html
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<!--
|
||||
This is a static template file, so it doesn't have an associated app.
|
||||
It is rendered by the server via a staticPages renderer.
|
||||
|
||||
Since static pages don't include the Derby client library, they can't have
|
||||
bound variables that automatically update. However, they do support initial
|
||||
template tag rendering from a context object and/or model.
|
||||
-->
|
||||
|
||||
<Title:>
|
||||
Not found
|
||||
|
||||
<Body:>
|
||||
<h1>404</h1>
|
||||
<p>Sorry, we can't find anything at <b>{{url}}</b>.
|
||||
<p>Try heading back to the <a href="/">home page</a>.
|
||||
37
node_modules/derby-examples/sink/views/app/bindingsBench.html
generated
vendored
Normal file
37
node_modules/derby-examples/sink/views/app/bindingsBench.html
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<Body:>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
{#if _mode}
|
||||
Mode: <b>{_mode}</b> FPS: <b>{_fps}</b>
|
||||
{else}
|
||||
Select a mode to run:
|
||||
{/}
|
||||
</p>
|
||||
<p>
|
||||
{{#each modes}}<button x-bind="click: start">{{this}}</button>{{/}}
|
||||
<button x-bind="click: stop">Stop</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{#if _bindProperties}
|
||||
<div>
|
||||
{#each _boxes}
|
||||
<div class="box-view">
|
||||
<div id="box-{{i}}" class="box" style="top: {.top}px; left: {.left}px; background: rgb(0, 0, {.color});">
|
||||
{.content}
|
||||
</div>
|
||||
</div>
|
||||
{/}
|
||||
</div>
|
||||
{else}
|
||||
<div>
|
||||
{#each _boxes}
|
||||
<div class="box-view">
|
||||
<div id="box-{{i}}" class="box" style="top: {{top}}px; left: {{left}}px; background: rgb(0, 0, {{color}});">
|
||||
{{content}}
|
||||
</div>
|
||||
</div>
|
||||
{/}
|
||||
</div>
|
||||
{/}
|
||||
32
node_modules/derby-examples/sink/views/app/home.html
generated
vendored
Normal file
32
node_modules/derby-examples/sink/views/app/home.html
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<Body:>
|
||||
{{#with home}}
|
||||
<h1 style="color:{unspace(.titleColor)}">Welcome in {.titleColor}!</h1>
|
||||
<p>This is a collection of random demos. Check 'em out!</p><br>
|
||||
<p>
|
||||
<label>Title color:
|
||||
<select id=titleSelect>
|
||||
{#each .colors}
|
||||
<option selected="{equal(.name, home.titleColor)}">{capitalize(.name)}</option>
|
||||
{/}
|
||||
</select>
|
||||
</label>
|
||||
<input id=titleInput value={.titleColor}>
|
||||
<h3>Colors:</h3>
|
||||
<div>
|
||||
{#each .colors}
|
||||
<p>
|
||||
<input type=radio name=titleRadio checked="{equal(.name, home.titleColor)}">
|
||||
<input class=colorInput value={.name}>
|
||||
<button x-bind="click: home.select">Select</button>
|
||||
</p>
|
||||
{/}
|
||||
</div>
|
||||
</p><br><br>
|
||||
<p><a href=#jump>Test jump link</a></p><br>
|
||||
<p><a href=/live-css/popout>Test Live CSS popped out</a></p>
|
||||
<p style="margin:400px 0 1000px">
|
||||
<span id=jump>Jumped!</span> -
|
||||
<a href="#">Back to top</a> -
|
||||
<a href=/live-css>Go to Live CSS</a>
|
||||
</p>
|
||||
{{/}}
|
||||
33
node_modules/derby-examples/sink/views/app/index.html
generated
vendored
Normal file
33
node_modules/derby-examples/sink/views/app/index.html
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<import: src=shared>
|
||||
<import: src=home>
|
||||
<import: src=liveCss>
|
||||
<import: src=tableEditor>
|
||||
<import: src=leaderboard>
|
||||
<import: src=submit>
|
||||
<import: src=bindingsBench>
|
||||
|
||||
<Title:>
|
||||
Derby demo: {{title}}
|
||||
|
||||
<Header:>
|
||||
<body class={{currentPage}}>
|
||||
<!-- components are void by default, and should not have a closing tag -->
|
||||
<app:shared:alert>
|
||||
<!-- if a component is nonvoid, it must have a closing tag -->
|
||||
<app:nav>
|
||||
{{#each pages}}
|
||||
{{#if current}}
|
||||
<b>{{text}}</b>
|
||||
{{else}}
|
||||
<a href={{url}}>{{text}}</a>
|
||||
{{/}}
|
||||
{{#unless isLast}} | {{/}}
|
||||
{{/}}
|
||||
</app:nav>
|
||||
|
||||
<nav: nonvoid>
|
||||
<nav>
|
||||
<!-- nonvoid components support a special `content` macro -->
|
||||
{{{content}}}
|
||||
<hr>
|
||||
</nav>
|
||||
44
node_modules/derby-examples/sink/views/app/leaderboard.html
generated
vendored
Normal file
44
node_modules/derby-examples/sink/views/app/leaderboard.html
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<Root:>
|
||||
<html x-bind="click: leaderboard.deselect">
|
||||
|
||||
<Body:>
|
||||
{{#with leaderboard}}
|
||||
<form x-bind="submit: leaderboard.add">
|
||||
<input value={._newPlayer}> <input type=submit value="Add player">
|
||||
<button x-bind="click: leaderboard.remove" disabled={not(._selected)}>
|
||||
Remove
|
||||
{#if ._selected}
|
||||
{.name}
|
||||
{else}
|
||||
selected
|
||||
{/}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!--
|
||||
By binding click here, it will prevent click events within this div
|
||||
from bubbling further and reaching the document node. All clicks
|
||||
outside of this div will continue bubbling up to the document.
|
||||
-->
|
||||
<div id=leaderboard x-bind=click>
|
||||
<div class=selectedPlayer>
|
||||
{#if ._selected}
|
||||
<p class=vote>
|
||||
<button x-bind="click: leaderboard.incr">+ 5</button>
|
||||
<button x-bind="click: leaderboard.decr">- 5</button>
|
||||
</p>
|
||||
<span>{.name}</span>
|
||||
{else}
|
||||
Click a player to select
|
||||
{/}
|
||||
</div>
|
||||
<ul>
|
||||
{#each ._list}
|
||||
<li class="{#if equal(.id, leaderboard._selectedId)}selected{/}"
|
||||
x-bind="click: leaderboard.select">
|
||||
<p class=score>{.score}</p>{{name}}
|
||||
</li>
|
||||
{/}
|
||||
</ul>
|
||||
</div>
|
||||
{{/}}
|
||||
44
node_modules/derby-examples/sink/views/app/liveCss.html
generated
vendored
Normal file
44
node_modules/derby-examples/sink/views/app/liveCss.html
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<Body:>
|
||||
<select multiple>
|
||||
<optgroup label="CSS properties">
|
||||
{#each liveCss.styles}<option selected={.active}>{.prop}</option>{/}
|
||||
</optgroup>
|
||||
</select>
|
||||
<div>
|
||||
{#each liveCss.styles}
|
||||
<p>
|
||||
<input type="checkbox" checked="{.active}">
|
||||
<input value="{.prop}" disabled="{not(.active)}">
|
||||
<input value="{.value}" disabled="{not(.active)}">
|
||||
<button x-bind="click: liveCss.deleteStyle">Delete</button>
|
||||
</p>
|
||||
{/}
|
||||
</div>
|
||||
<button x-bind="click: liveCss.addStyle">Add</button>
|
||||
<h3>Currently applied:</h3>
|
||||
<div>
|
||||
{#if _hasActiveStyles}
|
||||
<p>{</p>
|
||||
<ul class=css>
|
||||
{#each liveCss.styles}
|
||||
<li>{cssProperty(this)}</li>
|
||||
{/}
|
||||
</ul>
|
||||
<p>}</p>
|
||||
{else}
|
||||
(None)
|
||||
{/}
|
||||
</div>
|
||||
<div>
|
||||
{#unless _poppedOut}
|
||||
<h3 style=display:inline-block>Output:</h3> <a href="/live-css/popout">Pop out</a>
|
||||
{/}
|
||||
</div>
|
||||
<div class="{#if _poppedOut}poppedOut{/} cssOutput">
|
||||
<p class=popupTitle><a href="/live-css">Close</a></p>
|
||||
<div class=popupContent>
|
||||
<p style="{#each liveCss.styles}{cssProperty(this)}{/}" contenteditable>
|
||||
{unescaped liveCss.outputText}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
14
node_modules/derby-examples/sink/views/app/shared.html
generated
vendored
Normal file
14
node_modules/derby-examples/sink/views/app/shared.html
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<alert:>
|
||||
<div id=alert>
|
||||
{#unless connected}
|
||||
<p>
|
||||
{#if canConnect}
|
||||
<!-- Leading space is removed, and trailing space is maintained -->
|
||||
Offline
|
||||
{#if _showReconnect}– <a x-bind=click:connect>Reconnect</a>{/}
|
||||
{else}
|
||||
Unable to reconnect – <a x-bind=click:reload>Reload</a>
|
||||
{/}
|
||||
</p>
|
||||
{/}
|
||||
</div>
|
||||
9
node_modules/derby-examples/sink/views/app/submit.html
generated
vendored
Normal file
9
node_modules/derby-examples/sink/views/app/submit.html
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<Body:>
|
||||
<form action=submit method=post>
|
||||
<input type=hidden name=_method value=put>
|
||||
<p><label>Name: <input type=text name=user[name]></label></p>
|
||||
<p><label>Email: <input type=text name=user[email]></label></p>
|
||||
<p><input type=submit></p>
|
||||
</form>
|
||||
<h3>Arguments:</h3>
|
||||
<pre><code>{{args}}</code></pre>
|
||||
25
node_modules/derby-examples/sink/views/app/tableEditor.html
generated
vendored
Normal file
25
node_modules/derby-examples/sink/views/app/tableEditor.html
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<Body:>
|
||||
<button x-bind="click: tableEditor.addRow">Add row</button>
|
||||
<button x-bind="click: tableEditor.addCol">Add column</button>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
{#each table.cols}
|
||||
<th x-bind="mousedown: tableEditor.colDown" class=col>{.name}</th>
|
||||
{/}
|
||||
<td></td>
|
||||
</tr>
|
||||
{#each table.rows}
|
||||
<tr class=row>
|
||||
<th x-bind="mousedown: tableEditor.rowDown">{.name}</th>
|
||||
{#each .cells}<td><input value={.text}></td>{/}
|
||||
<td><button x-bind="click: tableEditor.deleteRow">Delete</button></td>
|
||||
</tr>
|
||||
{/}
|
||||
<tr class=foot>
|
||||
<td></td>
|
||||
{#each table.cols}<td><button x-bind="click: tableEditor.deleteCol">Delete</button></td>{/}
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user