/* * Solo - A small and beautiful blogging system written in Java. * Copyright (c) 2010-present, b3log.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ /* * skin style * * @author Liyuan Li * @version 0.1.0.1, Jul 9, 2019 */ @import "../../../scss/reset"; @import "../../../scss/usite"; @import "../../../scss/toc"; @import "../../../scss/function"; @import "../../../scss/nprogress"; @import "vditor/src/assets/scss/classic"; $fade-lighter: rgba(255, 255, 255, .8) !default; $gray: #738a94 !default; $black: #15171a !default; $black-bg: #232323 !default; $link: rgb(119, 182, 255) !default; body { background-color: #f4f8fb; } ::selection { text-shadow: none; background-color: #cbeafb; } a { color: $link; } .ft__a { color: $gray; &:hover { color: rgba($gray, .8); } } .fn { &__progress { position: fixed; right: 0; top: 0; left: 0; width: 100%; height: 2px; border: none; background: transparent; -webkit-appearance: none; z-index: 1; &::-webkit-progress-value { background-color: $link; transition: width 0.2s ease 0s, opacity 0.6s ease 0s; } &::-webkit-progress-bar { background-color: transparent; } } } @keyframes fade-in-down { 0% { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: translateY(0) } } @keyframes bounce { 0%, 20%, 50%, 80%, 100% { -webkit-transform: translateY(0); transform: translateY(0); } 40% { -webkit-transform: translateY(-10px); transform: translateY(-10px); } 60% { -webkit-transform: translateY(-5px); transform: translateY(-5px); } } @keyframes bounceInLeft { from { -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: rotate3d(0, 0, 1, -45deg); transform: rotate3d(0, 0, 1, -45deg); opacity: 0; } to { -webkit-transform-origin: left bottom; transform-origin: left bottom; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); opacity: 1; } } @keyframes bounceOutLeft { 20% { opacity: 1; transform: translate3d(20px, 0, 0); } to { opacity: 0; transform: translate3d(-2000px, 0, 0); } } @keyframes beating { 0% { transform: scale(1) } 20% { transform: scale(1.6) } 30% { transform: scale(1) } 50% { transform: scale(1.6) } 70%,to { transform: scale(1) } } .wrapper { max-width: 1040px; margin: 0 auto; padding: 0 10px; } .header { position: relative; z-index: 1; #canvas { position: absolute; } &--index { height: 100vh; &:before { content: ""; height: 100%; position: absolute; background: url("../images/header-bg.jpg") no-repeat center center; width: 100%; top: 0; background-size: cover; } } //&--article { // background-color: $black-bg; // height: 64px; // .header__title { // display: none; // } // .header__nav a { // margin-bottom: 0; // line-height: 64px; // } //} //&--other { // height: 407px; // .header__title { // display: none; // } // &:before { // content: ""; // height: 100%; // position: absolute; // background: url("../images/header-bg.jpg") no-repeat center center; // width: 100%; // top: 0; // background-size: cover; // filter: brightness(48%); // } // .header__nav a { // margin-bottom: 0; // line-height: 64px; // } //} &__title { position: relative; align-items: center; height: 100%; display: flex; justify-content: center; flex-direction: column; z-index: 1; } &__h1 { letter-spacing: -1px; font-weight: 700; font-size: 50px; text-shadow: 0 3px 6px rgba(0, 0, 0, .3); animation: fade-in-down 1s both; animation-delay: .5s; a { color: #fff; &:hover { text-decoration: none; color: $fade-lighter; } } } &__desc { margin-top: 10px; color: $fade-lighter; line-height: 24px; text-shadow: 0 3px 6px rgba(0, 0, 0, .3); animation: fade-in-down .9s both; animation-delay: .3s; &--title { font-size: 20px; font-weight: 400; } } &__down { animation: bounce 4s 2s infinite; color: $fade-lighter; height: 34px; width: 34px; position: absolute; bottom: 10px; cursor: pointer; &:hover { color: #fff; } } //&__nav { // position: relative; // a { // font-size: 13px; // float: left; // line-height: 24px; // color: $fade-lighter; // margin: 0 20px 90px 0; // &:hover { // color: #fff; // text-decoration: none; // } // } // // img { // height: 14px; // width: 14px; // margin-right: 5px; // } // // svg { // margin-top: 5px; // } //} } .side { &__menu { position: fixed; z-index: 2; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 3px; font-size: 12px; text-transform: uppercase; color: #fff; top: 20px; left: 20px; display: flex; align-items: center; padding: 10px; cursor: pointer; transition: left .3s ease; &:hover { opacity: .6; } &--edge { left: -3px; font-size: 0; background-color: #333; } } &__main { display: none; opacity: 0; position: fixed; width: 100%; height: 100vh; z-index: 3; transition: all 1s ease; &--show { opacity: 1; .side__bg { background-color: rgba(0, 0, 0, 0.3); } .side__panel { animation-name: bounceInLeft; } } } &__bg { position: fixed; width: 100%; height: 100vh; top: 0; left: 0; z-index: 3; transition: background-color 1s ease; } &__panel { width: 280px; height: 100vh; overflow: auto; background: #000 url(../images/side-bg.gif) top / contain no-repeat; animation-name: bounceOutLeft; animation-duration: 1s; animation-fill-mode: both; position: fixed; left: 0; z-index: 4; top: 0; &::-webkit-scrollbar { display: none; } } &__top { position: fixed; bottom: 20px; right: 20px; height: 24px; width: 24px; cursor: pointer; color: #555; opacity: .5; transition: all .5s ease-out; &--bottom { transform: rotate(-180deg); } &:hover { opacity: 1; } } } .footer { font-size: 12px; padding: 20px 0; background-color: $black-bg; color: #888; margin-top: 200px; line-height: 24px; text-align: center; .wrapper { position: relative; &:after { background: url(../images/footer.png) no-repeat center center / cover; position: absolute; bottom: 88px; left: 0; width: 100%; pointer-events: none; content: ""; height: 300px; } } &__heart { display: inline-block; animation: beating 1s infinite; animation-timing-function: ease-out; margin: 0 3px 5px 5px; } svg { margin: 0 5px; } a { color: $fade-lighter; &:hover { text-decoration: none; color: #fff; } } } .articles { display: flex; flex-wrap: wrap; margin: 0 -20px; .item { flex: 1 1 300px; overflow: hidden; margin: 0 20px 40px; min-height: 300px; border-radius: 5px; box-shadow: 8px 14px 38px rgba(39, 44, 49, .06), 1px 3px 8px rgba(39, 44, 49, .03); transition: all .3s ease; display: flex; flex-direction: column; background-color: #fff; &--large { flex-direction: row; flex: 1 1 100%; .item__cover { flex: 1; height: auto; } .item__main { padding: 30px 40px; width: 357px; flex: unset; } } &:hover { box-shadow: 8px 28px 50px rgba(39, 44, 49, .07), 1px 6px 12px rgba(39, 44, 49, .04); transform: translate3D(0, -1px, 0) scale(1.02); } &__cover { background-size: cover; background-position: center center; height: 200px; } &__main { padding: 25px; box-sizing: border-box; display: flex; flex-direction: column; flex: 1; } &__tag { display: inline-block; margin-bottom: 4px; color: $gray; font-size: 12px; line-height: 14px; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; &:hover { text-decoration: none; color: rgba($gray, 0.8); } } &__title { margin-bottom: 10px; a { color: $black; font-size: 18px; line-height: 24px; &:hover { text-decoration: none; color: rgba($black, 0.8); } } sup { font-size: 12px; font-weight: normal; color: rgba($gray, 0.8); } } &__abstract { line-height: 24px; color: $black; flex: 1; &:hover { text-decoration: none; color: rgba($black, 0.8); } } &__meta { float: right; margin-top: 18px; color: $gray; &:hover { text-decoration: none; color: rgba($gray, 0.8); } } &__avatar { margin-top: 10px; float: left; img { height: 32px; width: 32px; } } } } .pagination { text-align: center; margin-top: -70px; &__item { width: 30px; height: 30px; background: $black; border-radius: 50%; display: inline-block; color: #fff; line-height: 30px; font-size: 12px; margin: 0 5px 40px; &:hover, &--active { opacity: 0.68; text-decoration: none; } &--omit { background-color: transparent; color: $black; } } } .article { background-color: #fff; &__bottom { background-color: #fff; position: relative; .fn__flex { flex-wrap: wrap; margin: 0 -20px; } .item { position: relative; flex: 1 1 300px; margin: 40px 20px 40px; box-shadow: 8px 14px 38px rgba(39, 44, 49, .06), 1px 3px 8px rgba(39, 44, 49, .03); border-radius: 5px; padding: 40px; overflow: hidden; text-align: center; box-sizing: border-box; &:before { content: ""; position: absolute; height: 100%; top: 0; left: 0; width: 100%; background: url(../images/header-bg.jpg) no-repeat center center; background-size: cover; filter: brightness(48%); } h3 { color: #fff; position: relative; margin-bottom: 20px; } ul { padding-left: 0; position: relative; list-style: none; } a { display: block; border-bottom: 1px solid rgba($gray, .8); padding: 10px 0; color: #fff; margin: 0 20px; } } } &__top { position: fixed; width: 100%; top: -61px; background-color: rgba(255, 255, 255, 0.9); border-bottom: 1px solid rgba($gray, 0.1); height: 60px; transition: all .3s ease; z-index: 1; .title { float: left; margin-left: 20px; line-height: 60px; font-size: 22px; } } &__share { float: right; position: relative; .item { height: 60px; width: 60px; float: left; text-align: center; padding: 20px 0; box-sizing: border-box; color: #fdc200; cursor: pointer; transition: all .3s ease; svg { height: 20px; width: 20px; } &[data-type="wechat"] { color: #3caf36; &:hover { background-color: #3caf36; } } &[data-type="twitter"] { color: #18a3fa; &:hover { background-color: #18a3fa; } } &[data-type="weibo"] { color: #f93; &:hover { background-color: #f93; } } &:hover { color: #fff; background-color: #fdc200; } &__qr { position: absolute; top: 61px; left: 60px; } } } .item { &__meta { padding-top: 76px; font-size: 14px; text-transform: uppercase; color: rgba($gray, .8); a { color: $gray; } } &__title { font-size: 28px; margin-bottom: 40px; sup { font-size: 14px; font-weight: normal; color: rgba($gray, .8); } } &__cover { height: 800px; background-size: cover; background-position: center center; max-width: 1404px; margin: 0 auto; border-radius: 5px; filter: sepia(0.2) contrast(1.3) opacity(.86); } &__content { padding: 70px 100px 0; box-sizing: border-box; background-color: #fff; &--article { margin-top: -164px; position: relative; } } &__tip { margin-bottom: 40px; border-radius: 5px; box-shadow: 8px 14px 38px rgba(39, 44, 49, .06), 1px 3px 8px rgba(39, 44, 49, .03); transition: all .3s ease; padding: 20px 0; text-align: center; background: #f4f8fb; cursor: pointer; font-size: 18px; &:hover { box-shadow: 8px 28px 50px rgba(39, 44, 49, .07), 1px 6px 12px rgba(39, 44, 49, .04); transform: translate3D(0, -1px, 0) scale(1.02); } } } } .post__toc { display: none; position: fixed; top: 84px; bottom: 80px; overflow: auto; padding-left: 3px; &::-webkit-scrollbar { display: none; } .article__toc { overflow: initial; border-left: 1px solid rgba($gray, 0.28); margin: 0; font-size: 14px; line-height: 24px; li.current a, a:hover { color: $link; } a { display: block; margin-top: -24px; color: $gray; } } li { &:before { position: relative; top: -2px; left: -4px; display: inline-block; width: 7px; height: 7px; content: ''; border-radius: 50%; } &.current:before { background-color: $link; } } } .comment { background-color: #f4f8fb; position: relative; &__wrapper { margin: 0 auto; padding: 0 100px 0.1px; box-sizing: border-box; } &-body-ref { position: absolute; left: 80px; width: 76%; } &__title { text-align: center; padding: 40px 0; color: $gray; } .item { margin-bottom: 40px; border: 1px solid $fade-lighter; border-radius: 5px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .04); list-style: none; padding: 20px; &__meta { color: rgba($gray, .8); font-size: 12px; } &__avatar { float: left; height: 40px; width: 40px; border-radius: 20px; border: 1px solid rgba(0, 0, 0, .04); margin: 0 20px 20px 0; background-size: cover; background-position: center center; } &__name { color: rgba($gray, .8); float: left; line-height: 40px; a { color: $gray; &:hover { color: rgba($gray, .8); } } } &:hover { .item__reply { display: block; } } } #comments { position: relative; } #comment { position: relative; margin-bottom: 30px; padding: 20px; border-radius: 3px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); border: 0; resize: none; cursor: pointer; width: 100%; box-sizing: border-box; } } .other { position: relative; &__title { margin: -220px 0 5px; color: #fff; font-size: 28px; text-align: center; font-weight: 400; } &__meta { color: #fff; font-size: 14px; text-align: center; &--list { margin-bottom: 154px; } } &__content { background-color: #fff; padding: 70px 100px; margin: 77px auto 40px; box-shadow: 8px 14px 38px rgba(39, 44, 49, 0.06), 1px 3px 8px rgba(39, 44, 49, 0.03); border-radius: 5px; } &__item { line-height: 20px; margin: 10px; white-space: nowrap; display: block; &--archive { width: 187px; display: inline-block; } span, div { color: $gray; font-size: 12px; word-break: break-all; white-space: normal; } } } @media (max-width: 768px) { .header { padding: 10px 0; &__h1 { padding-top: 60px; } &__h2 { margin-bottom: 40px; } &__nav { .fn__right { float: none; } a { margin: 0 10px 0 0; } } &--article { height: auto; .header__nav a { line-height: 24px; } } &--other { height: 360px; .header__nav a { line-height: 24px; } } } .articles { position: initial; margin: 10px -5px 0 -5px; .item { margin: 0 5px 10px; &--large { flex-direction: column; flex: 1 1 300px; .item__cover { height: 200px; } .item__main { padding: 25px; width: auto; flex: 1; } } } } .pagination { margin-top: 0; margin-bottom: 5px; &__item { margin-bottom: 5px; } } .footer { .fn__left, .fn__right { float: none; text-align: center; } } .article { &__top { height: 40px; .title { display: none; } .toc { display: block; float: left; line-height: 40px; padding: 0 10px; cursor: pointer; } } &__share .item { height: 40px; width: 40px; padding: 10px 0; } .item { &__meta { padding-top: 40px; } &__cover { display: none; } &__content { padding: 10px 10px 0; &--article { margin-top: -20px; } } } &__bottom { .fn__flex { margin: 0 0 10px 0; } .item { margin: 10px 0 0 0; } } } .comment { &__title { padding: 10px 0; } &__wrapper { padding: 0 10px 0.1px; } #comment, .item { margin-bottom: 10px; padding: 10px; &__avatar { margin-bottom: 10px; } } } .other { &__title { margin-top: -280px; } &__content { padding: 20px; margin: 40px auto 10px; } &__meta--list { margin-bottom: 40px; } } .post__toc { left: 0; background-color: #fff; width: 100%; top: 41px; bottom: 0; } }