stuff
This commit is contained in:
parent
f1d9552ab8
commit
4be289b876
4 changed files with 55 additions and 75 deletions
3
main.go
3
main.go
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"pixivfe/configs"
|
||||
"pixivfe/handler"
|
||||
|
@ -23,7 +24,7 @@ func setupRouter() *fiber.App {
|
|||
|
||||
server := fiber.New(fiber.Config{
|
||||
AppName: "PixivFE",
|
||||
DisableStartupMessage: true,
|
||||
DisableStartupMessage: false,
|
||||
Views: engine,
|
||||
Prefork: true,
|
||||
JSONEncoder: json.Marshal,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
{{ if isset(Title) }}
|
||||
<title>{{ Title }} - PixivFE</title>
|
||||
{{ else }}
|
||||
|
@ -14,78 +15,56 @@
|
|||
<meta name="referrer" content="no-referrer, same-origin" />
|
||||
<link href="/css/style.css" rel="stylesheet" />
|
||||
<link href="/css/template.css" rel="stylesheet" />
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
<nav class="navbar">
|
||||
<ul class="navbar-list">
|
||||
<li class="navbar-item">
|
||||
<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"
|
||||
/>
|
||||
</label>
|
||||
<ul class="navbar-list">
|
||||
<li class="navbar-item">
|
||||
<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" />
|
||||
</label>
|
||||
|
||||
<div class="sidebar">
|
||||
<ul class="sidebar-list">
|
||||
<a class="sidebar-item" href="/discovery">
|
||||
<img src="/assets/compass.png" alt="icon" />Discovery</a
|
||||
>
|
||||
<a class="sidebar-item" href="/ranking">
|
||||
<img src="/assets/crown.png" alt="icon" />Ranking</a
|
||||
>
|
||||
<a class="sidebar-item" href="/newest">
|
||||
<img src="/assets/sparkling.png" alt="icon" />Newest</a
|
||||
>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<ul class="sidebar-list">
|
||||
<a class="sidebar-item" href="/discovery">
|
||||
<img src="/assets/compass.png" alt="icon" />Discovery</a>
|
||||
<a class="sidebar-item" href="/ranking">
|
||||
<img src="/assets/crown.png" alt="icon" />Ranking</a>
|
||||
<a class="sidebar-item" href="/newest">
|
||||
<img src="/assets/sparkling.png" alt="icon" />Newest</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<a href="/" class="navbar-brand">
|
||||
<img src="/favicon.ico" alt="PixivFE's logo" />
|
||||
<b>PixivFE</b>
|
||||
</a>
|
||||
</li>
|
||||
<li class="navbar-item search-bar">
|
||||
<form
|
||||
class="search-form"
|
||||
action="/tags"
|
||||
method="post"
|
||||
autocomplete="off"
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
class="search-form-text"
|
||||
placeholder="⌕ Search artworks..."
|
||||
/>
|
||||
<input type="submit" hidden />
|
||||
</form>
|
||||
</li>
|
||||
<li class="navbar-item">
|
||||
<a href="#" class="navbar-button">
|
||||
<img src="/assets/search.png" alt="Search" width="30" height="30" />
|
||||
</a>
|
||||
<a href="#" class="navbar-button">
|
||||
<img
|
||||
src="/assets/settings.png"
|
||||
alt="Settings"
|
||||
width="30"
|
||||
height="30"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="/" class="navbar-brand">
|
||||
<img src="/favicon.ico" alt="PixivFE's logo" />
|
||||
<b>{{ OriginalURL }}</b>
|
||||
</a>
|
||||
</li>
|
||||
<li class="navbar-item search-bar">
|
||||
<form class="search-form" action="/tags" method="post" autocomplete="off">
|
||||
<input type="text" name="name" class="search-form-text" placeholder="⌕ Search artworks..." />
|
||||
<input type="submit" hidden />
|
||||
</form>
|
||||
</li>
|
||||
<li class="navbar-item">
|
||||
<a href="#" class="navbar-button">
|
||||
<img src="/assets/search.png" alt="Search" width="30" height="30" />
|
||||
</a>
|
||||
<a href="#" class="navbar-button">
|
||||
<img src="/assets/settings.png" alt="Settings" width="30" height="30" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{{ embed() }}
|
||||
|
||||
<div class="footer">
|
||||
<a href="https://codeberg.org/VnPower/pixivfe">
|
||||
<p>Join the development on Codeberg!</p>
|
||||
</a>
|
||||
<a href="https://codeberg.org/VnPower/pixivfe">
|
||||
<p>Join the development on Codeberg!</p>
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="container">
|
||||
<h2>Newest works from all users</h2>
|
||||
<div class="switcher">
|
||||
<span class="switch-title">Filter</span>
|
||||
<a href="/newest" class="switch-button">Safe</a>
|
||||
<a href="/newest?mode=r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div>{{ include "small-tn" Items }}</div>
|
||||
<h2>Newest works from all users</h2>
|
||||
<div class="switcher">
|
||||
<span class="switch-title">Filter</span>
|
||||
<a href="/newest" class="switch-button">Safe</a>
|
||||
<a href="/newest?mode=r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div>{{ include "small-tn" Items }}</div>
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,7 @@ func index_page(c *fiber.Ctx) error {
|
|||
// "Spotlights": spotlight,
|
||||
// "Newest": newest,
|
||||
// })
|
||||
return c.Render("temp", fiber.Map{"Title": "Test"})
|
||||
return c.Render("temp", fiber.Map{"Title": "Landing"})
|
||||
}
|
||||
|
||||
func user_page(c *fiber.Ctx) error {
|
||||
|
|
Loading…
Reference in a new issue