View webpack.prd.conf.js
const path = require('path');
const utils = require('./utils');
const webpack = require('webpack');
const config = require('../config');
const merge = require('webpack-merge');
const baseWebpackConfig = require('./webpack.base.conf');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');
View webpack.base.conf.js
const path = require('path');
const utils = require('./utils');
const config = require('../config');
const { VueLoaderPlugin } = require('vue-loader');
const DirectoryNamedWebpackPlugin = require('directory-named-webpack-plugin');
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
View webpack.prd.conf.js
const path = require('path');
const utils = require('./utils');
const webpack = require('webpack');
const config = require('../config');
const merge = require('webpack-merge');
const baseWebpackConfig = require('./webpack.base.conf');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');
View webpack.base.conf.js
const path = require('path');
const utils = require('./utils');
const config = require('../config');
const { VueLoaderPlugin } = require('vue-loader');
const DirectoryNamedWebpackPlugin = require('directory-named-webpack-plugin');
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
View webpack.config.dev.js
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const exclude = /node_modules/;
const webpack = require('webpack');
module.exports = {
entry: {
"js/bundle": "./js/src/main",
"css/main": "./sass/main.scss",
"css/frontpage": "./sass/frontpage.scss"
View webpack.config.dev.js
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const exclude = /node_modules/;
module.exports = {
entry: {
"js/bundle": "./js/src/main",
"css/main": "./sass/main.scss",
"css/frontpage": "./sass/frontpage.scss"
},
View gist:40f9175a8c562339375969597450fc05
{% macro menu_links(items, attributes, menu_level, current_path) %}
{% import _self as menus %}
{% if items %}
{% if menu_level != 0 %}
<ul class="list-unstyled font-title font-small text-capitalize line-height-l level-{{ menu_level }}">
{% endif %}
{% for i, item in items %}
{% if menu_level == 0 %}
<div class="col-sm-3">
View test.js
const isElementInViewport = function (el) {
let rect = el.getBoundingClientRect()
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
)
}
View main.scss
// your variables file - here you can override bootstrap variables as well as create your own
@import "variables.scss";
// the bootstrap source
@import "bootstrap-custom";
@import "base/responsive_mixin";
@import "base/button";
@import "base/panels";
@import "base/helpers";
View gulpfile.js
var gulp = require('gulp'),
sass = require('gulp-sass');
// here you add variables for your paths so you don't have to repeat them
var config = {
sass: {
src: './src/assets/sass',
dest: './public/css'
},
bootstrap: {