Skip to content

Commit

Permalink
✨ tidy up build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
webcrawls committed Apr 13, 2024
1 parent e0a6aea commit 16d000e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 36 deletions.
42 changes: 9 additions & 33 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import {get, type Writable, writable} from "svelte/store";
import {onMount, setContext, type SvelteComponent} from "svelte";
import crewData from '$lib/data/team.json'
import {browser} from "$app/environment";
let uiPlaying: boolean = true
let videoPage: boolean = $page.url.pathname !== '/'
Expand Down Expand Up @@ -58,57 +57,32 @@
const centerTv = () => {
let wrapper = document.querySelector(".main-wrapper")
const elementRect = wrapper.getBoundingClientRect();
// wrapper.scrollIntoView({
// behavior: "instant",
// block: "center",
// inline: "center",
// });
scrollElementIntoView(wrapper)
// wrapper.scrollTo({ left: middle})
// console.log("scrolling to "+middle)
}
onMount(() => {
new ResizeObserver(() => setTimeout(() => centerTv(), 10)).observe(document.body)
})
// let aspectRatio = "unknown"
//
// onMount(() => setInterval(() => {
// function gcd (a, b) {
// return (b == 0) ? a : gcd (b, a%b);
// }
// var w = screen.width;
// var h = screen.height;
// var r = gcd (w, h);
// aspectRatio = `${w}/${r}`
// }, 1))
</script>

<svelte:window on:load={centerTv}/>

<div id="app">
<!-- <div style="font-size: 4rem; position: absolute; top: 0; left: 0; z-index: 999; background-color: white; color: black">-->
<!-- <p>aspect ratio: {aspectRatio}</p>-->
<!-- </div>-->
<BackgroundVideo playing={uiPlaying && videoPage}/>
<header>
<div class="top">
<h1><a href="/">INTERFERENCE PATTERN</a></h1>
</div>
<div class="bottom">
<p>a Borderline Fever Music Video</p>
<a style="{!videoPage ? 'opacity: 0.0 !important;' : ''}"
on:click|preventDefault={() => uiPlaying = !uiPlaying} href="#">[ {uiPlaying ? 'pause' : 'play'} video
]</a>
<button style="{!videoPage ? 'opacity: 0.0 !important;' : ''}"
on:click|preventDefault={() => uiPlaying = !uiPlaying}>
[ {uiPlaying ? 'pause' : 'play'} video ]
</button>
</div>
</header>
<div class="main-wrapper">
<main class="tv-frame">
<!-- <img aria-hidden="true" src="/PATTERN-TV.png" class="tv-background"/>-->
<nav class="tv-nav">
<a href="/about">About</a>
<a href="/team">Team</a>
Expand Down Expand Up @@ -162,9 +136,11 @@
</div>
</div>
<div class="image-bin">
<img src="/logo/sheridan-logo.png" alt="The Borderline Fever logo."
style="filter: invert(94%) sepia(94%) saturate(0%) hue-rotate(241deg) brightness(106%) contrast(105%);"/>
<img src="/logo/blf-logo.png" alt="The Sheridan College logo."/>
<a href="https://www.sheridancollege.ca" rel="external">
<img src="/logo/sheridan-logo.png" alt="The Sheridan college logo."
style="filter: invert(94%) sepia(94%) saturate(0%) hue-rotate(241deg) brightness(106%) contrast(105%);"/>
</a>
<img src="/logo/blf-logo.png" alt="The Borderline Fever logo."/>
</div>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</script>

<div class="image-container">
<img src="/logo/logo-grayscale.png"/>
<img alt="The Interference Pattern logo, grayscale." src="/logo/logo-grayscale.png"/>
</div>

<style>
Expand Down
6 changes: 4 additions & 2 deletions static/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,15 @@ header .bottom p {
opacity: 0.7;
}

header .bottom a {
header .bottom button {
color: inherit;
transition: opacity 0.2s;
opacity: 0.5;
background-color: unset;
border: none;
}

header .bottom a:hover {
header .bottom button:hover {
opacity: 0.8;
}

Expand Down

0 comments on commit 16d000e

Please sign in to comment.