2
0
Fork 0

Added basic theme

This commit is contained in:
Willem Cazander 2020-01-03 18:07:50 +01:00
parent a085ca6867
commit 8b9afa66ce
42 changed files with 5633 additions and 0 deletions

View file

@ -0,0 +1 @@
.adapterMixin(@len);

View file

@ -0,0 +1,93 @@
.aside {
display:none;
position:absolute;
top:0;
right:0;
width:100%;
height:100%;
overflow:hidden;
background-color: rgba(0,0,0,0.3);
.aside-content {
position:absolute;
top:0;
right:0;
width:750rem/@baseFontSize;
transform:translateX(750rem/@baseFontSize);
transition:transform .75s;
height:100%;
background-color: rgba(0,0,0,.9);
padding:40rem/@baseFontSize 15rem/@baseFontSize;
.aside-avatar {
width:128rem/@baseFontSize;
height:128rem/@baseFontSize;
display:block;
border-radius:50%;
margin:0 auto;
overflow:hidden;
img {
width:128rem/@baseFontSize;
height:128rem/@baseFontSize;
}
}
.aside-author {
text-align:center;
font-family:"华文行楷",sans-serif;
font-size:40rem/@baseFontSize;
margin-top:20rem/@baseFontSize;
}
.aside-description {
text-align:center;
font-family:"华文行楷",sans-serif;
font-size:30rem/@baseFontSize;
margin-top:20rem/@baseFontSize;
}
.aside-contact {
margin-top:20rem/@baseFontSize;
li {
float:left;
width:220rem/@baseFontSize;
height:220rem/@baseFontSize;
margin:0 10rem/@baseFontSize;
border-radius:10rem/@baseFontSize;
background-color: rgba(255,255,255,.1);
text-align:center;
overflow:hidden;
position:relative;
span {
display:block;
width:100%;
height:100%;
line-height:220rem/@baseFontSize;
text-align:center;
}
span.fa {
font-size:30rem/@baseFontSize;
}
a {
position:absolute;
top:0;
left:0;
color: @colorFont;
display:block;
background-color: #CEBB3B;
width:100%;
height:100%;
line-height:220rem/@baseFontSize;
text-align:center;
transform:translateY(220rem/@baseFontSize);
overflow:hidden;
transition:transform .3s;
}
a.in {
transform:translateY(0);
}
img {
width:220rem/@baseFontSize;
}
}
}
}
.in {
transform:translateX(0);
}
}

View file

@ -0,0 +1,13 @@
/*
.footer {
width:100%;
height:80rem/@baseFontSize;
background-color: @colorBar;
font-size: 20rem/@baseFontSize;
position:fixed;
bottom:0;
left:0;
text-align:center;
line-height:80rem/@baseFontSize;
border-top:2px solid #fff;
}*/

View file

@ -0,0 +1,102 @@
.header {
width:100%;
height:80rem/@baseFontSize;
background-color: @colorBar;
font-size:20rem/@baseFontSize;
padding:0 80rem/@baseFontSize;
position:fixed;
top:0;
left:0;
line-height:80rem/@baseFontSize;
border-bottom:2px solid #fff;
a {
transition: all 0.3s ease !important;
&:hover {
color: @colorFontHover !important;
text-decoration: none !important;
}
}
.header-menu,.header-search {
cursor:pointer;
display:none;
position:absolute;
top:0;
span {
font-size:30rem/@baseFontSize;
}
}
.header-menu {
left:20rem/@baseFontSize;
}
.header-search {
right:20rem/@baseFontSize;
}
.header-title {
a {
font-size:25rem/@baseFontSize;
.header-subtitle {
font-size:20rem/@baseFontSize;
transition: all .3s ease;
}
&:hover .header-subtitle {
color:@colorFontHover;
}
}
}
@media screen and (min-width:750px) {
.header-title {
display:inline-block;
float:left;
a {
color:#fff;
.header-subtitle {
color:#fff;
}
}
}
.header-navbar {
float:right;
li {
float:left;
a {
padding:0 10rem/@baseFontSize;
color:#fff;
}
//a:hover {
// color:@colorFontHover;
//}
}
}
}
@media screen and (max-width:750px) {
.header-menu,.header-search {
display:block;
}
.header-title {
text-align:center;
a {
color:#fff;
.header-subtitle {
color:#fff;
}
}
}
.header-navbar {
display:none;
line-height:40rem/@baseFontSize;
position:absolute;
top:80rem/@baseFontSize;
left:0;
li {
padding:0 20rem/@baseFontSize;
a {
color:#fff;
}
//a:hover {
// color:@colorFontHover;
//}
}
}
}
}

