mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
use SVG for the play icon, and reduce the default size to 40px
This commit is contained in:
parent
4da89eb38e
commit
fb696f3e3b
3 changed files with 24 additions and 4 deletions
|
@ -584,8 +584,13 @@ def av_refs_to_play_icons(text: str) -> str:
|
||||||
|
|
||||||
def repl(match: re.Match) -> str:
|
def repl(match: re.Match) -> str:
|
||||||
return f"""
|
return f"""
|
||||||
<a class=soundLink href=# onclick="pycmd('{match.group(1)}'); return false;">
|
<a class=replay-button href=# onclick="pycmd('{match.group(1)}'); return false;">
|
||||||
<img class=playImage src='/_anki/imgs/play.png'>
|
<svg class="playImage" viewBox="0 0 64 64" version="1.1">
|
||||||
|
<g>
|
||||||
|
<circle cx="32" cy="32" r="29" />
|
||||||
|
<path d="M56.502,32.301l-37.502,20.101l0.329,-40.804l37.173,20.703Z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
</a>"""
|
</a>"""
|
||||||
|
|
||||||
return AV_REF_RE.sub(repl, text)
|
return AV_REF_RE.sub(repl, text)
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 6 KiB |
|
@ -57,8 +57,23 @@ img {
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playImage { zoom: 50% }
|
.replay-button {
|
||||||
.soundLink { text-decoration: none; }
|
text-decoration: none;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
|
||||||
|
circle {
|
||||||
|
fill: #fff;
|
||||||
|
stroke: #414141;
|
||||||
|
}
|
||||||
|
|
||||||
|
path {
|
||||||
|
fill: #414141;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.nightMode {
|
.nightMode {
|
||||||
.latex {
|
.latex {
|
||||||
|
|
Loading…
Reference in a new issue