Skip to content

Commit d8195b4

Browse files
author
Andrew Hobden
committed
CSS improvements
1 parent 857a855 commit d8195b4

File tree

1 file changed

+31
-75
lines changed

1 file changed

+31
-75
lines changed

domains/misc/badssl.com/index.html

+31-75
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,50 @@
1010
<style>
1111
html, body {
1212
background: rgb(77, 149, 218);
13-
1413
margin: 0;
1514
padding: 0;
1615
}
1716
div {
1817
text-align: center;
1918
}
2019
#links {
21-
width: 50vh;
22-
max-width: 50vw;
20+
width: 60vw;
21+
max-width: 60vw;
2322
margin: 5vh auto;
2423
padding: 0 3vw 0 3vw;
2524
}
26-
#links > a, #links > .browser-info {
25+
#links > .link-container > a, #links > .browser-info {
2726
font-family: "Source Code Pro", Monaco, Consolas, "Courier New", monospace, Impact;
28-
font-size: 3.5vh;
29-
padding: 0.75vh 10vw 0.75vh 10vw;
30-
margin: 1.5vh -10vw;
27+
font-size: 16pt;
28+
padding: 0.75vh 0vw 0.75vh 0vw;
29+
margin-top: 1.5vh;
3130
}
32-
#links > a {
31+
#links > .link-container > a {
3332
text-decoration: none;
3433
color: white;
35-
font-size: 5em;
36-
font-size: 4vh;
34+
font-size: 18pt;
3735
display: block;
3836
width: 100%;
3937
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
4038
transition: all 150ms;
4139
font-weight: bold;
4240
word-wrap: break-word;
4341
}
44-
#links > .description {
42+
#links > .link-container > .description {
4543
text-decoration: none;
4644
color: white;
47-
display: none;
45+
max-height: 0;
46+
overflow: hidden;
4847
width: 100%;
49-
transition: all 150ms;
48+
transition: all 1.5s;
49+
transition-delay: 300ms;
5050
font-weight: bold;
51+
font-size: 14pt;
5152
word-wrap: break-word;
5253
}
54+
#links > .link-container:hover > .description {
55+
max-height: 50vh;
56+
}
5357
#links > .browser-info {
5458
margin: 3em auto 2em;
5559
padding: 0.75vh 0vh;
@@ -58,32 +62,16 @@
5862
text-shadow: 0 0 0.5em rgba(0, 0, 0, 0.5);
5963
}
6064
@media (min-height: 600px) {
61-
#links > a {
62-
margin: 0.75vh -10vw;
65+
#links > .link-container > a {
66+
margin: 0.75vh 0vw;
6367
}
64-
#links > a, #links .browser-info {
68+
#links > .link-container > a, #links .browser-info {
6569
font-size: 20px;
6670
padding-top: 0.25em;
6771
padding-bottom: 0.25em;
6872
}
6973
}
70-
#description-toggle {
71-
font-family: "Source Code Pro", Monaco, Consolas, "Courier New", monospace, Impact;
72-
font-size: 3.5vh;
73-
padding: 0.75vh 10vw 0.75vh 10vw;
74-
margin: 1.5vh -10vw 0 1.5vh;
75-
text-decoration: none;
76-
color: white;
77-
font-size: 2.5em;
78-
font-size: 2vh;
79-
display: block;
80-
width: 20%;
81-
cursor: pointer;
82-
transition: all 150ms;
83-
font-weight: bold;
84-
word-wrap: break-word;
85-
}
86-
#links > a:hover, #links > a:focus {
74+
#links > .link-container > a:hover, #links > .link-container > a:focus {
8775
text-decoration: underline;
8876
text-shadow:
8977
0 0 20px rgba(255, 255, 255, 0.5),
@@ -108,10 +96,10 @@
10896
.dubious {
10997
background: rgb(246, 207, 47);
11098
}
111-
#links > a.dubious {
99+
#links > .link-container > a.dubious {
112100
color: #222;
113101
}
114-
#links > a.dubious:hover {
102+
#links > .link-container > a.dubious:hover {
115103
text-shadow:
116104
0 0 20px rgba(150, 100, 0, 0.15),
117105
0 0 40px rgba(150, 100, 0, 0.15),
@@ -130,27 +118,6 @@
130118
color: #222;
131119
background: rgb(243, 121, 46);
132120
}
133-
#links > .comic-sans {
134-
font-family: "Comic Sans MS", "Comic Sans", "Marker Felt";
135-
}
136-
#links > .more {
137-
display: none;
138-
}
139-
#links.show-more > .more {
140-
display: block;
141-
}
142-
#links > #reveal-more {
143-
background: black;
144-
}
145-
#links > #reveal-more:hover {
146-
cursor: pointer
147-
}
148-
#links.show-more > #reveal-more {
149-
display: none;
150-
}
151-
#links > .hidden {
152-
display: none;
153-
}
154121

155122
h2 {
156123
color: white;
@@ -223,18 +190,6 @@
223190
return null;
224191
}
225192

226-
function toggleDescriptions() {
227-
var descriptions = document.querySelectorAll("#links > .description");
228-
for (var i = 0; i < descriptions.length; i++) {
229-
if (descriptions[i].style.display === "block") {
230-
descriptions[i].style.display = "none"
231-
} else {
232-
descriptions[i].style.display = "block"
233-
}
234-
235-
}
236-
}
237-
238193
window.addEventListener("load", function() {
239194
document.getElementById("ua").title = navigator.userAgent;
240195
document.getElementById("ua").textContent = getBrowserVersion();
@@ -246,17 +201,18 @@
246201
</script>
247202
</head>
248203
<body>
249-
<a id="description-toggle">Show Descriptions</a>
250204
<div id="links">
251205
{% for category in site.data.categories %}
252206
<h2>{{ category.name }}:</h2>
253207
{% for subdomain_hash in site.data.subdomains %}
254-
{% assign name = subdomain_hash[0] %}
255-
{% assign subdomain = subdomain_hash[1] %}
256-
{% if subdomain.category == category.name %}
257-
<a href="https://{{ name }}.{{ site.domain }}/" style="background: {{ subdomain.background }}">{{ name }}</a>
258-
<div class="description">{{ subdomain.description }}</div>
259-
{% endif %}
208+
<div class="link-container">
209+
{% assign name = subdomain_hash[0] %}
210+
{% assign subdomain = subdomain_hash[1] %}
211+
{% if subdomain.category == category.name %}
212+
<a href="https://{{ name }}.{{ site.domain }}/" style="background: {{ subdomain.background }}">{{ name }}</a>
213+
<div class="description">{{ subdomain.description }}</div>
214+
{% endif %}
215+
</div>
260216
{% endfor %}
261217
{% endfor %}
262218
<div class="browser-info">

0 commit comments

Comments
 (0)