fleshing out seed

This commit is contained in:
Geoff Doty 2018-03-31 02:08:51 -04:00
parent 0daff984fe
commit 245948af0d
11 changed files with 159 additions and 41 deletions

View File

@ -1,7 +1,7 @@
{
"name": "riot-starter",
"version": "0.1.0",
"description": "rapid RiotJS starter kit",
"version": "0.5.0",
"description": "rapid riotjs starter seed",
"main": "index.js",
"directories": {
"doc": "docs",
@ -14,7 +14,7 @@
"riot",
"riotjs",
"starter",
"rapid",
"seed",
"prototype"
],
"author": "Geoff Doty",

View File

@ -0,0 +1,3 @@
.header, .footer {
margin: 1.4em 0;
}

View File

@ -1 +0,0 @@
/*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}img,embed,iframe,object,audio,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}

View File

@ -1,45 +1,57 @@
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Rapid Application</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Rapid Application</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- build:css css/styles.css -->
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/main.css">
<!-- endbuild -->
</head>
<body>
<!--[if lte IE 9]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<!-- build:css css/styles.css -->
<link rel="stylesheet" href="css/main.css">
<!-- endbuild-->
<script src="js/vendor/riot+compiler.min.js"></script>
<script src="js/vendor/route.min.js"></script>
</head>
<body>
<!--[if lte IE 9]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<!-- Add your site or application content here -->
<p>Welcome to the RiotJS Boilerplate.</p>
<!-- Add your site or application content here -->
<div class="layout">
<div class="stack">
<Header></Header>
<div id="view"></div>
<Footer></Footer>
</div>
</div>
<script src="js/vendor/modernizr-3.5.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/riot@3.9/riot+compiler.min.js" crossorigin="anonymous"></script>
<script>window.riot || document.write('<script src="js/vendor/riot+compiler.min.js"><\/script>')</script>
<script src="https://cdn.jsdelivr.net/npm/riot@3.9/riot+compiler.min.js" crossorigin="anonymous"></script>
<script>window.riot || document.write('<script src="js/vendor/riot+compiler.min.js"><\/script>')</script>
<!-- build:js js/tags.min.js -->
<script src="js/app.js"></script>
<!-- endbuild -->
<!-- build:js js/tags.min.js -->
<script src="js/app.js"></script>
<!-- endbuild -->
<!-- build:js js/tags.min.js -->
<script src="js/plugins.js"></script>
<!-- endbuild -->
<!-- build:js js/tags.min.js -->
<script type="riot/tag" src="tags/layout/header.tag.html"></script>
<script type="riot/tag" src="tags/layout/footer.tag.html"></script>
<script type="riot/tag" src="tags/home.tag.html"></script>
<!-- endbuild -->
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
</body>
<!-- mount all included tags -->
<script>riot.mount('*');</script>
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
</body>
</html>

View File

@ -0,0 +1,48 @@
'use strict';
// -----------------------------------------------
// Global Application Settings
// -----------------------------------------------
const APP = {
DEBUG: true
};
// -----------------------------------------------
// Global Riot Mixins
// -----------------------------------------------
riot.mixin = {
store: {
get: function (key) {
return window.localStorage.getItem(key);
},
set: function (key, value) {
return window.localStorage.setItem(key, value);
},
remove: function (key) {
return window.localStorage.removeItem(key);
}
},
relay: riot.observable()
}
// -----------------------------------------------
// Routing
// -----------------------------------------------
// [ set hash base ] -----------------------------
route.base('#');
// [ define routes ] -----------------------------
// home page
route('/', function () {
riot.mount('#view', 'home');
});
// [ start router ] ------------------------------
route.start(true);

File diff suppressed because one or more lines are too long

2
src/public/js/vendor/riot.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
src/public/js/vendor/route.min.js vendored Normal file
View File

@ -0,0 +1 @@
var route=function(){"use strict";var e=function(e){e=e||{};var t={},n=Array.prototype.slice;Object.defineProperties(e,{on:{value:function(n,r){if(typeof r=="function"){(t[n]=t[n]||[]).push(r)}return e},enumerable:false,writable:false,configurable:false},off:{value:function(n,r){if(n=="*"&&!r){t={}}else{if(r){var i=t[n];for(var f=0,a;a=i&&i[f];++f){if(a==r){i.splice(f--,1)}}}else{delete t[n]}}return e},enumerable:false,writable:false,configurable:false},one:{value:function(t,n){function r(){e.off(t,r);n.apply(e,arguments)}return e.on(t,r)},enumerable:false,writable:false,configurable:false},trigger:{value:function(r){var i=arguments;var f=arguments.length-1,a=new Array(f),u,o,c;for(c=0;c<f;c++){a[c]=i[c+1]}u=n.call(t[r]||[],0);for(c=0;o=u[c];++c){o.apply(e,a)}if(t["*"]&&r!="*"){e.trigger.apply(e,["*",r].concat(a))}return e},enumerable:false,writable:false,configurable:false}});return e};var t=/^.+?\/\/+[^/]+/,n="EventListener",r="remove"+n,i="add"+n,f="hasAttribute",a="popstate",u="hashchange",o="trigger",c=3,l=typeof window!="undefined"&&window,s=typeof document!="undefined"&&document,h=l&&history,p=l&&(h.location||l.location),d=P.prototype,v=s&&s.ontouchstart?"touchstart":"click",m=e();var y=false,b=false,g,w,$,A,S,x=[],K=0;function N(e){return e.split(/[/?#]/)}function O(e,t){var n=t.replace(/\?/g,"\\?").replace(/\*/g,"([^/?#]+?)").replace(/\.\./,".*");var r=new RegExp("^"+n+"$");var i=e.match(r);if(i){return i.slice(1)}}function T(e,t){var n;return function(){clearTimeout(n);n=setTimeout(e,t)}}function E(e){g=T(L,1);l[i](a,g);l[i](u,g);s[i](v,R);if(e){L(true)}}function P(){this.$=[];e(this);m.on("stop",this.s.bind(this));m.on("emit",this.e.bind(this))}function j(e){return e.replace(/^\/|\/$/,"")}function k(e){return typeof e=="string"}function q(e){return(e||p.href).replace(t,"")}function D(e){return w[0]==="#"?(e||p.href||"").split(w)[1]||"":(p?q(e):e||"").replace(w,"")}function L(e){var t=K===0;if(c<=K){return}K++;x.push(function(){var t=D();if(e||t!==$){m[o]("emit",t);$=t}});if(t){var n;while(n=x.shift()){n()}K=0}}function R(e){if(e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented){return}var n=e.target;while(n&&n.nodeName!=="A"){n=n.parentNode}if(!n||n.nodeName!=="A"||n[f]("download")||!n[f]("href")||n.target&&n.target!=="_self"||n.href.indexOf(p.href.match(t)[0])===-1){return}if(n.href!==p.href&&(n.href.split("#")[0]===p.href.split("#")[0]||w[0]!=="#"&&q(n.href).indexOf(w)!==0||w[0]==="#"&&n.href.split(w)[0]!==p.href.split(w)[0]||!_(D(n.href),n.title||s.title))){return}e.preventDefault()}function _(e,t,n){if(!h){return m[o]("emit",D(e))}e=w+j(e);t=t||s.title;n?h.replaceState(null,t,e):h.pushState(null,t,e);s.title=t;b=false;L();return b}d.m=function(e,t,n){if(k(e)&&(!t||k(t))){_(e,t,n||false)}else if(t){this.r(e,t)}else{this.r("@",e)}};d.s=function(){this.off("*");this.$=[]};d.e=function(e){this.$.concat("@").some(function(t){var n=(t==="@"?A:S)(j(e),j(t));if(typeof n!="undefined"){this[o].apply(null,[t].concat(n));return b=true}},this)};d.r=function(e,t){if(e!=="@"){e="/"+j(e);this.$.push(e)}this.on(e,t)};var z=new P;var B=z.m.bind(z);B.create=function(){var e=new P;var t=e.m.bind(e);t.stop=e.s.bind(e);return t};B.base=function(e){w=e||"#";$=D()};B.exec=function(){L(true)};B.parser=function(e,t){if(!e&&!t){A=N;S=O}if(e){A=e}if(t){S=t}};B.query=function(){var e={};var t=p.href||$;t.replace(/[?&](.+?)=([^&]*)/g,function(t,n,r){e[n]=r});return e};B.stop=function(){if(y){if(l){l[r](a,g);l[r](u,g);s[r](v,R)}m[o]("stop");y=false}};B.start=function(e){if(!y){if(l){if(document.readyState==="interactive"||document.readyState==="complete"){E(e)}else{document.onreadystatechange=function(){if(document.readyState==="interactive"){setTimeout(function(){E(e)},1)}}}}y=true}};B.base();B.parser();return B}();