View file

@ -0,0 +1,120 @@
.main {
width:100%;
height:100%;
padding:80rem/@baseFontSize 0 0 0;
overflow:hidden;
a {
transition: all 0.3s ease !important;
&:hover {
color: @colorFontHover !important;
text-decoration: none !important;
}
}
.arrow {
display:none;
padding:5rem/@baseFontSize 15rem/@baseFontSize;
border-radius:10rem/@baseFontSize;
background-color:rgba(255,255,255,.2) ;
color:@colorFont;
position:absolute;
left:0;
&.fa-arrow-down {
bottom:20rem/@baseFontSize;
}
&.fa-arrow-up {
top:100rem/@baseFontSize;
}
}
.main-content {
width:100%;
height:100%;
background-color: @colorBg;
padding:50rem/@baseFontSize 50rem/@baseFontSize;
overflow:auto;
.post {
border-radius:20rem/@baseFontSize;
padding:40rem/@baseFontSize 20rem/@baseFontSize;
min-width:100%;
background-color: rgba(255,255,255,.1);
margin-bottom:50rem/@baseFontSize;
overflow:hidden;
.post-title {
a {
font-size:25rem/@baseFontSize;
color:@colorFont;
}
h2 {
margin:10rem/@baseFontSize 0;
}
}
.post-excerpt {
margin-top:40rem/@baseFontSize;
}
.post-content {
margin-top:40rem/@baseFontSize;
a {
padding:5rem/@baseFontSize 15rem/@baseFontSize;
border-radius:10rem/@baseFontSize;
background-color:rgba(255,255,255,.2) ;
color:@colorFont;
}
.article-tag-list {
float:right;
.article-tag-list-item {
float:left;
margin:0 5rem/@baseFontSize;
}
}
}
.post-media {
margin-top:40rem/@baseFontSize;
text-align:right;
.post-time {
font-size:15rem/@baseFontSize;
}
a {
padding:5rem/@baseFontSize 15rem/@baseFontSize;
border-radius:10rem/@baseFontSize;
background-color:rgba(255,255,255,.2) ;
color:@colorFont;
}
.article-tag-list {
float:left;
.article-tag-list-item {
float:left;
margin:0 5rem/@baseFontSize;
}
}
}
}
.post-nav {
text-align:center;
.page-nav {
display:inline-block;
vertical-align: middle;
.page-number,.extend.prev,.extend.next {
padding:5rem/@baseFontSize 15rem/@baseFontSize;
border-radius:10rem/@baseFontSize;
margin:0 5rem/@baseFontSize;
background-color:rgba(255,255,255,.2) ;
color:@colorFont;
}
span.page-number {
color:@colorFontHover;
}
a.page-number {
}
}
}
}
}
#particles-js {
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background-color: @colorDiy;
z-index:-1;
}

View file

@ -0,0 +1,14 @@
.meethigher-scroll::-webkit-scrollbar {/*滚动条整体样式*/
width: 5rem/@baseFontSize; /*高宽分别对应横竖滚动条的尺寸*/
height: 10rem/@baseFontSize;
}
.meethigher-scroll::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
border-radius: 10px;
background-color: @colorDiy;
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
}
.meethigher-scroll::-webkit-scrollbar-track {/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
border-radius: 10px;
background: #EDEDED;
}

View file

@ -0,0 +1,8 @@
.adapterMixin(@index) when (@index>=1) {
@media(min-width:extract(@adapterDeviceList,@index)){
html {
font-size: @baseFontSize/ @psdWidth*extract(@adapterDeviceList,@index);
}
.adapterMixin(@index - 1);
}
}

View file

