mirror of
https://github.com/oupala/apaxy.git
synced 2025-08-17 21:51:41 +02:00
Merge pull request #108 from PeterDaveHelloKitchen/format-improvement
Improve code readability, maintainability, style
This commit is contained in:
@@ -3,8 +3,8 @@ document.getElementsByTagName('tr')[1].className = 'parent';
|
||||
// fix links when not adding a / at the end of the URI
|
||||
var uri = window.location.pathname.substr(1);
|
||||
if (uri.substring(uri.length - 1) != '/') {
|
||||
var indexes = document.getElementsByClassName('indexcolname'),
|
||||
i = indexes.length;
|
||||
var indexes = document.getElementsByClassName('indexcolname');
|
||||
var i = indexes.length;
|
||||
while (i--) {
|
||||
var a = indexes[i].getElementsByTagName('a')[0];
|
||||
a.href = '/' + uri + '/' + a.getAttribute('href', 2);
|
||||
|
@@ -10,13 +10,14 @@ button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-bloc
|
||||
\*------------------------------------*/
|
||||
|
||||
@import url('//fonts.googleapis.com/css?family=Open+Sans');
|
||||
|
||||
/* Have to use @import for the font, as you can only specify a single stylesheet */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
@@ -29,76 +30,96 @@ html {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 20px;
|
||||
-webkit-backface-visibility: hidden;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: consolas,monospace;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #61666c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a, img {
|
||||
border: none;
|
||||
outline:none
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #2a2a2a;
|
||||
}
|
||||
|
||||
/*------------------------------------*\
|
||||
Wrapper
|
||||
\*------------------------------------*/
|
||||
|
||||
.wrapper {
|
||||
margin: 0 auto;
|
||||
padding-top: 20px;
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
/*------------------------------------*\
|
||||
Demo block
|
||||
\*------------------------------------*/
|
||||
|
||||
.block {
|
||||
font-size: .875em;
|
||||
margin: 20px 0;
|
||||
padding: 20px;
|
||||
color: #9099A3;
|
||||
}
|
||||
|
||||
/*------------------------------------*\
|
||||
Table (directory listing)
|
||||
\*------------------------------------*/
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: .875em;
|
||||
}
|
||||
|
||||
tr {
|
||||
outline: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
tr:hover td {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
font-size: .75em;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
/* 2nd Column: Filename */
|
||||
|
||||
th + th {
|
||||
width: 65%;
|
||||
}
|
||||
|
||||
/* 3rd Column: Last Modified */
|
||||
th + th + th {
|
||||
}
|
||||
|
||||
/* 4th Column: Size */
|
||||
th + th + th + th {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
tr td:first-of-type {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 5px 0;
|
||||
outline: 0;
|
||||
@@ -106,24 +127,29 @@ td {
|
||||
border-bottom: 1px solid #edf1f5;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
-webkit-transition:background 300ms ease;
|
||||
-moz-transition:background 300ms ease;
|
||||
-ms-transition:background 300ms ease;
|
||||
-o-transition:background 300ms ease;
|
||||
transition: background 300ms ease;
|
||||
-o-transition: background 300ms ease;
|
||||
-ms-transition: background 300ms ease;
|
||||
-moz-transition: background 300ms ease;
|
||||
-webkit-transition: background 300ms ease;
|
||||
}
|
||||
|
||||
td a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
tr.parent a[href^="/"] {
|
||||
color: #9099A3;
|
||||
}
|
||||
|
||||
.parent a[href^="/"]:hover {
|
||||
color: #2281d0;
|
||||
}
|
||||
|
||||
/*------------------------------------*\
|
||||
Footer
|
||||
\*------------------------------------*/
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
font-size: .75em;
|
||||
|
Reference in New Issue
Block a user