Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-28 14:50:50 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-28 14:50:50 +0300
commit42c035ee38a6629090da07aea818f4c9e3733075 (patch)
treedc4dfc2d36cbe02974a4a1749db27dc63bd47b29 /app/views/projects/badges
parent33e14285d3dc0c2340ca34ede7235644a418cea6 (diff)
Add badge template to generic badge view template
Diffstat (limited to 'app/views/projects/badges')
-rw-r--r--app/views/projects/badges/badge.svg.erb18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/views/projects/badges/badge.svg.erb b/app/views/projects/badges/badge.svg.erb
index 72f341176e3..5a71419d3af 100644
--- a/app/views/projects/badges/badge.svg.erb
+++ b/app/views/projects/badges/badge.svg.erb
@@ -1,25 +1,25 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="91" height="20">
+<svg xmlns="http://www.w3.org/2000/svg" width="<%= badge.width %>" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="a">
- <rect width="91" height="20" rx="3" fill="#fff"/>
+ <rect width="<%= badge.width %>" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#a)">
- <path fill="#555" d="M0 0h37v20H0z"/>
- <path fill="#4c1" d="M37 0h54v20H37z"/>
- <path fill="url(#b)" d="M0 0h91v20H0z"/>
+ <path fill="<%= badge.key_color%>" d="M0 0h <%= badge.key_width%>v 20H 0z"/>
+ <path fill="#4c1" d="M<%= badge.key_width%> 0h <%= badge.value_width %>v 20H <%= badge.key_width%>z"/>
+ <path fill="url(#b)" d="M0 0h <%= badge.width %>v 20H 0z"/>
</g>
<g fill="#fff" text-anchor="middle">
<g font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
- <text x="18" y="15" fill="#010101" fill-opacity=".3">build</text>
- <text x="18" y="14">build</text>
- <text x="63" y="15" fill="#010101" fill-opacity=".3">success</text>
- <text x="63" y="14">success</text>
+ <text x="<%= badge.key_text_anchor %>" y="15" fill="#010101" fill-opacity=".3"><%= badge.key_text %></text>
+ <text x="<%= badge.key_text_anchor %>" y="14"><%= badge.key_text %></text>
+ <text x="<%= badge.value_text_anchor %>" y="15" fill="#010101" fill-opacity=".3"><%= badge.value_text %></text>
+ <text x="<%= badge.value_text_anchor %>" y="14"><%= badge.value_text %></text>
</g>
</g>
</svg>