braid 1.1.4 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/exe/braid +11 -0
  3. data/lib/braid/check_gem.rb +58 -0
  4. data/lib/braid/command.rb +13 -0
  5. data/lib/braid/commands/diff.rb +1 -1
  6. data/lib/braid/config.rb +28 -4
  7. data/{bin/braid → lib/braid/main.rb} +1 -16
  8. data/lib/braid/mirror.rb +110 -23
  9. data/lib/braid/operations.rb +9 -6
  10. data/lib/braid/operations_lite.rb +19 -1
  11. data/lib/braid/sorbet/fake_runtime.rb +68 -0
  12. data/lib/braid/sorbet/setup.rb +18 -0
  13. data/lib/braid/version.rb +1 -1
  14. data/lib/braid.rb +21 -0
  15. metadata +12 -75
  16. data/.gitignore +0 -16
  17. data/.travis.yml +0 -15
  18. data/CONTRIBUTING.md +0 -24
  19. data/Gemfile +0 -3
  20. data/README.md +0 -234
  21. data/Rakefile +0 -12
  22. data/_config.yml +0 -1
  23. data/braid.gemspec +0 -35
  24. data/braids-json.schema.json +0 -91
  25. data/config_versions.md +0 -58
  26. data/spec/config_spec.rb +0 -59
  27. data/spec/fixtures/shiny/README +0 -3
  28. data/spec/fixtures/shiny/other-skit/layout.liquid +0 -219
  29. data/spec/fixtures/shiny/skit-layout.liquid.test +0 -2
  30. data/spec/fixtures/shiny/skit1.test +0 -2
  31. data/spec/fixtures/shiny-conf-1.0.9-lock/.braids.json +0 -10
  32. data/spec/fixtures/shiny-conf-1.0.9-lock/expected.braids.json +0 -9
  33. data/spec/fixtures/shiny-conf-1.0.9-lock/skit1/layouts/layout.liquid +0 -219
  34. data/spec/fixtures/shiny-conf-1.0.9-lock/skit1/preview.png +0 -0
  35. data/spec/fixtures/shiny-conf-breaking-changes/.braids +0 -14
  36. data/spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/README.md +0 -9
  37. data/spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/index.html +0 -20
  38. data/spec/fixtures/shiny-conf-breaking-changes/Spoon-Knife/styles.css +0 -17
  39. data/spec/fixtures/shiny-conf-breaking-changes/expected.braids.json +0 -10
  40. data/spec/fixtures/shiny-conf-breaking-changes/skit1/layouts/layout.liquid +0 -219
  41. data/spec/fixtures/shiny-conf-breaking-changes/skit1/preview.png +0 -0
  42. data/spec/fixtures/shiny-conf-future/.braids.json +0 -10
  43. data/spec/fixtures/shiny-conf-future/skit1/layouts/layout.liquid +0 -219
  44. data/spec/fixtures/shiny-conf-future/skit1/preview.png +0 -0
  45. data/spec/fixtures/shiny-conf-json-old-name/.braids +0 -9
  46. data/spec/fixtures/shiny-conf-json-old-name/expected.braids.json +0 -10
  47. data/spec/fixtures/shiny-conf-json-old-name/skit1/layouts/layout.liquid +0 -219
  48. data/spec/fixtures/shiny-conf-json-old-name/skit1/preview.png +0 -0
  49. data/spec/fixtures/shiny-conf-yaml/.braids +0 -8
  50. data/spec/fixtures/shiny-conf-yaml/expected.braids.json +0 -10
  51. data/spec/fixtures/shiny-conf-yaml/skit1/layouts/layout.liquid +0 -219
  52. data/spec/fixtures/shiny-conf-yaml/skit1/preview.png +0 -0
  53. data/spec/fixtures/shiny_skit1.2_merged/layouts/layout.liquid +0 -223
  54. data/spec/fixtures/shiny_skit1.2_merged/preview.png +0 -0
  55. data/spec/fixtures/shiny_skit1_conflicting/layouts/layout.liquid +0 -221
  56. data/spec/fixtures/shiny_skit1_conflicting/preview.png +0 -0
  57. data/spec/fixtures/shiny_skit1_mergeable/layouts/layout.liquid +0 -221
  58. data/spec/fixtures/shiny_skit1_mergeable/preview.png +0 -0
  59. data/spec/fixtures/skit1/layouts/layout.liquid +0 -219
  60. data/spec/fixtures/skit1/preview.png +0 -0
  61. data/spec/fixtures/skit1.1/layouts/layout.liquid +0 -219
  62. data/spec/fixtures/skit1.1_with_filter/.gitattributes +0 -1
  63. data/spec/fixtures/skit1.1_with_filter/layouts/layout.liquid +0 -219
  64. data/spec/fixtures/skit1.1_with_filter/preview.png +0 -0
  65. data/spec/fixtures/skit1.1x/layouts/layout.liquid +0 -219
  66. data/spec/fixtures/skit1.2/layouts/layout.liquid +0 -221
  67. data/spec/fixtures/skit1.3/layouts/README.md +0 -1
  68. data/spec/fixtures/skit1.3/layouts/layout.liquid +0 -221
  69. data/spec/fixtures/skit1_with_filter/.gitattributes +0 -1
  70. data/spec/fixtures/skit1_with_filter/layouts/layout.liquid +0 -219
  71. data/spec/fixtures/skit1_with_filter/preview.png +0 -0
  72. data/spec/integration/adding_spec.rb +0 -230
  73. data/spec/integration/config_versioning_spec.rb +0 -222
  74. data/spec/integration/diff_spec.rb +0 -597
  75. data/spec/integration/integration_helper.rb +0 -126
  76. data/spec/integration/push_spec.rb +0 -402
  77. data/spec/integration/remove_spec.rb +0 -81
  78. data/spec/integration/status_spec.rb +0 -165
  79. data/spec/integration/updating_spec.rb +0 -487
  80. data/spec/mirror_spec.rb +0 -119
  81. data/spec/operations_spec.rb +0 -66
  82. data/spec/test_helper.rb +0 -19