@ -0,0 +1,400 @@
.busuanzi {
margin-top: 30rem/@baseFontSize;
text-align: center;
}
//下面是目录样式
.outline {
padding: 5rem/@baseFontSize 15rem/@baseFontSize;
background-color: rgba(255, 255, 255, .2);
color: @colorFont;
cursor: pointer;
position: absolute;
top: 200px;
right: 0;
border-radius: 10rem/@baseFontSize;
}
.layui-layer-page {
background-color: #13172f !important;
border: 1px solid #fff !important;
border-radius: 10px !important;
}
.layui-layer-title {
border-top-left-radius: 10px !important;
border-top-right-radius:10px !important;
}
.layui-layer-content ul {
list-style:none;
}
.layui-layer-dialog {
background-color: #13172F !important;
border: 1px solid #fff !important;
border-radius: 10px !important;
}
.catalog-container {
padding:5px 10px;
font-size:16px;
}
.catalog-container ul li a {
text-decoration: underline;
}
//上面是目录样式
.post-media2 {
margin-top: 20rem/@baseFontSize;
.post-time {
padding: 5rem/@baseFontSize 15rem/@baseFontSize;
border-radius: 10rem/@baseFontSize;
background-color: rgba(255, 255, 255, .2);
color: @colorFont;
}
.article-tag-list {
float: left;
.article-tag-list-item {
float: left;
margin: 0 5rem/@baseFontSize;
a {
padding: 5rem/@baseFontSize 15rem/@baseFontSize;
border-radius: 10rem/@baseFontSize;
background-color: rgba(255, 255, 255, .2);
color: @colorFont;
}
}
}
}
.blog-markdown {
font-size: 18rem/@baseFontSize !important;
/*设置h标签*/
.postSize(@fontSize) {
font-size: @fontSize/@baseFontSize !important;
margin: 10rem/@baseFontSize 0;
}
h6 {
.postSize(18rem);
}
h5 {
.postSize(20rem);
}
h4 {
.postSize(22rem);
}
h3 {
.postSize(24rem);
}
h2 {
.postSize(26rem);
}
h1 {
.postSize(28rem);
}
/*设置无序有序标签*/
ul, ol {
margin-left: 30rem/@baseFontSize;
li {
margin: 3rem/@baseFontSize 0;
}
}
ul {
list-style-type: disc;
}
ol {
list-style-type: decimal;
}
/*设置引用标签*/
blockquote {
border: none;
color: @colorFont;
margin: 20rem/@baseFontSize 0;
padding: 0 0 0 10rem/@baseFontSize;
min-height: 20rem/@baseFontSize;
background-color: transparent;
line-height: inherit;
border-left: 4px solid @post-blockquote-border-color;
}
/*设置加粗倾斜*/
strong {
margin: 0 3rem/@baseFontSize;
}
em {
padding-right: 3rem/@baseFontSize;
}
/*设置图片*/
@media screen and (min-width: 767px) {
img {
max-width: 930rem/@baseFontSize;
display: block;
margin: 15rem/@baseFontSize auto 30rem/@baseFontSize auto;
border-radius: 3rem/@baseFontSize;
}
}
@media screen and (max-width: 767px) {
img {
width: 100%;
display: block;
margin: 15rem/@baseFontSize auto 30rem/@baseFontSize auto;
border-radius: 3rem/@baseFontSize;
}
}
/*设置表格*/
> table {
font-size: 16rem/@baseFontSize;
border-collapse: collapse;
border-spacing: 0;
empty-cells: show;
border: 1px solid @post-table-border-color;
width: 100%;
margin-bottom: 24rem/@baseFontSize;
border-radius: 3rem/@baseFontSize;
th {
font-family: inherit;
font-size: inherit;
background-color: @post-table-thead-bg-color !important;
white-space: nowrap;
font-weight: 600;
border: 1px solid @post-table-border-color !important;
padding: 8rem/@baseFontSize 16rem/baseFontSize !important;
}
td {
border: 1px solid @post-table-border-color !important;
padding: 8rem/@baseFontSize 16rem/@baseFontSize !important;
}
}
/*设置超链接*/
a {
padding: 0 !important;
border-radius: 0 !important;
color: @colorFontHover !important;
background-color: transparent !important;
}
/*设置段落格式*/
p {
margin: 10rem/@baseFontSize auto;
text-indent: 0;
}
/*设置关键字*/
code {
color: @colorFont;
line-height: 1;
padding: 3rem/@baseFontSize 4rem/@baseFontSize;
margin: 0 3rem/@baseFontSize;
border-radius: 3rem/@baseFontSize !important;
border: 1px solid @post-table-border-color;
background-color: @post-table-thead-bg-color;
}
/*设置代码块*/
figure.highlight {
background-color: @post-table-thead-bg-color;
padding: 30rem/@baseFontSize 0 10rem/@baseFontSize 0;
border: 1px solid @post-table-border-color;
border-radius: 3rem/@baseFontSize;
position: relative;
overflow-x: auto;
width: 100%;
span.language {
position: absolute;
top: 0;
left: 0;
padding: 5rem/@baseFontSize 6rem/@baseFontSize 6rem/@baseFontSize 6rem/@baseFontSize;
border-radius: 10rem/@baseFontSize;
}
table {
width: 100%;
position: relative;
.line {
font-family: "Comic Sans MS", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace !important;
line-height: 12rem/@baseFontSize;
.comment,
.quote {
color: #5c6370;
font-style: italic;
}
.doctag,
.keyword,
.formula {
color: #c678dd;
}
.section,
.name,
.selector-tag,
.deletion,
.subst {
color: #e06c75;
}
.literal {
color: #56b6c2;
}
.string,
.regexp,
.addition,
.attribute,
.meta-string {
color: #98c379;
}
.built_in,
.class .title {
color: #e6c07b;
}
.attr,
.variable,
.template-variable,
.type,
.selector-class,
.selector-attr,
.selector-pseudo,
.number {
color: #d19a66;
}
.symbol,
.bullet,
.link,
.meta,
.selector-id,
.title {
color: #61aeee;
}
.emphasis {
font-style: italic;
}
.strong {
font-weight: bold;
}
.link {
text-decoration: underline;
}
}
.gutter {
width: 30rem/@baseFontSize;
pre {
padding-left: 8rem/@baseFontSize;
text-align: right;
color: @post-table-border-color;
}
}
.code {
pre {
padding-right: 8rem/@baseFontSize;
padding-left: 8rem/@baseFontSize;
width: 100%;
}
}
&::before {
position: absolute;
top: -30rem/@baseFontSize;
left: 0;
min-width: 100%;
display: block;
height: 30rem/@baseFontSize;
background-color: @post-table-border-color;
content: ""
}
tbody {
pointer-events: none;
&::after {
position: absolute;
top: -30rem/@baseFontSize;
right: 0;
content: "copy";
padding: 5rem/@baseFontSize 6rem/@baseFontSize 6rem/@baseFontSize 6rem/@baseFontSize;
border-radius: 10rem/@baseFontSize;
background-color: skyblue;
cursor: pointer;
pointer-events: all;
}
.before {
opacity: 0;
position: absolute;
top: -30rem/@baseFontSize;
right: 50rem/@baseFontSize;
padding: 5rem/@baseFontSize 6rem/@baseFontSize 6rem/@baseFontSize 6rem/@baseFontSize;
background-color: skyblue;
content: "success";
border-radius: 10rem/@baseFontSize;
animation: copy 1.5s;
}
@keyframes copy {
0% {
opacity: 0
}
50% {
opacity: 1
}
100% {
opacity: 0
}
}
}
}
&::-webkit-scrollbar { /*滚动条整体样式*/
width: 5rem/@baseFontSize; /*高宽分别对应横竖滚动条的尺寸*/
height: 5rem/@baseFontSize;
}
&::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
border-radius: 10px;
background-color: @colorDiy;
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
}
&::-webkit-scrollbar-track { /*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background: #EDEDED;
}
}
}

View file

@ -0,0 +1,55 @@
/*========reset css===============*/
*,
*::before,
*::after {
/*所有的标签和伪元素都选中*/
margin: 0;
padding: 0;
/*移动端常用布局是非固定像素布局*/
box-sizing: border-box;
-webkit-box-sizing: border-box;
/*点击高亮效果清除*/
tap-highlight-color: transparent;
-webkit-tap-highlight-color: transparent;
}
html, body {
width: 100%;
height: 100%;
}
body {
font-size: 20rem/@baseFontSize;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', sans-serif;
color: @colorFont;
}
ul, ol {
list-style: none;
}
a {
text-decoration: none;
color: @colorFont;
}
input, textarea {
border: none;
outline: none;
/*不允许改变尺寸*/
resize: none;
/*元素的外观 none没有任何样式*/
-webkit-appearance: none;
}
/*===============common css===========*/
/*清除浮动*/
.clearFix::before,
.clearFix::after {
content: "";
display: block;
visibility: hidden;
height: 0;
line-height: 0;
clear: both;
}

View file

@ -0,0 +1,40 @@
.search {
padding: 5rem/@baseFontSize 15rem/@baseFontSize;
background-color: rgba(255, 255, 255, .2);
color: @colorFont;
cursor: pointer;
position: absolute;
top: 150px;
right: 0;
border-radius: 10rem/@baseFontSize;
}
@media screen and (max-width: 750px) {
.search {
display: none;
}
}
.search-container {
margin:0 auto;
text-align:center;
padding:5px 10px;
font-size:16px;
#input {
outline: none;
border: 1px solid orange;
padding: 5px 10px;
vertical-align: middle;
border-radius: 10px;
}
.btn-search {
cursor:pointer;
display:inline-block;
padding:5px 10px;
}
.result {
list-style:none;
}
.result li {
border-bottom: 1px solid rgba(255,255,255,.1);
}
}

View file

@ -0,0 +1,45 @@
.tag-tags {
.tags-title {
font-size:26rem/@baseFontSize;
display:block;
margin:0 auto;
text-align:center;
}
.tags-all {
margin-top:10rem/@baseFontSize;
li {
float:left;
margin:10rem/@baseFontSize 5rem/@baseFontSize;
a {
padding:5rem/@baseFontSize 15rem/@baseFontSize;
border-radius:10rem/@baseFontSize;
background-color:rgba(255,255,255,.2) ;
color:@colorFont;
}
}
}
.posts-all {
margin:10rem/@baseFontSize 0;
text-align:left;
li {
padding:5rem/@baseFontSize 15rem/@baseFontSize;
border-radius:10rem/@baseFontSize;
background-color:rgba(255,255,255,.2) ;
color:@colorFont;
margin-top:10rem/@baseFontSize;
width:100%;
span {
width:50%;
display:inline-block;
text-align:right;
padding-right:50rem/@baseFontSize;
}
a {
width:50%;
display:inline-block;
padding-left:50rem/@baseFontSize;
//padding-left:100rem/@baseFontSize;
}
}
}
}

View file

@ -0,0 +1,15 @@
.toolbar {
padding:5rem/@baseFontSize 15rem/@baseFontSize;
background-color:rgba(255,255,255,.2) ;
color:@colorFont;
cursor:pointer;
position:absolute;
top:100px;
right:0;
border-radius:10rem/@baseFontSize;
}
@media screen and (max-width:750px) {
.toolbar {
display:none;
}
}

View file

@ -0,0 +1,37 @@
@charset "UTF-8";
@adapterDeviceList:750px,720px,640px,540px,480px,424px,414px,400px,384px,375px,360px,320px;
@psdWidth:750px;
@baseFontSize:100px;
@len:length(@adapterDeviceList);
@colorDiy:#13172F;
@colorBar:transparent;
@colorBg:transparent;
@colorFont:#fff;
@colorFontHover:gold;
@blog-bg-color: #2B2A32;
@blog-theme-color: #FF787F;
@blog-border-color: #3e4c42;
@blog-font-color: #25AD87;
@blog-title-color: #25AD87;
@blog-github-fill-color: #25AD87;
@post-catalog-bg-color: #2b2a32;
@post-catalog-font-color: #288EAD;
@post-table-thead-bg-color: #30303a;
@post-table-border-color: #3e4c42;
@post-inline-code-bg-color: #282c34;
@post-inline-code-border-color: #3e4c42;
@post-cnblogs-code-bg-color: #282c34;
@post-cnblogs-code-font-color: #abb2bf;
@post-signature-bg-color: #30303a;
@post-blockquote-border-color: #479680;
@comment-font-color: #C8B735;
@comment-bg-color: #30303a;

View file

@ -0,0 +1,28 @@
@import "_partial/var";
@import "_partial/mixins";
@import "_partial/adapter";
@import "_partial/reset";
/*===============diy css===========*/
@import "_partial/meethigher-scroll";
@import "_partial/header";
@import "_partial/aside";
@import "_partial/layout";
@import "_partial/post";
@import "_partial/tag";
@import "_partial/archive";
@import "_partial/footer";
@import "_partial/toolbar";
@import "_partial/search";