-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bootstrap.jade renamed to _bootstrap.jade, new bootswatch mixins, but…
…ton mixins, image mixins, sample layouts optimized using mixins
- Loading branch information
Showing
23 changed files
with
1,029 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//- Bootswatch theme mixins by Kezz Bracey | ||
//- https://github.com/tutsplus/baking-bootstrap-snippets-with-jade | ||
//- Author: http://tutsplus.com/authors/kezz-bracey | ||
mixin bootswatch(theme) | ||
link(href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.4/" + theme + "/bootstrap.min.css", rel="stylesheet") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
//- button mixins | ||
//- anchor buttons | ||
mixin a-btn(url,style) | ||
- var type = (typeof style === 'undefined') ? "default" : style | ||
a.btn(class="btn-#{type}",href="#{url}",role="button") | ||
block | ||
|
||
mixin a-btn-primary(url) | ||
+a-btn(url,"primary") | ||
block | ||
|
||
mixin a-btn-info(url) | ||
+a-btn(url,"info") | ||
block | ||
|
||
mixin a-btn-warning(url) | ||
+a-btn(url,"warning") | ||
block | ||
|
||
mixin a-btn-danger(url) | ||
+a-btn(url,"danger") | ||
block | ||
|
||
mixin a-btn-success(url) | ||
+a-btn(url,"success") | ||
block | ||
|
||
//- buttons | ||
mixin btn(caption,style,size) | ||
- var type = (typeof style === 'undefined') ? "default" : style | ||
unless size | ||
button.btn(class="btn-#{type}",type="button")= caption | ||
else | ||
button.btn(class="btn-#{type} btn-#{size}",type="button")= caption | ||
|
||
|
||
mixin btn-primary(caption) | ||
+btn(caption,"primary") | ||
|
||
mixin btn-info(caption) | ||
+btn(caption,"info") | ||
|
||
mixin btn-warning(caption) | ||
+btn(caption,"warning") | ||
|
||
mixin btn-danger(caption) | ||
+btn(caption,"danger") | ||
|
||
mixin btn-success(caption) | ||
+btn(caption,"success") | ||
|
||
//- Large buttons | ||
mixin btn-lg(caption) | ||
- var type = (typeof style === 'undefined') ? 'default' : style | ||
+btn(caption,type,"lg") | ||
|
||
mixin btn-lg-primary(caption) | ||
+btn(caption,"primary","lg") | ||
|
||
mixin btn-lg-info(caption) | ||
+btn(caption,"info","lg") | ||
|
||
mixin btn-lg-success(caption) | ||
+btn(caption,"success","lg") | ||
|
||
mixin btn-lg-warning(caption) | ||
+btn(caption,"warning","lg") | ||
|
||
mixin btn-lg-danger(caption) | ||
+btn(caption,"danger","lg") | ||
|
||
//- Small buttons | ||
mixin btn-sm(caption) | ||
- var type = (typeof style === 'undefined') ? 'default' : style | ||
+btn(caption,type,"sm") | ||
|
||
mixin btn-sm-primary(caption) | ||
+btn(caption,"primary","sm") | ||
|
||
mixin btn-sm-info(caption) | ||
+btn(caption,"info","sm") | ||
|
||
mixin btn-sm-success(caption) | ||
+btn(caption,"success","sm") | ||
|
||
mixin btn-sm-warning(caption) | ||
+btn(caption,"warning","sm") | ||
|
||
mixin btn-sm-danger(caption) | ||
+btn(caption,"danger","sm") | ||
|
||
//- Extra Small buttons | ||
mixin btn-xs(caption) | ||
- var type = (typeof style === 'undefined') ? 'default' : style | ||
+btn(caption,type,"xs") | ||
|
||
mixin btn-xs-primary(caption) | ||
+btn(caption,"primary","xs") | ||
|
||
mixin btn-xs-info(caption) | ||
+btn(caption,"info","xs") | ||
|
||
mixin btn-xs-success(caption) | ||
+btn(caption,"success","xs") | ||
|
||
mixin btn-xs-warning(caption) | ||
+btn(caption,"warning","xs") | ||
|
||
mixin btn-xs-danger(caption) | ||
+btn(caption,"danger","xs") | ||
|
||
//- input buttons | ||
mixin input-btn(caption,style) | ||
- var type = (typeof style === 'undefined') ? "default" : style | ||
input.btn(class="btn-#{type}",type="button",value="#{caption}") | ||
|
||
mixin input-btn-primary(caption) | ||
+input-btn(caption,"primary") | ||
|
||
mixin input-btn-info(caption) | ||
+input-btn(caption,"info") | ||
|
||
mixin input-btn-warning(caption) | ||
+input-btn(caption,"warning") | ||
|
||
mixin input-btn-danger(caption) | ||
+input-btn(caption,"danger") | ||
|
||
mixin input-btn-success(caption) | ||
+input-btn(caption,"success") | ||
|
||
//- submit buttons | ||
mixin submit(caption,style) | ||
- var type = (typeof style === 'undefined') ? "default" : style | ||
input.btn(class="btn-#{type}",type="submit",value="#{caption}") | ||
|
||
mixin submit-primary(caption) | ||
+submit(caption,"primary") | ||
|
||
mixin submit-info(caption) | ||
+submit(caption,"info") | ||
|
||
mixin submit-warning(caption) | ||
+submit(caption,"warning") | ||
|
||
mixin submit-danger(caption) | ||
+submit(caption,"danger") | ||
|
||
mixin submit-success(caption) | ||
+submit(caption,"success") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//- Image mixins | ||
mixin img-responsive(_src,_alt) | ||
img.img-responsive(src="#{_src}",alt="#{_alt}") | ||
|
||
mixin img-responsive-center(_src,_alt) | ||
img.img-responsive.center-block(src="#{_src}",alt="#{_alt}") | ||
|
||
mixin img-rounded(_src,_alt) | ||
img.img-rounded(src="#{_src}",alt="#{_alt}") | ||
|
||
mixin img-circle(_src,_alt) | ||
img.img-circle(src="#{_src}",alt="#{_alt}") | ||
|
||
mixin img-thumbnail(_src,_alt) | ||
img.img-thumbnail(src="#{_src}",alt="#{_alt}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.