Improve indentation in svg badge template

This commit is contained in:
Grzegorz Bizon 2016-08-08 12:49:26 +02:00
parent bc17996227
commit 89f2be7d58
2 changed files with 19 additions and 8 deletions

View file

@ -9,17 +9,28 @@
</mask>
<g mask="url(#a)">
<path fill="<%= badge.key_color%>" d="M0 0h <%= badge.key_width%>v 20H 0z"/>
<path fill="<%= badge.value_color %>" 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"/>
<path fill="<%= badge.key_color %>"
d="M0 0 h<%= badge.key_width %> v20 H0 z"/>
<path fill="<%= badge.value_color %>"
d="M<%= badge.key_width%> 0 h<%= badge.value_width %> v20 H<%= badge.key_width %> z"/>
<path fill="url(#b)"
d="M0 0 h<%= badge.width %> v20 H0 z"/>
</g>
<g fill="#fff" text-anchor="middle">
<g font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<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>
<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>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -2,7 +2,7 @@ module Gitlab
module Badge
class Build
##
# Abstract class for build badge template.
# Class that represents a build badge template.
#
# Template object will be passed to badge.svg.erb template.
#