feature(index): Build a homepage draft

This commit is contained in:
2021-12-28 17:05:11 +08:00
parent 73ae46f635
commit fe0f90592d
12 changed files with 719 additions and 97 deletions

161
source/css/Redemption.css Normal file
View File

@@ -0,0 +1,161 @@
html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 16px;
font-weight: 500;
font-variant-numeric: tabular-nums;
-webkit-font-smoothing: antialiased;
}
html::-webkit-scrollbar {
width: 10px;
height: 10px;
}
html::-webkit-scrollbar-thumb {
height: 40px;
border-radius: 16px;
}
body {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
}
.header {
width: 45rem;
padding: 7rem 0 3rem 0;
-webkit-background-size: cover;
background-size: cover;
display: flex;
justify-content: space-between;
align-items: center;
}
.header .title {
width: 6rem;
}
.header .title a {
font-size: 2.2rem;
letter-spacing: 0.2rem;
line-height: 2.4rem;
}
.header .description {
font-size: 0.9rem;
}
.header .description .socials {
display: flex;
justify-content: flex-end;
}
.header .description .socials a {
font-size: 1rem;
margin-left: 0.5rem;
cursor: pointer;
}
main {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
width: 50rem;
margin-top: 4rem;
}
main .post {
width: 45rem;
padding-top: 1rem;
}
main .post h1 a {
letter-spacing: 0.0625rem;
font-size: 1.375rem;
line-height: 1.75rem;
}
main .post p {
line-height: 1.5rem;
text-indent: 2rem;
}
main .post .info {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
flex-direction: row;
padding: 0.5rem 0 2rem 0;
}
main .post .info span {
font-weight: 400;
font-size: 0.75rem;
}
main .post .info a {
font-size: 0.75rem;
}
main .post .info .date,
main .post .info .tag {
margin: 0 0.5rem;
}
main .post .info .date i,
main .post .info .tag i {
position: relative;
top: 0.05rem;
}
main .pagenav {
display: flex;
justify-content: space-between;
padding: 2rem 0 5rem 0;
}
main .pagenav a {
text-decoration: none;
margin: 0 2rem;
}
footer {
padding: 2rem 0;
}
footer .copyright {
font-size: 0.8rem;
}
footer .copyright a {
margin: 0 0.125rem;
}
/*animation starts*/
@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-3px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeInDown {
0% {
opacity: 0;
-moz-transform: translateY(-3px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-o-keyframes fadeInDown {
0% {
opacity: 0;
-o-transform: translateY(-3px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeInDown {
0% {
opacity: 0;
transform: translateY(-3px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
/*animation ends*/

202
source/css/Redemption.scss Normal file
View File

@@ -0,0 +1,202 @@
@charset "UTF-8";
// 全局 HTML 配置
html {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
font-size: 16px;
font-weight: 500;
font-variant-numeric: tabular-nums;
-webkit-font-smoothing: antialiased;
}
// 滚动条
html::-webkit-scrollbar {
width: 10px;
height: 10px;
}
html::-webkit-scrollbar-thumb {
height: 40px;
border-radius: 16px;
}
// Body 主体
body {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
}
// Header 头部
.header {
width: 45rem;
padding: 7rem 0 3rem 0;
-webkit-background-size: cover;
background-size: cover;
display: flex;
justify-content: space-between;
align-items: center;
// 站点标题
.title {
width: 6rem;
a {
font-size: 2.2rem;
letter-spacing: 0.2rem;
line-height: 2.4rem;
}
}
// 二级标题
.description {
font-size: 0.9rem;
.socials {
display: flex;
justify-content: flex-end;
a {
font-size: 1rem;
margin-left: 0.5rem;
cursor: pointer;
}
}
}
}
// main 主体
main {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
width: 50rem;
margin-top: 4rem;
.post {
width: 45rem;
padding-top: 1rem;
h1 {
a {
letter-spacing: 0.0625rem;
font-size: 1.375rem;
line-height: 1.75rem;
}
}
p {
line-height: 1.5rem;
text-indent: 2rem;
}
.info {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
flex-direction: row;
padding: 0.5rem 0 2rem 0;
span {
font-weight: 400;
font-size: 0.75rem;
}
a {
font-size: 0.75rem;
}
.date,
.tag {
margin: 0 0.5rem;
i {
position: relative;
top: 0.05rem;
}
}
}
}
.pagenav {
display: flex;
justify-content: space-between;
padding: 2rem 0 5rem 0;
a {
text-decoration: none;
margin: 0 2rem;
}
}
}
footer {
padding: 2rem 0;
.copyright {
font-size: 0.8rem;
a {
margin: 0 0.125rem;
}
}
}
/*animation starts*/
@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-3px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@-moz-keyframes fadeInDown {
0% {
opacity: 0;
-moz-transform: translateY(-3px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}
@-o-keyframes fadeInDown {
0% {
opacity: 0;
-o-transform: translateY(-3px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}
@keyframes fadeInDown {
0% {
opacity: 0;
transform: translateY(-3px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
/*animation ends*/

File diff suppressed because one or more lines are too long

79
source/css/color.css Normal file
View File

@@ -0,0 +1,79 @@
html {
background-color: #f5f5f5;
color: #1f1f1f;
}
html::-webkit-scrollbar-thumb {
background-color: #0000000d;
}
html::-webkit-scrollbar-thumb:hover {
background-color: #00000026;
}
::selection {
background: #0095ff1a;
}
body {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
}
.header .title a span {
color: black;
}
.header .title a span:hover {
color: rgba(0, 0, 0, 0.65);
}
.header .description {
color: rgba(0, 0, 0, 0.65);
}
.header .description .socials a {
color: rgba(0, 0, 0, 0.65);
}
.header .description .socials a:hover {
color: rgba(0, 0, 0, 0.85);
}
main {
background: #ffffff;
box-shadow: 0 0.375rem 1rem -0.5rem rgba(0, 0, 0, 0.08);
}
main .post h1 a {
color: black;
}
main .post p {
color: rgba(0, 0, 0, 0.85);
}
main .post .info {
border-bottom: 1px solid #f3f3f3;
}
main .post .info span {
color: rgba(0, 0, 0, 0.65);
}
main .post .info a {
color: rgba(0, 0, 0, 0.65);
}
main .post .info .date i,
main .post .info .tag i {
color: rgba(0, 0, 0, 0.85);
}
main .pagenav {
border-bottom: 1px solid #f2f2f2;
}
main .pagenav a {
color: black;
}
main .pagenav a:hover {
color: rgba(0, 0, 0, 0.65);
}
footer .copyright a {
color: rgba(0, 0, 0, 0.25);
}
footer .copyright a:hover {
color: rgba(0, 0, 0, 0.85);
}

125
source/css/color.scss Normal file
View File

@@ -0,0 +1,125 @@
// HTML
html {
background-color: #f5f5f5;
color: #1f1f1f;
}
// 滚动条
html::-webkit-scrollbar-thumb {
background-color: #0000000d;
}
html::-webkit-scrollbar-thumb:hover {
background-color: #00000026;
}
::selection {
background: #0095ff1a;
}
// Body
body {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
}
// Header 头部
.header {
// 站点标题
.title {
a {
span {
color: rgb(0, 0, 0);
&:hover {
color: rgba(0, 0, 0, 0.65);
}
}
}
}
// 二级标题
.description {
color: rgba(0, 0, 0, 0.65);
.socials {
a {
color: rgba(0, 0, 0, 0.65);
&:hover {
color: rgba(0, 0, 0, 0.85);
}
}
}
}
}
// main 主体
main {
background: #ffffff;
box-shadow: 0 0.375rem 1rem -0.5rem rgba(0, 0, 0, 0.08);
.post {
h1 {
a {
color: rgba(0, 0, 0, 1);
}
}
p {
color: rgba(0, 0, 0, 0.85);
}
.info {
border-bottom: 1px solid #f3f3f3;
span {
color: rgb(0, 0, 0, 0.65);
}
a {
color: rgb(0, 0, 0, 0.65);
}
.date,
.tag {
i {
color: rgb(0, 0, 0, 0.85);
}
}
}
}
.pagenav {
border-bottom: 1px solid #f2f2f2;
a {
color: rgb(0, 0, 0);
&:hover {
color: rgb(0, 0, 0, 0.65);
}
}
}
}
// 脚注
footer {
.copyright {
a {
color: rgb(0, 0, 0, 0.25);
&:hover {
color: rgb(0, 0, 0, 0.85);
}
}
}
}

View File

@@ -1,3 +0,0 @@
html {
width: 100%;
}

View File

@@ -1,3 +0,0 @@
html{
width: 100%;
}

View File

@@ -346,4 +346,11 @@
[hidden] {
display: none;
}
}
/*
* 去除链接下划线
*/
a {
text-decoration: none;
}