Compare commits
No commits in common. "31cc7defe07e32328a87b9d14aff543bc1d4c748" and "3001d0c25d2a8b2d592c0a0e5b280174b9d283c7" have entirely different histories.
31cc7defe0
...
3001d0c25d
15 changed files with 642 additions and 1174 deletions
|
@ -1,4 +1,3 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
./pocketbase
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -22,4 +22,3 @@ pnpm-debug.log*
|
||||||
|
|
||||||
# jetbrains setting folder
|
# jetbrains setting folder
|
||||||
.idea/
|
.idea/
|
||||||
pocketbase/
|
|
11
Dockerfile
11
Dockerfile
|
@ -13,11 +13,18 @@ FROM build-deps AS build
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG POCKETBASE_URL
|
||||||
|
ENV POCKETBASE_URL=${POCKETBASE_URL}
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM base AS runtime
|
FROM base AS runtime
|
||||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||||
COPY --from=build /app/dist ./dist
|
COPY --from=build /app/dist ./dist
|
||||||
|
|
||||||
EXPOSE 4321
|
ARG PORT=4321
|
||||||
CMD ["node", "./dist/server/entry.mjs"]
|
ENV HOST=0.0.0.0
|
||||||
|
ENV PORT=${PORT}
|
||||||
|
ENV POCKETBASE_URL=${POCKETBASE_URL}
|
||||||
|
EXPOSE ${PORT}
|
||||||
|
CMD node ./dist/server/entry.mjs
|
48
compose.yml
48
compose.yml
|
@ -3,15 +3,51 @@ services:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
PUBLIC_POCKETBASE_URL: ${PUBLIC_POCKETBASE_URL}
|
||||||
|
PUBLIC_TITLE: ${PUBLIC_TITLE}
|
||||||
|
PUBLIC_DESCRIPTION: ${PUBLIC_DESCRIPTION}
|
||||||
|
PUBLIC_USEICONS: ${PUBLIC_USEICONS}
|
||||||
env_file: .env
|
env_file: .env
|
||||||
ports:
|
networks:
|
||||||
- 4321:4321
|
- caddy
|
||||||
|
labels:
|
||||||
|
caddy: lion.gay
|
||||||
|
caddy.reverse_proxy: "{{upstreams 4321}}"
|
||||||
pocketbase:
|
pocketbase:
|
||||||
image: ghcr.io/muchobien/pocketbase:latest
|
image: ghcr.io/muchobien/pocketbase:latest
|
||||||
container_name: pocketbase-gallery
|
container_name: pocketbase-gallery
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
networks:
|
||||||
- "8090:8090"
|
- caddy
|
||||||
volumes:
|
volumes:
|
||||||
- ./pocketbase/pb_data:/pb_data
|
- /opt/pocketbase/pb_data:/pb_data
|
||||||
- ./pocketbase/pb_public:/pb_public
|
- /opt/pocketbase/pb_public:/pb_public
|
||||||
|
labels:
|
||||||
|
caddy: pocket.fangs.app
|
||||||
|
caddy.reverse_proxy: "{{upstreams 8090}}"
|
||||||
|
caddy:
|
||||||
|
container_name: "caddy-gallery"
|
||||||
|
image: videah/caddy-proxy:latest
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
- "443:443/udp"
|
||||||
|
environment:
|
||||||
|
- CADDY_INGRESS_NETWORKS=caddy
|
||||||
|
networks:
|
||||||
|
- caddy
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- caddy_data:/data
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
caddy.email: "caddy@lion.gay"
|
||||||
|
caddy.encode: zstd gzip
|
||||||
|
|
||||||
|
networks:
|
||||||
|
caddy:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
caddy_data: {}
|
1598
pnpm-lock.yaml
generated
1598
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
import pb from "../lib/pb";
|
import pb from "../lib/pb";
|
||||||
|
|
||||||
const { href, title, body, image } = Astro.props;
|
const { href, title, body, image } = Astro.props;
|
||||||
let imageURL;
|
let imageURL;
|
||||||
|
|
||||||
|
@ -9,12 +10,11 @@ if (image) {
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="relative max-w-xl mx-auto mt-20 h-32 w-55">
|
<div class="relative max-w-xl mx-auto mt-20 h-32 w-55">
|
||||||
<a href={href} class="block backdrop-blur-md rounded-md h-32 w-64">
|
<a href={href} class="block">
|
||||||
{
|
{
|
||||||
image && (
|
image && (
|
||||||
<img
|
<img
|
||||||
class="h-32 w-64 object-cover rounded-md"
|
class="h-32 w-64 object-cover rounded-md"
|
||||||
// @ts-ignore
|
|
||||||
src={imageURL}
|
src={imageURL}
|
||||||
alt={`Cover for ${title}`}
|
alt={`Cover for ${title}`}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -31,9 +31,9 @@ const showNsfw = Astro.url.searchParams.has('nsfw') || false;
|
||||||
<div
|
<div
|
||||||
data-lightbox="true"
|
data-lightbox="true"
|
||||||
id="parent"
|
id="parent"
|
||||||
class='rounded-lg relative overflow-hidden mb-4 border border-transparent hover:border-gray-300 transition-all duration-300 ease-in-out hover:shadow-lg w-52'
|
class=`relative overflow-hidden rounded mb-4 border border-transparent hover:border-gray-300 transition-all duration-300 ease-in-out hover:shadow-lg w-52`
|
||||||
>
|
>
|
||||||
<img class="rounded-lg" src={src} alt={`${alt !== '' ? `${alt}<br>` : ""} ${artist ? `by ${artist}` : ""}`} loading="lazy" />
|
<img src={src} alt={`${alt !== '' ? `${alt}<br>` : ""} ${artist ? `by ${artist}` : ""}`} loading="lazy" />
|
||||||
{
|
{
|
||||||
alt && (
|
alt && (
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -21,11 +21,11 @@ const config = {
|
||||||
---
|
---
|
||||||
|
|
||||||
<aside>
|
<aside>
|
||||||
<div class="p-4 backdrop-blur-md backdrop-brightness-50 rounded-lg ">
|
<div class="p-4">
|
||||||
<a href="/">
|
<a href="/">
|
||||||
{
|
{
|
||||||
icon && (
|
icon && (
|
||||||
<Image class={"w-40 h-40 mx-auto object-cover object-center rounded-full"} src={icon} width={10} height={10} alt={""} />
|
<Image class={"icon"} src={icon} width={10} height={10} alt={""} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
<h1 class="font-bold text-2xl pt-4">{config.title}</h1></a
|
<h1 class="font-bold text-2xl pt-4">{config.title}</h1></a
|
||||||
|
@ -68,4 +68,15 @@ const config = {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
img.icon {
|
||||||
|
width: 10rem;
|
||||||
|
height: 10rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
object-fit: cover;
|
||||||
|
object-position: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<figure class="place-content-center app-lightbox backdrop-blur-md">
|
<figure class="place-content-center app-lightbox backdrop-blur-md">
|
||||||
<img class="portal" />
|
<img class="portal" />
|
||||||
<figcaption class="desc rounded font-bold backdrop-blur-sm bg-black/50"></figcaption>
|
<figcaption class="desc rounded font-bold backdrop-blur-sm"></figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
cursor: zoom-out;
|
cursor: zoom-out;
|
||||||
background-color: var(--bg-color, hsla(0, 0%, 0%, 0.623));
|
background-color: var(--bg-color, hsla(0, 0%, 0%, 0.623));
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity ease-in-out 0.35s;
|
transition: opacity 0.35s;
|
||||||
|
|
||||||
&.is-active {
|
&.is-active {
|
||||||
pointer-events: initial;
|
pointer-events: initial;
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
transition:
|
transition:
|
||||||
opacity 0.35s,
|
opacity 0.35s,
|
||||||
transform 0.35s;
|
transform 0.35s;
|
||||||
transform: scale(0.5);
|
transform: scale(0.2);
|
||||||
|
|
||||||
:global(img) {
|
:global(img) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
1
src/env.d.ts
vendored
1
src/env.d.ts
vendored
|
@ -1,2 +1 @@
|
||||||
/// <reference path="../.astro/types.d.ts" />
|
|
||||||
/// <reference types="astro/client" />
|
/// <reference types="astro/client" />
|
||||||
|
|
|
@ -4,21 +4,17 @@ import Sidebar from "../components/Sidebar.astro";
|
||||||
import pb from "../lib/pb";
|
import pb from "../lib/pb";
|
||||||
import c from "../lib/config";
|
import c from "../lib/config";
|
||||||
|
|
||||||
|
|
||||||
const avatarRec = await pb
|
const avatarRec = await pb
|
||||||
.collection("images")
|
.collection("images")
|
||||||
.getFirstListItem("useAsAvatar=true", { requestKey: null })
|
.getFirstListItem("useAsAvatar=true").catch(() => null);
|
||||||
.catch(() => null);
|
|
||||||
const backgroundRec = await pb
|
const backgroundRec = await pb
|
||||||
.collection("images")
|
.collection("images")
|
||||||
.getFirstListItem("useAsBackground=true", { requestKey: null })
|
.getFirstListItem("useAsBackground=true").catch(() => null);
|
||||||
.catch(() => null);
|
|
||||||
|
|
||||||
const icon = avatarRec
|
|
||||||
? await pb.files.getUrl(avatarRec, avatarRec.file)
|
const icon = avatarRec ? await pb.files.getUrl(avatarRec, avatarRec.file) : null;
|
||||||
: null;
|
const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgroundRec.file) : null;
|
||||||
const background = backgroundRec
|
|
||||||
? await pb.files.getUrl(backgroundRec, backgroundRec.file)
|
|
||||||
: null;
|
|
||||||
const socials = await pb.collection("socials").getFullList();
|
const socials = await pb.collection("socials").getFullList();
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
@ -43,23 +39,18 @@ export const prerender = false;
|
||||||
<title>{config.title}</title>
|
<title>{config.title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="xl:flex">
|
|
||||||
<div
|
<div
|
||||||
class="static xl:h-screen xl:relative w-full xl:w-96 bg-[#11111156] backdrop-blur-md backdrop-brightness-50 h-full pt-4 box-border text-center"
|
class="xl:fixed xl:left-0 xl:top-0 w-full xl:w-96 bg-[#11111156] backdrop-blur-md h-full pt-4 box-border text-center"
|
||||||
>
|
>
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
class="max-w-fit ml-auto mr-auto transition-all"
|
|
||||||
>
|
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<style define:vars={{ background: `url(${config.background})` }}>
|
<style define:vars={{ background: `url(${config.background})` }}>
|
||||||
|
.container {
|
||||||
|
width: calc(100% - 25rem);
|
||||||
|
}
|
||||||
body {
|
body {
|
||||||
font-family: system-ui, sans-serif;
|
font-family: system-ui, sans-serif;
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
|
|
|
@ -39,23 +39,25 @@ const config = {
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<Lightbox />
|
<Lightbox />
|
||||||
<div class="xl:flex">
|
|
||||||
<div
|
<div
|
||||||
class="tatic xl:h-screen xl:relative w-full xl:w-96 bg-[#11111156] backdrop-blur-md h-full pt-4 box-border text-center"
|
class="xl:fixed xl:left-0 xl:top-0 w-full xl:w-96 bg-[#11111156] backdrop-blur-md h-full pt-4 box-border text-center"
|
||||||
>
|
>
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="max-w-fit ml-auto mr-auto transition-all"
|
class="container float-none xl:float-right xl:box-border transition-all"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<style define:vars={{ background: `url(${config.background})` }}>
|
<style define:vars={{ background: `url(${config.background})` }}>
|
||||||
|
@media screen(xl) {
|
||||||
|
.container {
|
||||||
|
width: calc(100% - 25rem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: system-ui, sans-serif;
|
font-family: system-ui, sans-serif;
|
||||||
|
|
|
@ -20,15 +20,15 @@ const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgrou
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<title>{config.TITLE}</title>
|
<title>{config.TITLE}</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="flex h-screen">
|
<body>
|
||||||
<div class="m-auto">
|
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<style define:vars={{ background: `url(${background})` }}>
|
<style define:vars={{ background: `url(${background})` }}>
|
||||||
|
.container {
|
||||||
|
width: calc(100% - 25rem);
|
||||||
|
}
|
||||||
body {
|
body {
|
||||||
font-family: system-ui, sans-serif;
|
font-family: system-ui, sans-serif;
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
|
|
|
@ -6,7 +6,7 @@ import Card from "../../components/Card.astro";
|
||||||
const characters = await pb
|
const characters = await pb
|
||||||
.collection("characters")
|
.collection("characters")
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
.getFullList({ expand: ["icon"], filter: `(hidden = false)`, requestKey: null });
|
.getFullList({ expand: ["icon"], filter: `(hidden = false)` });
|
||||||
|
|
||||||
export const prerender = false;
|
export const prerender = false;
|
||||||
---
|
---
|
||||||
|
@ -14,24 +14,9 @@ export const prerender = false;
|
||||||
<CharacterList>
|
<CharacterList>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<h1 class="text-3xl text-center pt-8">Characters</h1>
|
<h1 class="text-3xl text-center pt-8">Characters</h1>
|
||||||
<!-- class="grid grid-cols-2 xl:grid-cols-4 gap-4 columns-2 md:columns-4 self-center p-4" -->
|
<div
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 2xl:grid-cols-4 gap-4 self-center p-4">
|
class="grid grid-cols-2 xl:grid-cols-4 gap-4 columns-2 md:columns-4 self-center p-4"
|
||||||
{
|
>
|
||||||
// @ts-ignore
|
|
||||||
characters.length === 0 && (
|
|
||||||
<div class="text-center col-span-full">
|
|
||||||
<p class="text-lg">No characters found.</p>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
// @ts-ignore
|
|
||||||
characters.length === 0 && (
|
|
||||||
<div class="text-center col-span-full">
|
|
||||||
<p class="text-lg">No characters found.</p>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
[...characters].map((c) => (
|
[...characters].map((c) => (
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -45,13 +30,4 @@ export const prerender = false;
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</CharacterList>
|
</CharacterList>
|
||||||
|
|
||||||
<style>
|
|
||||||
@media screen(md) {
|
|
||||||
.container {
|
|
||||||
width: calc(100% - 25rem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import IndexLayout from "../layouts/Index.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<IndexLayout>
|
<IndexLayout>
|
||||||
<div class="flex flex-col items-center justify-centerß">
|
<div class="flex flex-col ">
|
||||||
<div class="mx-auto my-auto">
|
<div class=" flex gap-4 columns-2 md:columns-4 self-center">
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue