Skip to content

Commit

Permalink
更新:增加收藏栏目
Browse files Browse the repository at this point in the history
  • Loading branch information
guanqr committed Sep 16, 2023
1 parent a081fc3 commit ca0a51c
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 13 deletions.
1 change: 1 addition & 0 deletions assets/scss/custom/_blogroll.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
width: 4em !important;
height: 4em !important;
margin: 0 1em 0 0 !important;
pointer-events: none;
z-index: 0;
}
}
Expand Down
56 changes: 56 additions & 0 deletions assets/scss/custom/_collection.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// 友链样式
.collection-link::after {
content: " ";
display: block;
clear: both;
}

.collection-link {
display: grid;
grid-gap: 0 1.5em;
grid-template-columns: 1fr 1fr 1fr;
}

.collection {
padding: 1em 0;
border-bottom: 1px dashed var(--color-contrast-low);
transition: all .5s;
text-decoration: none !important;
text-align: center;
overflow: hidden;
.overview {
text-decoration: none;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
margin: 0.5em;
}
.name {
font-weight: bold;
}
.excerpt {
font-size: 0.875em;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.cover {
width: 12em !important;
height: 16em !important;
margin: 1em auto 0 !important;
pointer-events: none;
z-index: 0;
}
}

@media (max-width: $maxWidth) {
.collection-link {
grid-template-columns: 1fr 1fr;
}
}

@media (max-width: 400px) {
.collection-link {
grid-template-columns: 1fr;
}
}
4 changes: 2 additions & 2 deletions assets/scss/custom/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
// 友链
@import "blogroll";

// 卡牌
@import "cards";
// 收藏展示
@import "collection";

// 一行多图
@import "gallery";
Expand Down
22 changes: 11 additions & 11 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -228,39 +228,39 @@ uglyURLs = false
# pre = "internal"
# post = "globe-asia"
# identifier = "series"
#[[menu.main]]
# url = "/cards/"
# name = "藏卡"
# weight = 6
# pre = "internal"
# post = "feather-alt"
# identifier = "cards"
[[menu.main]]
pageref = "/archives/"
name = "归档"
weight = 3
pre = "internal"
post = "archive"
identifier = "archives"
[[menu.main]]
url = "/exhibition/"
name = "收藏"
weight = 4
pre = "internal"
post = "feather-alt"
identifier = "cards"
[[menu.main]]
pageref = "/blogroll/"
name = "友链"
weight = 4
weight = 5
pre = "internal"
post = "pagelines"
identifier = "friends"
[[menu.main]]
pageref = "/about/"
name = "关于"
weight = 5
weight = 6
pre = "internal"
post = "user-circle"
identifier = "about"
[[menu.main]]
weight = 6
weight = 7
identifier = "theme-switcher"
[[menu.main]]
weight = 7
weight = 8
identifier = "lang-switcher"
#[[menu.main]]
# weight = 11
Expand Down
7 changes: 7 additions & 0 deletions content/zh/exhibition/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+++
title = "收藏小屋"
description = "这里展示了一些我近些年收藏的各种各样的小玩意儿,如果你也感兴趣的话,欢迎交流哦~"
date = "2023-09-15T23:24:47+08:00"
dropCap = false
comments = false
+++
59 changes: 59 additions & 0 deletions data/collection.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[[collection]]
name = "托尼·斯塔克"
url = "/collections/figures/one-sixth-scale-figure-tony-stark/"
cover = "/images/cover/one-sixth-scale-figure-tony-stark-cover.jpg"
source = "《钢铁侠 2》"
head = "ThreeStep Studio"
outfit = "Toribox"
shoe = "KantiZhu"
accessory = "Solid Factory"
organizer = "KantiZhu"
weight = 1

[[collection]]
name = "张牧之"
url = "/collections/figures/one-sixth-scale-figure-zhang-muzhi/"
cover = "/images/cover/one-sixth-scale-figure-zhang-muzhi-cover.jpg"
source = "《让子弹飞》"
head = "712 Studio"
outfit = "Y.M.A Studio"
shoe = "HotToys"
accessory = "712 Studio"
organizer = "712 Studio"
weight = 2

[[collection]]
name = "尼根"
url = "/collections/figures/one-sixth-scale-figure-negan/"
cover = "/images/cover/one-sixth-scale-figure-negan-cover.jpg"
source = "《行尸走肉》"
head = "Balloon Man"
outfit = "Toribox"
shoe = "Mr.E"
accessory = ""
organizer = "Hosam"
weight = 3

[[collection]]
name = "布鲁斯·韦恩"
url = "/collections/figures/one-sixth-scale-figure-bruce-wayne-bvs/"
cover = "/images/cover/one-sixth-scale-figure-bruce-wayne-cover.jpg"
source = "《蝙蝠侠大战超人》"
head = "六等星"
outfit = "Zihao Studio"
shoe = "Zihao Studio"
accessory = ""
organizer = "Zihao Studio"
weight = 4

[[collection]]
name = "屠夫比尔"
url = "/collections/figures/one-sixth-scale-figure-bill-the-butcher/"
cover = "/images/cover/one-sixth-scale-figure-bill-the-butcher-cover.jpg"
source = "《纽约黑帮》"
head = "Jay.sculptor"
outfit = "Toribox"
shoe = "NightT47"
accessory = "Robbie"
organizer = "Siruis & Yunaitou"
weight = 5
43 changes: 43 additions & 0 deletions layouts/exhibition/exhibition.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{ define "main" }}
<main class="main single" id="main">
<div class="main-inner">

{{ $attrs := partial "utils/data-attributes.html" . }}

<article class="content post h-entry" {{- with $attrs.align }} data-align="{{ . }}"{{ end }}>

<h1 class="post-title p-name">{{ (partial "utils/title.html" (dict "$" $ "title" $.Title)).htmlTitle }}</h1>

{{ if .Site.Params.displayPostDescription }}
{{ with .Params.description }}
{{- $raw := . -}}
<div class="post-description p-summary">{{ partial "utils/markdownify.html" (dict "$" $ "raw" $raw "isContent" false) }}</div>
{{ end }}
{{ end }}

<div class="post-body e-content">
<div class="collection-link">

{{ range .Site.Data.collection }}
{{ range sort . "weight" }}
<a class="collection" href="{{ .url }}">
<img class="cover" src="{{ .cover }}"/>
<div class="overview">
<div class="name">{{ .name }}</div>
<div class="excerpt">{{ .source }}</div>
</div>
</a>
{{ end }}
{{ end }}

</div>
{{ partial "utils/content.html" . }}
</div>

</article>

{{ partial "components/comments.html" . }}

</div>
</main>
{{ end }}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ca0a51c

Please sign in to comment.