Tristan Van Berkom pushed to branch tristan/docs-version-badge at BuildStream / buildstream
Commits:
-
d5cac6da
by Tristan Van Berkom at 2018-08-28T16:02:47Z
6 changed files:
- README.rst
- doc/badges.py
- doc/source/install_versions.rst
- doc/source/main_install.rst
- + doc/source/release-badge.rst
- + doc/source/snapshot-badge.rst
Changes:
1 | 1 |
About
|
2 | 2 |
-----
|
3 | 3 |
|
4 |
-.. image:: https://buildstream.gitlab.io/buildstream/_static/release.svg
|
|
5 |
- |
|
6 |
-.. image:: https://buildstream.gitlab.io/buildstream/_static/snapshot.svg
|
|
4 |
+.. include:: release-badge.rst
|
|
5 |
+
|
|
6 |
+.. include:: snapshot-badge.rst
|
|
7 | 7 |
|
8 | 8 |
.. image:: https://gitlab.com/BuildStream/buildstream/badges/master/pipeline.svg
|
9 | 9 |
:target: https://gitlab.com/BuildStream/buildstream/commits/master
|
... | ... | @@ -24,45 +24,46 @@ import re |
24 | 24 |
|
25 | 25 |
# The badge template is modeled after the gitlab badge svgs
|
26 | 26 |
#
|
27 |
-BADGE_TEMPLATE = """<svg xmlns="http://www.w3.org/2000/svg"
|
|
28 |
- xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
29 |
- width="116" height="20">
|
|
30 |
- <a xlink:href="">
|
|
31 |
- <linearGradient id="b" x2="0" y2="100%">
|
|
32 |
- <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
33 |
- <stop offset="1" stop-opacity=".1"/>
|
|
34 |
- </linearGradient>
|
|
35 |
- |
|
36 |
- <mask id="a">
|
|
37 |
- <rect width="116" height="20" rx="3" fill="#fff"/>
|
|
38 |
- </mask>
|
|
39 |
- |
|
40 |
- <g mask="url(#a)">
|
|
41 |
- <path fill="#555"
|
|
42 |
- d="M0 0 h62 v20 H0 z"/>
|
|
43 |
- <path fill="{color}"
|
|
44 |
- d="M62 0 h54 v20 H62 z"/>
|
|
45 |
- <path fill="url(#b)"
|
|
46 |
- d="M0 0 h116 v20 H0 z"/>
|
|
47 |
- </g>
|
|
48 |
- |
|
49 |
- <g fill="#fff" text-anchor="middle">
|
|
50 |
- <g font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
51 |
- <text x="31" y="15" fill="#010101" fill-opacity=".3">
|
|
52 |
- {badge_name}
|
|
53 |
- </text>
|
|
54 |
- <text x="31" y="14">
|
|
55 |
- {badge_name}
|
|
56 |
- </text>
|
|
57 |
- <text x="89" y="15" fill="#010101" fill-opacity=".3">
|
|
58 |
- {version}
|
|
59 |
- </text>
|
|
60 |
- <text x="89" y="14">
|
|
61 |
- {version}
|
|
62 |
- </text>
|
|
27 |
+BADGE_TEMPLATE = """
|
|
28 |
+<svg xmlns="http://www.w3.org/2000/svg"
|
|
29 |
+ xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
30 |
+ width="116" height="20">
|
|
31 |
+ <a xlink:href="">
|
|
32 |
+ <linearGradient id="{badge_name}_b" x2="0" y2="100%">
|
|
33 |
+ <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
34 |
+ <stop offset="1" stop-opacity=".1"/>
|
|
35 |
+ </linearGradient>
|
|
36 |
+ |
|
37 |
+ <mask id="{badge_name}_a">
|
|
38 |
+ <rect width="116" height="20" rx="3" fill="#fff"/>
|
|
39 |
+ </mask>
|
|
40 |
+ |
|
41 |
+ <g mask="url(#{badge_name}_a)">
|
|
42 |
+ <path fill="#555"
|
|
43 |
+ d="M0 0 h62 v20 H0 z"/>
|
|
44 |
+ <path fill="{color}"
|
|
45 |
+ d="M62 0 h54 v20 H62 z"/>
|
|
46 |
+ <path fill="url(#{badge_name}_b)"
|
|
47 |
+ d="M0 0 h116 v20 H0 z"/>
|
|
63 | 48 |
</g>
|
64 |
- </g>
|
|
65 |
- </a>
|
|
49 |
+ |
|
50 |
+ <g fill="#fff" text-anchor="middle">
|
|
51 |
+ <g font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
52 |
+ <text x="31" y="15" fill="#010101" fill-opacity=".3">
|
|
53 |
+ {badge_name}
|
|
54 |
+ </text>
|
|
55 |
+ <text x="31" y="14">
|
|
56 |
+ {badge_name}
|
|
57 |
+ </text>
|
|
58 |
+ <text x="89" y="15" fill="#010101" fill-opacity=".3">
|
|
59 |
+ {version}
|
|
60 |
+ </text>
|
|
61 |
+ <text x="89" y="14">
|
|
62 |
+ {version}
|
|
63 |
+ </text>
|
|
64 |
+ </g>
|
|
65 |
+ </g>
|
|
66 |
+ </a>
|
|
66 | 67 |
</svg>
|
67 | 68 |
"""
|
68 | 69 |
|
... | ... | @@ -17,8 +17,8 @@ tag to ensure you're getting the latest release. |
17 | 17 |
|
18 | 18 |
* Latest release:
|
19 | 19 |
|
20 |
- .. image:: https://buildstream.gitlab.io/buildstream/_static/release.svg
|
|
20 |
+ .. include:: release-badge.rst
|
|
21 | 21 |
|
22 | 22 |
* Latest development snapshot:
|
23 | 23 |
|
24 |
- .. image:: https://buildstream.gitlab.io/buildstream/_static/snapshot.svg
|
|
24 |
+ .. include:: snapshot-badge.rst
|
... | ... | @@ -5,9 +5,9 @@ |
5 | 5 |
Install
|
6 | 6 |
=======
|
7 | 7 |
|
8 |
-.. image:: https://buildstream.gitlab.io/buildstream/_static/release.svg
|
|
9 |
- |
|
10 |
-.. image:: https://buildstream.gitlab.io/buildstream/_static/snapshot.svg
|
|
8 |
+.. include:: release-badge.rst
|
|
9 |
+
|
|
10 |
+.. include:: snapshot-badge.rst
|
|
11 | 11 |
|
12 | 12 |
This section provides instructions for installing BuildStream and its
|
13 | 13 |
companion artifact server on various platforms, along with any installation
|
1 |
+ |
|
2 |
+.. raw:: html
|
|
3 |
+ |
|
4 |
+ <a class="reference external image-reference">
|
|
5 |
+ <object style="margin-bottom:24px;vertical-align:middle" data="" type="image/svg+xml"/></object>
|
|
6 |
+ </a>
|
1 |
+ |
|
2 |
+.. raw:: html
|
|
3 |
+ |
|
4 |
+ <a class="reference external image-reference">
|
|
5 |
+ <object style="margin-bottom:24px;vertical-align:middle" data="" type="image/svg+xml"/></object>
|
|
6 |
+ </a>
|