update css

This commit is contained in:
wolegca 2019-09-20 22:34:39 +08:00
parent 71720a31a8
commit e3bc023d61
5 changed files with 106 additions and 56 deletions

View File

@ -1,61 +1,39 @@
.container{
max-width: 1440px;
margin:0 auto;
position: relative
div.sidebar div:nth-of-type(n+1) {
margin-bottom: 10px
}
.container:before{
content:'';
div.sidebar div:nth-of-type(n+1) *{
display: block;
position:fixed;
top:0px;
left:0px;
height:150%;
width:100%;
background: black url(../images/bg.jpg) no-repeat top;
background-size: cover
font-size: 16px;
padding: 2px 0px;
margin: 3px 0px
}
.clearfix:after{
content:'';
display: block;
height:0px;
clear: both;
visibility: hidden
div.sidebar div:nth-of-type(n+1) span{
font-weight: bold;
font-size: 18px
}
.sidebar-border{
position: absolute;
left:0px;
top:0px;
display: block;
width:250px;
background-color: transparent;
padding-top:50px;
overflow-x:hidden;
padding-bottom: 10px;
padding-left: 10px
div.sidebar div:nth-of-type(n+1) a{
text-decoration: none;
transition:all ease .2s;
padding-left: 2px;
border-radius:5px;
box-shadow: 1px 1px 2px #999;
min-height: 50px;
padding:15px 5px;
}
.sidebar{
position: relative;
display: block;
width:100%;
background-color:rgba(255,255,255,.8);
border-radius: 15px;
padding:15px
div.sidebar div:nth-of-type(n+1) a:visited{
color:black
}
.sidebar div:first-child{
font-size: 20px;
font-weight: bold
div.sidebar div:nth-of-type(n+1) a:hover{
color:green;
box-shadow: 2px 2px 5px #999;
transform:scale(1.05)
}
@media screen and (max-width:700px){
.sidebar-border{
position: relative;
width:100%;
height:auto;
padding:0px
}
div.sidebar div:nth-of-type(n+1) a:active{
color:red
}

View File

@ -14,7 +14,8 @@ body {
width: 100%;
z-index: 0;
position: relative;
display: block
display: block;
overflow-x: hidden
}
#menu-control {
@ -309,6 +310,61 @@ body {
left: 0px
}
.container{
max-width: 1440px;
margin:0 auto;
position: relative
}
.container:before{
content:'';
display: block;
position:fixed;
top:0px;
left:0px;
height:150%;
width:100%;
background: black url(../images/bg.jpg) no-repeat top;
background-size: cover
}
.clearfix:after{
content:'';
display: block;
height:0px;
clear: both;
visibility: hidden
}
.sidebar-border{
position: absolute;
left:0px;
top:0px;
display: block;
width:250px;
background-color: transparent;
padding-top:50px;
overflow-x:hidden;
padding-bottom: 10px;
padding-left: 10px
}
.sidebar{
position: relative;
display: block;
width:100%;
background-color:rgba(255,255,255,.8);
border-radius: 15px;
padding:15px;
cursor:default
}
.sidebar div:first-child{
font-size: 20px;
font-weight: bold;
margin-bottom: 10px
}
@keyframes fadeIn {
from {
opacity: 0
@ -380,6 +436,22 @@ body {
border-radius: 0px 0px 10px 13px;
color:white
}
.sidebar-border{
position: relative;
width:100%;
height:auto;
padding:0px
}
.sidebar div:nth-of-type(n+1) *{
text-align: center
}
.sidebar div:nth-of-type(n+1) a{
border:1px solid black;
border-radius:5px
}
}
@media screen and (max-width:480px) {

View File

@ -10,15 +10,15 @@
// }
// });
var index = getQueryString('i');
$.ajax({
type: "GET",
url: "content.json",
url: "content.json?timestamp=" + (new Date()).valueOf(),
dataType: "json",
success: function (response) {
var lastIndex = response.length - 1;
listContent(response);
listContent(response, lastIndex);
if (response[lastIndex]['hasCode'])
loadScript('content/js/' + response[lastIndex]['date'] + '.js');

View File

@ -121,7 +121,7 @@ function listContent(json, num) {
sidebar = $('.sidebar');
for (; i <= len; i++) {
index = len - i;
if (len - i !== num) {
if (index != num) {
sidebar.append($('<div>').append($('<a>').attr('href', 'view.html?i=' + index).append(json[index]['title'])));
} else {
sidebar.append($('<div>').append($('<span>').append(' · ' + json[index]['title'])));

View File

@ -2,11 +2,11 @@
var index = getQueryString('i');
$.ajax({
type: "GET",
url: "content.json",
url: "content.json?timestamp=" + (new Date()).valueOf(),
dataType: "json",
success: function (response) {
listContent(response,index);
listContent(response, index);
if (response[index]['hasCode'])
loadScript('content/js/' + response[index]['date'] + '.js');