Improved HTML semantics

This commit is contained in:
krateng 2021-12-25 03:12:03 +01:00
parent 2a642c5f80
commit 898a9930bb
5 changed files with 28 additions and 40 deletions

View File

@ -52,8 +52,12 @@
{% for issue in issuedata.duplicates %}
<tr>
<td>{{ links.link(issue[0]) }} is a possible duplicate of {{ links.link(issue[1]) }}</td>
<td class='button' onclick="newrule(this,'replaceartist','{{ issue[0] }}','{{ issue[1] }}')"><div>{{ issue[1] }} is correct</div></td>
<td class='button' onclick="newrule(this,'replaceartist','{{ issue[1] }}','{{ issue[0] }}')"><div>{{ issue[0] }} is correct</div></td>
<td>
<button onclick="newrule(this,'replaceartist','{{ issue[0] }}','{{ issue[1] }}')">{{ issue[1] }} is correct</button>
</td>
<td>
<button onclick="newrule(this,'replaceartist','{{ issue[1] }}','{{ issue[0] }}')">{{ issue[0] }} is correct</button>
</td>
</tr>
{% endfor %}
@ -62,14 +66,18 @@
<td>{{ links.link(issue[0]) }} sounds like the combination of {{ issue[1].__len__() }} artists:
{{ issue[1]|join(", ") }}
</td>
<td class='button' onclick="newrule(this,'replaceartist','{{ issue[0] }}','{{ issue[1] | join('␟') }}')"><div>Fix it</div></td>
<td>
<button onclick="newrule(this,'replaceartist','{{ issue[0] }}','{{ issue[1] | join('␟') }}')">Fix it</button>
</td>
</tr>
{% endfor %}
{% for issue in issuedata.newartists %}
<tr>
<td>Is '{{ issue[0] }}' in '{{ links.link(issue[1]) }}' an artist?</td>
<td class='button' onclick="newrule(this,'replaceartist','{{ issue[1] }}','{{ (issue[2] + [issue[0]]) | join('␟') }}')"><div>Yes</div></td>
<td>
<button onclick="newrule(this,'replaceartist','{{ issue[1] }}','{{ (issue[2] + [issue[0]]) | join('␟') }}')">Yes</button>
</td>
</tr>
{% endfor %}

View File

@ -30,8 +30,8 @@
<br/>
<span class="button" onclick="scrobbleNew(event)">Scrobble!</span>
<span class="button" onclick="repeatLast()">↻</span>
<button onclick="scrobbleNew(event)">Scrobble!</button>
<button onclick="repeatLast()">↻</button>
<br/>

View File

@ -70,9 +70,9 @@
</ul>
{% if adminmode %}
<span id="adminmodebutton" class="button" onclick="deactivate()">Deactivate</span>
<button id="adminmodebutton" onclick="deactivate()">Deactivate</button>
{% else %}
<span id="adminmodebutton" class="button" onclick="activate()">Activate</span>
<button id="adminmodebutton" onclick="activate()">Activate</button>
{% endif %}
<h2>Links</h2>
@ -85,6 +85,6 @@
<input class="simpleinput" type="password" placeholder="New Password"></input><br/>
<input class="simpleinput" type="password" placeholder="Repeat"></input><br/><br/>
<span class="button" onclick="changepw()">Change</span>
<button onclick="changepw()">Change</button>
{% endif %}
{% endblock %}

View File

@ -48,7 +48,7 @@
<br/>
<p class="stats">
{% if adminmode %}<span onclick="scrobble('{{ encodedtrack }}')" class="button">Scrobble now</span>{% endif %}
{% if adminmode %}<button onclick="scrobble('{{ encodedtrack }}')">Scrobble now</button>{% endif %}
<a href="{{ mlj_uri.create_uri("/scrobbles",filterkeys) }}">{{ info['scrobbles'] }} Scrobbles</a>
</p>

View File

@ -419,19 +419,26 @@ img.star {
.button {
button {
padding:3px;
padding-right:6px;
padding-left:6px;
border: 0px;
font-family: inherit;
font-size: inherit;
background-color: var(--button-color-bg);
color: var(--button-color-fg);
cursor:pointer;
}
.button:hover {
button.important {
background-color:red;
color:white;
}
button:hover {
background-color: var(--button-color-bg-focus);
color: var(--button-color-fg-focus);
}
.button.locked {
button.locked {
background-color:grey;
color:black;
cursor:not-allowed;
@ -650,33 +657,6 @@ table.list tr td.chart div.bronze {
}
table.list tr td.button {
width:200px;
cursor:pointer;
border-color:rgba(0,0,0,0)!important;
}
table.list td.button div {
background-color: var(--button-color-bg);
color: var(--button-color-fg);
padding:3px;
border-radius:4px;
}
table.list td.button div:hover {
background-color: var(--button-color-bg-focus);
color: var(--button-color-fg-focus);
padding:3px;
border-radius:4px;
}
td.button.important div {
background-color:red;
color:white;
}
table.misc {
margin-left:20px;
}