Compile with:
webpack --config vendor.webpack.config.js
webpack --config app.webpack.config.jsUse with the following index.html
| /*== | |
| *== Hexagon | |
| *== ======================================= ==*/ | |
| $hexagon-size: 184px; | |
| $sin60: 0.86602540; | |
| $hexagon-height: $hexagon-size / $sin60; | |
| .hexagon { | |
| &, * { transition: 0.3s linear; } |
| function hasClass(el, className) { | |
| if (el.classList) { | |
| return el.classList.contains(className); | |
| } else { | |
| return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)')); | |
| } | |
| } | |
| function addClass(el, className) { | |
| if (el.classList) { |
| @function em($from, $to, $dimension: true) { | |
| @return ($from / $to) * if($dimension, 1em, 1); | |
| } | |
| @function rem($px, $root: 16px) { | |
| @return ($px / $root) * 1rem; | |
| } | |
| @mixin font($font-size, $line-height: null) { | |
| font-size: rem($font-size); |
Compile with:
webpack --config vendor.webpack.config.js
webpack --config app.webpack.config.jsUse with the following index.html
| /* | |
| * Paste into the end <head> | |
| */ | |
| (function(){ | |
| var width = screen.width; | |
| var oldViewport = document.querySelector('meta[name="viewport"]'); | |
| var viewport = document.createElement('meta'); | |
| viewport.setAttribute('name', 'viewport'); | |
| viewport.setAttribute('content', 'width=' + (width <= 640 ? '640' : 'device-width')); | |
| document.head.replaceChild(viewport, oldViewport); |
| $.formUtils.addValidator({ | |
| name : 'tel', | |
| validatorFunction: function (value, $el, config, language, $form) { | |
| return /^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/.test(value); | |
| }, | |
| errorMessage : 'Please enter a valid phone number', | |
| errorMessageKey : 'badTel' | |
| }); |
| /// Replace `$search` with `$replace` in `$string` | |
| /// @author Hugo Giraudel | |
| /// @param {String} $string - Initial string | |
| /// @param {String} $search - Substring to replace | |
| /// @param {String} $replace ('') - New value | |
| /// @return {String} - Updated string | |
| @function str-replace($string, $search, $replace: '') { | |
| $index: str_index($string, $search); | |
| @if $index { |
| @mixin webkit-scrollbar($color, $background: transparent, $size: 3px) { | |
| &::-webkit-scrollbar { | |
| width: $size; | |
| height: $size; | |
| } | |
| &::-webkit-scrollbar-button { | |
| display: none; | |
| //background: none; | |
| //size: $size; | |
| //height: $size; |
| $screen-xs-min: 480px !default; | |
| $screen-sm-min: 768px !default; | |
| $screen-md-min: 992px !default; | |
| $screen-lg-min: 1200px !default; | |
| $grid-gutter-width: 30px !default; | |
| $dev-grid-style: guides !default; | |
| $dev-grid-style: false !default; | |
| $dev-grid-show-center-guides: true !default; | |
| $dev-grid-show-label: true !default; |
| $(document).on('hidden.bs.modal', '.modal', function () { | |
| $('.modal:visible').length && $(document.body).addClass('modal-open'); | |
| }); |