Fixed the annoying buttons

This commit is contained in:
jyamihud 2022-04-16 23:09:43 +03:00
parent 806b0bafa6
commit f4d7419382
2 changed files with 21 additions and 79 deletions

View file

@ -96,7 +96,7 @@ input[type=text] {
color: #311a46;
font-weight: bold;
}
button {
button, .button {
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
@ -105,6 +105,7 @@ button {
color: #311a46;
font-weight: bold;
}
.button { line-height: 3 }
summary {
color: #b058c6;
font-weight: bold;
@ -113,7 +114,7 @@ summary:hover, summary:hover > h1 {
color: white;
cursor: pointer;
}
button:hover, input:hover, button:focus, input:focus {
button:hover, input:hover, button:focus, input:focus, .button:hover, .button:focus {
background-color: #3798DD;
color: white;
}

View file

@ -84,28 +84,11 @@ def html(page, json):
# Links
page = page + """
<!-- To organize the buttons with the main links we are using
a table. But since I don't know what CSS file the maintainer
will choose. And I want the table to be invisible. I insert here
a bit of CSS code. -->
"""
page = page + """
<style>
table, th, td {
border-right:none;
border-left:none;
border-bottom:none;
border-top:none
}
</style>
<!-- And now the table itself. -->
"""
page = page + "<table><tr>"
linksfilter = {"git":"source"}
links = json.get("links", {})
for website in links:
@ -115,16 +98,10 @@ def html(page, json):
page = page + """
<!-- Here's how to do a simple button -->
<a class="button" href=\""""+link+"""\" title=\""""+link+"""\">"""+linksfilter.get(website,website).upper()+"""</a>
<th>
<form action=\""""+link+"""\"> <!-- You make a form with a link -->
<button title=\""""+link+"""\" type="submit">"""+linksfilter.get(website,website).upper()+"""</button> <!-- And you activare that form with a button -->
</form>
</th>
"""
page = page + "</tr></table>"
page = page + """
<!-- Details are those little collapsable things that I like to
@ -308,51 +285,15 @@ def source_code_link(page):
<!-- As always I want to add a bit of CSS to make tables
invisible -->
<style>
table, th, td {
border-right:none;
border-left:none;
border-bottom:none;
border-top:none
}
</style>
<br><br>
<!-- This is self explanatory ( if you read most of the page ) -->
<table><tr>
<th><form action=/>
<button title="Come back to the home page." type="submit">HOME</button>
</form></th>
<th><form action=https://notabug.org/jyamihud/FreeCompetitors>
<button title="See the full source code of the software that powers this website." type="submit">SOURCE</button>
</form></th>
<th><form action=/faq>
<button title="Frequently Asked Questions" type="submit">FAQ</button>
</form></th>
<th><form action=https://notabug.org/jyamihud/FreeCompetitors/issues>
<button title="Report a bug." type="submit">BUG?</button>
</form></th>
</tr></table><table><tr>
<th><form action=https://notabug.org/jyamihud/FreeCompetitors/issues/25>
<button title="Report a piece of software that's missing from the catalogue." type="submit">MISSING?</button>
</form></th>
<th><form action=https://notabug.org/jyamihud/FreeCompetitors/issues/24>
<button title="Report a mistake in data about software." type="submit">MISTAKE?</button>
</form></th>
<th><form action=/stats>
<button title="See stats of this server." type="submit">STATS</button>
</form></th></tr>
</table>
<a class="button" href="/" title="Come back to the home page.">HOME</a>
<a class="button" href="https://notabug.org/jyamihud/FreeCompetitors" title="See the full source code of the software that powers this website.">SOURCE CODE</a>
<a class="button" href="/faq" title="Frequently Asked Questions">FAQ</a>
<a class="button" href="https://notabug.org/jyamihud/FreeCompetitors/issues" title="Report a Bug.">BUG?</a>
<a class="button" href="https://notabug.org/jyamihud/FreeCompetitors/issues/25" title="Report a piece of software that's missing from the catalogue.">MISSING?</a>
<a class="button" href="https://notabug.org/jyamihud/FreeCompetitors/issues/24" title="Report a mistake in data about software.">MISTAKE?</a>
<a class="button" href="https://notabug.org/jyamihud/FreeCompetitors/issues/24" title="See stats of this server.">STATS</a>
<!-- And this was the page of Free Competitors. No Javascript.
No crap. No trackers. No nothing. And still works. Take that