diff --git a/demo.js b/demo-386.js similarity index 100% rename from demo.js rename to demo-386.js diff --git a/demo-386.scss b/demo-386.scss new file mode 100644 index 0000000..2ceb4d8 --- /dev/null +++ b/demo-386.scss @@ -0,0 +1,197 @@ +/** + * variables + * + */ + +$text-color: #000; +$link-color: #fefe5b; +$background-color: #000084; +$background-contrast-color: #bbbbbb; + + +/** + * default elements + * + */ + +body { + color: $text-color; + background-color: $background-color; + font-family: 'PxPlus IBM VGA8', sans-serif; + font-style: normal; + font-size: 1.2rem; +} + +*:first-letter { + color: $link-color; +} + +a { + color: $text-color; + text-decoration: none; +} + + +/** + * navigation + * + * + */ + +nav { + ul { + list-style: none; + border: 3px solid #000; + margin: 0; + padding: 0.6em 0.8em; + + a { + display: block; + padding: 0.1em; + margin: -0.1em; + + &:hover, &.current { + color: #fff; + background-color: $text-color; + } + } + } +} + + +/** + * footer + * + * + */ + +footer { + position: absolute; + bottom: 0; + z-index: -1; + + text-align: center; + font-size: 3rem; + width: 100%; + + background: #000; + padding: 0.8em 0; + + i { + color: #fff !important; + } +} + + +/** + * panel + * + * + */ + +.panel { + padding: 6px 0; + background-color: $background-contrast-color; +} + + +/** + * icons + * + * + */ + +[class^="icon-tiny"], [class*=" icon-tiny"] { + font-family: 'PxPlus IBM VGA8', sans-serif !important; + font-style: normal; + color: $link-color; +} + +.icon-tiny-hamburger-open, .icon-tiny-hamburger-close { + position: absolute; + top: 3px; + transition: transform .2s; + margin: 3px; + + &:after { + content: '\2bc5'; + } +} + +.icon-tiny-hamburger-open { + transform: rotate(0deg); +} + +.icon-tiny-hamburger-close { + transform: rotate(180deg); +} + + +/** + * tiny-tiny-hamburger + * + * + */ + +.tiny-hamburger { + &__inner { + padding: 4px 8px 5px; + } + + // modal with animation + &__modal { + height: auto; + max-height: 0; + overflow: hidden; + transition: max-height 0.2s; + } + + &__button { + appearance: none; + border: none; + background: transparent; + padding: 0.3em 0.5em; + + &:hover { + cursor: pointer; + outline: none; + background-color: $background-contrast-color; + } + + &:focus { + outline: none; + } + } +} + +.navbar { + position: fixed; + width: 100%; + text-align: center; + background-color: white; + + li { + display: inline-block; + margin: 0 0.3em; + + a { + display: block; + transition: all .1s ease-in-out; + + &:hover { + transform: scale(1.3); + } + } + + &.current { + a { + transform: scale(1.3); + } + } + } +} + +.section { + padding: 6em; + line-height: 1.8; +} diff --git a/dist/css/demo-386.css b/dist/css/demo-386.css new file mode 100644 index 0000000..30fceef --- /dev/null +++ b/dist/css/demo-386.css @@ -0,0 +1,186 @@ +@charset "UTF-8"; + +/** + * variables + * + */ + +/** + * default elements + * + */ + +body { + color: #000; + background-color: #000084; + font-family: "PxPlus IBM VGA8", sans-serif; + font-style: normal; + font-size: 1.2rem; +} + +*:first-letter { + color: #fefe5b; +} + +a { + color: #000; + text-decoration: none; +} + +/** + * navigation + * + * + */ + +nav ul { + list-style: none; + border: 3px solid #000; + margin: 0; + padding: 0.6em 0.8em; +} + +nav ul a { + display: block; + padding: 0.1em; + margin: -0.1em; +} + +nav ul a:hover, +nav ul a.current { + color: #fff; + background-color: #000; +} + +/** + * footer + * + * + */ + +footer { + position: absolute; + bottom: 0; + z-index: -1; + text-align: center; + font-size: 3rem; + width: 100%; + background: #000; + padding: 0.8em 0; +} + +footer i { + color: #fff !important; +} + +/** + * panel + * + * + */ + +.panel { + padding: 6px 0; + background-color: #bbbbbb; +} + +/** + * icons + * + * + */ + +[class^=icon-tiny], +[class*=" icon-tiny"] { + font-family: "PxPlus IBM VGA8", sans-serif !important; + font-style: normal; + color: #fefe5b; +} + +.icon-tiny-hamburger-open, +.icon-tiny-hamburger-close { + position: absolute; + top: 3px; + transition: transform 0.2s; + margin: 3px; +} + +.icon-tiny-hamburger-open:after, +.icon-tiny-hamburger-close:after { + content: "\2BC5"; +} + +.icon-tiny-hamburger-open { + transform: rotate(0deg); +} + +.icon-tiny-hamburger-close { + transform: rotate(180deg); +} + +/** + * tiny-tiny-hamburger + * + * + */ + +.tiny-hamburger__inner { + padding: 4px 8px 5px; +} + +.tiny-hamburger__modal { + height: auto; + max-height: 0; + overflow: hidden; + transition: max-height 0.2s; +} + +.tiny-hamburger__button { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border: none; + background: transparent; + padding: 0.3em 0.5em; +} + +.tiny-hamburger__button:hover { + cursor: pointer; + outline: none; + background-color: #bbbbbb; +} + +.tiny-hamburger__button:focus { + outline: none; +} + +.navbar { + position: fixed; + width: 100%; + text-align: center; + background-color: white; +} + +.navbar li { + display: inline-block; + margin: 0 0.3em; +} + +.navbar li a { + display: block; + transition: all 0.1s ease-in-out; +} + +.navbar li a:hover { + transform: scale(1.3); +} + +.navbar li.current a { + transform: scale(1.3); +} + +.section { + padding: 6em; + line-height: 1.8; +} + diff --git a/dist/index.html b/dist/index.html index 03cfd68..c9cb33b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -8,7 +8,7 @@ - +
@@ -63,6 +63,6 @@ - + diff --git a/dist/js/demo-386.js b/dist/js/demo-386.js new file mode 100644 index 0000000..97574c3 --- /dev/null +++ b/dist/js/demo-386.js @@ -0,0 +1,2713 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./demo-386.js": +/*!*********************!*\ + !*** ./demo-386.js ***! + \*********************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var riot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js"); +/* harmony import */ var _src_TinyOnePage_riot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/TinyOnePage.riot */ "./src/TinyOnePage.riot"); + + +riot__WEBPACK_IMPORTED_MODULE_0__["register"]('tiny-one-page', _src_TinyOnePage_riot__WEBPACK_IMPORTED_MODULE_1__["default"]); // adding component with animate object + +riot__WEBPACK_IMPORTED_MODULE_0__["mount"]('tiny-one-page'); + +/***/ }), + +/***/ "./demo-386.scss": +/*!***********************!*\ + !*** ./demo-386.scss ***! + \***********************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), + +/***/ "./node_modules/riot/riot.esm.js": +/*!***************************************!*\ + !*** ./node_modules/riot/riot.esm.js ***! + \***************************************/ +/*! exports provided: __, component, install, mount, register, uninstall, unmount, unregister, version */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__", function() { return __; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "component", function() { return component; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mount", function() { return mount; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "register", function() { return register; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uninstall", function() { return uninstall; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unmount", function() { return unmount; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregister", function() { return unregister; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); +/* Riot v4.5.0, @license MIT */ +const COMPONENTS_IMPLEMENTATION_MAP = new Map(), + DOM_COMPONENT_INSTANCE_PROPERTY = Symbol('riot-component'), + PLUGINS_SET = new Set(), + IS_DIRECTIVE = 'is', + VALUE_ATTRIBUTE = 'value', + ATTRIBUTES_KEY_SYMBOL = Symbol('attributes'), + TEMPLATE_KEY_SYMBOL = Symbol('template'); + +var globals = /*#__PURE__*/Object.freeze({ + COMPONENTS_IMPLEMENTATION_MAP: COMPONENTS_IMPLEMENTATION_MAP, + DOM_COMPONENT_INSTANCE_PROPERTY: DOM_COMPONENT_INSTANCE_PROPERTY, + PLUGINS_SET: PLUGINS_SET, + IS_DIRECTIVE: IS_DIRECTIVE, + VALUE_ATTRIBUTE: VALUE_ATTRIBUTE, + ATTRIBUTES_KEY_SYMBOL: ATTRIBUTES_KEY_SYMBOL, + TEMPLATE_KEY_SYMBOL: TEMPLATE_KEY_SYMBOL +}); + +/** + * Remove the child nodes from any DOM node + * @param {HTMLElement} node - target node + * @returns {undefined} + */ +function cleanNode(node) { + clearChildren(node.childNodes); +} +/** + * Clear multiple children in a node + * @param {HTMLElement[]} children - direct children nodes + * @returns {undefined} + */ + + +function clearChildren(children) { + Array.from(children).forEach(n => n.parentNode && n.parentNode.removeChild(n)); +} + +const EACH = 0; +const IF = 1; +const SIMPLE = 2; +const TAG = 3; +const SLOT = 4; +var bindingTypes = { + EACH, + IF, + SIMPLE, + TAG, + SLOT +}; +/** + * Create the template meta object in case of