rename views/ to assets/
rename folders within
@@ -24,4 +24,4 @@ jobs:
|
||||
mv ./leanify /usr/local/bin
|
||||
|
||||
- name: Compress assets
|
||||
run: leanify -p ./views/assets
|
||||
run: leanify -p ./assets/img
|
||||
|
||||
@@ -20,7 +20,7 @@ RUN addgroup -g 1000 -S pixivfe && \
|
||||
|
||||
# Copy the compiled application and other necessary files from the builder stage
|
||||
COPY --from=builder /app/pixivfe /app/pixivfe
|
||||
COPY --from=builder /app/views /app/views
|
||||
COPY --from=builder /app/assets /app/assets
|
||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
# Include entrypoint script and ensure it's executable
|
||||
RUN chmod +x /entrypoint.sh && \
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 924 B |
|
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 284 B |
|
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 560 B |
|
Before Width: | Height: | Size: 873 B After Width: | Height: | Size: 873 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 893 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 857 B |
|
Before Width: | Height: | Size: 749 B After Width: | Height: | Size: 749 B |
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 421 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 659 B After Width: | Height: | Size: 659 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 356 B |
|
Before Width: | Height: | Size: 91 B After Width: | Height: | Size: 91 B |
|
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 910 B After Width: | Height: | Size: 910 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 886 B After Width: | Height: | Size: 886 B |
@@ -49,38 +49,38 @@
|
||||
<span class="sidebar-container">
|
||||
<input type="checkbox" class="sidebar-toggler" id="sidebar-toggler" />
|
||||
<label for="sidebar-toggler" class="sidebar-label">
|
||||
<img src="/assets/menu-thin.png" alt="Menu" width="30" height="30" />
|
||||
<img src="/img/menu-thin.png" alt="Menu" width="30" height="30" />
|
||||
</label>
|
||||
<div class="sidebar">
|
||||
<ul class="sidebar-list">
|
||||
<a class="sidebar-item" href="/discovery">
|
||||
<img src="/assets/compass.png" alt="compass" />Discovery</a>
|
||||
<img src="/img/compass.png" alt="compass" />Discovery</a>
|
||||
<a class="sidebar-item" href="/ranking">
|
||||
<img src="/assets/crown.png" alt="crown" />Ranking</a>
|
||||
<img src="/img/crown.png" alt="crown" />Ranking</a>
|
||||
<a class="sidebar-item" href="/rankingCalendar">
|
||||
<img src="/assets/calendar.png" alt="calendar" />Ranking history</a>
|
||||
<img src="/img/calendar.png" alt="calendar" />Ranking history</a>
|
||||
<a class="sidebar-item" href="/newest">
|
||||
<img src="/assets/sparkling.png" alt="sparkling" />Newest</a>
|
||||
<img src="/img/sparkling.png" alt="sparkling" />Newest</a>
|
||||
<br />
|
||||
<a class="sidebar-item" href="/self/followingWorks">
|
||||
<img src="/assets/users.png" alt="users" />Latest by followed</a>
|
||||
<img src="/img/users.png" alt="users" />Latest by followed</a>
|
||||
<a class="sidebar-item" href="/self/bookmarks">
|
||||
<img src="/assets/heart.png" alt="heart" />Your bookmarks</a>
|
||||
<img src="/img/heart.png" alt="heart" />Your bookmarks</a>
|
||||
<a class="sidebar-item" href="/self">
|
||||
<img src="/assets/user.png" alt="user" />Your profile</a>
|
||||
<img src="/img/user.png" alt="user" />Your profile</a>
|
||||
<br />
|
||||
<a class="sidebar-item" href="/settings">
|
||||
<img src="/assets/settings.png" alt="settings" />Settings</a>
|
||||
<img src="/img/settings.png" alt="settings" />Settings</a>
|
||||
<a class="sidebar-item" href="/about">
|
||||
<img src="/assets/about.svg" alt="about" />About</a>
|
||||
<img src="/img/about.svg" alt="about" />About</a>
|
||||
<br />
|
||||
<a class="sidebar-item" href="https://codeberg.org/vnpower/pixivfe">
|
||||
<img src="/assets/globe.png" alt="globe" />Source code</a>
|
||||
<img src="/img/globe.png" alt="globe" />Source code</a>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="/assets/favicon.ico" alt="PixivFE icon" />
|
||||
<img src="/img/favicon.ico" alt="PixivFE icon" />
|
||||
<span>PixivFE</span>
|
||||
</a>
|
||||
</span>
|
||||
@@ -88,13 +88,13 @@
|
||||
<span class="navbar-entry">
|
||||
<form action="/tags" method="post" class="search-form" autocomplete="off">
|
||||
<input type="text" name="name" required="true" class="search-form-text" placeholder="⌕ Search artworks..." />
|
||||
<label class="navbar-entry"><img src="/assets/search.svg" alt="Search" /><input type="submit"
|
||||
<label class="navbar-entry"><img src="/img/search.svg" alt="Search" /><input type="submit"
|
||||
hidden /></label>
|
||||
</form>
|
||||
</span>
|
||||
|
||||
<a class="navbar-entry" href="/settings">
|
||||
<img src="/assets/cog.svg" alt="Settings" />
|
||||
<img src="/img/cog.svg" alt="Settings" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-shadow"></div>
|
||||
@@ -37,20 +37,20 @@
|
||||
<div class="artwork-actions">
|
||||
{{ if isset(.BookmarkData) && LoggedIn }}
|
||||
<a href="/self/deleteBookmark/{{ .BookmarkID }}?r={{ OriginalURL }}">
|
||||
<img src="/assets/heart-red.png" alt="Bookmarked" />
|
||||
<img src="/img/heart-red.png" alt="Bookmarked" />
|
||||
</a>
|
||||
{{ else }}
|
||||
<a href="/self/addBookmark/{{ .ID }}?r={{ OriginalURL }}">
|
||||
<img src="/assets/heart-outline.png" alt="Bookmark" />
|
||||
<img src="/img/heart-outline.png" alt="Bookmark" />
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Liked && LoggedIn}}
|
||||
<img src="/assets/like-blue.png" alt="Liked" />
|
||||
<img src="/img/like-blue.png" alt="Liked" />
|
||||
|
||||
{{ else }}
|
||||
<a href="/self/like/{{ .ID }}?r={{ OriginalURL }}">
|
||||
<img src="/assets/like-outline.png" alt="Like" />
|
||||
<img src="/img/like-outline.png" alt="Like" />
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -62,19 +62,19 @@
|
||||
</div>
|
||||
<div class="illust-tags">
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/eye.png" alt="Views" />
|
||||
<img src="/img/eye.png" alt="Views" />
|
||||
{{ .Views }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/heart-solid.png" alt="Bookmarks" />
|
||||
<img src="/img/heart-solid.png" alt="Bookmarks" />
|
||||
{{ .Bookmarks }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/like.png" alt="Likes" />
|
||||
<img src="/img/like.png" alt="Likes" />
|
||||
{{ .Likes }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/calendar.png" alt="Date" />
|
||||
<img src="/img/calendar.png" alt="Date" />
|
||||
{{ parseTime: .Date }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -52,11 +52,11 @@
|
||||
|
||||
<div class="illust-tags">
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/heart-solid.png" alt="Bookmarks" />
|
||||
<img src="/img/heart-solid.png" alt="Bookmarks" />
|
||||
{{ .Bookmarks }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/calendar.png" alt="Date" />
|
||||
<img src="/img/calendar.png" alt="Date" />
|
||||
{{ parseTime: .CreateDate }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -40,19 +40,19 @@
|
||||
|
||||
<div class="illust-tags">
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/eye.png" alt="Views" />
|
||||
<img src="/img/eye.png" alt="Views" />
|
||||
{{ Novel.Views }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/heart-solid.png" alt="Bookmarks" />
|
||||
<img src="/img/heart-solid.png" alt="Bookmarks" />
|
||||
{{ Novel.Bookmarks }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/like.png" alt="Likes" />
|
||||
<img src="/img/like.png" alt="Likes" />
|
||||
{{ Novel.Likes }}
|
||||
</span>
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/calendar.png" alt="Date" />
|
||||
<img src="/img/calendar.png" alt="Date" />
|
||||
{{ parseTime: Novel.CreateDate }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -65,7 +65,7 @@
|
||||
{{ url := "/settings/novelFontType?noredirect=t&r=" + OriginalURL + "#content" }}
|
||||
<input type="checkbox" class="dropdown-toggler" id="font-type-toggler" />
|
||||
<label for="font-type-toggler" class="dropdown-toggler-label">
|
||||
<img src="/assets/font-family.png" alt="Font family" />
|
||||
<img src="/img/font-family.png" alt="Font family" />
|
||||
</label>
|
||||
<div class="dropdown-content">
|
||||
<div>Font type</div>
|
||||
@@ -79,12 +79,12 @@
|
||||
</form>
|
||||
</div>
|
||||
</span>
|
||||
<img src="/assets/font-size.png" alt="Font size" />
|
||||
<img src="/img/font-size.png" alt="Font size" />
|
||||
<span class="dropdown">
|
||||
{{ url := "/settings/novelViewMode?r=" + OriginalURL + "#content" }}
|
||||
<input type="checkbox" class="dropdown-toggler" id="view-mode-toggler" />
|
||||
<label for="view-mode-toggler" class="dropdown-toggler-label">
|
||||
<img src="/assets/orientation.png" alt="Orientation" />
|
||||
<img src="/img/orientation.png" alt="Orientation" />
|
||||
</label>
|
||||
<div class="dropdown-content">
|
||||
<div>Text orientation</div>
|
||||
@@ -18,11 +18,11 @@
|
||||
<small> {{ User.Following }} Following | {{ User.MyPixiv }} MyPixiv </small>
|
||||
<div class="user-social">
|
||||
{{ if User.Webpage }}
|
||||
<span><a href="{{ User.Webpage }}"><img src="/assets/globe.png" alt="Webpage" /></a></span>
|
||||
<span><a href="{{ User.Webpage }}"><img src="/img/globe.png" alt="Webpage" /></a></span>
|
||||
{{ end }} {{ range index, item := User.Social }}
|
||||
<span>
|
||||
<a href="{{ item.url }}">
|
||||
<img src="/assets/{{ index }}.svg" alt="{{ index }}" />
|
||||
<img src="/img/{{ index }}.svg" alt="{{ index }}" />
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
|
||||
func CanRequestSkipLimiter(c *fiber.Ctx) bool {
|
||||
path := c.Path()
|
||||
return strings.HasPrefix(path, "/assets/") ||
|
||||
return strings.HasPrefix(path, "/img/") ||
|
||||
strings.HasPrefix(path, "/css/") ||
|
||||
strings.HasPrefix(path, "/js/") ||
|
||||
strings.HasPrefix(path, "/proxy/s.pximg.net/")
|
||||
@@ -50,7 +50,7 @@ func main() {
|
||||
config.GlobalServerConfig.InitializeConfig()
|
||||
core_http.Init()
|
||||
|
||||
engine := jet.New("./views/pages", ".jet.html")
|
||||
engine := jet.New("./assets/layout", ".jet.html")
|
||||
engine.AddFuncMap(serve.GetTemplateFunctions())
|
||||
if config.GlobalServerConfig.InDevelopment {
|
||||
engine.Reload(true)
|
||||
@@ -238,11 +238,11 @@ func main() {
|
||||
return nil
|
||||
})
|
||||
|
||||
server.Static("/favicon.ico", "./views/assets/favicon.ico")
|
||||
server.Static("/robots.txt", "./views/assets/robots.txt")
|
||||
server.Static("/assets/", "./views/assets")
|
||||
server.Static("/css/", "./views/css")
|
||||
server.Static("/js/", "./views/js")
|
||||
server.Static("/favicon.ico", "./assets/img/favicon.ico")
|
||||
server.Static("/robots.txt", "./assets/robots.txt")
|
||||
server.Static("/img/", "./assets/img")
|
||||
server.Static("/css/", "./assets/css")
|
||||
server.Static("/js/", "./assets/js")
|
||||
|
||||
server.Use(recover.New(recover.Config{EnableStackTrace: config.GlobalServerConfig.InDevelopment}))
|
||||
|
||||
@@ -301,7 +301,7 @@ func main() {
|
||||
// run sass when in development mode
|
||||
if config.GlobalServerConfig.InDevelopment {
|
||||
go func() {
|
||||
cmd := exec.Command("sass", "--watch", "views/css")
|
||||
cmd := exec.Command("sass", "--watch", "assets/css")
|
||||
cmd.Stdout = os.Stderr // Sass quirk
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true, Pdeathsig: syscall.SIGHUP}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
package pages
|
||||
|
||||