summaryrefslogtreecommitdiff
path: root/website/static
diff options
context:
space:
mode:
Diffstat (limited to 'website/static')
-rw-r--r--website/static/base/css/packages.css64
-rw-r--r--website/static/base/js/packages.js46
2 files changed, 110 insertions, 0 deletions
diff --git a/website/static/base/css/packages.css b/website/static/base/css/packages.css
new file mode 100644
index 0000000..d9771be
--- /dev/null
+++ b/website/static/base/css/packages.css
@@ -0,0 +1,64 @@
+/* license: CC0 */
+
+@import url("article.css");
+
+a {
+ transition: all 0.3s;
+}
+table#packages, table#packages tr, table#packages tbody, table#packages td, table#packages th {
+ border: 0px solid black;
+ clear: both;
+}
+table#packages tr:nth-child(even) {
+ background-color: #FFF;
+}
+table#packages tr:nth-child(odd) {
+ background-color: #EEE;
+}
+table#packages tr:hover, table#packages tr:focus, table#packages tr:active {
+ background-color: #DDD;
+}
+table#packages th {
+ background-color: #333;
+ color: #fff;
+}
+table#packages td {
+ margin:0px;
+ padding:0.2em 0.5em;
+}
+table#packages td:first-child {
+ width:10%;
+ text-align:center;
+}
+table#packages td:nth-child(2) {
+ width:30%;
+}
+table#packages td:last-child {
+ width:60%;
+}
+img.package-logo {
+ float: left;
+ padding: 0.75em;
+}
+table#packages span {
+ font-weight: 700;
+}
+table#packages span a {
+ float: right;
+ font-weight: 500;
+}
+a#top {
+ position:fixed;
+ right:10px;
+ bottom:10px;
+ font-size:150%;
+ background-color:#EEE;
+ padding:10px 7.5px 0 7.5px;
+ text-decoration:none;
+ color:#000;
+ border-radius:5px;
+}
+a#top:hover, a#top:focus {
+ background-color:#333;
+ color:#fff;
+} \ No newline at end of file
diff --git a/website/static/base/js/packages.js b/website/static/base/js/packages.js
new file mode 100644
index 0000000..c8d9fc4
--- /dev/null
+++ b/website/static/base/js/packages.js
@@ -0,0 +1,46 @@
+/* license: CC0 */
+
+function show_hide(idThing)
+{
+ if(document.getElementById && document.createTextNode) {
+ var thing = document.getElementById(idThing);
+ /* Used to change the link text, depending on whether description is
+ collapsed or expanded */
+ var thingLink = thing.previousSibling.lastChild.firstChild;
+ if (thing) {
+ if (thing.style.display == "none") {
+ thing.style.display = "";
+ thingLink.data = 'Collapse';
+ } else {
+ thing.style.display = "none";
+ thingLink.data = 'Expand';
+ }
+ }
+ }
+}
+
+/* Add controllers used for collapse/expansion of package descriptions */
+function prep(idThing)
+{
+ var tdThing = document.getElementById(idThing).parentNode;
+ if (tdThing) {
+ var aThing = tdThing.firstChild.appendChild(document.createElement('a'));
+ aThing.setAttribute('href', 'javascript:void(0)');
+ aThing.setAttribute('title', 'show/hide package description');
+ aThing.appendChild(document.createTextNode('Expand'));
+ aThing.onclick=function(){show_hide(idThing);};
+ /* aThing.onkeypress=function(){show_hide(idThing);}; */
+ }
+}
+
+/* Take n element IDs, prepare them for javascript enhanced
+ display and hide the IDs by default. */
+function prep_pkg_descs()
+{
+ if(document.getElementById && document.createTextNode) {
+ for(var i=0; i<arguments.length; i++) {
+ prep(arguments[i])
+ show_hide(arguments[i]);
+ }
+ }
+}