mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
176 lines
8.5 KiB
HTML
176 lines
8.5 KiB
HTML
<!doctype html>
|
|
<html lang="en" data-bs-theme="dark">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="description" content="Read this on PixivFE" />
|
|
|
|
{{ title := "PixivFE" }}
|
|
{{- if isset(.Title) -}}
|
|
{{ title = .Title + " - PixivFE" }}
|
|
{{ end -}}
|
|
<title>{{ title }}</title>
|
|
|
|
<link href="/img/favicon.png" rel="icon" />
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
|
|
<!-- TODO: figure out custom themes (e.g. charcoal theme) -->
|
|
<link href="/css/bootstrap-style.css" rel="stylesheet" />
|
|
|
|
<script src="/js/htmx@1.9.10.min.js"
|
|
integrity="sha384-D1Kt99CQMDuVetoL1lrYwg5t+9QdHe7NLX/SoJYkXDFfX37iInKRy5xLSi8nO7UC"></script>
|
|
|
|
<!-- TODO: load these JS files only on pages that require them -->
|
|
<script src="/js/illust-preview.js" defer></script>
|
|
<!-- TODO: can be annoying when you accidentally scroll inside a horizontal scroll area instead of the main content -->
|
|
<!-- <script src="/js/horizontal-scroll.js" defer></script> -->
|
|
<script src="/js/comment-pagination.js" defer></script>
|
|
<script src="/js/proxy-toggle.js" defer></script>
|
|
|
|
<meta content="summary_large_image" name="twitter:card" />
|
|
|
|
<meta property="og:title" content="{{ title }}" />
|
|
<meta property="og:site_name" content="PixivFE" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="{{ PageURL }}" />
|
|
|
|
{{- if isset(.MetaAuthor) }}
|
|
<link rel="alternate" type="application/json+oembed"
|
|
href="{{ BaseURL }}/oembed?a={{ .MetaAuthor }}&u={{ BaseURL }}/users/{{ .MetaAuthorID }}">
|
|
{{- else }}
|
|
<link rel="alternate" type="application/json+oembed" href="{{ BaseURL }}/oembed">
|
|
{{- end -}}
|
|
|
|
{{- if isset(.MetaDescription) }}
|
|
<meta property="og:description" content="{{.MetaDescription}}" />
|
|
{{- end -}}
|
|
|
|
{{- if isset(.MetaImage) }}
|
|
<meta property="og:image" content="{{ .MetaImage }}" />
|
|
{{- end }}
|
|
</head>
|
|
|
|
<body class="bg-black">
|
|
<!-- mb-4 for spacing between the navbar and main content -->
|
|
<nav class="navbar bg-charcoal-surface1 py-3 mb-4">
|
|
<div class="container">
|
|
<div class="d-flex">
|
|
<!-- Offcanvas menu for navigation items -->
|
|
<button class="navbar-toggler border-0 p-0 me-3" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="offcanvas offcanvas-start bg-charcoal-surface1 border-0" tabindex="-1" id="offcanvasNavbar" aria-labelledby="offcanvasNavbarLabel">
|
|
<div class="offcanvas-header d-flex align-items-start">
|
|
<div class="d-flex flex-column w-75">
|
|
<!-- TODO: fw-bold for the title? can't decide -->
|
|
<h2 class="display-6 offcanvas-title mb-0" id="offcanvasNavbarLabel">PixivFE</h2>
|
|
<span class="h6 text-muted mb-0">A privacy-respecting alternative front-end for Pixiv that doesn't suck.</span>
|
|
</div>
|
|
<!-- TODO: p-4 is a dirty hack to 'align' the close button with the title; inconsistent across devices -->
|
|
<button type="button" class="btn-close text-reset p-4" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<ul class="navbar-nav me-auto">
|
|
<div class="mb-4">
|
|
<h3>Explore</h3>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/discovery"><i class="bi bi-compass me-2" title="compass"></i>Discovery</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/ranking"><i class="bi bi-trophy me-2" title="crown"></i>Ranking</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/rankingCalendar"><i class="bi bi-calendar me-2" title="calendar"></i>Ranking calendar</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/newest"><i class="bi bi-stars me-2" title="sparkling"></i>Newest</a>
|
|
</li>
|
|
</div>
|
|
<div class="mb-4">
|
|
<h3>Your profile</h3>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/self/followingWorks"><i class="bi bi-people me-2" title="users"></i>Latest works by followed</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/self/bookmarks"><i class="bi bi-heart me-2" title="heart"></i>Your bookmarks</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/self"><i class="bi bi-person me-2" title="user"></i>Your profile</a>
|
|
</li>
|
|
</div>
|
|
<div class="mb-4">
|
|
<h3>Settings & info</h3>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/settings"><i class="bi bi-gear me-2" title="settings"></i>Settings</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/about"><i class="bi bi-info-circle me-2" title="about"></i>About</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="https://codeberg.org/vnpower/pixivfe"><i class="bi bi-globe me-2" title="globe"></i>Source code</a>
|
|
</li>
|
|
</div>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- Icon and title -->
|
|
<a class="text-decoration-none fw-bold mb-0 d-flex align-items-center" href="/">
|
|
<img src="/img/favicon.svg" alt="PixivFE icon" width="30" height="30" class="d-inline-block me-2">
|
|
<p class="h2 text-body m-0">PixivFE</p>
|
|
</a>
|
|
</div>
|
|
<!-- Search bar (visible on md and larger devices) -->
|
|
<div class="position-absolute top-50 start-50 translate-middle d-none d-md-block">
|
|
<form class="d-flex" action="/tags" method="post" autocomplete="off">
|
|
<input class="form-control bg-charcoal-surface2 rounded-pill border-0" type="search" name="name" required placeholder="⌕ Search artworks" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
<!-- Search icon (visible on smaller devices) -->
|
|
<div class="d-md-none ms-auto">
|
|
<button class="btn btn-link text-body p-0 me-1" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16">
|
|
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<!-- TODO: figure out how to have the logged in user's avatar and name in the navbar -->
|
|
<!-- <a class="h5 text-decoration-none mb-0 d-flex align-items-center" href="/">
|
|
<img src=" .User.Avatar " width="30" height="30" class="d-inline-block rounded-circle me-2">
|
|
<p class="m-0"> .User.Name </p>
|
|
</a> -->
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Search modal -->
|
|
<div class="modal fade" id="searchModal" tabindex="-1" aria-labelledby="searchModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content bg-charcoal-surface1 rounded-5 border-0 p-4">
|
|
<div class="modal-header border-0 p-0 mb-3">
|
|
<h2 class="modal-title" id="searchModalLabel">Search</h2>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body p-0">
|
|
<form action="/tags" method="post" autocomplete="off">
|
|
<input class="form-control bg-charcoal-surface2 rounded-pill border-0" type="search" name="name" required placeholder="⌕ Search artworks" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/js/on-page-load.js"></script>
|
|
<!-- mb-5 for spacing at the bottom of the page -->
|
|
<main class="container mb-5" hx-boost="true" hx-swap="outerHTML">
|
|
{{- yield body() }}
|
|
</main>
|
|
<div id="site-config" class="d-none">
|
|
<span id="artworkPreview">{{CookieList["pixivfe-ArtworkPreview"]}}</span>
|
|
</div>
|
|
|
|
<script src="/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"></script>
|
|
</body>
|
|
|
|
</html>
|