Novel author

This commit is contained in:
VnPower
2024-02-25 10:37:13 +07:00
parent 923867ec91
commit bf16eddfa3
5 changed files with 77 additions and 56 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ func GetNovelRelated(c *fiber.Ctx, id string) ([]NovelBrief, error) {
}
// hard-coded value, may change
URL := http.GetNovelRelatedURL(id, 100)
URL := http.GetNovelRelatedURL(id, 50)
response, err := http.UnwrapWebAPIRequest(c.Context(), URL, "")
if err != nil {
+6 -1
View File
@@ -24,10 +24,15 @@ func NovelPage(c *fiber.Ctx) error {
return err
}
// todo: passing ArtWorkData{} here will not work. maybe lowercase?
user, err := core.GetUserBasicInformation(c, novel.UserID)
if err != nil {
return err
}
return c.Render("pages/novel", fiber.Map{
"Novel": novel,
"NovelRelated": related,
"User": user,
"Title": novel.Title,
})
}
+26 -25
View File
@@ -576,6 +576,32 @@ nav .sidebar-item img {
margin-right: 5px;
}
.illust-attr {
display: flex;
align-items: center;
margin-top: 10px;
margin-bottom: 10px;
}
.illust-attr .illust-avatar {
width: 62px;
height: 62px;
border-radius: 50px;
object-fit: cover;
object-position: center top;
}
.illust-attr .attr-wrap {
margin-left: 5px;
}
.illust-attr .attr-wrap .illust-title {
font-weight: bold;
}
.illust-attr .attr-wrap .illust-author {
font-size: 0.8em;
}
.illust-attr .attr-wrap a {
color: #aaa;
}
.illust {
background-color: #222;
border-radius: 5px;
@@ -593,31 +619,6 @@ nav .sidebar-item img {
width: auto;
max-width: 100%;
}
.illust .illust-attr {
display: flex;
align-items: center;
margin-top: 10px;
margin-bottom: 10px;
}
.illust .illust-attr .illust-avatar {
width: 62px;
height: 62px;
border-radius: 50px;
object-fit: cover;
object-position: center top;
}
.illust .illust-attr .attr-wrap {
margin-left: 5px;
}
.illust .illust-attr .attr-wrap .illust-title {
font-weight: bold;
}
.illust .illust-attr .attr-wrap .illust-author {
font-size: 0.8em;
}
.illust .illust-attr .attr-wrap .illust-author a {
color: #aaa;
}
.illust .illust-description {
font-size: 0.85em;
}
+29 -28
View File
@@ -666,6 +666,35 @@ nav {
}
}
.illust-attr {
display: flex;
align-items: center;
margin-top: 10px;
margin-bottom: 10px;
.illust-avatar {
width: 62px;
height: 62px;
border-radius: 50px;
object-fit: cover;
object-position: center top;
}
.attr-wrap {
margin-left: 5px;
.illust-title {
font-weight: bold;
}
.illust-author {
font-size: 0.8em;
}
a {
color: $fg-secondary;
}
}
}
.illust {
background-color: $bg-secondary;
border-radius: $border-radius;
@@ -685,34 +714,6 @@ nav {
}
}
.illust-attr {
display: flex;
align-items: center;
margin-top: 10px;
margin-bottom: 10px;
.illust-avatar {
width: 62px;
height: 62px;
border-radius: 50px;
object-fit: cover;
object-position: center top;
}
.attr-wrap {
margin-left: 5px;
.illust-title {
font-weight: bold;
}
.illust-author {
font-size: 0.8em;
a {
color: $fg-secondary;
}
}
}
}
.illust-description {
font-size: 0.85em;
+15 -1
View File
@@ -62,9 +62,23 @@
<div class="novel-content">
{{ raw: renderNovel(Novel.Content) }}
</div>
<div class="illust-attr">
<a href="/users/{{ User.ID }}"
><img
src="{{ User.Avatar }}"
alt="{{ User.Name }}"
class="illust-avatar"
/>
</a>
<div class="attr-wrap">
<div class="illust-title">
<a href="/users/{{ User.ID }}">{{ User.Name }}</a>
</div>
</div>
</div>
<div class="novel-container">
{{ range NovelRelated }}
{{ include "components/novel-tn" . }}
{{ include "components/novel-tn" . }}
{{ end }}
</div>
</div>