@@ -1,91 +0,0 @@
1
- {
2
- "title": "schema for .braids.json configuration file",
3
- "type": "object",
4
- "properties": {
5
- "config_version": {
6
- "type": "number",
7
- "enum": [
8
- 1
9
- ],
10
- "description": "configuration format version (see https://cristibalan.github.io/braid/#braid-version-compatibility)",
11
- "$comment": "So far, only version 1 is defined. (Version \"0\" is a mess and not worth writing a schema for.) When we have more than one defined version, we can look into the best way to make the rest of the schema dependent on the version."
12
- },
13
- "mirrors": {
14
- "type": "object",
15
- "description": "container for all added vendor repository mirrors",
16
- "patternProperties": {
17
- ".*": {
18
- "allOf": [
19
- {
20
- "type": "object",
21
- "description": "local path where the vendor content is placed, relative to the .braids.json file",
22
- "properties": {
23
- "url": {
24
- "type": "string",
25
- "description": "remote URL of the vendor repository"
26
- },
27
- "path": {
28
- "type": "string",
29
- "description": "path to a subdirectory or single file in the vendor tree (instead of the whole tree) to place at the specified local path"
30
- },
31
- "branch": {
32
- "type": "string",
33
- "description": "branch name of the vendor repository to track"
34
- },
35
- "tag": {
36
- "type": "string",
37
- "description": "tag name of the vendor repository to track"
38
- },
39
- "revision": {
40
- "type": "string",
41
- "description": "commit ID of the vendor repository currently used by the mirror"
42
- }
43
- },
44
- "required": [
45
- "url",
46
- "revision"
47
- ],
48
- "additionalProperties": false
49
- },
50
- {
51
- "$comment": "At most one of \"branch\" and \"tag\". Technique from https://stackoverflow.com/a/33358676 .",
52
- "oneOf": [
53
- {
54
- "not": {
55
- "anyOf": [
56
- {
57
- "required": [
58
- "branch"
59
- ]
60
- },
61
- {
62
- "required": [
63
- "tag"
64
- ]
65
- }
66
- ]
67
- }
68
- },
69
- {
70
- "required": [
71
- "branch"
72
- ]
73
- },
74
- {
75
- "required": [
76
- "tag"
77
- ]
78
- }
79
- ]
80
- }
81
- ]
82
- }
83
- }
84
- }
85
- },
86
- "required": [
87
- "config_version",
88
- "mirrors"
89
- ],
90
- "additionalProperties": false
91
- }
data/config_versions.md DELETED
@@ -1,58 +0,0 @@
1
- # Braid configuration version history
2
-
3
- The Braid configuration file (`.braids.json`) contains a configuration version
4
- number that indicates the format of the configuration file and the Braid
5
- features required by the project. You'll be directed to this page if you use a
6
- version of Braid that does not support the project's configuration version; see
7
- [the readme](README.md#braid-version-compatibility) for more information about
8
- the versioning scheme.
9
-
10
- To get a compatible version of Braid:
11
-
12
- 1. First check if the project has its own instructions to install and run Braid,
13
- and if so, follow them instead.
14
- 2. Look up the Braid versions corresponding to your current configuration
15
- version in the table below.
16
- 3. Run `gem query --remote --all --exact braid` to get a list of all existing
17
- versions of Braid, and choose one that is compatible with your configuration
18
- version (you probably want the newest such version); call it `x.y.z`.
19
- 4. Run `gem install braid --version x.y.z` to install the chosen version of
20
- Braid.
21
- 5. Run Braid as `braid _x.y.z_` (that's the chosen version surrounded by literal
22
- underscores) followed by your desired arguments.
23
-
24
- <table border="border">
25
- <tr>
26
- <th>Config. version</th>
27
- <th>Braid versions</th>
28
- <th>Changes since previous</th>
29
- </tr>
30
- <tr>
31
- <td>1</td>
32
- <td>1.1.x</td>
33
- <td>(Various)</td>
34
- </tr>
35
- <tr>
36
- <td>"0"</td>
37
- <td colspan="2">
38
- (Braid versions earlier than 1.1.0 have varying configuration formats and
39
- features and do not have a well-defined compatibility scheme. Braid 1.1.0 and
40
- newer refer to all of these formats as version "0" and are capable of correctly
41
- upgrading most of them. We recommend upgrading to Braid 1.1.0 or newer if you
42
- can.)
43
- </td>
44
- </tr>
45
- </table>
46
-
47
- <style>
48
- header, section#downloads, .inner > hr {
49
- display: none;
50
- }
51
- .inner {
52
- padding-top: 35px; /* same as header when it is visible */
53
- }
54
- th, td {
55
- border: 1px solid #6d6d6d;
56
- padding: 2px;
57
- }
58
- </style>
data/spec/config_spec.rb DELETED
@@ -1,59 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper'
2
-
3
- describe 'Braid::Config, when empty' do
4
- before(:each) do
5
- @config = Braid::Config.new({'config_file' => 'tmp.yml'})
6
- end
7
-
8
- after(:each) do
9
- FileUtils.rm('tmp.yml') rescue nil
10
- end
11
-
12
- it 'should not get a mirror by name' do
13
- expect(@config.get('path')).to be_nil
14
- expect { @config.get!('path') }.to raise_error(Braid::Config::MirrorDoesNotExist)
15
- end
16
-
17
- it 'should add a mirror and its params' do
18
- @mirror = build_mirror
19
- @config.add(@mirror)
20
- expect(@config.get('path').path).not_to be_nil
21
- end
22
- end
23
-
24
- describe 'Braid::Config, with one mirror' do
25
- before(:each) do
26
- @config = Braid::Config.new({'config_file' => 'tmp.yml'})
27
- @mirror = build_mirror
28
- @config.add(@mirror)
29
- end
30
-
31
- after(:each) do
32
- FileUtils.rm('tmp.yml') rescue nil
33
- end
34
-
35
- it 'should get the mirror by name' do
36
- expect(@config.get('path')).to eq(@mirror)
37
- expect(@config.get!('path')).to eq(@mirror)
38
- end
39
-
40
- it 'should raise when trying to overwrite a mirror on add' do
41
- expect { @config.add(@mirror) }.to raise_error(Braid::Config::PathAlreadyInUse)
42
- end
43
-
44
- it 'should remove the mirror' do
45
- @config.remove(@mirror)
46
- expect(@config.get('path')).to be_nil
47
- end
48
-
49
- it 'should update the mirror with new params' do
50
- @mirror.branch = 'other'
51
- @config.update(@mirror)
52
- expect(@config.get('path').attributes).to eq({'branch' => 'other'})
53
- end
54
-
55
- it 'should raise when trying to update nonexistent mirror' do
56
- @mirror.instance_variable_set('@path', 'other')
57
- expect { @config.update(@mirror) }.to raise_error(Braid::Config::MirrorDoesNotExist)
58
- end
59
- end
@@ -1,3 +0,0 @@
1
- shiny app
2
-
3
- it uses braid to pull in a bunch of stuff!
@@ -1,219 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- {{ '/feed/atom.xml' | assign_to: 'global_feed' }}
4
- {{ '/feed/all_comments.xml' | assign_to: 'global_comments_feed' }}
5
- <head>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
- <title>
8
- {{ site.title }}
9
- {% if site.current_section %}
10
- - {{ site.current_section.name }}
11
- {% endif %}
12
- {% if article %}
13
- - {{ article.title }}
14
- {% endif %}
15
- </title>
16
- <link rel="alternate" type="application/atom+xml" title="{{ site.title }} feed" href="{{ global_feed }}"/>
17
- <link rel="alternate" type="application/atom+xml" title="{{ site.title }} comments feed" href="{{ global_comments_feed }}"/>
18
- {{ 'base' | stylesheet }}
19
- {{ 'app' | javascript }}
20
- <!--[if IE]>
21
- {{ 'base_ie' | stylesheet }}
22
- <![endif]-->
23
- </head>
24
-
25
- <body class="fixed orange">
26
- <script type="text/javascript">loadPreferences()</script>
27
-
28
- <div id="wrapper">
29
-
30
- <div id="header" class="clearfix">
31
- <div id="title" class="clearfix">
32
- <h1><a href="/">{{ site.title }}</a></h1>
33
- </div>
34
- <h2>Sections</h2>
35
- <ul id="menu">
36
- {% for section in site.sections %}
37
- {% if section.articles_count > 0 %}
38
- {% if section.is_home %}
39
- <li{% if section.current %} class="selected"{% endif %}>{{ section | link_to_section }}</li>
40
- {% else %}
41
- {% if section.is_paged %}
42
- <li{% if section.current %} class="selected"{% endif %}>{{ section | link_to_section }}</li>
43
- {% endif %}
44
- {% endif %}
45
- {% endif %}
46
- {% endfor %}
47
- </ul>
48
- </div>
49
-
50
- <div id="contentwrapper" class="clearfix">
51
-
52
- <div id="content">
53
-
54
- <div id="innerwrapper">
55
-
56
- <div class="article">
57
- <div class="body">
58
- <h2>Skittlish Tips'n'Tricks</h2>
59
- <ul>
60
- <li>Change the classes for the body tag to set your default site style. also change these in the app.js file (line 66).</li>
61
- <li>Remove the scripts and the #options div if you don't want the option switcher.</li>
62
- <li>The top menu shows the home section and the sections that are not blogs.</li>
63
- <li>Email me at <a href="mailto:evil@che.lu">evil@che.lu</a> if you have any questions.</li>
64
- <li>Happy hacking!</li>
65
- </ul>
66
- </div>
67
- </div>
68
-
69
- {{ content_for_layout }}
70
-
71
- </div>
72
-
73
- </div>
74
-
75
- <div id="sidebar">
76
-
77
- <div class="boxy short">
78
- <h3>boxy short</h3>
79
-
80
- <p>You can have, boxes with a short, tall or no background shade, just change the class of the containing div.</p>
81
-
82
- <p>Have boxes with smaller text with the class "minor". See the "Recent" boxy below.</p>
83
-
84
- </div>
85
-
86
- <div id="search" class="boxy short">
87
- <h3>Search</h3>
88
- <form method="get" action="/search">
89
- <fieldset>
90
- <input class="text" type="text" id="q" value="" name="q"/>
91
- </fieldset>
92
- </form>
93
- </div>
94
-
95
- <div class="boxy tall minor">
96
- <h3>Recent</h3>
97
-
98
- <dl>
99
- <dt>Articles <a class="feed" href="{{ global_feed }}"><span>feed</span></a></dt>
100
- <dd>
101
- <ul>
102
- {% for article in site.latest_articles %}
103
- <li>{{ article | link_to_article }} <em>({{ article.published_at | format_date: 'stub', true }})</em></li>
104
- {% endfor %}
105
- </ul>
106
- </dd>
107
-
108
- <dt>Comments <a class="feed" href="{{ global_comments_feed }}"><span>feed</span></a></dt>
109
- <dd>
110
- <ul>
111
- {% for comment in site.latest_comments %}
112
- <li>{{ comment.author_link }} on <a href="{{ comment.url }}#comment-{{ comment.id }}">{{ comment.title }}</a></li>
113
- {% endfor %}
114
- </ul>
115
- </dd>
116
- </dl>
117
- </div>
118
-
119
- <div class="boxy short">
120
- <h3>Archives</h3>
121
- <p>This would be much nicer with jamis' month_drop thingy.</p>
122
- {{ '' | section | months | assign_to: 'home_section' }}
123
- <ul>
124
- {% for month in home_section.months %}
125
- {{ home_section | monthly_articles: month | size | assign_to: 'articles_count' }}
126
- {% if articles_count > 0 %}
127
- <li>{{ home_section | link_to_month: month }} ({{ articles_count }})</li>
128
- {% endif %}
129
- {% endfor %}
130
- </ul>
131
- </div>
132
-
133
- {% if site.blog_sections.size > 1 %}
134
- <div class="boxy short">
135
- <h3>Categories</h3>
136
- <p>Lists only blog type categories with at least one article.</p>
137
- <p>This list uses an ul. You could use a dl with only dd's in it for the same effect. Wouldn't be semantic tho.</p>
138
- <ul class="sections">
139
- {% for section in site.blog_sections %}
140
- {% if section.articles_count > 0 %}
141
- {% unless section.is_home %}
142
- <li>{{ section | link_to_section }} ({{ section.articles_count }})</li>
143
- {% endunless %}
144
- {% endif %}
145
- {% endfor %}
146
- </ul>
147
- </div>
148
-
149
- {% endif %}
150
- {% unless site.tags == empty %}
151
- <div class="boxy short">
152
- <p>This would be nicer if we could get the number of articles for each tag.</p>
153
- <h3>tags: </h3>
154
- <ul>
155
- {% for tag in site.tags %}
156
- <li>{{ tag | link_to_tag }}</li>
157
- {% endfor %}
158
- </ul>
159
- </div>
160
-
161
- {% endunless %}
162
- <div class="boxy tall">
163
- <h3>boxy tall</h3>
164
- <p>When using a tall box, make sure it's got plenty of content or that it's immediately followed by a short boxy. It might look a bit chopped off otherwise.</p>
165
- <dl>
166
- <dt>thing 1</dt>
167
- <dd><a href="#">value 1</a></dd>
168
- <dd><a href="#">value 2</a></dd>
169
- <dd><a href="#">value 3</a></dd>
170
- <dd><a href="#">value 4</a></dd>
171
- <dd><a href="#">value 5</a></dd>
172
- <dd><a href="#">value 6</a></dd>
173
- <dd><a href="#">value 6</a></dd>
174
-
175
- <dt>thing 1</dt>
176
- <dd><a href="#">value 1</a></dd>
177
- <dd><a href="#">value 2</a></dd>
178
- <dd><a href="#">value 3</a></dd>
179
- <dd>value 4</dd>
180
- <dd>value 5</dd>
181
- <dd><a href="#">value 6</a></dd>
182
- <dd><a href="#">value 6</a></dd>
183
-
184
- </dl>
185
- </div>
186
-
187
- </div>
188
-
189
- </div>
190
-
191
- <div id="options">
192
- <h2>Options:</h2>
193
- <h3>Size</h3>
194
- <ul id="option_size">
195
- <li id="option_size_fixed" class="fixed" ><a><span>fixed </span></a></li>
196
- <li id="option_size_fluid" class="fluid" ><a><span>fluid </span></a></li>
197
- </ul>
198
- <h3>Colors</h3>
199
- <ul id="option_color">
200
- <li id="option_color_orange" class="orange"><a><span>orange</span></a></li>
201
- <li id="option_color_blue" class="blue" ><a><span>blue </span></a></li>
202
- <li id="option_color_green" class="green" ><a><span>green </span></a></li>
203
- <li id="option_color_pink" class="pink" ><a><span>pink </span></a></li>
204
- <li id="option_color_cyan" class="cyan" ><a><span>cyan </span></a></li>
205
- <li id="option_color_red" class="red" ><a><span>red </span></a></li>
206
- <li id="option_color_violet" class="violet"><a><span>violet</span></a></li>
207
- </ul>
208
- </div>
209
-
210
- <div id="footer">
211
- <p>Copyright &copy; 2006, Your Name. Valid <a href="http://validator.w3.org/check/referer">XHTML</a> and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>.</p>
212
- <p>Using <a href="http://evil.che.lu/projects/skittlish">skittlish</a> on <a href="http://publishwithimpunity.com/">mephisto</a>.</p>
213
- </div>
214
-
215
- </div>
216
-
217
- </body>
218
-
219
- </html>
@@ -1,2 +0,0 @@
1
- This file exists to test that `braid diff skit-layout.liquid` correctly limits
2
- the diff to the single file and doesn't do a naive path prefix match.
@@ -1,2 +0,0 @@
1
- This file exists to test that `braid diff skit1` correctly limits the diff to
2
- the single directory and doesn't do a naive path prefix match.
@@ -1,10 +0,0 @@
1
- {
2
- "skit1": {
3
- "url": "file:///path/to/braid/spec/fixtures/skit1",
4
- "remote": "master/braid/skit1",
5
- "branch": "master",
6
- "squashed": true,
7
- "revision": "6d3aeac08f9f4f9689d367fc771f5f1c90496176",
8
- "lock": "6d3aeac08f9f4f9689d367fc771f5f1c90496176"
9
- }
10
- }
@@ -1,9 +0,0 @@
1
- {
2
- "config_version": 1,
3
- "mirrors": {
4
- "skit1": {
5
- "url": "file:///path/to/braid/spec/fixtures/skit1",
6
- "revision": "6d3aeac08f9f4f9689d367fc771f5f1c90496176"
7
- }
8
- }
9
- }
@@ -1,219 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- {{ '/feed/atom.xml' | assign_to: 'global_feed' }}
4
- {{ '/feed/all_comments.xml' | assign_to: 'global_comments_feed' }}
5
- <head>
6
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
- <title>
8
- {{ site.title }}
9
- {% if site.current_section %}
10
- - {{ site.current_section.name }}
11
- {% endif %}
12
- {% if article %}
13
- - {{ article.title }}
14
- {% endif %}
15
- </title>
16
- <link rel="alternate" type="application/atom+xml" title="{{ site.title }} feed" href="{{ global_feed }}"/>
17
- <link rel="alternate" type="application/atom+xml" title="{{ site.title }} comments feed" href="{{ global_comments_feed }}"/>
18
- {{ 'base' | stylesheet }}
19
- {{ 'app' | javascript }}
20
- <!--[if IE]>
21
- {{ 'base_ie' | stylesheet }}
22
- <![endif]-->
23
- </head>
24
-
25
- <body class="fixed orange">
26
- <script type="text/javascript">loadPreferences()</script>
27
-
28
- <div id="wrapper">
29
-
30
- <div id="header" class="clearfix">
31
- <div id="title" class="clearfix">
32
- <h1><a href="/">{{ site.title }}</a></h1>
33
- </div>
34
- <h2>Sections</h2>
35
- <ul id="menu">
36
- {% for section in site.sections %}
37
- {% if section.articles_count > 0 %}
38
- {% if section.is_home %}
39
- <li{% if section.current %} class="selected"{% endif %}>{{ section | link_to_section }}</li>
40
- {% else %}
41
- {% if section.is_paged %}
42
- <li{% if section.current %} class="selected"{% endif %}>{{ section | link_to_section }}</li>
43
- {% endif %}
44
- {% endif %}
45
- {% endif %}
46
- {% endfor %}
47
- </ul>
48
- </div>
49
-
50
- <div id="contentwrapper" class="clearfix">
51
-
52
- <div id="content">
53
-
54
- <div id="innerwrapper">
55
-
56
- <div class="article">
57
- <div class="body">
58
- <h2>Skittlish Tips'n'Tricks</h2>
59
- <ul>
60
- <li>Change the classes for the body tag to set your default site style. also change these in the app.js file (line 66).</li>
61
- <li>Remove the scripts and the #options div if you don't want the option switcher.</li>
62
- <li>The top menu shows the home section and the sections that are not blogs.</li>
63
- <li>Email me at <a href="mailto:evil@che.lu">evil@che.lu</a> if you have any questions.</li>
64
- <li>Happy hacking!</li>
65
- </ul>
66
- </div>
67
- </div>
68
-
69
- {{ content_for_layout }}
70
-
71
- </div>
72
-
73
- </div>
74
-
75
- <div id="sidebar">
76
-
77
- <div class="boxy short">
78
- <h3>boxy short</h3>
79
-
80
- <p>You can have, boxes with a short, tall or no background shade, just change the class of the containing div.</p>
81
-
82
- <p>Have boxes with smaller text with the class "minor". See the "Recent" boxy below.</p>
83
-
84
- </div>
85
-
86
- <div id="search" class="boxy short">
87
- <h3>Search</h3>
88
- <form method="get" action="/search">
89
- <fieldset>
90
- <input class="text" type="text" id="q" value="" name="q"/>
91
- </fieldset>
92
- </form>
93
- </div>
94
-
95
- <div class="boxy tall minor">
96
- <h3>Recent</h3>
97
-
98
- <dl>
99
- <dt>Articles <a class="feed" href="{{ global_feed }}"><span>feed</span></a></dt>
100
- <dd>
101
- <ul>
102
- {% for article in site.latest_articles %}
103
- <li>{{ article | link_to_article }} <em>({{ article.published_at | format_date: 'stub', true }})</em></li>
104
- {% endfor %}
105
- </ul>
106
- </dd>
107
-
108
- <dt>Comments <a class="feed" href="{{ global_comments_feed }}"><span>feed</span></a></dt>
109
- <dd>
110
- <ul>
111
- {% for comment in site.latest_comments %}
112
- <li>{{ comment.author_link }} on <a href="{{ comment.url }}#comment-{{ comment.id }}">{{ comment.title }}</a></li>
113
- {% endfor %}
114
- </ul>
115
- </dd>
116
- </dl>
117
- </div>
118
-
119
- <div class="boxy short">
120
- <h3>Archives</h3>
121
- <p>This would be much nicer with jamis' month_drop thingy.</p>
122
- {{ '' | section | months | assign_to: 'home_section' }}
123
- <ul>
124
- {% for month in home_section.months %}
125
- {{ home_section | monthly_articles: month | size | assign_to: 'articles_count' }}
126
- {% if articles_count > 0 %}
127
- <li>{{ home_section | link_to_month: month }} ({{ articles_count }})</li>
128
- {% endif %}
129
- {% endfor %}
130
- </ul>
131
- </div>
132
-
133
- {% if site.blog_sections.size > 1 %}
134
- <div class="boxy short">
135
- <h3>Categories</h3>
136
- <p>Lists only blog type categories with at least one article.</p>
137
- <p>This list uses an ul. You could use a dl with only dd's in it for the same effect. Wouldn't be semantic tho.</p>
138
- <ul class="sections">
139
- {% for section in site.blog_sections %}
140
- {% if section.articles_count > 0 %}
141
- {% unless section.is_home %}
142
- <li>{{ section | link_to_section }} ({{ section.articles_count }})</li>
143
- {% endunless %}
144
- {% endif %}
145
- {% endfor %}
146
- </ul>
147
- </div>
148
-
149
- {% endif %}
150
- {% unless site.tags == empty %}
151
- <div class="boxy short">
152
- <p>This would be nicer if we could get the number of articles for each tag.</p>
153
- <h3>tags: </h3>
154
- <ul>
155
- {% for tag in site.tags %}
156
- <li>{{ tag | link_to_tag }}</li>
157
- {% endfor %}
158
- </ul>
159
- </div>
160
-
161
- {% endunless %}
162
- <div class="boxy tall">
163
- <h3>boxy tall</h3>
164
- <p>When using a tall box, make sure it's got plenty of content or that it's immediately followed by a short boxy. It might look a bit chopped off otherwise.</p>
165
- <dl>
166
- <dt>thing 1</dt>
167
- <dd><a href="#">value 1</a></dd>
168
- <dd><a href="#">value 2</a></dd>
169
- <dd><a href="#">value 3</a></dd>
170
- <dd><a href="#">value 4</a></dd>
171
- <dd><a href="#">value 5</a></dd>
172
- <dd><a href="#">value 6</a></dd>
173
- <dd><a href="#">value 6</a></dd>
174
-
175
- <dt>thing 1</dt>
176
- <dd><a href="#">value 1</a></dd>
177
- <dd><a href="#">value 2</a></dd>
178
- <dd><a href="#">value 3</a></dd>
179
- <dd>value 4</dd>
180
- <dd>value 5</dd>
181
- <dd><a href="#">value 6</a></dd>
182
- <dd><a href="#">value 6</a></dd>
183
-
184
- </dl>
185
- </div>
186
-
187
- </div>
188
-
189
- </div>
190
-
191
- <div id="options">
192
- <h2>Options:</h2>
193
- <h3>Size</h3>
194
- <ul id="option_size">
195
- <li id="option_size_fixed" class="fixed" ><a><span>fixed </span></a></li>
196
- <li id="option_size_fluid" class="fluid" ><a><span>fluid </span></a></li>
197
- </ul>
198
- <h3>Colors</h3>
199
- <ul id="option_color">
200
- <li id="option_color_orange" class="orange"><a><span>orange</span></a></li>
201
- <li id="option_color_blue" class="blue" ><a><span>blue </span></a></li>
202
- <li id="option_color_green" class="green" ><a><span>green </span></a></li>
203
- <li id="option_color_pink" class="pink" ><a><span>pink </span></a></li>
204
- <li id="option_color_cyan" class="cyan" ><a><span>cyan </span></a></li>
205
- <li id="option_color_red" class="red" ><a><span>red </span></a></li>
206
- <li id="option_color_violet" class="violet"><a><span>violet</span></a></li>
207
- </ul>
208
- </div>
209
-
210
- <div id="footer">
211
- <p>Copyright &copy; 2006, Your Name. Valid <a href="http://validator.w3.org/check/referer">XHTML</a> and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>.</p>
212
- <p>Using <a href="http://evil.che.lu/projects/skittlish">skittlish</a> on <a href="http://publishwithimpunity.com/">mephisto</a>.</p>
213
- </div>
214
-
215
- </div>
216
-
217
- </body>
218
-
219
- </html>