~sircmpwn/public-inbox

git.sr.ht: contributors.html: Make SVG style less global v1 PROPOSED

Martijn Braam: 1
 contributors.html: Make SVG style less global

 1 files changed, 2 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/public-inbox/patches/9759/mbox | git am -3
Learn more about email & git

[PATCH git.sr.ht] contributors.html: Make SVG style less global Export this patch

the SVG not having a class here means it's very difficult to override
the css for the graph without influencing other SVGs on sr.ht since
injected styles usually can't filter on url.
---
 gitsrht/templates/contributors.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gitsrht/templates/contributors.html b/gitsrht/templates/contributors.html
index d47f3f6..60d09a5 100644
--- a/gitsrht/templates/contributors.html
+++ b/gitsrht/templates/contributors.html
@@ -9,7 +9,7 @@

{% block head %}
  <style type="text/css">
    svg { background-color: WhiteSmoke }
    svg.contributors { background-color: WhiteSmoke }
    rect { fill: #116bdd }
    rect:hover { fill: #dc3545 }
  </style>
@@ -40,6 +40,7 @@
        baseProfile="full"
        viewBox="0 0 520 100"
        xmlns="http://www.w3.org/2000/svg"
	class="contributors"
      >
        {% for bar in bars %}
          <rect
-- 
2.24.1
Thanks!

To git.sr.ht:~sircmpwn/git.sr.ht
   5cc1d1d..f9d5e52  master -> master
View this thread in the archives