diff --git a/packages/frontend/src/routes/+page.svelte b/packages/frontend/src/routes/+page.svelte index e30795f..2651243 100644 --- a/packages/frontend/src/routes/+page.svelte +++ b/packages/frontend/src/routes/+page.svelte @@ -5,6 +5,7 @@ import { getAssetUrl } from "$lib/api"; import Meta from "$lib/components/meta/meta.svelte"; import { formatVideoDuration } from "$lib/utils.js"; + import SexyBackground from "$lib/components/background/background.svelte"; const { data } = $props(); @@ -12,11 +13,10 @@ -
- +
+ -

- - -
-
@@ -71,40 +63,22 @@
{#each data.models as model (model.slug)} - - -
- {model.artist_name} - -
-

{model.artist_name}

- - -
-
+

{model.artist_name}

+ + + {/each}
@@ -122,50 +96,42 @@
{#each data.videos as video (video.slug)} - -
- {video.title} -
-
- {#if video.movie_file?.duration}{formatVideoDuration(video.movie_file.duration)}{/if} -
- - - -

- {video.title} -

- -
- - {$_("home.trending.trending")} -
-
- + +

+ {video.title} +

+
+ + {$_("home.trending.trending")} +
+
+ + {/each}
diff --git a/packages/frontend/src/routes/magazine/+page.svelte b/packages/frontend/src/routes/magazine/+page.svelte index fd07392..7934b44 100644 --- a/packages/frontend/src/routes/magazine/+page.svelte +++ b/packages/frontend/src/routes/magazine/+page.svelte @@ -11,6 +11,8 @@ import { getAssetUrl } from "$lib/api"; import { calcReadingTime } from "$lib/utils.js"; import Meta from "$lib/components/meta/meta.svelte"; + import SexyBackground from "$lib/components/background/background.svelte"; + import PageHero from "$lib/components/page-hero/page-hero.svelte"; const timeAgo = new TimeAgo("en"); const { data } = $props(); @@ -48,6 +50,21 @@ } const totalPages = $derived(Math.ceil(data.total / data.limit)); + + const pageNumbers = $derived(() => { + const pages: (number | -1)[] = []; + if (totalPages <= 7) { + for (let i = 1; i <= totalPages; i++) pages.push(i); + } else { + pages.push(1); + if (data.page > 3) pages.push(-1); + for (let i = Math.max(2, data.page - 1); i <= Math.min(totalPages - 1, data.page + 1); i++) + pages.push(i); + if (data.page < totalPages - 2) pages.push(-1); + pages.push(totalPages); + } + return pages; + }); @@ -55,109 +72,80 @@
- -
-
-
-
-
+ -
-
-
-
-

- {$_("magazine.title")} -

-

- {$_("magazine.description")} -

- -
- -
- - { - searchValue = (e.target as HTMLInputElement).value; - debounceSearch(searchValue); - }} - class="pl-10 bg-background/50 border-primary/20 focus:border-primary" - /> -
- - - - - - -
+ +
+ +
+ + { + searchValue = (e.target as HTMLInputElement).value; + debounceSearch(searchValue); + }} + class="pl-10 bg-background/50 border-primary/20 focus:border-primary" + />
+ + + + + +
-
+
@@ -187,9 +175,7 @@

- + {featuredArticle.title}

{featuredArticle.excerpt} @@ -229,100 +215,83 @@