View File

@ -0,0 +1,21 @@
<Home>
<section class="is-clear">
<h1>RiotJS Kickstarter</h1>
Built your next revolutionary <em>Single Page Application</em> (SPA) starting right here:
<blockquote>/public/tags/home.tag.html</blockquote>
This <strong>seed</strong> kicks your development into high gear with all tools you'll <em>need</em>, and very <em>little</em> you don't.
<ul>
<li><strong>* RiotJS+Compiler</strong> for rapid application prototyping</li>
<li><strong>* Router</strong> to manage url navigation</li>
<li><strong>* Grayscale CSS</strong> for minimal style</li>
</ul>
<strong>No bloat here.</strong>
</p>
</section>
</Home>

View File

@ -0,0 +1,12 @@
<Footer>
<section class="footer">
&copy;2018 Your Website |
All rights reserved. |
<a href="http://riotjs.com">RiotJS</a> &nbsp;
<a href="http://n2geoff.github.io/grayscale/">Grayscale CSS</a>
</section>
<style>
.footer {border-top: 1px solid #222}
</style>
</Footer>

View File

@ -0,0 +1,18 @@
<Header>
<section class="header">
<ul class="navbar">
<li class="nav is-large">RiotJS</li>
<li class="nav"><a href="#/">Home</a></li>
</ul>
</section>
<style>
/* scoped styles */
.header {border-bottom: 1px solid #222;}
ul, li {margin:0;padding:0}
.nav a {text-decoration: none;}
</style>
</Header>