middleman-webcomic 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +5 -0
- data/ChangeLog.md +11 -0
- data/Gemfile +3 -0
- data/License +18 -0
- data/Rakefile +22 -0
- data/Readme.md +22 -0
- data/lib/middleman-webcomic/cli.rb +5 -0
- data/lib/middleman-webcomic/data.rb +213 -0
- data/lib/middleman-webcomic/feature.rb +172 -0
- data/lib/middleman-webcomic/mock_app.rb +31 -0
- data/lib/middleman-webcomic/pager.rb +51 -0
- data/lib/middleman-webcomic/tasks.rb +53 -0
- data/lib/middleman-webcomic/template/Gemfile.tt +7 -0
- data/lib/middleman-webcomic/template/Rakefile.tt +28 -0
- data/lib/middleman-webcomic/template/config.ru +16 -0
- data/lib/middleman-webcomic/template/config.tt +71 -0
- data/lib/middleman-webcomic/template/source/about.html.slim +11 -0
- data/lib/middleman-webcomic/template/source/comics/index.html.slim +14 -0
- data/lib/middleman-webcomic/template/source/comics/template.html.slim +1 -0
- data/lib/middleman-webcomic/template/source/feed.xml.builder +30 -0
- data/lib/middleman-webcomic/template/source/index.html.slim +1 -0
- data/lib/middleman-webcomic/template/source/layout.slim +63 -0
- data/lib/middleman-webcomic/template/source/robots.txt +3 -0
- data/lib/middleman-webcomic/template/source/theme/_comic.slim +4 -0
- data/lib/middleman-webcomic/template/source/theme/_layout_tall.slim +17 -0
- data/lib/middleman-webcomic/template/source/theme/_layout_wide.slim +16 -0
- data/lib/middleman-webcomic/template/source/theme/_sidebar.slim +13 -0
- data/lib/middleman-webcomic/template/source/theme/images/favicon.png +0 -0
- data/lib/middleman-webcomic/template/source/theme/scripts/app.js.coffee +4 -0
- data/lib/middleman-webcomic/template/source/theme/styles/_utils.scss +399 -0
- data/lib/middleman-webcomic/template/source/theme/styles/screen.css.sass +89 -0
- data/lib/middleman-webcomic/template.rb +30 -0
- data/lib/middleman-webcomic/version.rb +7 -0
- data/lib/middleman-webcomic.rb +11 -0
- data/lib/middleman_init.rb +1 -0
- data/middleman-webcomic.gemspec +29 -0
- metadata +113 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
require 'slim'
|
|
2
|
+
require 'coffee-script'
|
|
3
|
+
require 'json'
|
|
4
|
+
require 'builder'
|
|
5
|
+
require 'active_support/all'
|
|
6
|
+
|
|
7
|
+
# activate :automatic_image_sizes
|
|
8
|
+
activate :directory_indexes
|
|
9
|
+
|
|
10
|
+
activate :webcomic
|
|
11
|
+
|
|
12
|
+
set :webcomic_domain, "http://my-site.com"
|
|
13
|
+
set :webcomic_source, "comics/notes"
|
|
14
|
+
set :webcomic_source_images, "comics/images"
|
|
15
|
+
set :webcomic_images, "media/comics"
|
|
16
|
+
set :webcomic_enable_stories, false
|
|
17
|
+
set :webcomic_slug_field, :position
|
|
18
|
+
set :webcomic_include_comic_in_feed, true
|
|
19
|
+
set :webcomic_sort_by, :slug # or slug? and metadata
|
|
20
|
+
|
|
21
|
+
Slim::Engine.set_default_options :pretty => true
|
|
22
|
+
|
|
23
|
+
set :markdown, :layout_engine => :slim
|
|
24
|
+
set :erb, :layout_engine => :slim
|
|
25
|
+
|
|
26
|
+
# Page command
|
|
27
|
+
page "/feed.xml", :layout => false
|
|
28
|
+
|
|
29
|
+
# Helpers
|
|
30
|
+
# Methods defined in the helpers block are available in templates
|
|
31
|
+
# helpers do
|
|
32
|
+
# # Your helpers here
|
|
33
|
+
# end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# Change the CSS directory
|
|
38
|
+
set :css_dir, "theme/styles"
|
|
39
|
+
|
|
40
|
+
# Change the JS directory
|
|
41
|
+
set :js_dir, "theme/scripts"
|
|
42
|
+
|
|
43
|
+
# Change the images directory
|
|
44
|
+
set :images_dir, "media"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Build-specific configuration
|
|
48
|
+
configure :build do
|
|
49
|
+
|
|
50
|
+
data_content 'build', true
|
|
51
|
+
|
|
52
|
+
# For example, change the Compass output style for deployment
|
|
53
|
+
activate :minify_css
|
|
54
|
+
|
|
55
|
+
# Minify Javascript on build
|
|
56
|
+
activate :minify_javascript
|
|
57
|
+
|
|
58
|
+
# Enable cache buster
|
|
59
|
+
activate :cache_buster
|
|
60
|
+
|
|
61
|
+
# Use relative URLs
|
|
62
|
+
# activate :relative_assets
|
|
63
|
+
|
|
64
|
+
# Compress PNGs after build
|
|
65
|
+
# First: gem install middleman-smusher
|
|
66
|
+
# require "middleman-smusher"
|
|
67
|
+
# activate :smusher
|
|
68
|
+
|
|
69
|
+
# Or use a different image path
|
|
70
|
+
# set :http_path, "/Content/images/"
|
|
71
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
div.row.sidebars
|
|
2
|
+
|
|
3
|
+
div.col.span-8
|
|
4
|
+
div.box.archive
|
|
5
|
+
h1 Comic Archive
|
|
6
|
+
|
|
7
|
+
ol.comic-list
|
|
8
|
+
- data.webcomic.strips.reverse.each_with_index do |comic,i|
|
|
9
|
+
li value=comic.position
|
|
10
|
+
a href=comic_path_for(comic) = comic.title
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
div.col.span-4.sidebar
|
|
14
|
+
== partial 'theme/sidebar'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
== partial "theme/layout_wide"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
xml.instruct!
|
|
2
|
+
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
|
3
|
+
xml.title "Comic Name"
|
|
4
|
+
xml.subtitle "Comic subtitle"
|
|
5
|
+
xml.id settings.webcomic_domain
|
|
6
|
+
xml.link "href" => settings.webcomic_domain
|
|
7
|
+
xml.link "href" => "#{settings.webcomic_domain}/feed.xml", "rel" => "self"
|
|
8
|
+
xml.updated webcomic_feed_data.first.pub_date.to_time.iso8601
|
|
9
|
+
xml.author { xml.name "Blog Author" }
|
|
10
|
+
|
|
11
|
+
webcomic_feed_data.each do |webcomic|
|
|
12
|
+
xml.entry do
|
|
13
|
+
|
|
14
|
+
url= "#{settings.webcomic_domain}#{comic_path_url webcomic}"
|
|
15
|
+
content= if settings.webcomic_include_comic_in_feed
|
|
16
|
+
%Q|<p><img src="#{comic_image_url webcomic}" alt="#{webcomic.title}"/>\n</p>\n#{ webcomic.content}|
|
|
17
|
+
else
|
|
18
|
+
webcomic.content
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
xml.title webcomic.title
|
|
22
|
+
xml.link "rel" => "alternate", "href" => url
|
|
23
|
+
xml.id url
|
|
24
|
+
xml.published webcomic.pub_date.to_time.iso8601
|
|
25
|
+
xml.updated webcomic.pub_date.to_time.iso8601
|
|
26
|
+
xml.author { xml.name "Article Author" }
|
|
27
|
+
xml.content feed_absolute_paths(content), "type" => "html"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
== partial "theme/layout_wide"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
doctype html
|
|
2
|
+
html
|
|
3
|
+
head
|
|
4
|
+
meta charset="utf-8"
|
|
5
|
+
/! Always force latest IE rendering engine & Chrome Frame
|
|
6
|
+
meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"
|
|
7
|
+
title MY SITE by AUTHOR
|
|
8
|
+
link rel="shortcut icon" type="image/png" href="/theme/images/favicon.png"
|
|
9
|
+
link rel="icon" type="image/png" href="/theme/images/favicon.png"
|
|
10
|
+
meta name="Author" content="AUTHOR"
|
|
11
|
+
meta name="Keywords" content="Webcomic"
|
|
12
|
+
meta name="Description" content="SITE DESCRIPTION"
|
|
13
|
+
/ You might want to look into Feedburner: http://feedburner.google.com
|
|
14
|
+
link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/feed.xml"
|
|
15
|
+
== stylesheet_link_tag "screen.css"
|
|
16
|
+
== javascript_include_tag "app.js"
|
|
17
|
+
== yield_content :head
|
|
18
|
+
|
|
19
|
+
body class="#{{page_classes}} #{{data.page.slug}} #{{data.page.style}}"
|
|
20
|
+
section#header role="header"
|
|
21
|
+
div.row
|
|
22
|
+
div.col.span-12
|
|
23
|
+
header
|
|
24
|
+
a#site_logo href="/"
|
|
25
|
+
h1 My Site
|
|
26
|
+
|
|
27
|
+
section#navigation role="navigation"
|
|
28
|
+
div.row
|
|
29
|
+
div.col.span-10
|
|
30
|
+
navigation
|
|
31
|
+
ul
|
|
32
|
+
li.about
|
|
33
|
+
a href="/about" About
|
|
34
|
+
li.archive
|
|
35
|
+
a href="/comics" Archive
|
|
36
|
+
div.clear
|
|
37
|
+
div.col.span-2
|
|
38
|
+
div.comic-pager
|
|
39
|
+
- if prev_comic
|
|
40
|
+
a href="#{{ prev_comic_path }}" title="Previous" «
|
|
41
|
+
- else
|
|
42
|
+
span «
|
|
43
|
+
- if next_comic
|
|
44
|
+
a href="#{{ next_comic_path }}" title="Next" »
|
|
45
|
+
- else
|
|
46
|
+
span »
|
|
47
|
+
div.comic-latest
|
|
48
|
+
a href="/" Latest Comic
|
|
49
|
+
|
|
50
|
+
div.row
|
|
51
|
+
div.col.span-12
|
|
52
|
+
== yield
|
|
53
|
+
|
|
54
|
+
section#footer role="footer"
|
|
55
|
+
div.row
|
|
56
|
+
div.col.span-8
|
|
57
|
+
footer
|
|
58
|
+
markdown:
|
|
59
|
+
© [Me](http://www.my-site.com), all rights reserved. This site is built with [Middleman](http://middlemanapp.com/) and [Webcomic](https://github.com/darthapo/middleman-webcomic).
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
javascript:
|
|
63
|
+
App.init();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
section#main role="main"
|
|
3
|
+
|
|
4
|
+
div.row
|
|
5
|
+
div.col.span-8
|
|
6
|
+
div.comic
|
|
7
|
+
== partial "theme/comic"
|
|
8
|
+
div.clear
|
|
9
|
+
|
|
10
|
+
div.col.span-4
|
|
11
|
+
== partial 'theme/sidebar'
|
|
12
|
+
|
|
13
|
+
div.row
|
|
14
|
+
div.col.span-8
|
|
15
|
+
div.main-content
|
|
16
|
+
== current_comic.content
|
|
17
|
+
div.clear
|
|
File without changes
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
// Layout Tools v 1.2
|
|
2
|
+
|
|
3
|
+
// Sample Usage:
|
|
4
|
+
// #container {
|
|
5
|
+
// @include border-radius(5px);
|
|
6
|
+
// }
|
|
7
|
+
|
|
8
|
+
// GRID
|
|
9
|
+
|
|
10
|
+
// = The 1Kb Grid = (slightly modified)
|
|
11
|
+
@mixin grid($columns:12, $column_width:60, $column_margin:20) {
|
|
12
|
+
.row { // Did include: section
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
width: #{$columns * $column_width + $columns * $column_margin}px;
|
|
16
|
+
|
|
17
|
+
.row {
|
|
18
|
+
margin: 0 #{$column_margin - $column_margin * 1.5}px;
|
|
19
|
+
display: inline-block;
|
|
20
|
+
width: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.col {
|
|
24
|
+
margin: 0 #{$column_margin / 2}px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
float: left;
|
|
27
|
+
display: inline;
|
|
28
|
+
width: #{$column_width * 1 + $column_margin * (1 - 1)}px;
|
|
29
|
+
|
|
30
|
+
@for $i from 2 through $columns {
|
|
31
|
+
&.span-#{$i} {
|
|
32
|
+
width: #{$column_width * $i + $column_margin * ($i - 1)}px;
|
|
33
|
+
//&:hover
|
|
34
|
+
// outline: 1px solid red
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// CSS RESET
|
|
42
|
+
|
|
43
|
+
@mixin css-clear($boxmodel:'border-box') {
|
|
44
|
+
* {
|
|
45
|
+
@include box-model($boxmodel);
|
|
46
|
+
}
|
|
47
|
+
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
|
|
48
|
+
margin:0;
|
|
49
|
+
padding:0;
|
|
50
|
+
}
|
|
51
|
+
article, aside, dialog, figure, footer, header, hgroup, menu, nav, section {
|
|
52
|
+
display: block;
|
|
53
|
+
}
|
|
54
|
+
table {
|
|
55
|
+
border-collapse:collapse;
|
|
56
|
+
border-spacing:0;
|
|
57
|
+
}
|
|
58
|
+
fieldset,img {
|
|
59
|
+
border:0;
|
|
60
|
+
}
|
|
61
|
+
address,caption,cite,code,dfn,em,strong,th,var {
|
|
62
|
+
font-style:normal;
|
|
63
|
+
font-weight:normal;
|
|
64
|
+
}
|
|
65
|
+
ol,ul {
|
|
66
|
+
list-style:none;
|
|
67
|
+
}
|
|
68
|
+
caption,th {
|
|
69
|
+
text-align:left;
|
|
70
|
+
}
|
|
71
|
+
h1,h2,h3,h4,h5,h6 {
|
|
72
|
+
font-size:100%;
|
|
73
|
+
font-weight:normal;
|
|
74
|
+
}
|
|
75
|
+
q:before,q:after {
|
|
76
|
+
content:'';
|
|
77
|
+
}
|
|
78
|
+
abbr,acronym {
|
|
79
|
+
border:0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin css-reset($size:14px, $boxmodel:'border-box') {
|
|
84
|
+
@include css-clear($boxmodel);
|
|
85
|
+
body {
|
|
86
|
+
font-size: $size;
|
|
87
|
+
line-height: 1.3em;
|
|
88
|
+
}
|
|
89
|
+
h1, h2, h3, h4, h5, h6 {
|
|
90
|
+
font-weight: bold;
|
|
91
|
+
}
|
|
92
|
+
h1 {
|
|
93
|
+
font-size: 175%;
|
|
94
|
+
}
|
|
95
|
+
h2 {
|
|
96
|
+
font-size: 155%;
|
|
97
|
+
}
|
|
98
|
+
h3 {
|
|
99
|
+
font-size: 135%;
|
|
100
|
+
}
|
|
101
|
+
h4 {
|
|
102
|
+
font-size: 120%;
|
|
103
|
+
}
|
|
104
|
+
h5 {
|
|
105
|
+
font-size: 105%;
|
|
106
|
+
}
|
|
107
|
+
h6 {
|
|
108
|
+
font-size: 100%;
|
|
109
|
+
}
|
|
110
|
+
p, blockquote, h1, h2, h3, h4, h5, h6, pre, ol, ul {
|
|
111
|
+
padding: 0.5em 0;
|
|
112
|
+
}
|
|
113
|
+
b, strong {
|
|
114
|
+
font-weight: bold;
|
|
115
|
+
}
|
|
116
|
+
i, em {
|
|
117
|
+
font-style: italic;
|
|
118
|
+
}
|
|
119
|
+
ul, ol {
|
|
120
|
+
padding-left: 2em;
|
|
121
|
+
}
|
|
122
|
+
ul {
|
|
123
|
+
list-style: circle;
|
|
124
|
+
}
|
|
125
|
+
ol {
|
|
126
|
+
list-style: decimal;
|
|
127
|
+
}
|
|
128
|
+
blockquote {
|
|
129
|
+
padding-left: 4em;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@mixin debug-hover($color:'red') {
|
|
134
|
+
&:hover {
|
|
135
|
+
outline: 1px solid $color;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
// Vertical Background Gradient
|
|
141
|
+
@mixin vbg-gradient($fc: #FFF, $tc: #FFF) {
|
|
142
|
+
background: $fc;
|
|
143
|
+
background: -webkit-gradient(linear, left top, left bottom, from($fc), to($tc));
|
|
144
|
+
background: -moz-linear-gradient(top, $fc, $tc);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Vertical Background Gradient, 3 color
|
|
148
|
+
@mixin vbg-gradient3($fc: #FFF, $mc: #FFF, $tc: #FFF) {
|
|
149
|
+
background: $fc;
|
|
150
|
+
background: -webkit-gradient(linear, left top, left bottom, from($fc), color-stop(0.5, $mc), to($tc));
|
|
151
|
+
background: -moz-linear-gradient(top, $fc, $mc, $tc);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Horizontal Background Gradient
|
|
155
|
+
@mixin hbg-gradient($fc: #FFF, $tc: #FFF) {
|
|
156
|
+
background: $fc;
|
|
157
|
+
background: -webkit-gradient(linear, left top, right top, from($fc), to($tc));
|
|
158
|
+
background: -moz-linear-gradient(left, $fc, $tc);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
// Box Model
|
|
163
|
+
@mixin box-model($type:'border-box') {
|
|
164
|
+
box-sizing: $type;
|
|
165
|
+
-moz-box-sizing: $type;
|
|
166
|
+
-ms-box-sizing: $type;
|
|
167
|
+
-webkit-box-sizing: $type;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@mixin hbox ($boxAlign:stretch, $boxPack:left) {
|
|
171
|
+
@include display-box();
|
|
172
|
+
@include box-orient(horizontal);
|
|
173
|
+
@include box-align($boxAlign);
|
|
174
|
+
@include box-pack($boxPack);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@mixin vbox ($boxAlign:stretch, $boxPack:left) {
|
|
178
|
+
@include display-box();
|
|
179
|
+
@include box-orient(vertical);
|
|
180
|
+
@include box-align($boxAlign);
|
|
181
|
+
@include box-pack($boxPack);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@mixin display-box () {
|
|
185
|
+
display: box;
|
|
186
|
+
display: -webkit-box;
|
|
187
|
+
display: -moz-box;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@mixin box-flex ($s: 0) {
|
|
192
|
+
box-flex: $s;
|
|
193
|
+
-webkit-box-flex: $s;
|
|
194
|
+
-moz-box-flex: $s;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@mixin box-orient($dir:horizontal) {
|
|
199
|
+
box-orient: $dir;
|
|
200
|
+
-webkit-box-orient: $dir;
|
|
201
|
+
-moz-box-orient: $dir;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@mixin box-pack($dir:left) {
|
|
205
|
+
box-pack: $dir;
|
|
206
|
+
-webkit-box-pack: $dir;
|
|
207
|
+
-moz-box-pack: $dir;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@mixin box-align($dir:stretch) {
|
|
211
|
+
box-align: $dir;
|
|
212
|
+
-webkit-box-align: $dir;
|
|
213
|
+
-moz-box-align: $dir;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@mixin box-lines($rows:single) {
|
|
217
|
+
box-lines: $rows;
|
|
218
|
+
-webkit-box-lines: $rows;
|
|
219
|
+
-moz-box-lines: $rows;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
// SHADOWS
|
|
224
|
+
|
|
225
|
+
// TEXT shadow
|
|
226
|
+
@mixin text-shadow($props) {
|
|
227
|
+
text-shadow: $props;
|
|
228
|
+
-moz-text-shadow: $props;
|
|
229
|
+
-webkit-text-shadow: $props; }
|
|
230
|
+
|
|
231
|
+
// BOX shadow
|
|
232
|
+
@mixin box-shadow($props) {
|
|
233
|
+
box-shadow: $props;
|
|
234
|
+
-moz-box-shadow: $props;
|
|
235
|
+
-webkit-box-shadow: $props; }
|
|
236
|
+
|
|
237
|
+
@mixin inset-box-shadow ($h: 0px, $v: 0px, $b: 4px, $c: #333) {
|
|
238
|
+
box-shadow: inset $h $v $b $c;
|
|
239
|
+
-moz-box-shadow: inset $h $v $b $c;
|
|
240
|
+
-webkit-box-shadow: inset $h $v $b $c;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@mixin border-as-shadow($tlc:#000, $brc:#FFF, $width:1px, $style:solid) {
|
|
244
|
+
border: {
|
|
245
|
+
top: $width $style $tlc;
|
|
246
|
+
left: $width $style $tlc;
|
|
247
|
+
right: $width $style $brc;
|
|
248
|
+
bottom: $width $style $brc;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
// BORDER RADIUS
|
|
254
|
+
|
|
255
|
+
// All corners
|
|
256
|
+
@mixin border-radius($radius) {
|
|
257
|
+
border-radius: $radius;
|
|
258
|
+
-moz-border-radius: $radius;
|
|
259
|
+
-webkit-border-radius: $radius; }
|
|
260
|
+
|
|
261
|
+
// Top Right
|
|
262
|
+
@mixin border-radius-top-right($radius) {
|
|
263
|
+
@include border-radius-top-right($radius); }
|
|
264
|
+
|
|
265
|
+
// Bottom Right
|
|
266
|
+
@mixin border-radius-bottom-right($radius) {
|
|
267
|
+
@include border-radius-bottom-right($radius); }
|
|
268
|
+
|
|
269
|
+
// Bottom Left
|
|
270
|
+
@mixin border-radius-bottom-left($radius) {
|
|
271
|
+
@include border-radius-bottom-left($radius); }
|
|
272
|
+
|
|
273
|
+
// Top Left
|
|
274
|
+
@mixin border-radius-top-left($radius) {
|
|
275
|
+
@include border-radius-top-left($radius); }
|
|
276
|
+
|
|
277
|
+
// Top
|
|
278
|
+
@mixin border-radius-top($radius) {
|
|
279
|
+
@include border-radius-top-left($radius);
|
|
280
|
+
@include border-radius-top-right($radius); }
|
|
281
|
+
|
|
282
|
+
// Right
|
|
283
|
+
@mixin border-radius-right($radius) {
|
|
284
|
+
@include border-radius-top-right($radius);
|
|
285
|
+
@include border-radius-bottom-right($radius); }
|
|
286
|
+
|
|
287
|
+
// Bottom
|
|
288
|
+
@mixin border-radius-bottom($radius) {
|
|
289
|
+
@include border-radius-bottom-right($radius);
|
|
290
|
+
@include border-radius-bottom-left($radius); }
|
|
291
|
+
|
|
292
|
+
// Left
|
|
293
|
+
@mixin border-radius-left($radius) {
|
|
294
|
+
@include border-radius-top-left($radius);
|
|
295
|
+
@include border-radius-bottom-left($radius); }
|
|
296
|
+
|
|
297
|
+
// Let's setup the rules so we don't have to repeat ourselves
|
|
298
|
+
// These are mixins for this mixin and are re-used above
|
|
299
|
+
@mixin border-radius-top-right($radius) {
|
|
300
|
+
border-top-right-radius: $radius;
|
|
301
|
+
-moz-border-radius-topright: $radius;
|
|
302
|
+
-webkit-border-top-right-radius: $radius; }
|
|
303
|
+
|
|
304
|
+
@mixin border-radius-bottom-right($radius) {
|
|
305
|
+
border-bottom-right-radius: $radius;
|
|
306
|
+
-moz-border-radius-bottomright: $radius;
|
|
307
|
+
-webkit-border-bottom-right-radius: $radius; }
|
|
308
|
+
|
|
309
|
+
@mixin border-radius-bottom-left($radius) {
|
|
310
|
+
border-bottom-left-radius: $radius;
|
|
311
|
+
-moz-border-radius-bottomleft: $radius;
|
|
312
|
+
-webkit-border-bottom-left-radius: $radius; }
|
|
313
|
+
|
|
314
|
+
@mixin border-radius-top-left($radius) {
|
|
315
|
+
border-top-left-radius: $radius;
|
|
316
|
+
-moz-border-radius-topleft: $radius;
|
|
317
|
+
-webkit-border-top-left-radius: $radius; }
|
|
318
|
+
|
|
319
|
+
@mixin animate($name, $dur:1s, $easing:ease-in-out, $iter:infinite, $dir:alternate) {
|
|
320
|
+
-webkit-animation-name: $name;
|
|
321
|
+
-webkit-animation-duration: $dur;
|
|
322
|
+
-webkit-animation-direction: $dir;
|
|
323
|
+
-webkit-animation-iteration-count: $iter;
|
|
324
|
+
-webkit-animation-timing-function: $easing;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@mixin transition($info:all 250 ease-out) {
|
|
328
|
+
-webkit-transition: $info;
|
|
329
|
+
-moz-transition: $info;
|
|
330
|
+
-o-transition: $info;
|
|
331
|
+
transition: $info;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@mixin transform( $s:'rotate(45deg)') {
|
|
335
|
+
-moz-transform: $s;
|
|
336
|
+
-webkit-transform: $s;
|
|
337
|
+
-o-transform: $s;
|
|
338
|
+
transform: $s;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
@mixin box-attrs() {
|
|
342
|
+
*[box-flex="0"] { @include box-flex(0); }
|
|
343
|
+
*[box-flex="1"] { @include box-flex(1); }
|
|
344
|
+
*[box-flex="2"] { @include box-flex(2); }
|
|
345
|
+
*[box-flex="3"] { @include box-flex(3); }
|
|
346
|
+
*[box-flex="4"] { @include box-flex(4); }
|
|
347
|
+
*[box-flex="5"] { @include box-flex(5); }
|
|
348
|
+
*[box-flex="6"] { @include box-flex(6); }
|
|
349
|
+
*[box-flex="7"] { @include box-flex(7); }
|
|
350
|
+
*[box-flex="8"] { @include box-flex(8); }
|
|
351
|
+
*[box-flex="9"] { @include box-flex(9); }
|
|
352
|
+
*[box-flex="10"] { @include box-flex(10); }
|
|
353
|
+
|
|
354
|
+
*[box-align="start"] { @include box-align(start); }
|
|
355
|
+
*[box-align="center"] { @include box-align(center); }
|
|
356
|
+
*[box-align="end"] { @include box-align(end); }
|
|
357
|
+
*[box-align="baseline"] { @include box-align(baseline); }
|
|
358
|
+
*[box-align="stretch"] { @include box-align(stretch); }
|
|
359
|
+
|
|
360
|
+
*[box-pack="start"] { @include box-pack(start); }
|
|
361
|
+
*[box-pack="center"] { @include box-pack(center); }
|
|
362
|
+
*[box-pack="end"] { @include box-pack(end); }
|
|
363
|
+
*[box-pack="justify"] { @include box-pack(justify); }
|
|
364
|
+
*[box-pack="stretch"] { @include box-pack(justify); }
|
|
365
|
+
|
|
366
|
+
*[box-lines="single"] { @include box-lines(single); }
|
|
367
|
+
*[box-lines="multiple"] { @include box-lines(multiple); }
|
|
368
|
+
|
|
369
|
+
*[box-orient="horizontal"] { @include box-orient(horizontal); }
|
|
370
|
+
*[box-orient="vertical"] { @include box-orient(vertical); }
|
|
371
|
+
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Font stuff
|
|
375
|
+
|
|
376
|
+
@mixin web-font($family, $url, $format:'truetype') {
|
|
377
|
+
@font-face {
|
|
378
|
+
font-family: $family;
|
|
379
|
+
src: url($url) format($format);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// Color stuff
|
|
384
|
+
|
|
385
|
+
@function strengthen($color, $multiplier: 1, $reversed: $reversed-text) {
|
|
386
|
+
@if $reversed {
|
|
387
|
+
@return lighten($color, 20% * $multiplier);
|
|
388
|
+
} @else {
|
|
389
|
+
@return darken($color, 20% * $multiplier);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
@function soften($color, $multiplier: 1, $reversed: $reversed-text) {
|
|
394
|
+
@if $reversed {
|
|
395
|
+
@return darken($color, 20% * $multiplier);
|
|
396
|
+
} @else {
|
|
397
|
+
@return lighten($color, 20% * $multiplier);
|
|
398
|
+
}
|
|
399
|
+
}
|