compass-treesaver-plugin 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/compass-treesaver-plugin.gemspec +38 -0
- data/lib/compass-treesaver-plugin.rb +3 -0
- data/stylesheets/_treesaver.scss +6 -0
- data/stylesheets/treesaver/_basic.scss +26 -0
- data/stylesheets/treesaver/_chrome.scss +43 -0
- data/stylesheets/treesaver/_config.scss +17 -0
- data/stylesheets/treesaver/_grid.scss +18 -0
- data/stylesheets/treesaver/_layout.scss +26 -0
- data/stylesheets/treesaver/_reset.scss +9 -0
- data/stylesheets/treesaver/basic/_base.scss +58 -0
- data/stylesheets/treesaver/chrome/_base.scss +14 -0
- data/stylesheets/treesaver/chrome/_controls.scss +40 -0
- data/stylesheets/treesaver/chrome/_viewer.scss +17 -0
- data/stylesheets/treesaver/grid/_base.scss +48 -0
- data/stylesheets/treesaver/layout/_base.scss +15 -0
- data/templates/project/_compass_treesaver.scss +1 -0
- data/templates/project/manifest.rb +1 -0
- metadata +83 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{compass-treesaver-plugin}
|
5
|
+
s.version = "0.3.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
|
8
|
+
s.authors = ["Andrea Campi"]
|
9
|
+
s.date = %q{2011-03-18}
|
10
|
+
s.description = %q{A Compass plugin to provide basic styles for treesaver.js.}
|
11
|
+
s.email = %w{andrea.campi@zephirworks.com}
|
12
|
+
s.has_rdoc = false
|
13
|
+
s.files = [
|
14
|
+
"compass-treesaver-plugin.gemspec",
|
15
|
+
"lib/compass-treesaver-plugin.rb",
|
16
|
+
"stylesheets/_treesaver.scss",
|
17
|
+
"stylesheets/treesaver/_basic.scss",
|
18
|
+
"stylesheets/treesaver/_chrome.scss",
|
19
|
+
"stylesheets/treesaver/_config.scss",
|
20
|
+
"stylesheets/treesaver/_grid.scss",
|
21
|
+
"stylesheets/treesaver/_layout.scss",
|
22
|
+
"stylesheets/treesaver/_reset.scss",
|
23
|
+
"stylesheets/treesaver/basic/_base.scss",
|
24
|
+
"stylesheets/treesaver/chrome/_base.scss",
|
25
|
+
"stylesheets/treesaver/chrome/_controls.scss",
|
26
|
+
"stylesheets/treesaver/chrome/_viewer.scss",
|
27
|
+
"stylesheets/treesaver/grid/_base.scss",
|
28
|
+
"stylesheets/treesaver/layout/_base.scss",
|
29
|
+
"templates/project/_compass_treesaver.scss",
|
30
|
+
"templates/project/manifest.rb"
|
31
|
+
]
|
32
|
+
s.homepage = %q{http://zephirworks.com/}
|
33
|
+
s.require_paths = ["lib"]
|
34
|
+
s.rubyforge_project = %q{compass-treesaver-plugin}
|
35
|
+
s.rubygems_version = %q{1.3.6}
|
36
|
+
s.summary = %q{Compass stylesheets for treesaver.js.}
|
37
|
+
s.add_dependency(%q<compass>, ["~> 0.11"])
|
38
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/*
|
2
|
+
* Basic module:
|
3
|
+
*
|
4
|
+
* Basic styling for the whole "site".
|
5
|
+
*
|
6
|
+
* These macros provide basic styling: setting `overflow: hidden` on the `body` and
|
7
|
+
* Treesaver containers, establishing a `line-height` grid and so on. They are
|
8
|
+
* automatically included when the plugin is loaded.
|
9
|
+
*/
|
10
|
+
|
11
|
+
@import "treesaver/config";
|
12
|
+
@import "treesaver/basic/base";
|
13
|
+
|
14
|
+
@mixin treesaver-basic-setup {
|
15
|
+
@include -treesaver-basic-setup;
|
16
|
+
@include -treesaver-basic-setup-group;
|
17
|
+
@include -treesaver-basic-error-and-loading;
|
18
|
+
|
19
|
+
// FIXME
|
20
|
+
.fill {
|
21
|
+
left: 0;
|
22
|
+
top: 0;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
@include treesaver-basic-setup;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
* Chrome module:
|
3
|
+
*
|
4
|
+
* These macros aid in setting up chromes.
|
5
|
+
*/
|
6
|
+
|
7
|
+
@import "treesaver/config";
|
8
|
+
@import "treesaver/chrome/base";
|
9
|
+
@import "treesaver/chrome/viewer";
|
10
|
+
@import "treesaver/chrome/controls";
|
11
|
+
|
12
|
+
/*
|
13
|
+
* Sets up the "viewer" to take up the whole screen. Use it when you don't want
|
14
|
+
* a controls bar, perhaps because you are using a native shell to provide
|
15
|
+
* navigation.
|
16
|
+
*/
|
17
|
+
@mixin treesaver-chrome-viewer {
|
18
|
+
@include -treesaver-chrome-viewer(0);
|
19
|
+
}
|
20
|
+
|
21
|
+
/*
|
22
|
+
* Sets up a controls bar at the top of the screen, with the provided height
|
23
|
+
* (30px by default), with the viewer taking up the remaining height.
|
24
|
+
* Minimal styling is provided for the controls, aligning `left` and `right`
|
25
|
+
* buttons to their respective sides.
|
26
|
+
*/
|
27
|
+
@mixin treesaver-chrome-viewer-with-top-controls($controls-height: 30px) {
|
28
|
+
@include -treesaver-chrome-viewer($controls-height, "top");
|
29
|
+
@include -treesaver-chrome-controls($controls-height, "top");
|
30
|
+
}
|
31
|
+
|
32
|
+
/*
|
33
|
+
* Sets up a controls bar at the bottom of the screen, with the provided height
|
34
|
+
* (30px by default), with the viewer taking up the remaining height.
|
35
|
+
* Minimal styling is provided for the controls, aligning `left` and `right`
|
36
|
+
* buttons to their respective sides.
|
37
|
+
*/
|
38
|
+
@mixin treesaver-chrome-viewer-with-bottom-controls($controls-height: 30px) {
|
39
|
+
@include -treesaver-chrome-viewer($controls-height);
|
40
|
+
@include -treesaver-chrome-controls($controls-height);
|
41
|
+
}
|
42
|
+
|
43
|
+
@include -treesaver-chrome-size;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
//
|
2
|
+
// Basic module
|
3
|
+
//
|
4
|
+
|
5
|
+
$treesaver-line-height: 24px !default; // Vertical grid
|
6
|
+
|
7
|
+
//
|
8
|
+
// Chrome module
|
9
|
+
//
|
10
|
+
|
11
|
+
$treesaver-chrome-maximum-smallscreen-width: 480px !default; // Any device wider
|
12
|
+
// than this will use "normal" grids, anything smaller will use "small" chromes.
|
13
|
+
|
14
|
+
//
|
15
|
+
// Grid module
|
16
|
+
//
|
17
|
+
$treesaver-grid-smallscreen-width: 300px !default;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/*
|
2
|
+
* Grid module:
|
3
|
+
*
|
4
|
+
* This set of macros takes care of the minimal styles necessary to set up
|
5
|
+
* grids of different sizes, while retaining control over their use on big- and
|
6
|
+
* small-screen devices. They are automatically called when the plugin is loaded.
|
7
|
+
*/
|
8
|
+
|
9
|
+
@import "treesaver/config";
|
10
|
+
@import "grid/base";
|
11
|
+
|
12
|
+
@mixin treesaver-grid-default {
|
13
|
+
@include -treesaver-grid-base;
|
14
|
+
@include -treesaver-grid-support-smallscreen-mobile;
|
15
|
+
@include -treesaver-grid-fixed;
|
16
|
+
}
|
17
|
+
|
18
|
+
@include treesaver-grid-default;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/*
|
2
|
+
* Layout module:
|
3
|
+
*
|
4
|
+
* NOTE: these macros are experimental, they may change or be removed in a future
|
5
|
+
* release. The mix of "full" and "half" widths is also very confusing.
|
6
|
+
*/
|
7
|
+
|
8
|
+
@import "layout/base";
|
9
|
+
|
10
|
+
//
|
11
|
+
// TODO document
|
12
|
+
//
|
13
|
+
@mixin treesaver-layout-setup($width, $margin, $steps) {
|
14
|
+
.grid {
|
15
|
+
width: $width;
|
16
|
+
}
|
17
|
+
|
18
|
+
.column, .container {
|
19
|
+
width: $width;
|
20
|
+
top: 0;
|
21
|
+
bottom: 0;
|
22
|
+
}
|
23
|
+
|
24
|
+
@include -treesaver-layout-column-widths($steps, $width, $margin);
|
25
|
+
@include -treesaver-layout-columns($steps, $width, $margin);
|
26
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
//
|
2
|
+
// Basic styling for the whole "site"; they are pretty much mandatory.
|
3
|
+
//
|
4
|
+
@mixin -treesaver-basic-setup {
|
5
|
+
.treesaver {
|
6
|
+
body {
|
7
|
+
overflow: hidden;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
.chrome, .viewer, .grid, .column, .container {
|
12
|
+
position: absolute;
|
13
|
+
overflow: hidden;
|
14
|
+
line-height: $treesaver-line-height;
|
15
|
+
}
|
16
|
+
|
17
|
+
div, p, button {
|
18
|
+
line-height: $treesaver-line-height;
|
19
|
+
}
|
20
|
+
|
21
|
+
h1, h2, h3, h4, h5, h6 {
|
22
|
+
line-height: $treesaver-line-height;
|
23
|
+
}
|
24
|
+
|
25
|
+
.hidden, .microdata {
|
26
|
+
display: none !important;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
// XXX is this really generic?
|
31
|
+
@mixin -treesaver-basic-setup-group {
|
32
|
+
.group {
|
33
|
+
top: 0;
|
34
|
+
bottom: 0;
|
35
|
+
padding: 0;
|
36
|
+
position: absolute;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
//
|
41
|
+
// Basic styling for the error and loading floats.
|
42
|
+
// This may be stretching our goal of "structure, not presentation", but
|
43
|
+
// without them the loader would be just too damn ugly.
|
44
|
+
//
|
45
|
+
// XXX replace magic values
|
46
|
+
//
|
47
|
+
@mixin -treesaver-basic-error-and-loading {
|
48
|
+
.error, .loading {
|
49
|
+
position: absolute;
|
50
|
+
width: 160px;
|
51
|
+
height: 100px;
|
52
|
+
letter-spacing: 2px;
|
53
|
+
margin: 0 0 0 20px;
|
54
|
+
img {
|
55
|
+
display: inline;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
//
|
2
|
+
// Generates styles that make sure that "normal" chromes are only used on
|
3
|
+
// devices bigger than the given width (480px by default), and small chromes
|
4
|
+
// are used on smaller devices.
|
5
|
+
//
|
6
|
+
@mixin -treesaver-chrome-size {
|
7
|
+
.chrome {
|
8
|
+
min-width: $treesaver-chrome-maximum-smallscreen-width;
|
9
|
+
&.small {
|
10
|
+
min-width: 0;
|
11
|
+
max-width: $treesaver-chrome-maximum-smallscreen-width;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
@mixin -treesaver-chrome-controls-top-or-bottom($side) {
|
2
|
+
@if $side == "top" { top: 0; }
|
3
|
+
@if $side == "bottom" { bottom: 0; }
|
4
|
+
}
|
5
|
+
|
6
|
+
//
|
7
|
+
// A basic controls bar, anchored to either to bottom or top edges of the
|
8
|
+
// viewspace. Use it in conjunction with -treesaver-chrome-viewer to ensure
|
9
|
+
// viewer and controls will not overlap.
|
10
|
+
//
|
11
|
+
@mixin -treesaver-chrome-controls($height, $side: "bottom") {
|
12
|
+
.controls {
|
13
|
+
position: absolute;
|
14
|
+
@include -treesaver-chrome-controls-top-or-bottom($side);
|
15
|
+
left: 0;
|
16
|
+
right: 0;
|
17
|
+
height: $height;
|
18
|
+
line-height: $height;
|
19
|
+
|
20
|
+
.prev, .next {
|
21
|
+
border: none;
|
22
|
+
margin: 0;
|
23
|
+
padding: 0;
|
24
|
+
|
25
|
+
&:disabled {
|
26
|
+
display: none;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
.prev {
|
31
|
+
position: absolute;
|
32
|
+
left: 0;
|
33
|
+
}
|
34
|
+
|
35
|
+
.next {
|
36
|
+
position: absolute;
|
37
|
+
right: 0;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@mixin -treesaver-chrome-viewer-top-and-bottom($height, $side) {
|
2
|
+
@if $side == "top" { top: $height; bottom: 0; }
|
3
|
+
@if $side == "bottom" { top: 0; bottom: $height; }
|
4
|
+
}
|
5
|
+
|
6
|
+
//
|
7
|
+
// The main viewer area, set up to fill the whole viewport. You can optionally
|
8
|
+
// ask it to reserve some space either at the top or the bottom, mostly for
|
9
|
+
// use in conjunction with -treesaver-chrome-controls.
|
10
|
+
//
|
11
|
+
@mixin -treesaver-chrome-viewer($height, $side: "bottom") {
|
12
|
+
.viewer {
|
13
|
+
@include -treesaver-chrome-viewer-top-and-bottom($height, $side);
|
14
|
+
left: 0;
|
15
|
+
right: 0;
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
@mixin -treesaver-grid-hide {
|
2
|
+
min-width: 9001px;
|
3
|
+
width: 9001px;
|
4
|
+
}
|
5
|
+
|
6
|
+
// XXX slightly magical, do not change
|
7
|
+
@mixin -treesaver-grid-base {
|
8
|
+
.grid {
|
9
|
+
top: 50%;
|
10
|
+
z-index: 1;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
//
|
15
|
+
// Ensure mobile grids cannot be used by mistake on big screens, and that
|
16
|
+
// small-screen mobile devices can only used grids marked for mobiles.
|
17
|
+
// Note that you still have to add size-specific classes to specify grid sizes.
|
18
|
+
//
|
19
|
+
@mixin -treesaver-grid-support-smallscreen-mobile {
|
20
|
+
.grid.mobile {
|
21
|
+
@include -treesaver-grid-hide;
|
22
|
+
}
|
23
|
+
|
24
|
+
.smallscreen.mobile .grid {
|
25
|
+
@include -treesaver-grid-hide;
|
26
|
+
|
27
|
+
&.mobile {
|
28
|
+
width: $treesaver-grid-smallscreen-width;
|
29
|
+
min-width: $treesaver-grid-smallscreen-width;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
//
|
35
|
+
// A fixed grid has exact sizes and has no padding.
|
36
|
+
// You will need to specify the size with other classes.
|
37
|
+
//
|
38
|
+
// FIXME .fixed vs .full vs other?
|
39
|
+
//
|
40
|
+
@mixin -treesaver-grid-fixed {
|
41
|
+
.grid.fixed {
|
42
|
+
max-width: none;
|
43
|
+
max-height: none;
|
44
|
+
min-width: none;
|
45
|
+
min-height: none;
|
46
|
+
padding: 0;
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
@mixin -treesaver-layout-column-widths($colgroups, $width, $margin) {
|
2
|
+
@for $n from 1 through $colgroups {
|
3
|
+
.cols-#{$n} {
|
4
|
+
width: ($n - 1) * ($width + $margin) + $width;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin -treesaver-layout-columns($cols, $width, $margin) {
|
10
|
+
@for $n from 1 through $cols {
|
11
|
+
.col-#{$n} {
|
12
|
+
margin-left: ($n - 1) * ($width + $margin);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "treesaver";
|
@@ -0,0 +1 @@
|
|
1
|
+
stylesheet '_compass_treesaver.scss', :media => 'screen'
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: compass-treesaver-plugin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.3.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Andrea Campi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-03-18 00:00:00 +01:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: compass
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0.11"
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
description: A Compass plugin to provide basic styles for treesaver.js.
|
28
|
+
email:
|
29
|
+
- andrea.campi@zephirworks.com
|
30
|
+
executables: []
|
31
|
+
|
32
|
+
extensions: []
|
33
|
+
|
34
|
+
extra_rdoc_files: []
|
35
|
+
|
36
|
+
files:
|
37
|
+
- compass-treesaver-plugin.gemspec
|
38
|
+
- lib/compass-treesaver-plugin.rb
|
39
|
+
- stylesheets/_treesaver.scss
|
40
|
+
- stylesheets/treesaver/_basic.scss
|
41
|
+
- stylesheets/treesaver/_chrome.scss
|
42
|
+
- stylesheets/treesaver/_config.scss
|
43
|
+
- stylesheets/treesaver/_grid.scss
|
44
|
+
- stylesheets/treesaver/_layout.scss
|
45
|
+
- stylesheets/treesaver/_reset.scss
|
46
|
+
- stylesheets/treesaver/basic/_base.scss
|
47
|
+
- stylesheets/treesaver/chrome/_base.scss
|
48
|
+
- stylesheets/treesaver/chrome/_controls.scss
|
49
|
+
- stylesheets/treesaver/chrome/_viewer.scss
|
50
|
+
- stylesheets/treesaver/grid/_base.scss
|
51
|
+
- stylesheets/treesaver/layout/_base.scss
|
52
|
+
- templates/project/_compass_treesaver.scss
|
53
|
+
- templates/project/manifest.rb
|
54
|
+
has_rdoc: true
|
55
|
+
homepage: http://zephirworks.com/
|
56
|
+
licenses: []
|
57
|
+
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: "0"
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.3.5
|
75
|
+
requirements: []
|
76
|
+
|
77
|
+
rubyforge_project: compass-treesaver-plugin
|
78
|
+
rubygems_version: 1.5.2
|
79
|
+
signing_key:
|
80
|
+
specification_version: 3
|
81
|
+
summary: Compass stylesheets for treesaver.js.
|
82
|
+
test_files: []
|
83
|
+
|