added templates and foundation framework
This commit is contained in:
parent
9dccf24cf2
commit
bc35f40f9e
19 changed files with 18925 additions and 0 deletions
BIN
cmd/feedizer/internal/static/favicon.ico
Normal file
BIN
cmd/feedizer/internal/static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
0
cmd/feedizer/internal/static/lib/foundation/css/app.css
Normal file
0
cmd/feedizer/internal/static/lib/foundation/css/app.css
Normal file
6456
cmd/feedizer/internal/static/lib/foundation/css/foundation.css
vendored
Normal file
6456
cmd/feedizer/internal/static/lib/foundation/css/foundation.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
cmd/feedizer/internal/static/lib/foundation/css/foundation.min.css
vendored
Normal file
1
cmd/feedizer/internal/static/lib/foundation/css/foundation.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
171
cmd/feedizer/internal/static/lib/foundation/index.html
Normal file
171
cmd/feedizer/internal/static/lib/foundation/index.html
Normal file
|
@ -0,0 +1,171 @@
|
|||
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Foundation for Sites</title>
|
||||
<link rel="stylesheet" href="css/foundation.css">
|
||||
<link rel="stylesheet" href="css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="grid-container">
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-12 cell">
|
||||
<h1>Welcome to Foundation</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-12 cell">
|
||||
<div class="callout">
|
||||
<h3>We’re stoked you want to try Foundation! </h3>
|
||||
<p>To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.</p>
|
||||
<p>Once you've exhausted the fun in this document, you should check out:</p>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-4 medium-4 cell">
|
||||
<p><a href="https://get.foundation/sites/docs/">Foundation Documentation</a><br />Everything you need to know about using the framework.</p>
|
||||
</div>
|
||||
<div class="large-4 medium-4 cell">
|
||||
<p><a href="https://github.com/foundation/foundation-sites/discussions">Foundation Forum</a><br />Join the Foundation community to ask a question or show off your knowlege.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-4 medium-4 medium-push-2 cell">
|
||||
<p><a href="https://github.com/foundation/foundation-sites">Foundation on Github</a><br />Latest code, issue reports, feature requests and more.</p>
|
||||
</div>
|
||||
<div class="large-4 medium-4 medium-pull-2 cell">
|
||||
<p><a href="https://twitter.com/FoundationCSS">@FoundationCSS</a><br />Ping us on Twitter if you have questions. When you build something with this we'd love to see it.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-8 medium-8 cell">
|
||||
<h5>Here’s your basic grid:</h5>
|
||||
<!-- Grid Example -->
|
||||
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-12 cell">
|
||||
<div class="primary callout">
|
||||
<p><strong>This is a twelve cell section in a grid-x.</strong> Each of these includes a div.callout element so you can see where the cell are - it's not required at all for the grid.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-6 medium-6 cell">
|
||||
<div class="primary callout">
|
||||
<p>Six cell</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-6 medium-6 cell">
|
||||
<div class="primary callout">
|
||||
<p>Six cell</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-4 medium-4 small-4 cell">
|
||||
<div class="primary callout">
|
||||
<p>Four cell</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-4 medium-4 small-4 cell">
|
||||
<div class="primary callout">
|
||||
<p>Four cell</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-4 medium-4 small-4 cell">
|
||||
<div class="primary callout">
|
||||
<p>Four cell</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<h5>We bet you’ll need a form somewhere:</h5>
|
||||
<form>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-12 cell">
|
||||
<label>Input Label</label>
|
||||
<input type="text" placeholder="large-12.cell" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-4 medium-4 cell">
|
||||
<label>Input Label</label>
|
||||
<input type="text" placeholder="large-4.cell" />
|
||||
</div>
|
||||
<div class="large-4 medium-4 cell">
|
||||
<label>Input Label</label>
|
||||
<input type="text" placeholder="large-4.cell" />
|
||||
</div>
|
||||
<div class="large-4 medium-4 cell">
|
||||
<div class="grid-x">
|
||||
<label>Input Label</label>
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="small-9.cell" class="input-group-field" />
|
||||
<span class="input-group-label">.com</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-12 cell">
|
||||
<label>Select Box</label>
|
||||
<select>
|
||||
<option value="husker">Husker</option>
|
||||
<option value="starbuck">Starbuck</option>
|
||||
<option value="hotdog">Hot Dog</option>
|
||||
<option value="apollo">Apollo</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-6 medium-6 cell">
|
||||
<label>Choose Your Favorite</label>
|
||||
<input type="radio" name="pokemon" value="Red" id="pokemonRed"><label for="pokemonRed">Radio 1</label>
|
||||
<input type="radio" name="pokemon" value="Blue" id="pokemonBlue"><label for="pokemonBlue">Radio 2</label>
|
||||
</div>
|
||||
<div class="large-6 medium-6 cell">
|
||||
<label>Check these out</label>
|
||||
<input id="checkbox1" type="checkbox"><label for="checkbox1">Checkbox 1</label>
|
||||
<input id="checkbox2" type="checkbox"><label for="checkbox2">Checkbox 2</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-12 cell">
|
||||
<label>Textarea Label</label>
|
||||
<textarea placeholder="small-12.cell"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="large-4 medium-4 cell">
|
||||
<h5>Try one of these buttons:</h5>
|
||||
<p><a href="#" class="button">Simple Button</a><br/>
|
||||
<a href="#" class="success button">Success Btn</a><br/>
|
||||
<a href="#" class="alert button">Alert Btn</a><br/>
|
||||
<a href="#" class="secondary button">Secondary Btn</a></p>
|
||||
<div class="callout">
|
||||
<h5>So many components, girl!</h5>
|
||||
<p>A whole kitchen sink of goodies comes with Foundation. Check out the docs to see them all, along with details on making them your own.</p>
|
||||
<a href="https://get.foundation/sites/docs/" class="small button">Go to Foundation Docs</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="js/vendor/jquery.js"></script>
|
||||
<script src="js/vendor/what-input.js"></script>
|
||||
<script src="js/vendor/foundation.js"></script>
|
||||
<script src="js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
1
cmd/feedizer/internal/static/lib/foundation/js/app.js
Normal file
1
cmd/feedizer/internal/static/lib/foundation/js/app.js
Normal file
|
@ -0,0 +1 @@
|
|||
$(document).foundation()
|
531
cmd/feedizer/internal/static/lib/foundation/js/vendor/foundation.js
vendored
Normal file
531
cmd/feedizer/internal/static/lib/foundation/js/vendor/foundation.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
cmd/feedizer/internal/static/lib/foundation/js/vendor/foundation.min.js
vendored
Normal file
1
cmd/feedizer/internal/static/lib/foundation/js/vendor/foundation.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10881
cmd/feedizer/internal/static/lib/foundation/js/vendor/jquery.js
vendored
Normal file
10881
cmd/feedizer/internal/static/lib/foundation/js/vendor/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
517
cmd/feedizer/internal/static/lib/foundation/js/vendor/what-input.js
vendored
Normal file
517
cmd/feedizer/internal/static/lib/foundation/js/vendor/what-input.js
vendored
Normal file
|
@ -0,0 +1,517 @@
|
|||
/**
|
||||
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
|
||||
* @version v5.2.10
|
||||
* @link https://github.com/ten1seven/what-input
|
||||
* @license MIT
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define("whatInput", [], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["whatInput"] = factory();
|
||||
else
|
||||
root["whatInput"] = factory();
|
||||
})(this, function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function () {
|
||||
/*
|
||||
* bail out if there is no document or window
|
||||
* (i.e. in a node/non-DOM environment)
|
||||
*
|
||||
* Return a stubbed API instead
|
||||
*/
|
||||
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
||||
return {
|
||||
// always return "initial" because no interaction will ever be detected
|
||||
ask: function ask() {
|
||||
return 'initial';
|
||||
},
|
||||
|
||||
// always return null
|
||||
element: function element() {
|
||||
return null;
|
||||
},
|
||||
|
||||
// no-op
|
||||
ignoreKeys: function ignoreKeys() {},
|
||||
|
||||
// no-op
|
||||
specificKeys: function specificKeys() {},
|
||||
|
||||
// no-op
|
||||
registerOnChange: function registerOnChange() {},
|
||||
|
||||
// no-op
|
||||
unRegisterOnChange: function unRegisterOnChange() {}
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* variables
|
||||
*/
|
||||
|
||||
// cache document.documentElement
|
||||
var docElem = document.documentElement;
|
||||
|
||||
// currently focused dom element
|
||||
var currentElement = null;
|
||||
|
||||
// last used input type
|
||||
var currentInput = 'initial';
|
||||
|
||||
// last used input intent
|
||||
var currentIntent = currentInput;
|
||||
|
||||
// UNIX timestamp of current event
|
||||
var currentTimestamp = Date.now();
|
||||
|
||||
// check for a `data-whatpersist` attribute on either the `html` or `body` elements, defaults to `true`
|
||||
var shouldPersist = 'false';
|
||||
|
||||
// form input types
|
||||
var formInputs = ['button', 'input', 'select', 'textarea'];
|
||||
|
||||
// empty array for holding callback functions
|
||||
var functionList = [];
|
||||
|
||||
// list of modifier keys commonly used with the mouse and
|
||||
// can be safely ignored to prevent false keyboard detection
|
||||
var ignoreMap = [16, // shift
|
||||
17, // control
|
||||
18, // alt
|
||||
91, // Windows key / left Apple cmd
|
||||
93 // Windows menu / right Apple cmd
|
||||
];
|
||||
|
||||
var specificMap = [];
|
||||
|
||||
// mapping of events to input types
|
||||
var inputMap = {
|
||||
keydown: 'keyboard',
|
||||
keyup: 'keyboard',
|
||||
mousedown: 'mouse',
|
||||
mousemove: 'mouse',
|
||||
MSPointerDown: 'pointer',
|
||||
MSPointerMove: 'pointer',
|
||||
pointerdown: 'pointer',
|
||||
pointermove: 'pointer',
|
||||
touchstart: 'touch',
|
||||
touchend: 'touch'
|
||||
|
||||
// boolean: true if the page is being scrolled
|
||||
};var isScrolling = false;
|
||||
|
||||
// store current mouse position
|
||||
var mousePos = {
|
||||
x: null,
|
||||
y: null
|
||||
|
||||
// map of IE 10 pointer events
|
||||
};var pointerMap = {
|
||||
2: 'touch',
|
||||
3: 'touch', // treat pen like touch
|
||||
4: 'mouse'
|
||||
|
||||
// check support for passive event listeners
|
||||
};var supportsPassive = false;
|
||||
|
||||
try {
|
||||
var opts = Object.defineProperty({}, 'passive', {
|
||||
get: function get() {
|
||||
supportsPassive = true;
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('test', null, opts);
|
||||
} catch (e) {}
|
||||
// fail silently
|
||||
|
||||
|
||||
/*
|
||||
* set up
|
||||
*/
|
||||
|
||||
var setUp = function setUp() {
|
||||
// add correct mouse wheel event mapping to `inputMap`
|
||||
inputMap[detectWheel()] = 'mouse';
|
||||
|
||||
addListeners();
|
||||
};
|
||||
|
||||
/*
|
||||
* events
|
||||
*/
|
||||
|
||||
var addListeners = function addListeners() {
|
||||
// `pointermove`, `MSPointerMove`, `mousemove` and mouse wheel event binding
|
||||
// can only demonstrate potential, but not actual, interaction
|
||||
// and are treated separately
|
||||
var options = supportsPassive ? { passive: true } : false;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', setPersist);
|
||||
|
||||
// pointer events (mouse, pen, touch)
|
||||
if (window.PointerEvent) {
|
||||
window.addEventListener('pointerdown', setInput);
|
||||
window.addEventListener('pointermove', setIntent);
|
||||
} else if (window.MSPointerEvent) {
|
||||
window.addEventListener('MSPointerDown', setInput);
|
||||
window.addEventListener('MSPointerMove', setIntent);
|
||||
} else {
|
||||
// mouse events
|
||||
window.addEventListener('mousedown', setInput);
|
||||
window.addEventListener('mousemove', setIntent);
|
||||
|
||||
// touch events
|
||||
if ('ontouchstart' in window) {
|
||||
window.addEventListener('touchstart', setInput, options);
|
||||
window.addEventListener('touchend', setInput);
|
||||
}
|
||||
}
|
||||
|
||||
// mouse wheel
|
||||
window.addEventListener(detectWheel(), setIntent, options);
|
||||
|
||||
// keyboard events
|
||||
window.addEventListener('keydown', setInput);
|
||||
window.addEventListener('keyup', setInput);
|
||||
|
||||
// focus events
|
||||
window.addEventListener('focusin', setElement);
|
||||
window.addEventListener('focusout', clearElement);
|
||||
};
|
||||
|
||||
// checks if input persistence should happen and
|
||||
// get saved state from session storage if true (defaults to `false`)
|
||||
var setPersist = function setPersist() {
|
||||
shouldPersist = !(docElem.getAttribute('data-whatpersist') || document.body.getAttribute('data-whatpersist') === 'false');
|
||||
|
||||
if (shouldPersist) {
|
||||
// check for session variables and use if available
|
||||
try {
|
||||
if (window.sessionStorage.getItem('what-input')) {
|
||||
currentInput = window.sessionStorage.getItem('what-input');
|
||||
}
|
||||
|
||||
if (window.sessionStorage.getItem('what-intent')) {
|
||||
currentIntent = window.sessionStorage.getItem('what-intent');
|
||||
}
|
||||
} catch (e) {
|
||||
// fail silently
|
||||
}
|
||||
}
|
||||
|
||||
// always run these so at least `initial` state is set
|
||||
doUpdate('input');
|
||||
doUpdate('intent');
|
||||
};
|
||||
|
||||
// checks conditions before updating new input
|
||||
var setInput = function setInput(event) {
|
||||
var eventKey = event.which;
|
||||
var value = inputMap[event.type];
|
||||
|
||||
if (value === 'pointer') {
|
||||
value = pointerType(event);
|
||||
}
|
||||
|
||||
var ignoreMatch = !specificMap.length && ignoreMap.indexOf(eventKey) === -1;
|
||||
|
||||
var specificMatch = specificMap.length && specificMap.indexOf(eventKey) !== -1;
|
||||
|
||||
var shouldUpdate = value === 'keyboard' && eventKey && (ignoreMatch || specificMatch) || value === 'mouse' || value === 'touch';
|
||||
|
||||
// prevent touch detection from being overridden by event execution order
|
||||
if (validateTouch(value)) {
|
||||
shouldUpdate = false;
|
||||
}
|
||||
|
||||
if (shouldUpdate && currentInput !== value) {
|
||||
currentInput = value;
|
||||
|
||||
persistInput('input', currentInput);
|
||||
doUpdate('input');
|
||||
}
|
||||
|
||||
if (shouldUpdate && currentIntent !== value) {
|
||||
// preserve intent for keyboard interaction with form fields
|
||||
var activeElem = document.activeElement;
|
||||
var notFormInput = activeElem && activeElem.nodeName && (formInputs.indexOf(activeElem.nodeName.toLowerCase()) === -1 || activeElem.nodeName.toLowerCase() === 'button' && !checkClosest(activeElem, 'form'));
|
||||
|
||||
if (notFormInput) {
|
||||
currentIntent = value;
|
||||
|
||||
persistInput('intent', currentIntent);
|
||||
doUpdate('intent');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// updates the doc and `inputTypes` array with new input
|
||||
var doUpdate = function doUpdate(which) {
|
||||
docElem.setAttribute('data-what' + which, which === 'input' ? currentInput : currentIntent);
|
||||
|
||||
fireFunctions(which);
|
||||
};
|
||||
|
||||
// updates input intent for `mousemove` and `pointermove`
|
||||
var setIntent = function setIntent(event) {
|
||||
var value = inputMap[event.type];
|
||||
|
||||
if (value === 'pointer') {
|
||||
value = pointerType(event);
|
||||
}
|
||||
|
||||
// test to see if `mousemove` happened relative to the screen to detect scrolling versus mousemove
|
||||
detectScrolling(event);
|
||||
|
||||
// only execute if scrolling isn't happening
|
||||
if ((!isScrolling && !validateTouch(value) || isScrolling && event.type === 'wheel' || event.type === 'mousewheel' || event.type === 'DOMMouseScroll') && currentIntent !== value) {
|
||||
currentIntent = value;
|
||||
|
||||
persistInput('intent', currentIntent);
|
||||
doUpdate('intent');
|
||||
}
|
||||
};
|
||||
|
||||
var setElement = function setElement(event) {
|
||||
if (!event.target.nodeName) {
|
||||
// If nodeName is undefined, clear the element
|
||||
// This can happen if click inside an <svg> element.
|
||||
clearElement();
|
||||
return;
|
||||
}
|
||||
|
||||
currentElement = event.target.nodeName.toLowerCase();
|
||||
docElem.setAttribute('data-whatelement', currentElement);
|
||||
|
||||
if (event.target.classList && event.target.classList.length) {
|
||||
docElem.setAttribute('data-whatclasses', event.target.classList.toString().replace(' ', ','));
|
||||
}
|
||||
};
|
||||
|
||||
var clearElement = function clearElement() {
|
||||
currentElement = null;
|
||||
|
||||
docElem.removeAttribute('data-whatelement');
|
||||
docElem.removeAttribute('data-whatclasses');
|
||||
};
|
||||
|
||||
var persistInput = function persistInput(which, value) {
|
||||
if (shouldPersist) {
|
||||
try {
|
||||
window.sessionStorage.setItem('what-' + which, value);
|
||||
} catch (e) {
|
||||
// fail silently
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* utilities
|
||||
*/
|
||||
|
||||
var pointerType = function pointerType(event) {
|
||||
if (typeof event.pointerType === 'number') {
|
||||
return pointerMap[event.pointerType];
|
||||
} else {
|
||||
// treat pen like touch
|
||||
return event.pointerType === 'pen' ? 'touch' : event.pointerType;
|
||||
}
|
||||
};
|
||||
|
||||
// prevent touch detection from being overridden by event execution order
|
||||
var validateTouch = function validateTouch(value) {
|
||||
var timestamp = Date.now();
|
||||
|
||||
var touchIsValid = value === 'mouse' && currentInput === 'touch' && timestamp - currentTimestamp < 200;
|
||||
|
||||
currentTimestamp = timestamp;
|
||||
|
||||
return touchIsValid;
|
||||
};
|
||||
|
||||
// detect version of mouse wheel event to use
|
||||
// via https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
|
||||
var detectWheel = function detectWheel() {
|
||||
var wheelType = null;
|
||||
|
||||
// Modern browsers support "wheel"
|
||||
if ('onwheel' in document.createElement('div')) {
|
||||
wheelType = 'wheel';
|
||||
} else {
|
||||
// Webkit and IE support at least "mousewheel"
|
||||
// or assume that remaining browsers are older Firefox
|
||||
wheelType = document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll';
|
||||
}
|
||||
|
||||
return wheelType;
|
||||
};
|
||||
|
||||
// runs callback functions
|
||||
var fireFunctions = function fireFunctions(type) {
|
||||
for (var i = 0, len = functionList.length; i < len; i++) {
|
||||
if (functionList[i].type === type) {
|
||||
functionList[i].fn.call(undefined, type === 'input' ? currentInput : currentIntent);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// finds matching element in an object
|
||||
var objPos = function objPos(match) {
|
||||
for (var i = 0, len = functionList.length; i < len; i++) {
|
||||
if (functionList[i].fn === match) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var detectScrolling = function detectScrolling(event) {
|
||||
if (mousePos.x !== event.screenX || mousePos.y !== event.screenY) {
|
||||
isScrolling = false;
|
||||
|
||||
mousePos.x = event.screenX;
|
||||
mousePos.y = event.screenY;
|
||||
} else {
|
||||
isScrolling = true;
|
||||
}
|
||||
};
|
||||
|
||||
// manual version of `closest()`
|
||||
var checkClosest = function checkClosest(elem, tag) {
|
||||
var ElementPrototype = window.Element.prototype;
|
||||
|
||||
if (!ElementPrototype.matches) {
|
||||
ElementPrototype.matches = ElementPrototype.msMatchesSelector || ElementPrototype.webkitMatchesSelector;
|
||||
}
|
||||
|
||||
if (!ElementPrototype.closest) {
|
||||
do {
|
||||
if (elem.matches(tag)) {
|
||||
return elem;
|
||||
}
|
||||
|
||||
elem = elem.parentElement || elem.parentNode;
|
||||
} while (elem !== null && elem.nodeType === 1);
|
||||
|
||||
return null;
|
||||
} else {
|
||||
return elem.closest(tag);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* init
|
||||
*/
|
||||
|
||||
// don't start script unless browser cuts the mustard
|
||||
// (also passes if polyfills are used)
|
||||
if ('addEventListener' in window && Array.prototype.indexOf) {
|
||||
setUp();
|
||||
}
|
||||
|
||||
/*
|
||||
* api
|
||||
*/
|
||||
|
||||
return {
|
||||
// returns string: the current input type
|
||||
// opt: 'intent'|'input'
|
||||
// 'input' (default): returns the same value as the `data-whatinput` attribute
|
||||
// 'intent': includes `data-whatintent` value if it's different than `data-whatinput`
|
||||
ask: function ask(opt) {
|
||||
return opt === 'intent' ? currentIntent : currentInput;
|
||||
},
|
||||
|
||||
// returns string: the currently focused element or null
|
||||
element: function element() {
|
||||
return currentElement;
|
||||
},
|
||||
|
||||
// overwrites ignored keys with provided array
|
||||
ignoreKeys: function ignoreKeys(arr) {
|
||||
ignoreMap = arr;
|
||||
},
|
||||
|
||||
// overwrites specific char keys to update on
|
||||
specificKeys: function specificKeys(arr) {
|
||||
specificMap = arr;
|
||||
},
|
||||
|
||||
// attach functions to input and intent "events"
|
||||
// funct: function to fire on change
|
||||
// eventType: 'input'|'intent'
|
||||
registerOnChange: function registerOnChange(fn, eventType) {
|
||||
functionList.push({
|
||||
fn: fn,
|
||||
type: eventType || 'input'
|
||||
});
|
||||
},
|
||||
|
||||
unRegisterOnChange: function unRegisterOnChange(fn) {
|
||||
var position = objPos(fn);
|
||||
|
||||
if (position || position === 0) {
|
||||
functionList.splice(position, 1);
|
||||
}
|
||||
},
|
||||
|
||||
clearStorage: function clearStorage() {
|
||||
window.sessionStorage.clear();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
/***/ })
|
||||
/******/ ])
|
||||
});
|
||||
;
|
28
cmd/feedizer/internal/templates/errors/404.html
Normal file
28
cmd/feedizer/internal/templates/errors/404.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
{{ template "partials/head" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template "partials/header" . }}
|
||||
|
||||
<div class='row'>
|
||||
<div class='columns small-12'>
|
||||
<h2>Oops!</h2>
|
||||
<p>
|
||||
The {{ .Thing or "page" }} you tried to open does not
|
||||
exist. You can <a href="javascript:history.back();">
|
||||
go back</a>, or <a href="/">go home</a>.
|
||||
</p>
|
||||
<p>
|
||||
I am an Error 404 (Not Found). Retrying is futile.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "partials/footer" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
24
cmd/feedizer/internal/templates/pages/about.html
Normal file
24
cmd/feedizer/internal/templates/pages/about.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
{{ template "partials/head" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template "partials/header" . }}
|
||||
|
||||
<div class='row'>
|
||||
<div class='columns small-12'>
|
||||
<h2>What is "Feedizer"?</h2>
|
||||
<p>
|
||||
TBD
|
||||
</p>
|
||||
<p>Current version: {{ .App.Version }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "partials/footer" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
29
cmd/feedizer/internal/templates/pages/bot.html
Normal file
29
cmd/feedizer/internal/templates/pages/bot.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
{{ template "partials/head" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template "partials/header" . }}
|
||||
|
||||
<div class='row'>
|
||||
<div class='columns small-12'>
|
||||
<h2>About the FeedizerBot</h2>
|
||||
<p>Current version: {{ .Crawler.Version }}, updated on
|
||||
{{ .Crawler.LastUpdated | printf "%A, %Y-%m-%d" }}.</p>
|
||||
<p>
|
||||
TBD
|
||||
</p>
|
||||
<h3>Don't want your site to be feedized?</h3>
|
||||
<p>
|
||||
Support for <code>robots.txt</code> will be added by no later than version 1.0 of the crawler.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "partials/footer" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
160
cmd/feedizer/internal/templates/pages/home.html
Normal file
160
cmd/feedizer/internal/templates/pages/home.html
Normal file
|
@ -0,0 +1,160 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
{{ template "partials/head" . }}
|
||||
|
||||
<script type='text/javascript'>
|
||||
function updateDescriptionCharCount() {
|
||||
var desclen = document.getElementById('description').value.length;
|
||||
document.getElementById('descriptionCharCount').innerHTML = desclen;
|
||||
if (desclen < 1000)
|
||||
document.getElementById('descriptionContainer').setAttribute('class', 'columns small-12');
|
||||
else
|
||||
document.getElementById('descriptionContainer').setAttribute('class', 'columns small-12 error');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template "partials/header" . }}
|
||||
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12 medium-5 large-6'>
|
||||
|
||||
<p>
|
||||
Make a feed of almost anything!*<br>
|
||||
<span style='font-size: small;'>* Currently, everything means only HTTP(S)</span>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class='cell small-12 medium-7 large-6'>
|
||||
|
||||
<form action='/feed' method='post'>
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12{{ if .Form.Name.HasError }} error{{ end }}'>
|
||||
<label for=slug>Name <small>Required. Allowed Chars: a-z A-Z 0-9 _ . -</small></label>
|
||||
<input type=text name=slug id=slug required pattern='^[a-zA-Z0-9_\.\+-]+$' placeholder='Name'
|
||||
autofocus value='{{ .Form.Name.Value }}'>
|
||||
{{ if .Form.Name.HasError }}<small class='error'>{{ .Form.Name.ErrorMessage }}</small>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12{{ if .Form.URI.HasError }} error{{ end }}'>
|
||||
<label for=uri>URI <small>Required</small></label>
|
||||
<input type=text name=uri id=uri required
|
||||
pattern='^https?://[a-zA-Z0-9_\.-]+\.[a-zA-Z0-9]{2,}(/.*)?$'
|
||||
placeholder='https://example.com/news/' value='{{ .Form.URI.Value }}'>
|
||||
{{ if .Form.URI.HasError }}<small class='error'>{{ .Form.URI.ErrorMessage }}</small>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12 medium-12 large-12 {{ if .Form.Interval.HasError }} error{{ end }}'>
|
||||
<label for=refresh_interval><span>Refresh interval</span></label>
|
||||
<select name=interval id=interval required>
|
||||
<option value=request {{ if eq .Form.Interval.Value "request" }}selected{{ end }}>on request
|
||||
</option>
|
||||
<option value='900' {{ if eq .Form.Interval.Value 900 }}selected{{ end }}>15 minutes
|
||||
</option>
|
||||
<option value='1800' {{ if eq .Form.Interval.Value 1800 }}selected{{ end }}>30 minutes
|
||||
</option>
|
||||
<option value='3600' {{ if or (eq .Form.Interval.Value 3600) (not .Form.Interval.Value)
|
||||
}}selected{{ end }}>1 hour</option>
|
||||
<option value='7200' {{ if eq .Form.Interval.Value 7200 }}selected{{ end }}>2 hours</option>
|
||||
<option value='10800' {{ if eq .Form.Interval.Value 10800 }}selected{{ end }}>3 hours
|
||||
</option>
|
||||
<option value='21600' {{ if eq .Form.Interval.Value 21600 }}selected{{ end }}>6 hours
|
||||
</option>
|
||||
<option value='43200' {{ if eq .Form.Interval.Value 43200 }}selected{{ end }}>12 hours
|
||||
</option>
|
||||
<option value='86400' {{ if eq .Form.Interval.Value 86400 }}selected{{ end }}>24 hours
|
||||
</option>
|
||||
</select>
|
||||
{{ if .Form.Interval.HasError }}<small class='error'>{{ .Form.Interval.ErrorMessage }}</small>{{
|
||||
end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='grid-x grid-margin-x{{ if .Form.Expire.HasError }} error{{ end }}'>
|
||||
<!-- <div class='cell small-5 medium-6 large-2'>
|
||||
<div class="switch">
|
||||
<input class="switch-input" id="expire" type="checkbox" name="expire">
|
||||
<label class="switch-paddle" for="expire">
|
||||
<span class="show-for-sr">Expire?</span>
|
||||
</label>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class='cell shrink'>
|
||||
<div class="">
|
||||
<input class="" id="expire" type="checkbox" name="expire">
|
||||
<label class="" for="expire">Expire in</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class='cell auto'>
|
||||
<div class="input-group">
|
||||
<!-- <div class="input-group-label">
|
||||
<input class="" id="expire" type="checkbox" name="expire">
|
||||
<label class="show-for-sr" for="expire">Expire?</label>
|
||||
</div> -->
|
||||
<!-- <label class='input-group-label' for=expire>Expire in</label> -->
|
||||
<input class="input-group-field" type=text name=expire_value id=expire_value
|
||||
value='{{ .Form.Expire.Value }}'>
|
||||
<select class='input-group-field' name=expire_unit id=expire_unit>
|
||||
<option value='h' {{ if eq .Form.Expire.Unit "h" }}selected{{ end }}>hours</option>
|
||||
<option value='d' {{ if eq .Form.Expire.Unit "d" }}selected{{ end }}>days</option>
|
||||
<option value='w' {{ if eq .Form.Expire.Unit "w" }}selected{{ end }}>weeks</option>
|
||||
<option value='m' {{ if eq .Form.Expire.Unit "m" }}selected{{ end }}>months
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{ if .Form.Expire.HasError }}<small class='error'>{{ .Form.Expire.ErrorMessage }}</small>{{ end
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12{{ if .Form.Description.HasError }} error{{ end }}'
|
||||
id='descriptionContainer'>
|
||||
<label for=description>Description <small>No HTML Allowed. <span
|
||||
id='descriptionCharCount'>0</span> of 1000 Characters Used.</small></label>
|
||||
<textarea name=description id=description rows=2
|
||||
oninput='updateDescriptionCharCount()'>{{ .Form.Description.Value }}</textarea>
|
||||
{{ if .Form.Description.HasError }}<small class='error'>{{ .Form.Description.ErrorMessage
|
||||
}}</small>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12{{ if .Form.Password.HasError }} error{{ end }}'>
|
||||
<label for=password>Password <small>for Editing and Deleting</small></label>
|
||||
<input type=password name=password id=password oninput='passwordChanged()'>
|
||||
{{ if .Form.Password.HasError }}<small class='error'>{{ .Form.Password.ErrorMessage }}</small>{{
|
||||
end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='grid-x grid-margin-x' id='password_verificationContainer'>
|
||||
<div class='cell small-12{{ if .Form.PasswordVerification.HasError }} error{{ end }}'>
|
||||
<label for=password_verification>Password verification</label>
|
||||
<input type=password name=password_verification id=password_verification>
|
||||
{{ if .Form.PasswordVerification.HasError }}<small class='error'>{{
|
||||
.Form.PasswordVerification.ErrorMessage }}</small>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12'>
|
||||
<input type=submit class='button' value='Feedize it!'>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "partials/footer" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
23
cmd/feedizer/internal/templates/pages/imprint.html
Normal file
23
cmd/feedizer/internal/templates/pages/imprint.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
{{ template "partials/head" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template "partials/header" . }}
|
||||
|
||||
<div class='row'>
|
||||
<div class='columns small-12'>
|
||||
<h2>Imprint</h2>
|
||||
<p>
|
||||
TBD
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "partials/footer" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
26
cmd/feedizer/internal/templates/pages/tos.html
Normal file
26
cmd/feedizer/internal/templates/pages/tos.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
{{ template "partials/head" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template "partials/header" . }}
|
||||
|
||||
<div class='row'>
|
||||
<div class='columns small-12'>
|
||||
<h2>Terms of Service</h2>
|
||||
<p>
|
||||
By using this service, you understand and acknowledge the following terms of service:
|
||||
</p>
|
||||
<p>
|
||||
TBD
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ template "partials/footer" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
20
cmd/feedizer/internal/templates/partials/footer.html
Normal file
20
cmd/feedizer/internal/templates/partials/footer.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<footer class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12'>
|
||||
<hr>
|
||||
<ul class='breadcrumbs'>
|
||||
<li><a href='/'>Home</a></li>
|
||||
<li><a href='/about'>About Feedizer</a></li>
|
||||
<li><a href='/bot'>FeedizerBot</a></li>
|
||||
<li><a href='/tos'>Terms of Service</a></li>
|
||||
<li><a href='/imprint'>Imprint</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/static/lib/foundation/js/vendor/jquery.js"></script>
|
||||
<script src="/static/lib/foundation/js/vendor/what-input.js"></script>
|
||||
<script src="/static/lib/foundation/js/vendor/foundation.min.js"></script>
|
||||
<script>
|
||||
$(document).foundation();
|
||||
</script>
|
||||
</div>
|
33
cmd/feedizer/internal/templates/partials/head.html
Normal file
33
cmd/feedizer/internal/templates/partials/head.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<title>{{ .Title or "Feedizer" }}</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="/static/lib/foundation/css/foundation.css">
|
||||
|
||||
<style type='text/css'>
|
||||
body {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.announce-foot {
|
||||
color: #6F6F6F;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
label small {
|
||||
font-size: 66% !important;
|
||||
text-transform: none !important;
|
||||
}
|
||||
|
||||
.gray-out {
|
||||
opacity: 0.6;
|
||||
transition: opacity 300ms ease-out 0s;
|
||||
}
|
||||
|
||||
.gray-out:active,
|
||||
.gray-out:focus,
|
||||
.gray-out:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
23
cmd/feedizer/internal/templates/partials/header.html
Normal file
23
cmd/feedizer/internal/templates/partials/header.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<div class="grid-container">
|
||||
<header class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12'>
|
||||
<a href='/' class='text-center'><h1><span style='color: #E3702D;'>Feedizer</span></h1></a>
|
||||
<hr>
|
||||
</div>
|
||||
</header>
|
||||
{{ if and .GlobalAnnouncement .GlobalAnnouncement.IsImportant }}
|
||||
<div class='grid-x grid-margin-x'>
|
||||
<div class='cell small-12'>
|
||||
<div class='alert-box warning text-center'>
|
||||
<h3>{{ .GlobalAnnouncement.Title }}</h3>
|
||||
{{ if .GlobalAnnouncement.Abstract }}
|
||||
<p>{{ .GlobalAnnouncement.Abstract }}</p>
|
||||
<p><a href='/announcement/{{ .GlobalAnnouncement.ID }}/{{ .GlobalAnnouncement.Title }}'>Read more…</a></p>
|
||||
{{else}}
|
||||
<p>{{ .GlobalAnnouncement.Content }}</p>
|
||||
{{ end }}
|
||||
<div class='text-right announce-foot'>{{ .GlobalAnnouncement.Date | printf "%A, %Y-%m-%d %H:%M" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Reference in a new issue