diff --git a/src/style.css b/src/style.css index e6e674811..dd16bf47d 100644 --- a/src/style.css +++ b/src/style.css @@ -128,6 +128,7 @@ html.dark .theme-icon-dark { .card { flex: 1; + position: relative; } .card:target { @@ -179,6 +180,39 @@ ul.links-row li:not(:first-child)::before { margin-right: 0.5ch; } +/* Pin button on user-language cards */ + +.pin-btn { + position: absolute; + top: 0.4rem; + right: 0.4rem; + background: none; + border: none; + padding: 0.25rem; + cursor: pointer; + color: var(--card-link-color); + border-radius: 4px; + line-height: 0; + transition: background-color 0.2s; +} + +.pin-btn:hover { + background-color: var(--card-title-hover-bg); +} + +.pin-btn .pin-icon-unpinned { + display: none; +} + +.pin-btn.unpinned .pin-icon-pinned { + display: none; +} + +.pin-btn.unpinned .pin-icon-unpinned { + display: inline; + opacity: 0.5; +} + /* ------------------------------ Index ------------------------------------- */ .progress { diff --git a/templates/base.html.jinja b/templates/base.html.jinja index 980d31e15..62c5bd1d4 100644 --- a/templates/base.html.jinja +++ b/templates/base.html.jinja @@ -12,7 +12,7 @@ rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous"> - + {% endblock extrascript %}