From 86ea1a91455c32362d2a35e90806338c58518b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Dori=C4=87?= Date: Thu, 20 Apr 2017 16:49:00 +0200 Subject: [PATCH] Making Websites With October CMS - Part 37 - Laravel Mix and Webpack --- .jshintrc | 3 + gulpfile.js | 4 +- octobermovies.sublime-workspace | 304 ++++++++++---- package.json | 9 +- public/dist/app.js | 90 +++++ public/dist/style.css | 486 +++++++++++++++++++++++ public/mix-manifest.json | 4 + themes/olympos/assets/dist/css/style.css | 486 +++++++++++++++++++++++ themes/olympos/assets/dist/js/app.js | 124 ++++++ themes/olympos/assets/js/app.js | 12 + themes/olympos/assets/js/sayhi.js | 7 + themes/olympos/assets/mix-manifest.json | 4 + themes/olympos/layouts/default.htm | 5 +- webpack.config.js | 433 ++++++++++++++++++++ webpack.mix.js | 54 +++ 15 files changed, 1943 insertions(+), 82 deletions(-) create mode 100644 .jshintrc create mode 100644 public/dist/app.js create mode 100644 public/dist/style.css create mode 100644 public/mix-manifest.json create mode 100644 themes/olympos/assets/dist/css/style.css create mode 100644 themes/olympos/assets/dist/js/app.js create mode 100644 themes/olympos/assets/js/sayhi.js create mode 100644 themes/olympos/assets/mix-manifest.json create mode 100644 webpack.config.js create mode 100644 webpack.mix.js diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..8ab3485 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,3 @@ +{ + "esversion": 6 +} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index d365d6f..57ce583 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,6 +17,6 @@ elixir(function(mix){ 'themes/olympos/assets/compiled/css/style.css', 'themes/olympos/**/*.htm', 'themes/olympos/assets/compiled/js/*.js' - ]) + ]); -}) \ No newline at end of file +}); \ No newline at end of file diff --git a/octobermovies.sublime-workspace b/octobermovies.sublime-workspace index f567ace..a9da071 100644 --- a/octobermovies.sublime-workspace +++ b/octobermovies.sublime-workspace @@ -336,37 +336,63 @@ "buffers": [ { - "file": "plugins/watchlearn/movies/controllers/Movies.php", + "file": "package.json", "settings": { - "buffer_size": 657, + "buffer_size": 1041, "encoding": "UTF-8", "line_ending": "Unix" } }, { - "file": "plugins/watchlearn/movies/controllers/movies/config_relation.yaml", + "file": "webpack.mix.js", "settings": { - "buffer_size": 346, + "buffer_size": 2294, "encoding": "UTF-8", "line_ending": "Unix" } }, { - "file": "plugins/watchlearn/movies/models/movie/fields.yaml", + "file": "themes/olympos/layouts/default.htm", "settings": { - "buffer_size": 1389, + "buffer_size": 1676, "encoding": "UTF-8", "line_ending": "Unix" } }, { - "file": "plugins/watchlearn/movies/controllers/movies/update.htm", + "file": "themes/olympos/assets/sass/_globals.scss", "settings": { - "buffer_size": 2357, + "buffer_size": 2196, + "encoding": "UTF-8", + "line_ending": "Unix" + } + }, + { + "file": "themes/olympos/assets/js/app.js", + "settings": + { + "buffer_size": 169, + "encoding": "UTF-8", + "line_ending": "Unix" + } + }, + { + "file": "themes/olympos/assets/dist/js/app.js", + "settings": + { + "buffer_size": 3704, + "line_ending": "Unix" + } + }, + { + "file": "themes/olympos/assets/js/sayhi.js", + "settings": + { + "buffer_size": 117, "encoding": "UTF-8", "line_ending": "Unix" } @@ -594,19 +620,32 @@ "expanded_folders": [ "/Users/idoric/Development/public/octobermovies", - "/Users/idoric/Development/public/octobermovies/plugins", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/models", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/models/movie" + "/Users/idoric/Development/public/octobermovies/public", + "/Users/idoric/Development/public/octobermovies/public/dist", + "/Users/idoric/Development/public/octobermovies/themes", + "/Users/idoric/Development/public/octobermovies/themes/olympos", + "/Users/idoric/Development/public/octobermovies/themes/olympos/assets", + "/Users/idoric/Development/public/octobermovies/themes/olympos/assets/dist", + "/Users/idoric/Development/public/octobermovies/themes/olympos/assets/dist/css", + "/Users/idoric/Development/public/octobermovies/themes/olympos/assets/dist/js", + "/Users/idoric/Development/public/octobermovies/themes/olympos/assets/js", + "/Users/idoric/Development/public/octobermovies/themes/olympos/assets/sass", + "/Users/idoric/Development/public/octobermovies/themes/olympos/layouts" ], "file_history": [ + "/Users/idoric/Development/public/octobermovies/package.json", + "/Users/idoric/Development/public/octobermovies/themes/olympos/assets/js/app.js", + "/Users/idoric/Development/public/octobermovies/gulpfile.js", + "/Users/idoric/Library/Application Support/Sublime Text 3/Packages/User/JavaScript.sublime-build", + "/Users/idoric/Development/public/octobermovies/webpack.mix.js", + "/Users/idoric/Development/public/octobermovies/npm-debug.log", + "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/Movies.php", + "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/config_relation.yaml", + "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/models/movie/fields.yaml", + "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/update.htm", "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/_field_genre.htm", "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/_field_actor.htm", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/config_relation.yaml", "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/config_list.yaml", "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/config_filter.yaml", "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/models/movie/columns.yaml", @@ -615,8 +654,6 @@ "/Users/idoric/Development/public/octobermovies/themes/olympos/layouts/static-layout.htm", "/Users/idoric/Development/public/octobermovies/themes/olympos/layouts/default.htm", "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/_list_toolbar.htm", - "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/movies/controllers/movies/update.htm", - "/Users/idoric/Development/public/octobermovies/gulpfile.js", "/Users/idoric/Development/public/octobermovies/plugins/watchlearn/contact/components/contactform/default.htm", "/Users/idoric/Development/public/octobermovies/themes/olympos/assets/sass/_globals.scss", "/Users/idoric/Development/public/octobermovies/config/mail.php", @@ -724,22 +761,15 @@ "/Users/ivan/Development/public/activenation/Assets/krave/index.html", "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/goldenticket.php", "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/sass/_golden-ticket.scss", - "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/parts/goldenticket/slide-02.php", - "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/sass/_homepage.scss", - "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/parts/lockeroom/lockeroom-footer.php", - "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/sass/_lockeroom-index.scss", - "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/parts/activity-slider.php", - "/Users/ivan/Library/Application Support/Sublime Text 3/Packages/User/Default (OSX).sublime-keymap", - "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/parts/newsletter-subscribe.php", - "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/parts/notes.php" + "/Users/ivan/Development/public/activenation/wp-content/themes/olympos/parts/goldenticket/slide-02.php" ], "find": { - "height": 41.0 + "height": 83.0 }, "find_in_files": { - "height": 173.0, + "height": 197.0, "where_history": [ "", @@ -949,19 +979,19 @@ [ { "buffer": 0, - "file": "plugins/watchlearn/movies/controllers/Movies.php", + "file": "package.json", "semi_transient": false, "settings": { - "buffer_size": 657, + "buffer_size": 1041, "regions": { }, "selection": [ [ - 505, - 505 + 492, + 492 ] ], "settings": @@ -969,48 +999,47 @@ "incomplete_sync": null, "remote_loading": false, "synced": false, - "syntax": "Packages/PHP/PHP.sublime-syntax", - "tabs_extra_last_activated": 1491030985.8, + "syntax": "Packages/zzz A File Icon zzz/aliases/JSON (NPM).sublime-syntax", + "tabs_extra_last_activated": 1492622727.92, "tabs_extra_last_activated_sheet_index": 0, "tabs_extra_spawned": true }, "translation.x": 0.0, - "translation.y": 0.0, + "translation.y": 170.0, "zoom_level": 1.0 }, - "stack_index": 3, + "stack_index": 6, "type": "text" }, { "buffer": 1, - "file": "plugins/watchlearn/movies/controllers/movies/config_relation.yaml", + "file": "webpack.mix.js", "semi_transient": false, "settings": { - "buffer_size": 346, + "buffer_size": 2294, "regions": { }, "selection": [ [ - 346, - 346 + 835, + 835 ] ], "settings": { - "_anf_new": "", "incomplete_sync": null, "remote_loading": false, "synced": false, - "syntax": "Packages/YAML/YAML.sublime-syntax", - "tabs_extra_last_activated": 1491035496.02, + "syntax": "Packages/Seti_UI/icons/Langs/Laravel Mix (JS).tmLanguage", + "tabs_extra_last_activated": 1492673968.67, "tabs_extra_last_activated_sheet_index": 1, "tabs_extra_spawned": true }, "translation.x": 0.0, - "translation.y": 0.0, + "translation.y": 805.0, "zoom_level": 1.0 }, "stack_index": 0, @@ -1018,19 +1047,19 @@ }, { "buffer": 2, - "file": "plugins/watchlearn/movies/models/movie/fields.yaml", + "file": "themes/olympos/layouts/default.htm", "semi_transient": false, "settings": { - "buffer_size": 1389, + "buffer_size": 1676, "regions": { }, "selection": [ [ - 1386, - 1386 + 1086, + 1086 ] ], "settings": @@ -1038,33 +1067,33 @@ "incomplete_sync": null, "remote_loading": false, "synced": false, - "syntax": "Packages/YAML/YAML.sublime-syntax", - "tabs_extra_last_activated": 1491033427.55, + "syntax": "Packages/Twig/Syntaxes/HTML (Twig).tmLanguage", + "tabs_extra_last_activated": 1492623643.56, "tabs_extra_last_activated_sheet_index": 2, "tabs_extra_spawned": true }, "translation.x": 0.0, - "translation.y": 1992.0, + "translation.y": 1081.0, "zoom_level": 1.0 }, - "stack_index": 1, + "stack_index": 5, "type": "text" }, { "buffer": 3, - "file": "plugins/watchlearn/movies/controllers/movies/update.htm", + "file": "themes/olympos/assets/sass/_globals.scss", "semi_transient": false, "settings": { - "buffer_size": 2357, + "buffer_size": 2196, "regions": { }, "selection": [ [ - 361, - 361 + 285, + 285 ] ], "settings": @@ -1072,28 +1101,131 @@ "incomplete_sync": null, "remote_loading": false, "synced": false, - "syntax": "Packages/Twig/Syntaxes/HTML (Twig).tmLanguage", - "tabs_extra_last_activated": 1491032893.51, - "tabs_extra_last_activated_sheet_index": 2, + "syntax": "Packages/Syntax Highlighting for Sass/Syntaxes/SCSS.tmLanguage", + "tabs_extra_last_activated": 1492624636.72, + "tabs_extra_last_activated_sheet_index": 3, "tabs_extra_spawned": true }, "translation.x": 0.0, - "translation.y": 194.0, + "translation.y": 171.0, + "zoom_level": 1.0 + }, + "stack_index": 4, + "type": "text" + }, + { + "buffer": 4, + "file": "themes/olympos/assets/js/app.js", + "semi_transient": false, + "settings": + { + "buffer_size": 169, + "regions": + { + }, + "selection": + [ + [ + 169, + 169 + ] + ], + "settings": + { + "incomplete_sync": null, + "remote_loading": false, + "synced": false, + "syntax": "Packages/JavaScript/JavaScript.sublime-syntax", + "tabs_extra_last_activated": 1492625597.72, + "tabs_extra_last_activated_sheet_index": 4, + "tabs_extra_spawned": true + }, + "translation.x": 0.0, + "translation.y": 0.0, "zoom_level": 1.0 }, "stack_index": 2, "type": "text" + }, + { + "buffer": 5, + "file": "themes/olympos/assets/dist/js/app.js", + "semi_transient": true, + "settings": + { + "buffer_size": 3704, + "regions": + { + }, + "selection": + [ + [ + 3138, + 3138 + ] + ], + "settings": + { + "incomplete_sync": null, + "remote_loading": false, + "synced": false, + "syntax": "Packages/JavaScript/JavaScript.sublime-syntax", + "tabs_extra_last_activated": 1492626084.44, + "tabs_extra_last_activated_sheet_index": 5, + "tabs_extra_spawned": true + }, + "translation.x": 0.0, + "translation.y": 3342.0, + "zoom_level": 1.0 + }, + "stack_index": 1, + "type": "text" + }, + { + "buffer": 6, + "file": "themes/olympos/assets/js/sayhi.js", + "semi_transient": false, + "settings": + { + "buffer_size": 117, + "regions": + { + }, + "selection": + [ + [ + 115, + 115 + ] + ], + "settings": + { + "_anf_new": "", + "incomplete_sync": null, + "remote_loading": false, + "synced": false, + "syntax": "Packages/JavaScript/JavaScript.sublime-syntax", + "tabs_extra_last_activated": 1492625492.0, + "tabs_extra_last_activated_sheet_index": 5, + "tabs_extra_spawned": true + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 3, + "type": "text" } ] } ], "incremental_find": { - "height": 41.0 + "height": 45.0 }, "input": { - "height": 75.0 + "height": 83.0 }, "layout": { @@ -1118,6 +1250,10 @@ ] }, "menu_visible": true, + "output.exec": + { + "height": 288.0 + }, "output.find_results": { "height": 0.0 @@ -1130,7 +1266,7 @@ "project": "octobermovies.sublime-project", "replace": { - "height": 78.0 + "height": 98.0 }, "save_all_on_build": true, "select_file": @@ -1657,28 +1793,48 @@ "select_project": { "height": 500.0, - "last_filter": "watch", + "last_filter": "kon", "selected_items": [ [ - "watch", - "~/Development/public/watchlearn/watchlearn.sublime-project" + "kon", + "~/Development/public/iwmndev_vipnet-company-web1/konfigurator.sublime-project" ], [ - "wat", - "~/Development/public/watchlearn/watchlearn.sublime-project" + "october", + "~/Development/public/october/october.sublime-project" ], [ - "wa", - "~/Development/public/watchlearn/watchlearn.sublime-project" + "", + "~/Development/public/iwmndev_vipnet-company-web1/konfigurator.sublime-project" + ], + [ + "to", + "~/Development/public/todoapi/todoapi.sublime-project" + ], + [ + "todo", + "~/Development/public/todoapi/todoapi.sublime-project" + ], + [ + "octobe", + "~/Development/public/todoapi/todoapi.sublime-project" ], [ "vip", "~/Burza/vip-templates/vip-templates.sublime-project" ], [ - "", - "~/Burza/patternlab/patternlab.sublime-project" + "wat", + "~/Development/public/watchlearn/watchlearn.sublime-project" + ], + [ + "watch", + "~/Development/public/watchlearn/watchlearn.sublime-project" + ], + [ + "wa", + "~/Development/public/watchlearn/watchlearn.sublime-project" ], [ "vrsar", @@ -2112,10 +2268,6 @@ "tota", "/Users/ivan/Projects/TotalTubs.sublime-project" ], - [ - "to", - "/Users/ivan/Projects/TotalTubs.sublime-project" - ], [ "urb", "/Users/ivan/Projects/UrbanSailor.sublime-project" diff --git a/package.json b/package.json index 4a391c1..b10a430 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,11 @@ "test": "tests" }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "dev": "cross-env NODE_ENV=development webpack --progress --hide-modules", + "watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules", + "hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot", + "production": "cross-env NODE_ENV=production webpack --progress --hide-modules" }, "repository": { "type": "git", @@ -21,6 +25,7 @@ "homepage": "https://github.com/ivandoric/Making-Websites-With-October-CMS#readme", "devDependencies": { "laravel-elixir": "^5.0.0", - "laravel-elixir-livereload": "^1.1.6" + "laravel-elixir-livereload": "^1.1.6", + "laravel-mix": "^0.10.0" } } diff --git a/public/dist/app.js b/public/dist/app.js new file mode 100644 index 0000000..79952dc --- /dev/null +++ b/public/dist/app.js @@ -0,0 +1,90 @@ +/******/ (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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // 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 = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(0); +module.exports = __webpack_require__(1); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/public/dist/style.css b/public/dist/style.css new file mode 100644 index 0000000..8eb5796 --- /dev/null +++ b/public/dist/style.css @@ -0,0 +1,486 @@ +/* Vendor */ + +/* Setup */ + +/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */ + +@import https://fonts.googleapis.com/css?family=Roboto:400,700; + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + margin: 0; + padding: 0; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} + +body { + line-height: 1; +} + +ol, +ul { + list-style: none; +} + +blockquote, +q { + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +/* ======================================================================= +## ++ Media Queries +========================================================================== */ + +/* + Used for media queries. + Add these mixins in your normal scss flow. + + Eg. + .container{ + width:1024px; + + @include tablets{ + width:90%; + } + } +*/ + +/* ======================================================================= +## ++ Unit transform +========================================================================== */ + +/* + Used for making containers have width in percentages. + Usage: define elemnt width in px and the width of parent elemnt in px. + eg. .block{width:cp(512px, 1024px)} this will result in .block{width:50%;} +*/ + +/* + Used for making px values convert to rem values + Usage: define font-size in px and it will convert to rems + eg. font-size: rem(14px); +*/ + +/*! Typebase.less v0.1.0 | MIT License */ + +/* Setup */ + +html { + /* Change default typefaces here */ + font-family: 'Roboto', sans-serif; + font-size: 100%; + -webkit-font-smoothing: antialiased; +} + +/* Copy & Lists */ + +p { + line-height: 1.5rem; + margin-top: 1rem; + margin-bottom: 0; + font-size: 14px; +} + +ul, +ol { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +ul li, +ol li { + line-height: 1.5rem; +} + +ul ul, +ol ul, +ul ol, +ol ol { + margin-top: 0; + margin-bottom: 0; +} + +blockquote { + line-height: 1.5rem; + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +/* Headings */ + +h1, +h2, +h3, +h4, +h5, +h6 { + /* Change heading typefaces here */ + font-family: sans-serif; + margin-top: 1em; + padding-top: 1em; + margin-bottom: 0; + line-height: 1.5rem; + color: #333; + font-weight: 700; +} + +h1 { + font-size: 1rem; + line-height: 4.5rem; + margin-top: 3rem; +} + +h2 { + font-size: 1rem; + line-height: 3rem; + margin-top: 3rem; +} + +h3 { + font-size: 1.414rem; +} + +h4 { + font-size: 0.707rem; +} + +h5 { + font-size: 0.4713333333333333rem; +} + +h6 { + font-size: 0.3535rem; +} + +/* Tables */ + +table { + margin-top: 1.5rem; + border-spacing: 0px; + border-collapse: collapse; +} + +table td, +table th { + padding: 0; + line-height: 33px; +} + +/* Code blocks */ + +code { + vertical-align: bottom; +} + +/* Leading paragraph text */ + +.lead { + font-size: 1.414rem; +} + +/* Hug the block above you */ + +.hug { + margin-top: 0; +} + +/* ======================================================================= +## ++ Globals +========================================================================== */ + +html { + font-size: 100%; +} + +body { + -webkit-font-smoothing: antialiased; + background: #fff; + color: #566b78; +} + +.container { + max-width: 40em; + margin: 0 auto; +} + +* { + box-sizing: border-box; +} + +a { + color: #e81c4f; +} + +/* +|-------------------------------------------------------------------------- +| Gallery +|-------------------------------------------------------------------------- +*/ + +.gallery { + padding: 20px 15px; + background: #efefef; + border: 1px solid #ccc; + border-radius: 3px; +} + +.gallery li { + float: left; + margin: 5px; +} + +.gallery img, +.gallery a { + display: block; +} + +/* +|-------------------------------------------------------------------------- +| Form +|-------------------------------------------------------------------------- +*/ + +form { + margin-top: 40px; +} + +form input, +form textarea { + width: 100%; + padding: 15px; + border: 1px solid #ccc; + margin-bottom: 40px; + font-size: 16px; + color: #444; +} + +form label { + display: block; + margin-bottom: 10px; +} + +form textarea { + height: 200px; +} + +form button { + border: none; + background: #E41C4E; + padding: 10px 40px; + color: #fff; + text-transform: uppercase; + font-size: 16px; + font-weight: 700; +} + +/* ======================================================================= +## ++ Cleafix +========================================================================== */ + +/* float clearing for IE6 */ + +* html .clearfix { + height: 1%; + overflow: visible; +} + +/* float clearing for IE7 */ + +* + html .clearfix { + min-height: 1%; +} + +/* float clearing for everyone else */ + +.clearfix:after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; + font-size: 0; +} + +.clr { + clear: both; +} + +.clr { + content: "test"; +} + +.flash { + padding: 20px; + color: #fff; + display: none; +} + +.flash.active { + display: block; +} + +.flash.error { + background: red; +} + +.flash.success { + background: green; +} + +.main-header { + background: #333; +} + +.main-header h1 { + color: #fff; + font-size: 1.25rem; + margin: 0; + padding: 0; + font-weight: 700; + float: left; +} + +.main-nav { + float: right; +} + +.main-nav li { + float: left; +} + +.main-nav a { + display: inline-block; + padding: 0 10px; + text-decoration: none; + text-transform: uppercase; + font-size: 12px; + font-weight: 700; +} + +.main-nav a:hover { + color: #fff; +} + +.main-nav li.active a { + text-decoration: underline; +} + +.main-footer { + background: #efefef; + padding: 20px 0; + margin-top: 40px; +} + +.main-footer h3 { + margin: 0; +} + +/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9pZG9yaWMvRGV2ZWxvcG1lbnQvcHVibGljL29jdG9iZXJtb3ZpZXMvdGhlbWVzL29seW1wb3MvYXNzZXRzL3Nhc3Mvc3R5bGUuc2NzcyIsIi9Vc2Vycy9pZG9yaWMvRGV2ZWxvcG1lbnQvcHVibGljL29jdG9iZXJtb3ZpZXMvdGhlbWVzL29seW1wb3MvYXNzZXRzL3Nhc3MvX3N1c3kuc2NzcyIsIi9Vc2Vycy9pZG9yaWMvRGV2ZWxvcG1lbnQvcHVibGljL29jdG9iZXJtb3ZpZXMvdGhlbWVzL29seW1wb3MvYXNzZXRzL3Nhc3Mvc3VzeS9sYW5ndWFnZS9fc3VzeS5zY3NzIiwiL1VzZXJzL2lkb3JpYy9EZXZlbG9wbWVudC9wdWJsaWMvb2N0b2Jlcm1vdmllcy90aGVtZXMvb2x5bXBvcy9hc3NldHMvc2Fzcy9zdXN5L19zdS5zY3NzIiwiL1VzZXJzL2lkb3JpYy9EZXZlbG9wbWVudC9w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bmUtaGVpZ2h0OiAzM3B4O1xufVxuLyogQ29kZSBibG9ja3MgKi9cbmNvZGUge1xuICB2ZXJ0aWNhbC1hbGlnbjogYm90dG9tO1xufVxuLyogTGVhZGluZyBwYXJhZ3JhcGggdGV4dCAqL1xuLmxlYWQge1xuICBmb250LXNpemU6IDEuNDE0cmVtO1xufVxuLyogSHVnIHRoZSBibG9jayBhYm92ZSB5b3UgKi9cbi5odWcge1xuICBtYXJnaW4tdG9wOiAwO1xufVxuXG4iLCIvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIyMgKysgR2xvYmFsc1xuPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi9cbmh0bWx7XG4gICAgZm9udC1zaXplOiAxMDAlO1xufVxuXG5ib2R5e1xuICAgIC13ZWJraXQtZm9udC1zbW9vdGhpbmc6IGFudGlhbGlhc2VkO1xuICAgIGJhY2tncm91bmQ6ICNmZmY7XG4gICAgY29sb3I6ICM1NjZiNzg7XG59XG5cbi5jb250YWluZXJ7XG4gICAgbWF4LXdpZHRoOiA0MGVtO1xuICAgIG1hcmdpbjowIGF1dG87XG59XG5cbip7XG4gICAgYm94LXNpemluZzpib3JkZXItYm94O1xufVxuXG5hIHtcbiAgY29sb3I6ICNlODFjNGY7XG59XG5cbi8qXG58LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbnwgR2FsbGVyeVxufC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXG4qL1xuXG4uZ2FsbGVyeXtcbiAgICBwYWRkaW5nOjIwcHggMTVweDtc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HQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG4gICAgICAgIGZvbnQtc2l6ZTogMTZweDtcbiAgICAgICAgZm9udC13ZWlnaHQ6IDcwMDtcbiAgICB9XG59XG5cblxuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiMjICsrIENsZWFmaXhcbj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovXG5cbi8qIGZsb2F0IGNsZWFyaW5nIGZvciBJRTYgKi9cbiogaHRtbCAuY2xlYXJmaXh7XG4gaGVpZ2h0OiAxJTtcbiBvdmVyZmxvdzogdmlzaWJsZTtcbn1cblxuLyogZmxvYXQgY2xlYXJpbmcgZm9yIElFNyAqL1xuKitodG1sIC5jbGVhcmZpeHtcbiBtaW4taGVpZ2h0OiAxJTtcbn1cblxuLyogZmxvYXQgY2xlYXJpbmcgZm9yIGV2ZXJ5b25lIGVsc2UgKi9cbi5jbGVhcmZpeDphZnRlcntcbiBjbGVhcjogYm90aDtcbiBjb250ZW50OiBcIi5cIjtcbiBkaXNwbGF5OiBibG9jaztcbiBoZWlnaHQ6IDA7XG4gdmlzaWJpbGl0eTogaGlkZGVuO1xuIGZvbnQtc2l6ZTogMDtcbn1cblxuLmNscntjbGVhcjpib3RoO31cbi5jbHJ7Y29udGVudDpcInRlc3RcIjt9XG5cbi5mbGFzaHtcbiAgICBwYWRkaW5nOjIwcHg7XG4gICAgY29sb3I6ICNmZmY7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgICBcbiAgICAmLmFjdGl2ZXtcbiAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgfVxuICAgIFxuICAgICYuZXJyb3J7XG4gICAgICAgIGJhY2tncm91bmQ6IHJlZDtcbiAgICB9XG5cbiAgICAmLnN1Y2Nlc3N7XG4gICAgICAgIGJhY2tncm91bmQ6I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UsRUFBRSxJQUFLO0NBS3BCOztBQVJELEFBS0ksWUFMUSxDQUtSLEVBQUUsQ0FBQTtFQUNFLE1BQU0sRUFBQyxDQUFFO0NBQ1oiLCJuYW1lcyI6W119 */ \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json new file mode 100644 index 0000000..72f250d --- /dev/null +++ b/public/mix-manifest.json @@ -0,0 +1,4 @@ +{ + "/dist/app.js": "/dist/app.js", + "/dist/style.css": "/dist/style.css" +} \ No newline at end of file diff --git a/themes/olympos/assets/dist/css/style.css b/themes/olympos/assets/dist/css/style.css new file mode 100644 index 0000000..8eb5796 --- /dev/null +++ b/themes/olympos/assets/dist/css/style.css @@ -0,0 +1,486 @@ +/* Vendor */ + +/* Setup */ + +/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */ + +@import https://fonts.googleapis.com/css?family=Roboto:400,700; + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + margin: 0; + padding: 0; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} + +body { + line-height: 1; +} + +ol, +ul { + list-style: none; +} + +blockquote, +q { + quotes: none; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +/* ======================================================================= +## ++ Media Queries +========================================================================== */ + +/* + Used for media queries. + Add these mixins in your normal scss flow. + + Eg. + .container{ + width:1024px; + + @include tablets{ + width:90%; + } + } +*/ + +/* ======================================================================= +## ++ Unit transform +========================================================================== */ + +/* + Used for making containers have width in percentages. + Usage: define elemnt width in px and the width of parent elemnt in px. + eg. .block{width:cp(512px, 1024px)} this will result in .block{width:50%;} +*/ + +/* + Used for making px values convert to rem values + Usage: define font-size in px and it will convert to rems + eg. font-size: rem(14px); +*/ + +/*! Typebase.less v0.1.0 | MIT License */ + +/* Setup */ + +html { + /* Change default typefaces here */ + font-family: 'Roboto', sans-serif; + font-size: 100%; + -webkit-font-smoothing: antialiased; +} + +/* Copy & Lists */ + +p { + line-height: 1.5rem; + margin-top: 1rem; + margin-bottom: 0; + font-size: 14px; +} + +ul, +ol { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +ul li, +ol li { + line-height: 1.5rem; +} + +ul ul, +ol ul, +ul ol, +ol ol { + margin-top: 0; + margin-bottom: 0; +} + +blockquote { + line-height: 1.5rem; + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +/* Headings */ + +h1, +h2, +h3, +h4, +h5, +h6 { + /* Change heading typefaces here */ + font-family: sans-serif; + margin-top: 1em; + padding-top: 1em; + margin-bottom: 0; + line-height: 1.5rem; + color: #333; + font-weight: 700; +} + +h1 { + font-size: 1rem; + line-height: 4.5rem; + margin-top: 3rem; +} + +h2 { + font-size: 1rem; + line-height: 3rem; + margin-top: 3rem; +} + +h3 { + font-size: 1.414rem; +} + +h4 { + font-size: 0.707rem; +} + +h5 { + font-size: 0.4713333333333333rem; +} + +h6 { + font-size: 0.3535rem; +} + +/* Tables */ + +table { + margin-top: 1.5rem; + border-spacing: 0px; + border-collapse: collapse; +} + +table td, +table th { + padding: 0; + line-height: 33px; +} + +/* Code blocks */ + +code { + vertical-align: bottom; +} + +/* Leading paragraph text */ + +.lead { + font-size: 1.414rem; +} + +/* Hug the block above you */ + +.hug { + margin-top: 0; +} + +/* ======================================================================= +## ++ Globals +========================================================================== */ + +html { + font-size: 100%; +} + +body { + -webkit-font-smoothing: antialiased; + background: #fff; + color: #566b78; +} + +.container { + max-width: 40em; + margin: 0 auto; +} + +* { + box-sizing: border-box; +} + +a { + color: #e81c4f; +} + +/* +|-------------------------------------------------------------------------- +| Gallery +|-------------------------------------------------------------------------- +*/ + +.gallery { + padding: 20px 15px; + background: #efefef; + border: 1px solid #ccc; + border-radius: 3px; +} + +.gallery li { + float: left; + margin: 5px; +} + +.gallery img, +.gallery a { + display: block; +} + +/* +|-------------------------------------------------------------------------- +| Form +|-------------------------------------------------------------------------- +*/ + +form { + margin-top: 40px; +} + +form input, +form textarea { + width: 100%; + padding: 15px; + border: 1px solid #ccc; + margin-bottom: 40px; + font-size: 16px; + color: #444; +} + +form label { + display: block; + margin-bottom: 10px; +} + +form textarea { + height: 200px; +} + +form button { + border: none; + background: #E41C4E; + padding: 10px 40px; + color: #fff; + text-transform: uppercase; + font-size: 16px; + font-weight: 700; +} + +/* ======================================================================= +## ++ Cleafix +========================================================================== */ + +/* float clearing for IE6 */ + +* html .clearfix { + height: 1%; + overflow: visible; +} + +/* float clearing for IE7 */ + +* + html .clearfix { + min-height: 1%; +} + +/* float clearing for everyone else */ + +.clearfix:after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; + font-size: 0; +} + +.clr { + clear: both; +} + +.clr { + content: "test"; +} + +.flash { + padding: 20px; + color: #fff; + display: none; +} + +.flash.active { + display: block; +} + +.flash.error { + background: red; +} + +.flash.success { + background: green; +} + +.main-header { + background: #333; +} + +.main-header h1 { + color: #fff; + font-size: 1.25rem; + margin: 0; + padding: 0; + font-weight: 700; + float: left; +} + +.main-nav { + float: right; +} + +.main-nav li { + float: left; +} + +.main-nav a { + display: inline-block; + padding: 0 10px; + text-decoration: none; + text-transform: uppercase; + font-size: 12px; + font-weight: 700; +} + +.main-nav a:hover { + color: #fff; +} + +.main-nav li.active a { + text-decoration: underline; +} + +.main-footer { + background: #efefef; + padding: 20px 0; + margin-top: 40px; +} + +.main-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saW5lLWhlaWdodDoxfW9sLHVse2xpc3Qtc3R5bGU6bm9uZX1ibG9ja3F1b3RlLHF7cXVvdGVzOm5vbmV9YmxvY2txdW90ZTpiZWZvcmUsYmxvY2txdW90ZTphZnRlcixxOmJlZm9yZSxxOmFmdGVye2NvbnRlbnQ6bm9uZX10YWJsZXtib3JkZXItY29sbGFwc2U6Y29sbGFwc2U7Ym9yZGVyLXNwYWNpbmc6MH0iLCIvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIyMgKysgTWVkaWEgUXVlcmllc1xuPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi9cblxuLyogXG4gICAgVXNlZCBmb3IgbWVkaWEgcXVlcmllcy4gXG4gICAgQWRkIHRoZXNlIG1peGlucyBpbiB5b3VyIG5vcm1hbCBzY3NzIGZsb3cuXG4gICAgXG4gICAgRWcuXG4gICAgLmNvbnRhaW5lcntcbiAgICAgICAgd2lkdGg6MTAyNHB4O1xuICAgICAgICBcbiAgICAgICAgQGluY2x1ZGUgdGFibGV0c3tcbiAgICAgICAgICAgIHdpZHRoOjkwJTtcbiAgICAgICAgfVxuICAgIH1cbiovIFxuXG5AbWl4aW4gbG93cmVzbW9uaXRvcnN7XG4gICAgICAgIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDEzNTBweCl7IEBjb250ZW50O31cbn1cblxuQG1peGluIHRhYmxldHN7XG4gICAgICAgIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDExMDBweCl7IEBjb250ZW50OyB9XG59XG5cbkBtaXhpbiBwaG9uZXN7XG4gICAgICAgIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDcyMHB4KXsgQGNvbnRlbnQ7IH1cbn1cblxuLyogPT09PT09PT09PT09PT09PT09PT09P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WdodDogMS41cmVtO1xuICBjb2xvcjogIzMzMztcbiAgZm9udC13ZWlnaHQ6IDcwMDtcbn1cbmgxIHtcbiAgZm9udC1zaXplOiAxcmVtO1xuICBsaW5lLWhlaWdodDogNC41cmVtO1xuICBtYXJnaW4tdG9wOiAzcmVtO1xufVxuaDIge1xuICBmb250LXNpemU6IDFyZW07XG4gIGxpbmUtaGVpZ2h0OiAzcmVtO1xuICBtYXJnaW4tdG9wOiAzcmVtO1xufVxuaDMge1xuICBmb250LXNpemU6IDEuNDE0cmVtO1xufVxuaDQge1xuICBmb250LXNpemU6IDAuNzA3cmVtO1xufVxuaDUge1xuICBmb250LXNpemU6IDAuNDcxMzMzMzMzMzMzMzMzM3JlbTtcbn1cbmg2IHtcbiAgZm9udC1zaXplOiAwLjM1MzVyZW07XG59XG4vKiBUYWJsZXMgKi9cbnRhYmxlIHtcbiAgbWFyZ2luLXRvcDogMS41cmVtO1xuICBib3JkZXItc3BhY2luZzogMHB4O1xuICBib3JkZXItY29sbGFwc2U6IGNvbGxhcHNlO1xufVxudGFibGUgdGQsXG50YWJsZSB0aCB7XG4gIHBhZGRpbmc6IDA7XG4gIGxpbmUtaGVpZ2h0OiAzM3B4O1xufVxuLyogQ29kZSBibG9ja3MgKi9cbmNvZGUge1xuICB2ZXJ0aWNhbC1hbGlnbjogYm90dG9tO1xufVxuLyogTGVhZGluZyBwYXJhZ3JhcGggdGV4dCAqL1xuLmxlYWQge1xuICBmb250LXNpemU6IDEuNDE0cmVtO1xufVxuLyogSHVnIHRoZSBibG9jayBhYm92ZSB5b3UgKi9cbi5odWcge1xuICBtYXJnaW4tdG9wOiAwO1xufVxuXG4iLCIvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIyMgKysgR2xvYmFsc1xuPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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S0tLS0tLS0tLS0tLS0tLS0tXG4qL1xuXG5mb3Jte1xuICAgIG1hcmdpbi10b3A6IDQwcHg7XG5cbiAgICBpbnB1dCwgdGV4dGFyZWF7XG4gICAgICAgIHdpZHRoOjEwMCU7XG4gICAgICAgIHBhZGRpbmc6MTVweDtcbiAgICAgICAgYm9yZGVyOjFweCBzb2xpZCAjY2NjO1xuICAgICAgICBtYXJnaW4tYm90dG9tOiA0MHB4O1xuICAgICAgICBmb250LXNpemU6IDE2cHg7XG4gICAgICAgIGNvbG9yOiM0NDQ7XG4gICAgfVxuXG4gICAgbGFiZWx7XG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgICBtYXJnaW4tYm90dG9tOiAxMHB4O1xuICAgIH1cblxuICAgIHRleHRhcmVhe1xuICAgICAgICBoZWlnaHQ6MjAwcHg7XG4gICAgfVxuXG4gICAgYnV0dG9ue1xuICAgICAgICBib3JkZXI6bm9uZTtcbiAgICAgICAgYmFja2dyb3VuZDogI0U0MUM0RTtcbiAgICAgICAgcGFkZGluZzoxMHB4IDQwcHg7XG4gICAgICAgIGNvbG9yOiNmZmY7XG4gICAgICAgIHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG4gICAgICAgIGZvbnQtc2l6ZTogMTZweDtcbiAgICAgICAgZm9udC13ZWlnaHQ6IDcwMDtcbiAgICB9XG59XG5cblxuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiMjICsrIENsZWFmaXhcbj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovXG5cbi8qIGZsb2F0IGNsZWFyaW5nIGZvciBJRTYgKi9cbiogaHRtbCAuY2xlYXJmaXh7XG4gaGVpZ2h0OiAxJTtcbiBvdmVyZmxvdzogdmlzaWJsZTtcbn1cblxuLyogZmxvYXQgY2xlYXJ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BQU07Q0FxQmhCOztBQXRCRCxBQUdJLFNBSEssQ0FHTCxFQUFFLENBQUE7RUFDRSxLQUFLLEVBQUUsSUFBSztDQUNmOztBQUxMLEFBT0ksU0FQSyxDQU9MLENBQUMsQ0FBQTtFQUNHLE9BQU8sRUFBRSxZQUFhO0VBQ3RCLE9BQU8sRUFBRSxNQUFPO0VBQ2hCLGVBQWUsRUFBRSxJQUFLO0VBQ3RCLGNBQWMsRUFBRSxTQUFVO0VBQzFCLFNBQVMsRUFBRSxJQUFLO0VBQ2hCLFdBQVcsRUFBRSxHQUFJO0NBSXBCOztBQWpCTCxBQU9JLFNBUEssQ0FPTCxDQUFDLEFBT0ksTUFBTSxDQUFBO0VBQ0gsS0FBSyxFQUFDLElBQUs7Q0FDZDs7QUFoQlQsQUFtQmMsU0FuQkwsQ0FtQkwsRUFBRSxBQUFBLE9BQU8sQ0FBQyxDQUFDLENBQUE7RUFDUCxlQUFlLEVBQUUsU0FBVTtDQUM5Qjs7QUdsQ0wsQUFBQSxZQUFZLENBQUE7RUFDUixVQUFVLEVBQUUsT0FBUTtFQUNwQixPQUFPLEVBQUMsTUFBTztFQUNmLFVBQVUsRUFBRSxJQUFLO0NBS3BCOztBQVJELEFBS0ksWUFMUSxDQUtSLEVBQUUsQ0FBQTtFQUNFLE1BQU0sRUFBQyxDQUFFO0NBQ1oiLCJuYW1lcyI6W119 */ \ No newline at end of file diff --git a/themes/olympos/assets/dist/js/app.js b/themes/olympos/assets/dist/js/app.js new file mode 100644 index 0000000..7369afb --- /dev/null +++ b/themes/olympos/assets/dist/js/app.js @@ -0,0 +1,124 @@ +/******/ (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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // 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 = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sayhi__ = __webpack_require__(6); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + + +//sayHi('John'); +//sayBye('Sally'); + +var HelloWorld = function HelloWorld() { + _classCallCheck(this, HelloWorld); + + alert('Hello World'); +}; + +new HelloWorld(); + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(0); +module.exports = __webpack_require__(1); + + +/***/ }), +/* 3 */, +/* 4 */, +/* 5 */, +/* 6 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export sayHi */ +/* unused harmony export sayBye */ +function sayHi(name) { + alert('Hello ' + name); +} + +function sayBye(name) { + alert('Bye ' + name); +} + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/themes/olympos/assets/js/app.js b/themes/olympos/assets/js/app.js index e69de29..3688603 100644 --- a/themes/olympos/assets/js/app.js +++ b/themes/olympos/assets/js/app.js @@ -0,0 +1,12 @@ +import {sayHi, sayBye} from './sayhi'; + +//sayHi('John'); +//sayBye('Sally'); + +class HelloWorld{ + constructor() { + alert('Hello World'); + } +} + +new HelloWorld; \ No newline at end of file diff --git a/themes/olympos/assets/js/sayhi.js b/themes/olympos/assets/js/sayhi.js new file mode 100644 index 0000000..f630586 --- /dev/null +++ b/themes/olympos/assets/js/sayhi.js @@ -0,0 +1,7 @@ +export function sayHi(name){ + alert('Hello ' + name); +} + +export function sayBye(name){ + alert('Bye ' + name); +} \ No newline at end of file diff --git a/themes/olympos/assets/mix-manifest.json b/themes/olympos/assets/mix-manifest.json new file mode 100644 index 0000000..9a61b86 --- /dev/null +++ b/themes/olympos/assets/mix-manifest.json @@ -0,0 +1,4 @@ +{ + "/dist/js/app.js": "/dist/js/app.js", + "/dist/css/style.css": "/dist/css/style.css" +} \ No newline at end of file diff --git a/themes/olympos/layouts/default.htm b/themes/olympos/layouts/default.htm index 2a906ab..8035984 100644 --- a/themes/olympos/layouts/default.htm +++ b/themes/olympos/layouts/default.htm @@ -15,7 +15,7 @@ {% styles %} - + @@ -29,7 +29,8 @@ {% partial "footer" %} - + +