Skip to content

Commit

Permalink
more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
btopro committed Aug 14, 2018
1 parent 9089a58 commit ddd8772
Show file tree
Hide file tree
Showing 37 changed files with 450 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ hooks:
post-start:
- exec: "sudo npm i npm@latest -g"
- exec: "sudo npm install --global surge"
- exec: "bash scripts/haxtheweb.sh admin admin [email protected] admin"
- exec: "bash scripts/haxtheweb.sh 'admin' 'admin' '[email protected]' 'admin'"
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
2 changes: 0 additions & 2 deletions assets/favicon/browserconfig.xml

This file was deleted.

41 changes: 0 additions & 41 deletions assets/favicon/manifest.json

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 2 additions & 0 deletions browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="assets/ms-icon-70x70.png"/><square150x150logo src="assets/ms-icon-150x150.png"/><square310x310logo src="assets/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
93 changes: 53 additions & 40 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,64 @@
include_once 'system/lib/bootstrapHAX.php';
include_once $HAXCMS->configDirectory . '/config.php';
?>
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>Site listing</title>
<script>
/* this script must run before Polymer is imported */
window.Polymer = {
dom: 'shady',
lazyRegister: true
};
</script>
<script>!function(e){var r=e.babelHelpers={};r.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},r.createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),r.defineEnumerableProperties=function(e,r){for(var t in r){var n=r[t];n.configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,t,n)}return e},r.defaults=function(e,r){for(var t=Object.getOwnPropertyNames(r),n=0;n<t.length;n++){var o=t[n],i=Object.getOwnPropertyDescriptor(r,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e},r.defineProperty=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},r.extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.get=function e(r,t,n){null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,t);if(void 0===o){var i=Object.getPrototypeOf(r);return null===i?void 0:e(i,t,n)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(n)},r.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},r.instanceof=function(e,r){return null!=r&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](e):e instanceof r},r.newArrowCheck=function(e,r){if(e!==r)throw new TypeError("Cannot instantiate an arrow function")},r.objectDestructuringEmpty=function(e){if(null==e)throw new TypeError("Cannot destructure undefined")},r.objectWithoutProperties=function(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},r.set=function e(r,t,n,o){var i=Object.getOwnPropertyDescriptor(r,t);if(void 0===i){var a=Object.getPrototypeOf(r);null!==a&&e(a,t,n,o)}else if("value"in i&&i.writable)i.value=n;else{var u=i.set;void 0!==u&&u.call(o,n)}return n},r.slicedToArray=function(){function e(e,r){var t=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(t.push(a.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r.taggedTemplateLiteral=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))},r.temporalRef=function(e,r,t){if(e===t)throw new ReferenceError(r+" is not defined - temporal dead zone");return e},r.temporalUndefined={},r.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},r.toConsumableArray=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}}("undefined"==typeof global?self:global);</script>
<script src="webcomponents/bower_components/webcomponentsjs/webcomponents.min.js"></script>
<head>
<meta charset="utf-8">
<title>HAXCMS site list</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,user-scalable=yes">
<meta name="generator" content="HAXCMS">
<meta name="description" content="My HAXCMS site listing">
<link rel="icon" href="assets/favicon.ico">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#3f51b5">
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="My site">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="My App">
<link rel="apple-touch-icon" href="assets/icon-48x48.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/icon-72x72.png">
<link rel="apple-touch-icon" sizes="96x96" href="assets/icon-96x96.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/icon-144x144.png">
<link rel="apple-touch-icon" sizes="192x192" href="assets/icon-192x192.png">
<meta name="msapplication-TileImage" content="assets/icon-144x144.png">
<meta name="msapplication-TileColor" content="#3f51b5">
<meta name="msapplication-tap-highlight" content="no">
<script>/* Don't edit this block */
!function (e) { var r = e.babelHelpers = {}; r.typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, r.classCallCheck = function (e, r) { if (!(e instanceof r)) throw new TypeError("Cannot call a class as a function") }, r.createClass = function () { function e(e, r) { for (var t = 0; t < r.length; t++) { var n = r[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) } } return function (r, t, n) { return t && e(r.prototype, t), n && e(r, n), r } }(), r.defineEnumerableProperties = function (e, r) { for (var t in r) { var n = r[t]; n.configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, t, n) } return e }, r.defaults = function (e, r) { for (var t = Object.getOwnPropertyNames(r), n = 0; n < t.length; n++) { var o = t[n], i = Object.getOwnPropertyDescriptor(r, o); i && i.configurable && void 0 === e[o] && Object.defineProperty(e, o, i) } return e }, r.defineProperty = function (e, r, t) { return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e }, r.extends = Object.assign || function (e) { for (var r = 1; r < arguments.length; r++) { var t = arguments[r]; for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) } return e }, r.get = function e(r, t, n) { null === r && (r = Function.prototype); var o = Object.getOwnPropertyDescriptor(r, t); if (void 0 === o) { var i = Object.getPrototypeOf(r); return null === i ? void 0 : e(i, t, n) } if ("value" in o) return o.value; var a = o.get; if (void 0 !== a) return a.call(n) }, r.inherits = function (e, r) { if ("function" != typeof r && null !== r) throw new TypeError("Super expression must either be null or a function, not " + typeof r); e.prototype = Object.create(r && r.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), r && (Object.setPrototypeOf ? Object.setPrototypeOf(e, r) : e.__proto__ = r) }, r.instanceof = function (e, r) { return null != r && "undefined" != typeof Symbol && r[Symbol.hasInstance] ? r[Symbol.hasInstance](e) : e instanceof r }, r.newArrowCheck = function (e, r) { if (e !== r) throw new TypeError("Cannot instantiate an arrow function") }, r.objectDestructuringEmpty = function (e) { if (null == e) throw new TypeError("Cannot destructure undefined") }, r.objectWithoutProperties = function (e, r) { var t = {}; for (var n in e) r.indexOf(n) >= 0 || Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); return t }, r.possibleConstructorReturn = function (e, r) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !r || "object" != typeof r && "function" != typeof r ? e : r }, r.set = function e(r, t, n, o) { var i = Object.getOwnPropertyDescriptor(r, t); if (void 0 === i) { var a = Object.getPrototypeOf(r); null !== a && e(a, t, n, o) } else if ("value" in i && i.writable) i.value = n; else { var u = i.set; void 0 !== u && u.call(o, n) } return n }, r.slicedToArray = function () { function e(e, r) { var t = [], n = !0, o = !1, i = void 0; try { for (var a, u = e[Symbol.iterator](); !(n = (a = u.next()).done) && (t.push(a.value), !r || t.length !== r); n = !0); } catch (e) { o = !0, i = e } finally { try { !n && u.return && u.return() } finally { if (o) throw i } } return t } return function (r, t) { if (Array.isArray(r)) return r; if (Symbol.iterator in Object(r)) return e(r, t); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }(), r.taggedTemplateLiteral = function (e, r) { return Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(r) } })) }, r.temporalRef = function (e, r, t) { if (e === t) throw new ReferenceError(r + " is not defined - temporal dead zone"); return e }, r.temporalUndefined = {}, r.toArray = function (e) { return Array.isArray(e) ? e : Array.from(e) }, r.toConsumableArray = function (e) { if (Array.isArray(e)) { for (var r = 0, t = Array(e.length); r < e.length; r++)t[r] = e[r]; return t } return Array.from(e) } }("undefined" == typeof global ? self : global);
/* this script must run before Polymer is imported */
window.Polymer = {
dom: 'shady',
lazyRegister: true
};
</script>
<link rel="stylesheet" href="webcomponents/bower_components/haxcms-elements/base.css">
<link rel="import" href="webcomponents/bower_components/polymer/polymer.html">
<link rel="import" href="webcomponents/bower_components/haxcms-elements/haxcms-site-listing.html">
<!-- Adding Favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="assets/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="assets/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="assets/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="assets/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="assets/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="assets/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="assets/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="assets/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="webcomponents/bower_components/haxcms-elements/base.css">
<style>
html, body {
margin: 0;
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
background: #f1f1f1;
}
</style>
</head>
<body>
<haxcms-site-listing create-params='{"token":"<?php print $HAXCMS->getRequestToken();?>"}' base-path="<?php print $HAXCMS->basePath;?>" data-source="<?php print $HAXCMS->sitesJSON;?>"></haxcms-site-listing>
<script>
(function () {
if ('registerElement' in document
&& 'import' in document.createElement('link')
&& 'content' in document.createElement('template')) {
// platform is good!
} else {
// polyfill the platform!
var e = document.createElement('script');
e.src = 'webcomponents/bower_components/webcomponentsjs/webcomponents.min.js';
document.body.appendChild(e);
// c1 -> c0 ponyfill avoiding conflicts in FF w/ timing
setTimeout(() => {
var e2 = document.createElement('script');
e2.src = 'webcomponents/bower_components/document-register-element/build/document-register-element.js';
document.body.appendChild(e2);
}, 50);
}
})();
</script>
<noscript>Please enable JavaScript to view this website.</noscript>
</body>
</html>
47 changes: 47 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "My blog",
"short_name": "myblog",
"description": "A blog about all my awesomeness",
"icons": [
{
"src": "assets\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "assets\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "assets\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "assets\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "assets\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "assets\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
],
"start_url": "/",
"display": "standalone",
"theme_color": "#3f51b5",
"background_color": "#3f51b5"
}
5 changes: 4 additions & 1 deletion scripts/haxtheweb.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Welcome to HAXCMS. Decentralize already.

# where am i? move to where I am. This ensures source is properly sourced
Expand Down Expand Up @@ -65,10 +65,13 @@ if [ -z $surgepassword ]; then
fi
sed -i "s/surgepassword/${surgepassword}/g" _config/config.php
# seed login info so we have an account primed

cat <<EOF | surge login
$email
$surgepassword
EOF

# only if you use apache
if [ -z $1 ]; then
haxecho "www-data or apache is common, hit enter to ignore"
Expand Down
7 changes: 4 additions & 3 deletions scripts/surgepublish.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/bin/sh
#!/bin/bash
# Get surge.sh setup
# where am i? move to where I am. This ensures source is properly sourced
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
#email
email=$1
#pwd
password=$2
surgepassword=$2
# project name
projectname=$3
# seed login info just to make it work
cat <<EOF | surge login
$email
$password
$surgepassword
EOF
# move into project to operate on it
cd "../_sites/${projectname}"
Expand Down
Loading

0 comments on commit ddd8772

Please sign in to comment.