Skip to content

Commit

Permalink
prettier fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YueSteveYin committed Sep 10, 2024
1 parent 9586d35 commit 3553af7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
28 changes: 15 additions & 13 deletions layouts/_default/about.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{{ define "main" }}
<main
class="p-8 text-white bg-gray "
class="bg-gray p-8 text-white "
style="background-image: url('/img/background/personBackground.webp'); background-size: cover; background-position: center; background-repeat: no-repeat;"
>
<div class="mx-auto max-w-screen-md">
<!-- Title -->
<h1 class="text-3xl font-bold enter-title">About Us</h1>
<h1 class="enter-title text-3xl font-bold">About Us</h1>

<!-- Mission and Values Section -->
<section class="mt-6 enter-mission">
<section class="enter-mission mt-6">
<h2 class="text-gray-800 text-2xl font-semibold">Our Mission</h2>
<p class="text-gray-700 mt-2">
{{ .Params.mission }}
</p>
</section>

<!-- Meet Our Team Section -->
<section class="mt-6 enter-team-header">
<section class="enter-team-header mt-6">
<h2 class="text-gray-800 text-2xl font-semibold">Meet Our Team</h2>
<div class="mt-4 grid gap-6 text-black sm:grid-cols-2 lg:grid-cols-3">
{{ range $index, $member := .Params.team_members }}
{{ $delay := printf "%.1fs" (add 0.5 (mul $index 0.1)) }}
<div
class="team-member rounded-lg bg-white p-4 shadow enter-team-member"
style="--animation-delay: {{ $delay }};"
class="team-member enter-team-member rounded-lg bg-white p-4 shadow"
style="--animation-delay: {{ $delay }};"
>
{{ if $member.image }}
<img
Expand Down Expand Up @@ -51,20 +51,21 @@ <h2 class="text-gray-800 text-2xl font-semibold">Meet Our Team</h2>
</div>
{{ end }}
<div class="mt-4">
<h3 class="text-gray-800 text-lg font-bold">{{ $member.name }}</h3>
<h3 class="text-gray-800 text-lg font-bold">
{{ $member.name }}
</h3>
<p class="text-gray-600 text-sm">{{ $member.position }}</p>
</div>
</div>
{{ end }}
</div>
</section>
</div>

</main>

<!-- JavaScript to Remove Animation Class After Animation Ends -->
<script>
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function () {
const animatedElements = document.querySelectorAll(".enter-team-member");

animatedElements.forEach((element) => {
Expand All @@ -78,7 +79,6 @@ <h3 class="text-gray-800 text-lg font-bold">{{ $member.name }}</h3>

<!-- Staggered Animation for Page Elements -->
<style>

/* Title Animation */
.enter-title {
opacity: 0;
Expand Down Expand Up @@ -107,19 +107,21 @@ <h3 class="text-gray-800 text-lg font-bold">{{ $member.name }}</h3>
}

.team-member:hover {
transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
transition:
transform 0.3s ease-in-out,
box-shadow 0.3s ease-in-out;
transform: scale(1.05);
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2);
}

@keyframes popUp {
0% {
opacity: 0;
transform: translateY(20px); /* Change to translate instead of scale */
transform: translateY(20px); /* Change to translate instead of scale */
}
100% {
opacity: 1;
transform: translateY(0); /* Reset translate to 0 */
transform: translateY(0); /* Reset translate to 0 */
}
}
</style>
Expand Down
15 changes: 11 additions & 4 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@
href="/css/fonts/montserrat-v25/montserrat-v25-latin-regular.woff2"
crossorigin
/>
<link rel="preload" href="/img/background/bodyBackground.webp" as="image"/>
<link rel="preload" href="/img/background/titleBackground.webp" as="image"/>
<link rel="preload" href="/img/background/personBackground.webp" as="image"/>

<link rel="preload" href="/img/background/bodyBackground.webp" as="image" />
<link
rel="preload"
href="/img/background/titleBackground.webp"
as="image"
/>
<link
rel="preload"
href="/img/background/personBackground.webp"
as="image"
/>

{{ $cssTW := resources.Get "css/main.css" }}
{{ $css := $cssTW | resources.PostCSS (dict "inlineImports" true) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- Main Section with Logo and Title -->
<section
class="parallax p-8 bg-gray"
class="parallax bg-gray p-8"
style="background-image: url(/img/background/titleBackground.webp);"
>
<h1>
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/person.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ define "main" }}
<!-- Main Content Area -->
<main
class="p-8 text-white flex-grow bg-gray "
class="flex-grow bg-gray p-8 text-white "
data-pagefind-body
x-data="{ isBio: true }"
style="background-image: url('/img/background/personBackground.webp'); background-size: cover; background-position: center; background-repeat: no-repeat;"
Expand Down

0 comments on commit 3553af7

Please sign in to comment.