Skip to content

Commit

Permalink
small styles
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmoon1991 committed Apr 10, 2024
1 parent be37755 commit dcb9701
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ const About: Component = () => {
Moving Brands
</p>
</div>
<p class="xs:text-2 pl fixed bottom-0 w-full">
©2024 All Rights Reserved
</p>
<p class="xs:text-2 left-8 fixed bottom-4">©2024 All Rights Reserved</p>
</section>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const Carousel: Component<CarouselProps> = (props) => {
</Show>

<Show when={!isShortScreen() && imageUrls().length > 1}>
<div class="xs:bottom-35 absolute flex w-full justify-center gap-4 md:bottom-3">
<div class="xs:bottom-35 absolute flex w-full justify-center gap-4 md:bottom-4">
<For each={imageUrls()}>
{(url, index) => (
<span
Expand Down
18 changes: 15 additions & 3 deletions src/components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createSignal, createEffect, onCleanup } from "solid-js";
import { createSignal, createEffect, onCleanup, onMount } from "solid-js";
import type { Component } from "solid-js";
import { Show } from "solid-js";
import { Transition } from "solid-transition-group";
Expand Down Expand Up @@ -29,7 +29,7 @@ const Nav: Component = () => {
});

createEffect(() => {
const mediaQuery = window.matchMedia("(max-height: 480px)");
const mediaQuery = window.matchMedia("(max-height: 700px)");
const updateScreenSize = () => setIsShortScreen(mediaQuery.matches);

updateScreenSize();
Expand All @@ -38,6 +38,14 @@ const Nav: Component = () => {
onCleanup(() => mediaQuery.removeEventListener("change", updateScreenSize));
});

const isSafari = () => {
const userAgent = window.navigator.userAgent;
const safari = userAgent.indexOf("Safari") !== -1;
const chrome = userAgent.indexOf("Chrome") !== -1;
console.log("safari", safari && !chrome);
return safari && !chrome;
};

return (
<>
<header class="z-3 fixed left-0 top-0 mt-4 flex w-full justify-between">
Expand All @@ -48,7 +56,11 @@ const Nav: Component = () => {
: "Brian You, Art Direction and Design, NY")}
</span>
<a
class="lg:text-4 xs:text-3 m-0 cursor-pointer pr-4 mix-blend-screen"
class={
isSafari()
? "lg:text-4 xs:text-3 m-0 cursor-pointer pr-8 mix-blend-screen"
: "lg:text-4 xs:text-3 m-0 cursor-pointer pr-4 mix-blend-screen"
}
onClick={handleAboutClick}
id="untouchable"
>
Expand Down

0 comments on commit dcb9701

Please sign in to comment.