Make id have impact
This commit is contained in:
@@ -1,19 +1,30 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { onMount } from "svelte";
|
||||||
import { t } from "$lib/translations";
|
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>
|
||||||
|
|||||||
Reference in New Issue
Block a user