All Projects → evgen3 → mpa-frontend-template

evgen3 / mpa-frontend-template

Licence: MIT license
🔥 Template based on webpack, pug, stylus, es6, postcss for multi page applications

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to mpa-frontend-template

Quokka
LOOKING FOR NEW MAINTAINER - Quokka is a Content Management System - `docker run --rm -it -p 5000:5000 quokka/quokka`
Stars: ✭ 2,198 (+8040.74%)
Mutual labels:  static-site-generator, static-site
nene
Nēnē: A no-frills static site generator
Stars: ✭ 22 (-18.52%)
Mutual labels:  static-site-generator, static-site
Jamstack Web Starter
Static website workflow utilising Eleventy, Tailwind CSS, Webpack and PostCSS.
Stars: ✭ 198 (+633.33%)
Mutual labels:  static-site-generator, postcss
Vanilla Back To Top
Simple and smooth Back To Top button
Stars: ✭ 179 (+562.96%)
Mutual labels:  static-site-generator, postcss
vscode-front-matter
Front Matter is a CMS running straight in Visual Studio Code. Can be used with static site generators like Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...
Stars: ✭ 962 (+3462.96%)
Mutual labels:  static-site-generator, static-site
Nikola
A static website and blog generator
Stars: ✭ 2,221 (+8125.93%)
Mutual labels:  static-site-generator, static-site
Peco
nothing here, move on..
Stars: ✭ 213 (+688.89%)
Mutual labels:  static-site-generator, static-site
Hugs
🤗 A super simple starting point for Hugo websites.
Stars: ✭ 162 (+500%)
Mutual labels:  static-site-generator, static-site
static-webpack-boilerplate
🚀 Minimal & Modern Webpack Boilerplate for building static sites
Stars: ✭ 40 (+48.15%)
Mutual labels:  postcss, static-site
Statiq.framework
A flexible and extensible static content generation framework for .NET.
Stars: ✭ 251 (+829.63%)
Mutual labels:  static-site-generator, static-site
urlzap
⚡️ Your own static URL shortener
Stars: ✭ 57 (+111.11%)
Mutual labels:  static-site-generator, static-site
readme-in-static-site
💎 Transform and insert your GitHub readme in your static site.
Stars: ✭ 24 (-11.11%)
Mutual labels:  static-site-generator, static-site
Fornax
Scriptable static site generator using type safe F# DSL to define page templates.
Stars: ✭ 175 (+548.15%)
Mutual labels:  static-site-generator, static-site
Gatsby Docker
Develop & Build GatsbyJS static sites within Docker.
Stars: ✭ 184 (+581.48%)
Mutual labels:  static-site-generator, static-site
Gopablo
🐺 Static site generator.
Stars: ✭ 166 (+514.81%)
Mutual labels:  static-site-generator, postcss
Jekyll Doc Theme
Jekyll theme for creating project documentation websites
Stars: ✭ 203 (+651.85%)
Mutual labels:  static-site-generator, static-site
Deventy
A minimal 11ty starting point for building static websites with modern tools.
Stars: ✭ 157 (+481.48%)
Mutual labels:  static-site-generator, postcss
Pendulum
A simple markdown editor for static files (Hugo, Nexo, Jekyll, MkDocs, ...)
Stars: ✭ 157 (+481.48%)
Mutual labels:  static-site-generator, static-site
Elegant
Best theme for Pelican Static Blog Generator
Stars: ✭ 241 (+792.59%)
Mutual labels:  static-site-generator, static-site
presta
Minimalist serverless framework for SSR, SSG, serverless APIs and more.
Stars: ✭ 89 (+229.63%)
Mutual labels:  static-site-generator, static-site

MPA frontend template

Simple template based on webpack, pug, stylus, es6, postcss for multi page applications

MPA Frontend Template banner

Feedback

For questions, bugs and enhancements use issues.

Prepare

Required

  1. Install or update Node.js;
  2. Install Yarn - fast package manager (like a npm), usage.

Optional

  1. Install editorconfig plugin for your editor (PhpStorm, Sublime Text, Atom, VS Code) - consistent coding style between different editors and IDEs;
  2. Install eslint plugin for your editor (PhpStorm, Sublime Text, Atom, VS Code) - the pluggable linting utility for JavaScript.

Start

  1. Clone or download project:
    git clone [email protected]:evgen3/mpa-frontend-template.git your-project-name
    
  2. Enter in project folder and remove .git folder:
    cd your-project-name && rm -rf .git
    
  3. Install dependencies with yarn:
    yarn
    
  4. Use build commands:
    • yarn build - build project for production (includes UglifyJSPlugin, cssnano);
    • yarn watch - build and start watching for development (includes sourcemaps);
    • yarn start - build, watch and local server for development (includes reload on change files);
    • yarn lint - lint js code in src folder with airbnb rules.

Cookbook

Include image in template

In file pug/includes/require.pug located function, usage:

img(src='upload/sample.jpg' srcset=`upload/[email protected] 2x` alt='')
.block(style='background-image: url(upload/sample.jpg);')

For short include in file pug/mixins/img.pug located mixin, usage:

+img('sample.jpg')(alt='image').some-class

Attention! This mixin requires a picture in a double size (for srcset) and the link is already included upload/ directory.

Include plugins/libraries

CSS

Install dependency (for example, swiper):

yarn add swiper

Import dependency in main.styl once:

@require '~swiper/dist/css/swiper.css'

Symbol ~ in styl points to a node_modules folder.

JS

jQuery plugins

Install dependency (for example, sticky-kit):

yarn add sticky-kit

Import dependency in main.js once:

import 'sticky-kit/dist/sticky-kit';
Other libraries

Install dependency (for example, swiper):

yarn add swiper

Import in the file in which you need the dependency:

import Swiper from 'swiper/dist/js/swiper';

Alias @ in stylus and js

@ in path points to src folder, with it you can create an absolute path. CSS:

src: url("~@/font/rouble-webfont.woff") format("woff")

JS:

import module from '@/js/module';

Using svg-sprite

Put the icon in /ico folder

And add code in your template:

<svg class="your-class" width="193" height="40">
  <use xlink:href="#your-icon-file-name"></use>
</svg>

Or you can use pug-mixin:

+icon('your-icon-file-name')(width=193 height=40).your-class
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].