Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Switch backers from js onload animation to having a default background and pop in the loaded image on top of it

Peter Müller1f11c774dde7
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html
index db3bdf76..1bc3d36b 100644
--- a/docs/_layouts/default.html
+++ b/docs/_layouts/default.html
@@ -7,9 +7,9 @@
{% include header.html %}
- <section id="content">
+ <main id="content">
{{ content }}
- </section>
+ </main>
{% include footer.html %}
</body>
diff --git a/docs/css/style.css b/docs/css/style.css
index dfc018ba..6d8f13b2 100644
--- a/docs/css/style.css
+++ b/docs/css/style.css
@@ -57,19 +57,36 @@ header {
font-style: normal
}
-#_backers a, #_sponsors a {
+#_backers {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+#_backers a {
+ margin: 3px;
+}
+
+#_backers a img {
+ display: block;
+ width: 64px;
+ height: 64px;
+
+ margin: 0;
+ box-shadow: none;
+
+ background: url(/images/backer-background.svg?inline) center center no-repeat;
+}
+
+#_sponsors a {
opacity: 0;
- -webkit-transition: opacity .3s;
- -moz-transition: opacity .3s;
- -o-transition: opacity .3s;
transition: opacity .3s;
}
-#_backers a img, #_sponsors a img {
+#_sponsors a img {
max-height: 64px;
}
-.onload h1, #_backers.onload a, #_sponsors.onload a {
+#_sponsors.onload a {
opacity: 1;
}
@@ -112,11 +129,7 @@ ul {
margin-top: 20px;
padding: 0 15px;
width: 100%;
- -webkit-column-count: 2;
- -moz-column-count: 2;
column-count: 2;
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
box-sizing: content-box;
}
@@ -126,8 +139,6 @@ ul li {
list-style: none;
border-bottom: 1px solid #eee;
padding: 5px 0;
- -webkit-column-break-inside: avoid;
- -moz-column-break-inside: avoid;
column-break-inside: avoid;
}
@@ -150,34 +161,19 @@ pre {
border: 1px solid #ddd;
border-bottom-color: #ccc;
background-color: #f3f3f3;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- -o-border-radius: 3px;
border-radius: 3px;
- -webkit-box-shadow: inset 0 0 10px #ddd;
- -moz-box-shadow: inset 0 0 10px #ddd;
box-shadow: inset 0 0 10px #ddd;
overflow-x: auto;
}
-img {
+main img:not([src*=avatar]):not([src*=badges]):not([src*=".svg"]) {
margin: 30px;
padding: 1px;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- -o-border-radius: 3px;
border-radius: 3px;
- -webkit-box-shadow: 0 3px 10px #dedede, 0 1px 5px #888;
- -moz-box-shadow: 0 3px 10px #dedede, 0 1px 5px #888;
box-shadow: 0 3px 10px #dedede, 0 1px 5px #888;
max-width: 100%;
}
-img[src*="opencollective.com/mochajs"], img[src*=badges], img[src*=".svg"] {
- margin: 0;
- box-shadow: none;
-}
-
footer {
background-color: #eee;
width: 100%;
diff --git a/docs/images/backer-background.svg b/docs/images/backer-background.svg
new file mode 100644
index 00000000..29bd6166
--- /dev/null
+++ b/docs/images/backer-background.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 30.9 30.9" enable-background="new 0 0 30.9 30.9" xml:space="preserve" height="64">
+<path id="XMLID_64_" fill="#7FADF2" d="M15.5,0C6.9,0,0,6.9,0,15.5c0,4.2,1.7,8,4.4,10.8c0.3,0.3,0.5,0.5,0.8,0.7
+ c0.3,0.2,0.5,0.5,0.8,0.7c2.6,2,5.9,3.3,9.5,3.3c3.6,0,6.9-1.2,9.5-3.3c0.3-0.2,0.5-0.4,0.8-0.7c0.3-0.2,0.5-0.5,0.8-0.7
+ c2.7-2.8,4.4-6.6,4.4-10.8C30.9,6.9,24,0,15.5,0z M15.5,29.4c-3.4,0-6.4-1.2-8.8-3.2c1.2-2.2,3.3-3.9,5.8-4.7
+ c0.4-0.1,0.7-0.5,0.7-0.9c0-0.4-0.2-0.8-0.5-1c-1.9-1.1-3.2-3.1-3.2-5.3c0-3.3,2.7-6,6-6c3.3,0,6,2.7,6,6c0,2.2-1.2,4.2-3.2,5.3
+ c-0.4,0.2-0.6,0.6-0.5,1c0,0.4,0.3,0.7,0.7,0.9c2.5,0.8,4.6,2.5,5.8,4.7C21.9,28.2,18.8,29.4,15.5,29.4z M25.8,24.8
+ c-1.2-1.9-2.9-3.5-4.9-4.5c1.6-1.5,2.6-3.6,2.6-5.9c0-4.4-3.6-8-8-8c-4.4,0-8,3.6-8,8c0,2.3,1,4.4,2.6,5.9c-2.1,1-3.8,2.6-4.9,4.5
+ c-2.2-2.5-3.6-5.8-3.6-9.4c0-7.7,6.3-14,14-14s14,6.3,14,14C29.4,19.1,28,22.3,25.8,24.8z"/>
+</svg>
diff --git a/docs/images/join-chat.svg b/docs/images/join-chat.svg
new file mode 100644
index 00000000..0edf5f3b
--- /dev/null
+++ b/docs/images/join-chat.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="a"><rect width="99" height="20" rx="3" fill="#fff"/></mask><g mask="url(#a)"><path fill="#555" d="M0 0h40v20H0z"/><path fill="#46BC99" d="M40 0h59v20H40z"/><path fill="url(#b)" d="M0 0h99v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="20" y="15" fill="#010101" fill-opacity=".3">gitter</text><text x="20" y="14">gitter</text><text x="68.5" y="15" fill="#010101" fill-opacity=".3">join chat</text><text x="68.5" y="14">join chat</text></g></svg>
\ No newline at end of file