Skip to content

Commit

Permalink
Drop <button> under <a>
Browse files Browse the repository at this point in the history
Reported by https://validator.w3.org/nu/:

    The element button must not appear as a descendant of the a element.
  • Loading branch information
cgzones authored and matze committed Jan 7, 2025
1 parent 5b64bbe commit 1fab87c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
9 changes: 7 additions & 2 deletions src/themes/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ main {

#nav-title {
margin-right: auto;
margin-top: 16px;
margin-bottom: 16px;
}

header ul {
Expand All @@ -75,16 +77,19 @@ header li {
display: inline-block;
}

header button {
header .navigation {
color: #39bae6;
border: none;
padding: 1rem;
background: none;
font-family: "JetBrains Mono", monospace;
font-size: 1.125rem;
}

header button:hover {
header .navigation:hover {
background-color: #39bae6;
color: #0f1419;
cursor: pointer;
}

button {
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<body>
<div id="main-container">
<header>
<span id="nav-title"><a href="{{ base_path.path() }}"><button>home</button></a></span>
<span id="nav-title"><a href="{{ base_path.path() }}" class="navigation">home</a></span>
<nav>
<ul>
{% block nav %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
{% endblock %}

{% block nav %}
<li><button onclick="openFile()">open</button></li>
<li><button onclick="openFile()" class="navigation">open</button></li>
{% endblock %}

{%- block content -%}
Expand Down
8 changes: 4 additions & 4 deletions templates/paste.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@

{% block nav %}
{% if can_delete %}
<li><a href="{{ base_path.join("delete/") }}{{ id }}"><button>delete</button></a></li>
<li><a href="{{ base_path.join("delete/") }}{{ id }}" class="navigation">delete</a></li>
{% endif %}
<li><a href="{{ base_path.join(id) }}?dl={{ ext }}"><button>download</button></a></li>
<li><a href="{{ base_path.join(id) }}?fmt=raw"><button>raw</button></a></li>
<li><a href="{{ base_path.join(id) }}?fmt=qr"><button>qr</button></a></li>
<li><a href="{{ base_path.join(id) }}?dl={{ ext }}" class="navigation">download</a></li>
<li><a href="{{ base_path.join(id) }}?fmt=raw" class="navigation">raw</a></li>
<li><a href="{{ base_path.join(id) }}?fmt=qr" class="navigation">qr</a></li>
{% endblock %}

0 comments on commit 1fab87c

Please # to comment.