Make id have impact
All checks were successful
Deploy / build-and-publish (push) Successful in 2m5s
Deploy / deploy (push) Successful in 51s

This commit is contained in:
Kopyl Anatoly
2024-12-11 19:44:48 +03:00
parent 9e95ed76e3
commit 28a49973ac

View File

@@ -1,19 +1,30 @@
<script lang="ts"> <script lang="ts">
import {t} from "$lib/translations"; import { onMount } from "svelte";
import { t } from "$lib/translations";
import Project from "./Project.svelte"; import Project from "./Project.svelte";
import {projects} from "./projects"; import { projects } from "./projects";
let wrapperClass = "grid gap-8 md:grid-cols-2 lg:grid-cols-3";
onMount(() => {
window.ym(88895893, "getClientID", function (clientID) {
const university_test_group =
Number(clientID.slice(-1)) % 2 === 0 ? "a" : "b";
if (university_test_group === "b") {
wrapperClass = `${wrapperClass} lg:grid-cols-2!`;
}
});
});
</script> </script>
<section class="px-2 md:px-8 mb-16 max-w-[1280px] mx-auto"> <section class="px-2 md:px-8 mb-16 max-w-[1280px] mx-auto">
<h2 class="text-3xl mb-4 md:text-4xl"> <h2 class="text-3xl mb-4 md:text-4xl">
{$t('projects.h')} {$t("projects.h")}
</h2> </h2>
<div class="grid gap-8 md:grid-cols-2 lg:grid-cols-3"> <div class={wrapperClass}>
{#each projects as project} {#each projects as project}
<Project <Project {project}></Project>
project={project}
></Project>
{/each} {/each}
</div> </div>
</section> </section>