Browse Source

feat: 更新头像样式,优化时间线布局,调整背景图像显示

route
谢亚昕 1 month ago
parent
commit
07a5b2ff22
  1. 20
      public/css/page/index.css
  2. BIN
      public/static/bg.jpg
  3. 2
      public/styles.css
  4. 4
      src/views/htmx/footer.pug
  5. 10
      src/views/page/index/index.pug

20
public/css/page/index.css

@ -8,12 +8,14 @@
width: 100px;
height: 100px;
margin: 0 auto;
position: relative;
}
.avatar-container .author{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
}
.avatar-container:hover .avatar {
transform: rotate(360deg);
@ -30,6 +32,24 @@
transition: 0.5s transform ease-in-out, 0.5s left ease-in-out;
}
.time-line{
display: flex;
flex-direction: column;
justify-content: center;
}
.time-line-item {
color: white;
}
.time-line-item.left {
border-right: 1px solid white;
}
.time-line-item.right {
border-left: 1px solid white;
}
@media screen and (max-width: 768px) {
.home-hero {
margin: 0;

BIN
public/static/bg.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB

2
public/styles.css

@ -22,7 +22,7 @@ body::after {
right: 0;
bottom: 0;
background-image: var(--bg);
background-size: 100% 100%;
background-size: cover;
background-repeat: no-repeat;
background-color: #f9f9f9;
filter: brightness(.55);

4
src/views/htmx/footer.pug

@ -6,10 +6,6 @@
a(href="/") 首页
li
a(href="/about") 关于我们
//- li
//- a(href="/contact") 联系方式
//- li
//- a(href="/privacy") 隐私
style.
.footer-panel {
background: rgba(34,34,34,.25);

10
src/views/page/index/index.pug

@ -4,10 +4,10 @@ block pageHead
+css("css/page/index.css")
block pageContent
.card.home-hero
.home-hero
.avatar-container
.author 罗非鱼
.author #{$site.site_author}
img.avatar(src="https://alist.xieyaxin.top/p/%E6%B8%B8%E5%AE%A2%E6%96%87%E4%BB%B6/%E5%85%AC%E5%85%B1%E4%BF%A1%E6%81%AF/avatar.jpg", alt="")
h1 #{$site.site_title}
p.subtitle #{$site.site_description}
ul.time-line
li.time-line-item.left dsad
li.time-line-item.right dsad

Loading…
Cancel
Save