gitea源码

12345678910111213141516171819202122232425262728
  1. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{{.Badge.Width}}" height="20"
  2. role="img" aria-label="{{.Badge.Label.Text}}: {{.Badge.Message.Text}}">
  3. <title>{{.Badge.Label.Text}}: {{.Badge.Message.Text}}</title>
  4. <linearGradient id="{{.Badge.IDPrefix}}s" x2="0" y2="100%">
  5. <stop offset="0" stop-color="#bbb" stop-opacity=".1" />
  6. <stop offset="1" stop-opacity=".1" />
  7. </linearGradient>
  8. <clipPath id="{{.Badge.IDPrefix}}r">
  9. <rect width="{{.Badge.Width}}" height="20" rx="3" fill="#fff" />
  10. </clipPath>
  11. <g clip-path="url(#{{.Badge.IDPrefix}}r)">
  12. <rect width="{{.Badge.Label.Width}}" height="20" fill="#555" />
  13. <rect x="{{.Badge.Label.Width}}" width="{{.Badge.Message.Width}}" height="20" fill="{{.Badge.Color}}" />
  14. <rect width="{{.Badge.Width}}" height="20" fill="url(#{{.Badge.IDPrefix}}s)" />
  15. </g>
  16. <g fill="#fff" text-anchor="middle" font-family="{{.Badge.FontFamily}}"
  17. text-rendering="geometricPrecision" font-size="{{.Badge.FontSize}}">
  18. <text aria-hidden="true" x="{{.Badge.Label.X}}" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)"
  19. textLength="{{.Badge.Label.TextLength}}">{{.Badge.Label.Text}}</text>
  20. <text x="{{.Badge.Label.X}}" y="140"
  21. transform="scale(.1)" fill="#fff" textLength="{{.Badge.Label.TextLength}}">{{.Badge.Label.Text}}</text>
  22. <text aria-hidden="true" x="{{.Badge.Message.X}}" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)"
  23. textLength="{{.Badge.Message.TextLength}}">{{.Badge.Message.Text}}</text>
  24. <text x="{{.Badge.Message.X}}" y="140" transform="scale(.1)" fill="#fff"
  25. textLength="{{.Badge.Message.TextLength}}">{{.Badge.Message.Text}}</text>
  26. </g>
  27. </svg>