All Projects → vue-foundation → Vue Foundation

vue-foundation / Vue Foundation

VueJS + Foundation + Vue-Router + Webpack

Projects that are alternatives of or similar to Vue Foundation

Tris Webpack Boilerplate
A Webpack boilerplate for static websites that has all the necessary modern tools and optimizations built-in. Score a perfect 10/10 on performance.
Stars: ✭ 1,016 (+379.25%)
Mutual labels:  webpack, boilerplate, sass
Webpack Starter
✨ A lightweight foundation for your next webpack based frontend project.
Stars: ✭ 1,745 (+723.11%)
Mutual labels:  webpack, boilerplate, sass
Webxr Webpack Boilerplate
Starter Kit for building rich, immersive WebXR projects (featuring A-Frame) PWA with Webpack and SASS
Stars: ✭ 48 (-77.36%)
Mutual labels:  webpack, boilerplate, sass
Manhuaren
vue2.0全家桶,仿漫画人官网(移动端)
Stars: ✭ 18 (-91.51%)
Mutual labels:  webpack, vue-cli, sass
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (-22.17%)
Mutual labels:  webpack, boilerplate, sass
Vue Auth Boilerplate
🔑 Vue.js scalable boilerplate with user authentication.
Stars: ✭ 31 (-85.38%)
Mutual labels:  webpack, vue-cli, boilerplate
Static Site Boilerplate
A better workflow for building modern static websites.
Stars: ✭ 1,633 (+670.28%)
Mutual labels:  webpack, boilerplate, sass
Threejs Webpack Es6 Boilerplate
A basic boilerplate for a Three.js project compiled with Webpack and transpiled via Babel to enable using ES6 syntax.
Stars: ✭ 267 (+25.94%)
Mutual labels:  webpack, boilerplate, sass
Electron Vue
An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
Stars: ✭ 14,610 (+6791.51%)
Mutual labels:  webpack, vue-cli, boilerplate
Kirby Webpack
💪 A Kirby CMS starter-kit with modern frontend tools
Stars: ✭ 150 (-29.25%)
Mutual labels:  webpack, boilerplate, sass
React Webpack Typescript Starter
Minimal starter with hot module replacement (HMR) for rapid development.
Stars: ✭ 632 (+198.11%)
Mutual labels:  webpack, boilerplate, sass
React Cordova Boilerplate
TodoMVC example for react with development tools to build a cordova application
Stars: ✭ 206 (-2.83%)
Mutual labels:  webpack, boilerplate, sass
Webpack Boilerplate
A minimal webpack 5 boilerplate with only Babel, SASS and lodash (optional) on board
Stars: ✭ 404 (+90.57%)
Mutual labels:  webpack, boilerplate, sass
Html Sass Babel Webpack Boilerplate
Webpack 4 + Babel + ES6 + SASS + HTML Modules + Livereload
Stars: ✭ 35 (-83.49%)
Mutual labels:  webpack, boilerplate, sass
Kratos Boilerplate
🔥 A simple boilerplate for creating statics PWA using Webpack, Pug, PostCSS and CSS Modules
Stars: ✭ 308 (+45.28%)
Mutual labels:  webpack, boilerplate, sass
Frontie Webpack
Front-end Boilerplate | Gulp 4 + Webpack 4 + Babel + ITCSS Architecture + BEM Methodology + Twig.js
Stars: ✭ 102 (-51.89%)
Mutual labels:  webpack, boilerplate, sass
Frontend Webpack Boilerplate
Simple starter webpack 5 project template supporting SASS/PostCSS, Babel ES7, browser syncing, code linting. Easy project setup having multiple features and developer friendly tools.
Stars: ✭ 242 (+14.15%)
Mutual labels:  webpack, boilerplate, sass
Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (-32.08%)
Mutual labels:  webpack, boilerplate, sass
React Core Boilerplate
Powerful ASP.NET Core 3 templates with React, true server-side rendering and Docker support
Stars: ✭ 169 (-20.28%)
Mutual labels:  webpack, boilerplate, sass
Mern Boilerplate
MERN stack project boilerplate
Stars: ✭ 211 (-0.47%)
Mutual labels:  webpack, boilerplate, sass

vue-foundation

A boilerplate integrating Foundation for Sites and VueJS

This repository is an example of how to use Foundation for Sites in a Vue single-page application. The project is scaffolded using vue-cli, with the webpack template, and vue-router.

A detailed description of the project is available here.

Warning

The master branch is based on a recent vue-cli template, which makes use of Webpack 2. For a working configuration using Webpack 1, check out the webpackv1 branch

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm start

# build for production with minification
npm run build

CSS/SASS

CSS setup resides in the src/styles folder.

app.scss gets imported in every Vue component, through modified cssLoaders in build/utils.js (see vuejs-templates/webpack#149):

let scssOptions = {
    includePaths: [
      './src/styles'
    ],
    data: '@import "./src/styles/app";'
  }

As a result, Foundation mixins are now available in Vue components, without the need for an @import statement in every style declaration. In order for this to work, every CSS declaration in components needs to use SCSS:

<style lang="scss">
    // styles
</style>

_settings.scss is also imported: this is the original Foundation variables file. The only change required to make it work is the import path of Foundation util.

global.scss gets imported in the root component. It initializes Foundation, loads custom icon fonts and Motion UI.

_icons.scss is a modified Fontello build (all urls in @font-face declaration). Instead of using the default static folder for assets, this project is configured to process fonts and images with custom loaders, in build/webpack.base.conf.js.

JavaScript

The foundation-sites JavaScript modules are being initialized and destroyed within the Vue component lifecycle hooks. Specifically the mounted hook is used to initialize each component while the destroyed hook is used to destroy them.

There is one exception to this rule; Tooltips are currently not being destroyed due to a bug in foundation-sites.

You will also notice in the Vue components that a reference is added to the Vue object using this.component = .... This is to allow the destroyed hook to be able to destroy the object without having to use the jQuery selector.

Example from the Accordion component:

export default {
  name: 'accordion',
  mounted() {
    this.accordion = new Foundation.Accordion($('#accordion'), {
      // These options can be declarative using the data attributes
      slideSpeed: 500,
      multiExpand: true,
    });
  },
  data() {
    return {
      msg: 'Accordion',
    };
  },
  destroyed() {
    this.accordion.destroy();
  },
};

Orbit

In order to work properly, Orbit needs the Motion UI library.

Slider

This component requires listening to Foundation custom events, setting a v-model on the hidden input will not work, as explained here: vuejs/vue#372

Change Log

Note: Versions based on the package.json version value

  • v3.0 [2017-09-26] Replaced single foundation import to plugin import.
  • v2.0 [2017-09-05] Upgraded to Foundation 6.4.3 including XY Grid support.
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].