Git Product home page Git Product logo

_base's Introduction

BASE

Documentation using Foundation, Gulp

All the files you edit go into src and compiles into build


Setup

NPM is required to be installed.

Run npm install after clone to download gulp and other required modules.


Tasks:

gulp build - cleans and builds everything into build folder

gulp clean - cleans build folder

gulp css - compile scss to css

gulp js - compile js with browserify

gulp assemble - generate all pages

gulp fonts - move fonts to build folder

gulp todo - go through and generate todo's based off of comments "//TODO:"

gulp watch - look for changes in src/pages|scss|js

gulp iconfont - generate icon font


Folder Structure

└── src
  ├── assets
  │    ├── fonts
  │    ├── icons
  │    │   ├── _icon-font.css (icon font template)
  │    │   └── svgs
  │    │        └── *.svg
  │    ├── imgs
  │    │   └── *.*
  │    ├── sprites
  │    │   └── *.png
  │    ├── js
  │    │   ├── libs
  │    │   ├── app
  │    │   ├── templates
  │    │   └── main.js
  │    └── scss
  │        ├── libs
  │        ├── partials
  │        ├── elements
  │        ├── modules
  │        ├── pages
  │        ├── theme
  │        ├── main.scss
  │        └── _*.scss
  ├── data
  │   └── *.{json,yml}
  ├── helpers
  │   └── *.js
  └── views
      ├── docs
      │   └── *.{hbs,html,php}
      ├── partials
      │   └── *.{hbs,html,php}
      ├── layouts
      │   └── default.{hbs,html,php}
      └── pages
          └── index.{hbs,html,php}

Pages

All the files in pages folder are used to generate static pages.

These files in pages should contain the core content of the page.

The layout files will contain the major layout and are referenced to by front matter(more on that below)

Pages can also load partials anywhere in the page

Front matter

Pages can use YAML front matter as shown below or call a variable from a data.json file in the data folder, for things like the layout.

---
layout: 'default'
title: 'site'
arr:
- {"a":"b"}
---

this.arr.[0] // {"a","b"}

Loading partial
{{>nav }}

with current front matter
{{>nav this}}

with custom variable
{{>nav key="value"}}

with global data variable
{{>nav site}}

with custom json
{{#parseJSON '{
  "a": "b",
  "c": "d"
}'}}
{{> nav }}
{{/parseJSON}}

{{#parseJSON '{"name": "John", "age": "1"}'}}
    {{> partial title="TITLE" desc=../site.desc person=this}}
{{/parseJSON}}


Foundation

This project uses the Foundation grid, block grid and visibility classes. Other Foundation elements are available but not being pulled in, edit the "_foundation.scss" file in "src/assets/scss/libs/".

The grid has between tweaked to a 24 column grid for more versatility and with more media breakpoints.


SCSS

All scss goes into "src/assets/scss/"

All scss goes into "src/assets/scss/libs"

The "_global.scss" file contains some utility classes


JS

Using Browserify for JS

All js goes into "src/assets/js/app" Refrence js in the main.js file located in "src/assets/js/"

All libraries goes into "src/assets/js/libs"

If you do any js templating put that into "src/assets/js/templates/"


Fonts

Fonts go into "src/assets/fonts/"

The current build comes with Google's Roboto font


Icon Font

Put svg files into "src/assets/icons" Then run gulp iconfont to generate font and matching scss file

Once the icon font is generated uncomment the import of "icon-font" in the main.scss file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.