Dieser Commit ist enthalten in:
Ursprung
f062f3eaf9
Commit
296fe40085
@ -22,6 +22,7 @@
|
|||||||
import {onMount} from "svelte";
|
import {onMount} from "svelte";
|
||||||
|
|
||||||
let cardElement: HTMLDivElement;
|
let cardElement: HTMLDivElement;
|
||||||
|
export let hoverEffect: boolean = true;
|
||||||
|
|
||||||
function rotateElement(event: MouseEvent) {
|
function rotateElement(event: MouseEvent) {
|
||||||
const x = event.clientX;
|
const x = event.clientX;
|
||||||
@ -47,7 +48,7 @@
|
|||||||
$: classes = twMerge("w-72 border-2 bg-zinc-50 border-gray-100 flex flex-col items-center p-8 m-4 rounded-xl shadow-lg dark:bg-zinc-900 dark:border-gray-800 dark:text-gray-100", extraClasses)
|
$: classes = twMerge("w-72 border-2 bg-zinc-50 border-gray-100 flex flex-col items-center p-8 m-4 rounded-xl shadow-lg dark:bg-zinc-900 dark:border-gray-800 dark:text-gray-100", extraClasses)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={classes} bind:this={cardElement} on:mousemove={rotateElement} on:mouseleave={resetElement}>
|
<div class={classes} bind:this={cardElement} on:mousemove={rotateElement} on:mouseleave={resetElement} class:hoverEffect>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -57,20 +58,16 @@
|
|||||||
|
|
||||||
transition: scale 300ms cubic-bezier(.2, 3, .67, .6);
|
transition: scale 300ms cubic-bezier(.2, 3, .67, .6);
|
||||||
|
|
||||||
&:hover {
|
|
||||||
scale: 105%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(h1) {
|
:global(h1) {
|
||||||
@apply text-xl font-bold mt-4;
|
@apply text-xl font-bold mt-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(p) {
|
|
||||||
@apply mt-4;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(svg) {
|
:global(svg) {
|
||||||
@apply transition-transform duration-300 ease-in-out hover:scale-110 hover:drop-shadow-2xl
|
@apply transition-transform duration-300 ease-in-out hover:scale-110 hover:drop-shadow-2xl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hoverEffect:hover {
|
||||||
|
scale: 105%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -60,8 +60,7 @@
|
|||||||
<CaretDownOutline class="ml-2 mt-auto"/>
|
<CaretDownOutline class="ml-2 mt-auto"/>
|
||||||
</button>
|
</button>
|
||||||
<div>
|
<div>
|
||||||
<a class="btn btn-gray my-1"
|
<a class="btn btn-gray" href={l("/announcements")}>{t("navbar.links.home.announcements")}</a>
|
||||||
href={l("/announcements")}>{t("navbar.links.home.announcements")}</a>
|
|
||||||
<a class="btn btn-gray" href={l("/about")}>{t("navbar.links.home.about")}</a>
|
<a class="btn btn-gray" href={l("/about")}>{t("navbar.links.home.about")}</a>
|
||||||
<a class="btn btn-gray" href={l("/publics")}>{t("navbar.links.home.publics")}</a>
|
<a class="btn btn-gray" href={l("/publics")}>{t("navbar.links.home.publics")}</a>
|
||||||
<a class="btn btn-gray" href={l("/downloads")}>{t("navbar.links.home.downloads")}</a>
|
<a class="btn btn-gray" href={l("/downloads")}>{t("navbar.links.home.downloads")}</a>
|
||||||
|
@ -5,24 +5,30 @@ import {astroI18n} from "astro-i18n";
|
|||||||
import {Image} from "astro:assets";
|
import {Image} from "astro:assets";
|
||||||
import TagComponent from "./TagComponent.astro";
|
import TagComponent from "./TagComponent.astro";
|
||||||
import P from "./P.astro";
|
import P from "./P.astro";
|
||||||
|
import Card from "@components/Card.svelte";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
post: CollectionEntry<"announcements">
|
post: CollectionEntry<"announcements">
|
||||||
}
|
}
|
||||||
|
|
||||||
const { post } = Astro.props as Props;
|
const { post } = Astro.props as Props;
|
||||||
|
|
||||||
|
const postUrl = l(`/announcements/${post.slug.split("/").slice(1).join("/")}`);
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={l(`/announcements/${post.slug.split("/").slice(1).join("/")}`)}>
|
<Card extraClasses="w-full items-start mx-0" hoverEffect={false}>
|
||||||
<div class="p-4 flex flex-row">
|
<div class="p-4 flex flex-row">
|
||||||
{post.data.image != null
|
{post.data.image != null
|
||||||
? (
|
? (
|
||||||
|
<a href={postUrl}>
|
||||||
<div class="flex-shrink-0 pr-2">
|
<div class="flex-shrink-0 pr-2">
|
||||||
<Image transition:name={post.data.title + "-image"} src={post.data.image} alt="Post Image" class="rounded-2xl shadow-2xl object-cover h-32 w-32 max-w-none transition-transform hover:scale-105" />
|
<Image transition:name={post.data.title + "-image"} src={post.data.image} alt="Post Image" class="rounded-2xl shadow-2xl object-cover h-32 w-32 max-w-none transition-transform hover:scale-105" />
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
)
|
)
|
||||||
: null}
|
: null}
|
||||||
<div>
|
<div>
|
||||||
|
<a href={postUrl} class="flex flex-col items-start">
|
||||||
<h2 class="text-2xl font-bold" transition:name={post.data.title + "-title"}>{post.data.title}</h2>
|
<h2 class="text-2xl font-bold" transition:name={post.data.title + "-title"}>{post.data.title}</h2>
|
||||||
<P class="text-gray-500">{Intl.DateTimeFormat(astroI18n.locale, {
|
<P class="text-gray-500">{Intl.DateTimeFormat(astroI18n.locale, {
|
||||||
day: "numeric",
|
day: "numeric",
|
||||||
@ -30,6 +36,7 @@ const { post } = Astro.props as Props;
|
|||||||
year: "numeric",
|
year: "numeric",
|
||||||
}).format(post.data.created)}</P>
|
}).format(post.data.created)}</P>
|
||||||
<P>{post.data.description}</P>
|
<P>{post.data.description}</P>
|
||||||
|
</a>
|
||||||
<div class="mt-1" transition:name={post.data.title + "-tags"}>
|
<div class="mt-1" transition:name={post.data.title + "-tags"}>
|
||||||
{post.data.tags.map((tag) => (
|
{post.data.tags.map((tag) => (
|
||||||
<TagComponent tag={tag} />
|
<TagComponent tag={tag} />
|
||||||
@ -37,4 +44,4 @@ const { post } = Astro.props as Props;
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</Card>
|
@ -13,10 +13,10 @@ const {tag, noLink} = Astro.props;
|
|||||||
|
|
||||||
{noLink
|
{noLink
|
||||||
? (
|
? (
|
||||||
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 shadow-2xl">{capitalize(tag)}</span>
|
<span class="inline-block bg-gray-800 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 shadow-2xl">{capitalize(tag)}</span>
|
||||||
)
|
)
|
||||||
: (
|
: (
|
||||||
<a href={l(`/announcements/tags/${tag}`)}>
|
<a href={l(`/announcements/tags/${tag}`)}>
|
||||||
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 shadow-2xl">{capitalize(tag)}</span>
|
<span class="inline-block bg-gray-800 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 shadow-2xl">{capitalize(tag)}</span>
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
"id": 123,
|
"id": 123,
|
||||||
"creator": ["Test", "Test2"],
|
"creator": ["Test", "Test2"],
|
||||||
"gamemode": "wargear",
|
"gamemode": "wargear",
|
||||||
"image": "../../images/2024-03-24_20.59.03.png",
|
"image": "../../images/area_render_2_.png",
|
||||||
"xray": "../../images/2024-03-24_20.59.59.png"
|
"xray": "../../images/area_render_1_.png"
|
||||||
}
|
}
|
BIN
src/images/area_render_1_.png
Normale Datei
BIN
src/images/area_render_1_.png
Normale Datei
Binäre Datei nicht angezeigt.
Nachher Breite: | Höhe: | Größe: 1.4 MiB |
BIN
src/images/area_render_2_.png
Normale Datei
BIN
src/images/area_render_2_.png
Normale Datei
Binäre Datei nicht angezeigt.
Nachher Breite: | Höhe: | Größe: 1.7 MiB |
@ -47,12 +47,9 @@ const tags = await getTags();
|
|||||||
<TagComponent tag={tag} transition:name={`${tag}-tag-filter`} />
|
<TagComponent tag={tag} transition:name={`${tag}-tag-filter`} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
{posts.map((post, index) => (
|
{posts.map((post, index) => (
|
||||||
<div>
|
<div>
|
||||||
<PostComponent post={post}/>
|
<PostComponent post={post}/>
|
||||||
{index !== posts.length - 1 &&
|
|
||||||
<hr/>}
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</PageLayout>
|
</PageLayout>
|
@ -63,12 +63,9 @@ const {posts, tag} = Astro.props;
|
|||||||
<TagComponent tag={tag} noLink="true" transition:name={`${tag}-tag-filter`}/>
|
<TagComponent tag={tag} noLink="true" transition:name={`${tag}-tag-filter`}/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
{posts.map((post, index) => (
|
{posts.map((post, index) => (
|
||||||
<div>
|
<div>
|
||||||
<PostComponent post={post}/>
|
<PostComponent post={post}/>
|
||||||
{index !== posts.length - 1 &&
|
|
||||||
<hr/>}
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</PageLayout>
|
</PageLayout>
|
@ -117,19 +117,19 @@ function mapMap<T, K, J>(i: Map<T, K>, fn: (key: T, value: K) => J): J[] {
|
|||||||
<Card client:idle>
|
<Card client:idle>
|
||||||
<Archive heigth="64" width="64"/>
|
<Archive heigth="64" width="64"/>
|
||||||
<h1>{t("home.benefits.historic.title")}</h1>
|
<h1>{t("home.benefits.historic.title")}</h1>
|
||||||
<p>{t("home.benefits.historic.description.1")}</p>
|
<p class="mt-4">{t("home.benefits.historic.description.1")}</p>
|
||||||
<p>{t("home.benefits.historic.description.2")}</p>
|
<p class="mt-4">{t("home.benefits.historic.description.2")}</p>
|
||||||
</Card>
|
</Card>
|
||||||
<Card client:idle>
|
<Card client:idle>
|
||||||
<Rocket heigth="64" width="64"/>
|
<Rocket heigth="64" width="64"/>
|
||||||
<h1>{t("home.benefits.server.title")}</h1>
|
<h1>{t("home.benefits.server.title")}</h1>
|
||||||
<p>{t("home.benefits.server.description")}</p>
|
<p class="mt-4">{t("home.benefits.server.description")}</p>
|
||||||
</Card>
|
</Card>
|
||||||
<Card client:idle>
|
<Card client:idle>
|
||||||
<Bell heigth="64" width="64"/>
|
<Bell heigth="64" width="64"/>
|
||||||
<h1>{t("home.benefits.events.title")}</h1>
|
<h1>{t("home.benefits.events.title")}</h1>
|
||||||
<p>{t("home.benefits.events.description.1")}</p>
|
<p class="mt-4">{t("home.benefits.events.description.1")}</p>
|
||||||
<p>{t("home.benefits.events.description.2")}</p>
|
<p class="mt-4">{t("home.benefits.events.description.2")}</p>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
<a class="btn px-8 flex" href={l("/about")}>{t("home.benefits.read")}
|
<a class="btn px-8 flex" href={l("/about")}>{t("home.benefits.read")}
|
||||||
|
@ -16,7 +16,7 @@ const publics = await getCollection("publics");
|
|||||||
<Card extraClasses="w-full mx-0">
|
<Card extraClasses="w-full mx-0">
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
<XRayPreview client:load>
|
<XRayPreview client:load>
|
||||||
<Image slot="normal" src={pub.data.image} alt={pub.data.name} transition:name={pub.data.id + "-img"} />
|
<Image style="width: 500px" slot="normal" src={pub.data.image} alt={pub.data.name} transition:name={pub.data.id + "-img"} />
|
||||||
{pub.data.xray && <Image slot="xray" src={pub.data.xray} alt={pub.data.name} />}
|
{pub.data.xray && <Image slot="xray" src={pub.data.xray} alt={pub.data.name} />}
|
||||||
</XRayPreview>
|
</XRayPreview>
|
||||||
</div>
|
</div>
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren