middlemac-extras 1.0.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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +18 -0
- data/LICENSE.md +22 -0
- data/README.md +70 -0
- data/Rakefile +10 -0
- data/bin/middlemac-extras +80 -0
- data/documentation_project/.gitignore +25 -0
- data/documentation_project/Gemfile +17 -0
- data/documentation_project/README.md +13 -0
- data/documentation_project/config.rb +77 -0
- data/documentation_project/source/archives/about.html.md.erb +29 -0
- data/documentation_project/source/archives/index.html.md.erb +78 -0
- data/documentation_project/source/archives/past_far/about.html.md.erb +29 -0
- data/documentation_project/source/archives/past_far/index.html.md.erb +35 -0
- data/documentation_project/source/archives/past_near/about.html.md.erb +29 -0
- data/documentation_project/source/archives/past_near/index.html.md.erb +35 -0
- data/documentation_project/source/books/about.html.md.erb +29 -0
- data/documentation_project/source/books/index.html.md.erb +30 -0
- data/documentation_project/source/books/science fiction/about.html.md.erb +29 -0
- data/documentation_project/source/books/science fiction/index.html.md.erb +35 -0
- data/documentation_project/source/books/science fiction/past_science_fiction/about.html.md.erb +29 -0
- data/documentation_project/source/books/science fiction/past_science_fiction/index.html.md.erb +35 -0
- data/documentation_project/source/books/science fiction/past_science_fiction/past_far/about.html.md.erb +29 -0
- data/documentation_project/source/books/science fiction/past_science_fiction/past_far/index.html.md.erb +35 -0
- data/documentation_project/source/books/science fiction/past_science_fiction/past_near/about.html.md.erb +29 -0
- data/documentation_project/source/books/science fiction/past_science_fiction/past_near/index.html.md.erb +35 -0
- data/documentation_project/source/config_rb.html.md.erb +72 -0
- data/documentation_project/source/css_image_sizes.html.md.erb +65 -0
- data/documentation_project/source/image_tag.html.md.erb +83 -0
- data/documentation_project/source/images/middlemac-extras-small.png +0 -0
- data/documentation_project/source/images/middlemac-extras-small@2x.png +0 -0
- data/documentation_project/source/images/middlemac-extras.png +0 -0
- data/documentation_project/source/images/middlemac-extras@2x.png +0 -0
- data/documentation_project/source/images/sub_images/middlemac-extras-small.png +0 -0
- data/documentation_project/source/images/sub_images/middlemac-extras-small@2x.png +0 -0
- data/documentation_project/source/images/sub_images/middlemac-extras.png +0 -0
- data/documentation_project/source/images/sub_images/middlemac-extras@2x.png +0 -0
- data/documentation_project/source/index.html.md.erb +53 -0
- data/documentation_project/source/javascripts/all.js +1 -0
- data/documentation_project/source/layouts/layout.haml +10 -0
- data/documentation_project/source/layouts/template-logo-large.haml +22 -0
- data/documentation_project/source/layouts/template-logo-medium.haml +20 -0
- data/documentation_project/source/layouts/template-logo-small.haml +18 -0
- data/documentation_project/source/license.html.md.erb +42 -0
- data/documentation_project/source/md_images.html.md.erb +72 -0
- data/documentation_project/source/md_links.html.md.erb +73 -0
- data/documentation_project/source/stylesheets/_github.scss +61 -0
- data/documentation_project/source/stylesheets/_middlemac_minimal.scss +516 -0
- data/documentation_project/source/stylesheets/_normalize.scss +374 -0
- data/documentation_project/source/stylesheets/css_image_sizes.css.erb +1 -0
- data/documentation_project/source/stylesheets/style.css.scss +3 -0
- data/lib/middlemac-extras/extension.rb +261 -0
- data/lib/middlemac-extras/version.rb +5 -0
- data/lib/middlemac-extras.rb +6 -0
- data/middlemac-extras.gemspec +27 -0
- metadata +162 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
title: The MIT License
|
3
|
+
blurb: Describes your legal rights and obligations for using these materials.
|
4
|
+
layout: template-logo-medium
|
5
|
+
order: 40
|
6
|
+
navigate: false
|
7
|
+
---
|
8
|
+
|
9
|
+
<%= md_links %>
|
10
|
+
<% content_for :seeAlso do %>
|
11
|
+
<ul>
|
12
|
+
<li><a href="/">Welcome to <code>middlemac-extras</code></a></li>
|
13
|
+
<li><a href="css_image_sizes.html">The <code>css_image_sizes</code> helper</a></li>
|
14
|
+
<li><a href="image_tag.html">The <code>image_tag</code> helper</a></li>
|
15
|
+
<li><a href="md_images.html">The <code>md_images</code> helper</a></li>
|
16
|
+
<li><a href="md_links.html">The <code>md_links</code> helper</a></li>
|
17
|
+
<li><a href="config_rb.html">Setting up <code>config.rb</code></a></li>
|
18
|
+
</ul>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
# <%= current_page.data.title %>
|
22
|
+
<%= current_page.data.blurb %>
|
23
|
+
|
24
|
+
**Copyright (c) 2016 Jim Derry**
|
25
|
+
|
26
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
27
|
+
of this software and associated documentation files (the "Software"), to deal
|
28
|
+
in the Software without restriction, including without limitation the rights
|
29
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
30
|
+
copies of the Software, and to permit persons to whom the Software is
|
31
|
+
furnished to do so, subject to the following conditions:
|
32
|
+
|
33
|
+
The above copyright notice and this permission notice shall be included in
|
34
|
+
all copies or substantial portions of the Software.
|
35
|
+
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
37
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
38
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
39
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
40
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
41
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
42
|
+
THE SOFTWARE.
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
title: The <code>md_images</code> helper
|
3
|
+
blurb: Automatic Markdown reference style links for every image in your site
|
4
|
+
are available by using this helper.
|
5
|
+
layout: template-logo-medium
|
6
|
+
order: 40
|
7
|
+
navigate: false
|
8
|
+
---
|
9
|
+
|
10
|
+
<%= md_links %>
|
11
|
+
<%= md_images %>
|
12
|
+
<% content_for :seeAlso do %>
|
13
|
+
<ul>
|
14
|
+
<li><a href="/">Welcome to <code>middlemac-extras</code></a></li>
|
15
|
+
<li><a href="css_image_sizes.html">The <code>css_image_sizes</code> helper</a></li>
|
16
|
+
<li><a href="image_tag.html">The <code>image_tag</code> helper</a></li>
|
17
|
+
<li><a href="md_links.html">The <code>md_links</code> helper</a></li>
|
18
|
+
<li><a href="config_rb.html">Setting up <code>config.rb</code></a></li>
|
19
|
+
<li><a href="license.html">The MIT License</a></li>
|
20
|
+
</ul>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
# <%= current_page.data.title %>
|
24
|
+
<%= current_page.data.blurb %>
|
25
|
+
|
26
|
+
It works by providing a Markdown list of file references for every image used
|
27
|
+
by your project.
|
28
|
+
|
29
|
+
## Example
|
30
|
+
|
31
|
+
When called like this:
|
32
|
+
|
33
|
+
~~~ erb
|
34
|
+
<%%= md_images %>
|
35
|
+
~~~
|
36
|
+
|
37
|
+
…the invisible result (made visible here) is this:
|
38
|
+
|
39
|
+
~~~ markdown
|
40
|
+
<%= md_images %>
|
41
|
+
~~~
|
42
|
+
|
43
|
+
Note that not all of these images are in use within this documentation; they’re
|
44
|
+
provided in this sample project only to illustrate this helper’s output.
|
45
|
+
{:.note}
|
46
|
+
|
47
|
+
## Use
|
48
|
+
|
49
|
+
Simply call the helper as described above, and then you can link to your images
|
50
|
+
very easily using Markdown reference-style links:
|
51
|
+
|
52
|
+
~~~ markdown
|
53
|
+
!['middlemac-extras-small' logo][middlemac-extras-small]
|
54
|
+
~~~
|
55
|
+
|
56
|
+
!['middlemac-extras-small' logo][middlemac-extras-small]
|
57
|
+
|
58
|
+
|
59
|
+
## Reference naming
|
60
|
+
|
61
|
+
The extension tries to keep the reference as short as possible. If all of your
|
62
|
+
images are within the `images/` directory then the references will be very
|
63
|
+
simple.
|
64
|
+
|
65
|
+
Items that are nested deeper will also have simple names if the name
|
66
|
+
is unique within your project.
|
67
|
+
|
68
|
+
Both of those conditions satisfy the vast majority of use cases. However if you
|
69
|
+
have multiple nested directories that share common image names, then the
|
70
|
+
references can grow quite long, and **the reference is not guaranteed** to stay
|
71
|
+
stable as you add more images with the same name in other directories. See the
|
72
|
+
example above.
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
title: The md_links helper<code></code>
|
3
|
+
blurb: The <code>md_links</code> helper can help you by providing Markdown
|
4
|
+
reference-style links (including title attributes) to every page in
|
5
|
+
your site.
|
6
|
+
layout: template-logo-medium
|
7
|
+
order: 40
|
8
|
+
navigate: false
|
9
|
+
---
|
10
|
+
|
11
|
+
<%= md_links %>
|
12
|
+
<% content_for :seeAlso do %>
|
13
|
+
<ul>
|
14
|
+
<li><a href="/">Welcome to <code>middlemac-extras</code></a></li>
|
15
|
+
<li><a href="css_image_sizes.html">The <code>css_image_sizes</code> helper</a></li>
|
16
|
+
<li><a href="image_tag.html">The <code>image_tag</code> helper</a></li>
|
17
|
+
<li><a href="md_images.html">The <code>md_images</code> helper</a></li>
|
18
|
+
<li><a href="config_rb.html">Setting up <code>config.rb</code></a></li>
|
19
|
+
<li><a href="license.html">The MIT License</a></li>
|
20
|
+
</ul>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
# <%= current_page.data.title %>
|
24
|
+
<%= current_page.data.blurb %>
|
25
|
+
|
26
|
+
It works by providing a Markdown list of file references for every file used
|
27
|
+
by your project.
|
28
|
+
|
29
|
+
## Example
|
30
|
+
|
31
|
+
When called like this:
|
32
|
+
|
33
|
+
~~~ erb
|
34
|
+
<%%= md_links %>
|
35
|
+
~~~
|
36
|
+
|
37
|
+
…the invisible result (made visible here) is this:
|
38
|
+
|
39
|
+
~~~ markdown
|
40
|
+
<%= md_links %>
|
41
|
+
~~~
|
42
|
+
|
43
|
+
Note that most of these files have no useful content; they’re provided in this
|
44
|
+
sample project _only_ to illustrate this helper’s output.
|
45
|
+
{:.note}
|
46
|
+
|
47
|
+
|
48
|
+
## Use
|
49
|
+
|
50
|
+
Simply call the helper as described above, and then you can link to your other
|
51
|
+
files very easily using Markdown reference-style links:
|
52
|
+
|
53
|
+
~~~ markdown
|
54
|
+
[Go to the top page of this site.][index]
|
55
|
+
~~~
|
56
|
+
|
57
|
+
[Go to the top page of this site.][index]
|
58
|
+
|
59
|
+
|
60
|
+
## Reference naming
|
61
|
+
|
62
|
+
The extension tries to keep the reference as short as possible. If all of your
|
63
|
+
files are within the root level directory then the references will be very
|
64
|
+
simple.
|
65
|
+
|
66
|
+
Items that are nested deeper will also have simple names if the name
|
67
|
+
is unique within your project.
|
68
|
+
|
69
|
+
Both of those conditions satisfy the vast majority of use cases. However if you
|
70
|
+
have multiple nested directories that share common image names, then the
|
71
|
+
references can grow quite long, and **the reference is not guaranteed** to stay
|
72
|
+
stable as you add more files with the same name in other directories. See the
|
73
|
+
example above.
|
@@ -0,0 +1,61 @@
|
|
1
|
+
.hll { background-color: #ffffcc }
|
2
|
+
.c { color: #999988; font-style: italic } /* Comment */
|
3
|
+
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
4
|
+
.k { color: #000000; font-weight: bold } /* Keyword */
|
5
|
+
.o { color: #000000; font-weight: bold } /* Operator */
|
6
|
+
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
7
|
+
.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
|
8
|
+
.c1 { color: #999988; font-style: italic } /* Comment.Single */
|
9
|
+
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
10
|
+
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
11
|
+
.ge { color: #000000; font-style: italic } /* Generic.Emph */
|
12
|
+
.gr { color: #aa0000 } /* Generic.Error */
|
13
|
+
.gh { color: #999999 } /* Generic.Heading */
|
14
|
+
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
15
|
+
.go { color: #888888 } /* Generic.Output */
|
16
|
+
.gp { color: #555555 } /* Generic.Prompt */
|
17
|
+
.gs { font-weight: bold } /* Generic.Strong */
|
18
|
+
.gu { color: #aaaaaa } /* Generic.Subheading */
|
19
|
+
.gt { color: #aa0000 } /* Generic.Traceback */
|
20
|
+
.kc { color: #000000; font-weight: bold } /* Keyword.Constant */
|
21
|
+
.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
|
22
|
+
.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
|
23
|
+
.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
|
24
|
+
.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
|
25
|
+
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
26
|
+
.m { color: #009999 } /* Literal.Number */
|
27
|
+
.s { color: #d01040 } /* Literal.String */
|
28
|
+
.na { color: #008080 } /* Name.Attribute */
|
29
|
+
.nb { color: #0086B3 } /* Name.Builtin */
|
30
|
+
.nc { color: #445588; font-weight: bold } /* Name.Class */
|
31
|
+
.no { color: #008080 } /* Name.Constant */
|
32
|
+
.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
|
33
|
+
.ni { color: #800080 } /* Name.Entity */
|
34
|
+
.ne { color: #990000; font-weight: bold } /* Name.Exception */
|
35
|
+
.nf { color: #990000; font-weight: bold } /* Name.Function */
|
36
|
+
.nl { color: #990000; font-weight: bold } /* Name.Label */
|
37
|
+
.nn { color: #555555 } /* Name.Namespace */
|
38
|
+
.nt { color: #000080 } /* Name.Tag */
|
39
|
+
.nv { color: #008080 } /* Name.Variable */
|
40
|
+
.ow { color: #000000; font-weight: bold } /* Operator.Word */
|
41
|
+
.w { color: #bbbbbb } /* Text.Whitespace */
|
42
|
+
.mf { color: #009999 } /* Literal.Number.Float */
|
43
|
+
.mh { color: #009999 } /* Literal.Number.Hex */
|
44
|
+
.mi { color: #009999 } /* Literal.Number.Integer */
|
45
|
+
.mo { color: #009999 } /* Literal.Number.Oct */
|
46
|
+
.sb { color: #d01040 } /* Literal.String.Backtick */
|
47
|
+
.sc { color: #d01040 } /* Literal.String.Char */
|
48
|
+
.sd { color: #d01040 } /* Literal.String.Doc */
|
49
|
+
.s2 { color: #d01040 } /* Literal.String.Double */
|
50
|
+
.se { color: #d01040 } /* Literal.String.Escape */
|
51
|
+
.sh { color: #d01040 } /* Literal.String.Heredoc */
|
52
|
+
.si { color: #d01040 } /* Literal.String.Interpol */
|
53
|
+
.sx { color: #d01040 } /* Literal.String.Other */
|
54
|
+
.sr { color: #009926 } /* Literal.String.Regex */
|
55
|
+
.s1 { color: #d01040 } /* Literal.String.Single */
|
56
|
+
.ss { color: #990073 } /* Literal.String.Symbol */
|
57
|
+
.bp { color: #999999 } /* Name.Builtin.Pseudo */
|
58
|
+
.vc { color: #008080 } /* Name.Variable.Class */
|
59
|
+
.vg { color: #008080 } /* Name.Variable.Global */
|
60
|
+
.vi { color: #008080 } /* Name.Variable.Instance */
|
61
|
+
.il { color: #009999 } /* Literal.Number.Integer.Long */
|