GithubHelp home page GithubHelp logo

ckh4 / theemey.js Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 1.0 51 KB

A theme engine built in jQuery and Stylus.

Home Page: http://ckh4.github.io/theemey.js/

License: GNU General Public License v3.0

JavaScript 16.70% HTML 45.87% CSS 37.43%

theemey.js's Introduction

theemey.js

demo - http://ckh4.github.io/theemey.js/

How to use?

Setup

Include the script in your page:

JS
<script src="assets/theemey.js"></script>

##Making Your Theme

Include the Stylus mixin in your page:

CSS
theme($name, /* theme properties go here */)
  /#{$name} &
    //theme goes here

Only use variable properties here, otherwise you'll have redundant code.


Write the rest of your theme like normal: ###### CSS ```Stylus body margin 0

header width 100% height 64px


<br>
Call the themes on the <body> element:
###### CSS
```Stylus
body
  theme(/* name */, /* properties */)

Example

Setup your HTML:

HTML
<html>
 <head>
   <link href="assets/style.css" type="text/css" rel="stylesheet"></link>
 </head>

  <body>
    <header>Header</header>

    <article>
      <h3>Lorem Ipsum...</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc a dapibus mi. Donec vitae tempor magna. Vestibulum orci leo, porttitor ac nisi nec, lacinia imperdiet leo. Nam luctus, felis sed molestie pretium, turpis orci eleifend est, eget ullamcorper metus risus aliquam justo. Aenean est leo, pharetra vitae tempor ac, vestibulum non dolor. Cras vulputate sed justo nec auctor. Ut sit amet semper augue. Vivamus erat diam, iaculis eget libero at, accumsan consectetur ante. Morbi sagittis arcu sollicitudin hendrerit fermentum.</p>
    </article>

    <script src="assets/theemey.js"></script>
  </body>
</html>

Setup your CSS: ###### CSS ```Stylus theme($name, $background, $color, $font) #{$name} & background $background color $color font-family $font

body margin 0 theme(default, #333, #bdbdbd, sans-serif) theme(red, #c00, #000, serif)

header width 100% paddding 32px

article width 600px max-width 90% margin 32px auto


<br>
##Changelog
- v1.0 First Release, basic functionality

##Future Plans
- v1.5 Add support for other CSS preprocessors
- v2.0 Remove jQuery Dependency

theemey.js's People

Stargazers

Sogrey avatar  avatar 晋龙 avatar Joohun, Maeng avatar Shun Yamaguchi avatar WebCrew avatar BritFrag avatar  avatar Michael Corrado avatar Nick Wan avatar Masaomi Ishikawa avatar maitokuwahara avatar Vahid Mohammad Taheri avatar Deives Fahl avatar Tarık Kavaz avatar Sumit Hingu avatar Soufiane Abid avatar

Watchers

James Cloos avatar Connor avatar  avatar BritFrag avatar

Forkers

yashilanka

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.