Code Monkey home page Code Monkey logo

html-skinning-boilerplate's Introduction

##HTML Skinning Boilerplate

This is a starter kit for HTML Developers, useful to develop HTMLs faster. This uses sass, gulp and gulp-nunjucks-render.

###Advantages:

  • Obeys DRY concept (Don't repeat yourself) for both css and html.
  • Manage all svgs as SVG sprite-sheet.
  • No need to run any web server (optional).
  • Later, you can use the same setup to create a single page application based on nunjucks template engine. (in that case, don't use gulp-nunjucks-render)

###How it is useful?

Suppose, you got a requirement where you just need to develop six HTML pages from the provided images by Designers. There are many common sections which you are copy pasting for each page of HTML files (let say it is Header). Later, the client/designer proposed some changes in header part. In that case, you need to change the header part in a page and need to copy paste again in all the six pages.

And if the changes are frequent in all common sections and there are more pages, it is quite common we miss to change the modified section in a page or two. This boilerplate handles this kind of situations and many more.

You can also write css faster using sass and create svg sprite-sheet.

###How it works?

  • To write sass, you can refer sass documentation.
  • I already implemented common layouting styles in _mini-bootstrap.scss file, with comments.
  • To write in nunjucks template, you can refer nunjucks documentation.
  • The whole setup runs on gulp, which I tried to explain in this link
  • Using gulp-svgstore, I wrote a small code in gulpfile.js which will be helpful to create svg sprite-sheet. This svg spritesheet works only when run on any web server

Note: you can also write css in .scss files if you aren't aware of sass and same applies to nunjucks templating.

###Installation:

Here are some easy installation steps:

  • This Boilerplate needs nodejs (for templating and for sass). So, install it first.
  • After installing nodejs, fork/download this repo in your local.
  • cd to the project folder through CLI.
  • npm install (add prefix sudo in mac, if necessary).

That's it!! everything is ready now.

###Usage

To watch for template and sass changes, cd to project directory and then gulp watch.

Note: if you are doing the above step frequently, you can create a batch extension file. I have given examples for Windows and Mac OS which you can find in win-build and mac-build folders respectively.

###References:

Very nice articles to know about SVG Spritesheets

PS: Contributors are welcome :)

###FAQ:

#####1) I am getting following error while trying to install node dependencies in command prompt.

Couldn't install optional dependency: Unsupported

For this Boilerplate, the following fix will work. Check this link.

html-skinning-boilerplate's People

Contributors

kamlekar avatar srinivashappy avatar venumadhavnitturu avatar

Stargazers

 avatar

Watchers

 avatar

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.