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

View file

@ -84,28 +84,11 @@ def html(page, json):
# Links # Links
page = page + """ 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. --> <!-- And now the table itself. -->
""" """
page = page + "<table><tr>"
linksfilter = {"git":"source"} linksfilter = {"git":"source"}
links = json.get("links", {}) links = json.get("links", {})
for website in links: for website in links:
@ -115,16 +98,10 @@ def html(page, json):
page = page + """ page = page + """
<!-- Here's how to do a simple button --> <!-- 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 + """ page = page + """
<!-- Details are those little collapsable things that I like to <!-- Details are those little collapsable things that I like to
@ -307,52 +284,16 @@ def source_code_link(page):
<!-- As always I want to add a bit of CSS to make tables <!-- As always I want to add a bit of CSS to make tables
invisible --> invisible -->
<style>
table, th, td {
border-right:none;
border-left:none;
border-bottom:none;
border-top:none
}
</style>
<!-- This is self explanatory ( if you read most of the page ) --> <br><br>
<table><tr> <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>
<th><form action=/> <a class="button" href="/faq" title="Frequently Asked Questions">FAQ</a>
<button title="Come back to the home page." type="submit">HOME</button> <a class="button" href="https://notabug.org/jyamihud/FreeCompetitors/issues" title="Report a Bug.">BUG?</a>
</form></th> <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>
<th><form action=https://notabug.org/jyamihud/FreeCompetitors> <a class="button" href="https://notabug.org/jyamihud/FreeCompetitors/issues/24" title="See stats of this server.">STATS</a>
<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>
<!-- And this was the page of Free Competitors. No Javascript. <!-- And this was the page of Free Competitors. No Javascript.
No crap. No trackers. No nothing. And still works. Take that No crap. No trackers. No nothing. And still works. Take that