{#each data.items as article (article.slug)} - -
- {article.title} -
- - -
- {article.category} -
- - - {#if article.featured} + + +
+ {article.title}
+ + +
- {$_("magazine.featured")} + {article.category}
- {/if} - - -
- - -
-

- {article.title} -

-

- {article.excerpt} -

-
- - -
- {#each (article.tags ?? []).slice(0, 3) as tag (tag)} - + {#if article.featured} +
- #{tag} - - {/each} + {$_("magazine.featured")} +
+ {/if}
- -
-
- {article.author?.artist_name} -
-

{article.author?.artist_name}

-
- - {timeAgo.format(new Date(article.publish_date))} + +
+

+ {article.title} +

+

+ {article.excerpt} +

+
+ + +
+ {#each (article.tags ?? []).slice(0, 3) as tag (tag)} + + #{tag} + + {/each} +
+ + +
+
+ {article.author?.artist_name} +
+

{article.author?.artist_name}

+
+ + {timeAgo.format(new Date(article.publish_date))} +
+
+ {$_("magazine.read_time", { + values: { time: calcReadingTime(article.content) }, + })} +
-
- {$_("magazine.read_time", { - values: { time: calcReadingTime(article.content) }, - })} -
-
- - - - - + + + {/each}
@@ -339,32 +308,40 @@ {#if totalPages > 1} -
- - {$_("common.page_of", { values: { page: data.page, total: totalPages } })} -  ·  - {$_("common.total_results", { values: { total: data.total } })} - -
+
+
+ >{$_("common.previous")} + {#each pageNumbers() as p} + {#if p === -1} + + {:else} + + {/if} + {/each} + >{$_("common.next")}
+

+ {$_("common.total_results", { values: { total: data.total } })} +

{/if}
diff --git a/packages/frontend/src/routes/models/+page.svelte b/packages/frontend/src/routes/models/+page.svelte index 1e7cd5f..13fe547 100644 --- a/packages/frontend/src/routes/models/+page.svelte +++ b/packages/frontend/src/routes/models/+page.svelte @@ -44,6 +44,21 @@ } const totalPages = $derived(Math.ceil(data.total / data.limit)); + + const pageNumbers = $derived(() => { + const pages: (number | -1)[] = []; + if (totalPages <= 7) { + for (let i = 1; i <= totalPages; i++) pages.push(i); + } else { + pages.push(1); + if (data.page > 3) pages.push(-1); + for (let i = Math.max(2, data.page - 1); i <= Math.min(totalPages - 1, data.page + 1); i++) + pages.push(i); + if (data.page < totalPages - 2) pages.push(-1); + pages.push(totalPages); + } + return pages; + }); @@ -97,7 +112,7 @@ {model.artist_name} @@ -183,31 +198,40 @@ {#if totalPages > 1} -
- - {$_("common.page_of", { values: { page: data.page, total: totalPages } })} -  ·  - {$_("common.total_results", { values: { total: data.total } })} - -
+
+
+ >{$_("common.previous")} + {#each pageNumbers() as p} + {#if p === -1} + + {:else} + + {/if} + {/each} + >{$_("common.next")} +
+

+ {$_("common.total_results", { values: { total: data.total } })} +

{/if} diff --git a/packages/frontend/src/routes/play/+page.svelte b/packages/frontend/src/routes/play/+page.svelte index 1ef7096..1ec1564 100644 --- a/packages/frontend/src/routes/play/+page.svelte +++ b/packages/frontend/src/routes/play/+page.svelte @@ -17,6 +17,7 @@ import DeviceMappingDialog from "./components/device-mapping-dialog.svelte"; import type { BluetoothDevice, RecordedEvent, DeviceInfo } from "$lib/types"; import { toast } from "svelte-sonner"; + import SexyBackground from "$lib/components/background/background.svelte"; const client = new ButtplugClient("Sexy.Art"); let connected = $state(client.connected); @@ -378,18 +379,7 @@
- -
-
-
-
-
+
diff --git a/packages/frontend/src/routes/videos/+page.svelte b/packages/frontend/src/routes/videos/+page.svelte index ef18224..708765d 100644 --- a/packages/frontend/src/routes/videos/+page.svelte +++ b/packages/frontend/src/routes/videos/+page.svelte @@ -47,6 +47,21 @@ } const totalPages = $derived(Math.ceil(data.total / data.limit)); + + const pageNumbers = $derived(() => { + const pages: (number | -1)[] = []; + if (totalPages <= 7) { + for (let i = 1; i <= totalPages; i++) pages.push(i); + } else { + pages.push(1); + if (data.page > 3) pages.push(-1); + for (let i = Math.max(2, data.page - 1); i <= Math.min(totalPages - 1, data.page + 1); i++) + pages.push(i); + if (data.page < totalPages - 2) pages.push(-1); + pages.push(totalPages); + } + return pages; + }); @@ -134,7 +149,7 @@ {video.title} @@ -241,32 +256,40 @@ {#if totalPages > 1} -
- - {$_("common.page_of", { values: { page: data.page, total: totalPages } })} -  ·  - {$_("common.total_results", { values: { total: data.total } })} - -
+
+
+ >{$_("common.previous")} + {#each pageNumbers() as p} + {#if p === -1} + + {:else} + + {/if} + {/each} + >{$_("common.next")}
+

+ {$_("common.total_results", { values: { total: data.total } })} +

{/if}