-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conditionally render QR Code and update sponsors (#25)
* added method to call api to access user's email * Add navbar links with mobile support * finished footer component * updated email address contact in footer * finished up styling for footer * finish up hero section * finish logo section * add footer to home page * Fetch user via SSR and show name in navbar * add qr code to home page * finish hero section * decrease sponsors size * Update landing page layout according to figma * Add stars to the background * Add shooting stars & handle fetch errors * use store to pass user around, conditionally render qr code * update sponsors * add building svgs * add image alts * Make navbar mobile friendly * Update footer icons & fix text size --------- Co-authored-by: Shreya Deshpande <[email protected]> Co-authored-by: Soham Kulkarni <[email protected]>
- Loading branch information
1 parent
61b7f3c
commit d586c62
Showing
32 changed files
with
393 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<script> | ||
import Icon from '@iconify/svelte'; | ||
</script> | ||
|
||
<span class="bg-white bg-opacity-10 px-5 pt-16 h-20 relative block bottom-0 w-full"> | ||
<div class="absolute right-10 top-8 flex flex-row"> | ||
<a href="https://www.instagram.com/uiuc_rp/?hl=en"> | ||
<Icon | ||
icon="ri:instagram-fill" | ||
class="text-3xl text-gray-200 hover:text-gray-400 duration-200 inline mx-2" | ||
title="Instagram" | ||
/> | ||
</a> | ||
|
||
<a href="https://www.linkedin.com/company/reflections-projections-uiuc/"> | ||
<Icon | ||
icon="ri:linkedin-fill" | ||
class="text-3xl text-gray-200 hover:text-gray-400 duration-200 inline mx-2" | ||
title="LinkedIn" | ||
/> | ||
</a> | ||
|
||
<a href="https://twitter.com/uiuc_rp?lang=en"> | ||
<Icon | ||
icon="ri:twitter-fill" | ||
class="text-3xl text-gray-200 hover:text-gray-400 duration-200 inline mx-2" | ||
title="Twitter" | ||
/> | ||
</a> | ||
|
||
<a href="https://www.facebook.com/acmrp/"> | ||
<Icon | ||
icon="ri:facebook-fill" | ||
class="text-3xl text-gray-200 hover:text-gray-400 duration-200 inline mx-2" | ||
title="Facebook" | ||
/> | ||
</a> | ||
|
||
<a href="mailto:[email protected]"> | ||
<Icon | ||
icon="ri:mail-line" | ||
class="text-3xl text-gray-200 hover:text-gray-400 duration-200 inline mx-2" | ||
title="Email" | ||
/> | ||
</a> | ||
</div> | ||
<div class="absolute top-8 text-white text-base">Organized by ACM@UIUC</div> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script> | ||
const sponsors = [['state-farm'], ['forcepoint']]; | ||
</script> | ||
|
||
<div class="w-full py-28 px-10 lg:py-40"> | ||
<h2 class="text-white text-xl md:text-2xl lg:text-4xl text-center mb-10 sm:mb-20"> | ||
Our Sponsors | ||
</h2> | ||
<div | ||
class="w-full sm:w-3/4 xl:w-5/8 max-w-4xl mx-auto flex justify-center items-center mb-10 sm:mb-20" | ||
> | ||
{#each sponsors[0] as sponsor} | ||
<img class="w-6/12" src="logos/{sponsor}.png" alt="{sponsor} logo" /> | ||
{/each} | ||
</div> | ||
<div class="w-3/4 sm:w-1/2 xl:w-3/8 max-w-2xl mx-auto flex justify-around items-center"> | ||
{#each sponsors[1] as sponsor} | ||
<img class="w-4/12" src="logos/{sponsor}.png" alt="{sponsor} logo" /> | ||
{/each} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,87 @@ | ||
<script lang="ts"> | ||
import Icon from '@iconify/svelte'; | ||
import type { User } from '../lib/types'; | ||
import { userStore } from '../stores/user-store'; | ||
import { slide } from 'svelte/transition'; | ||
let user: User | null; | ||
userStore.subscribe((data) => (user = data)); | ||
let openDropDown = false; | ||
</script> | ||
|
||
<span class="sticky top-0"> | ||
<div class="flex px-5 py-5 flex-row justify-between h-24"> | ||
<a href="/"> | ||
<div | ||
class="flex flex-row justify-between p-5 text-gray-200 text-sm md:text-md lg:text-lg font-sans items-center" | ||
> | ||
<a href="/" class="flex flex-row items-center gap-3"> | ||
<img | ||
src="/favicon.png" | ||
alt="Reflections Projections Home Page" | ||
height={50} | ||
width={50} | ||
class="hover:rotate-180 duration-500 hover:scale-125" | ||
class="hover:rotate-180 duration-500 hover:scale-125 h-[40px] w-[40px] md:h-[50px] md:w-[50px]" | ||
/> | ||
</a> | ||
<div class="flex flex-row justify-evenly w-full md:w-2/3 lg:w-1/2"> | ||
<a | ||
href="/speakers" | ||
class="hover:underline underline-offset-8 hover:underline-offset-4 decoration-pink-500 decoration-2 duration-150" | ||
>Speakers</a | ||
> | ||
<a | ||
href="/puzzlebang" | ||
class="hidden md:block hover:underline underline-offset-8 hover:underline-offset-4 decoration-pink-500 decoration-2 duration-150" | ||
>Puzzlebang</a | ||
> | ||
<a | ||
href="/mechmania" | ||
class="hidden md:block hover:underline underline-offset-8 hover:underline-offset-4 decoration-pink-500 decoration-2 duration-150" | ||
>MechMania</a | ||
> | ||
<div | ||
class="relative inline-block md:hidden" | ||
on:mouseenter={() => { | ||
openDropDown = true; | ||
}} | ||
on:mouseleave={() => { | ||
openDropDown = false; | ||
}} | ||
> | ||
<button | ||
class="relative md:hidden hover:underline underline-offset-8 hover:underline-offset-4 decoration-pink-500 decoration-2 duration-150" | ||
on:click={() => { | ||
openDropDown = !openDropDown; | ||
}}>Special Events</button | ||
> | ||
{#if openDropDown} | ||
<div class="block absolute z-10 pt-1" in:slide out:slide> | ||
<div | ||
class="flex flex-col divide-y-2 bg-rp-cream rounded-lg text-rp-blue p-1 border-rp-pink" | ||
> | ||
<a class="p-1.5 hover:text-rp-dull-pink duration-200" href="/mechmania">MechMania</a> | ||
<a class="p-1.5 hover:text-rp-dull-pink duration-200" href="/puzzlebang">Puzzlebang</a | ||
> | ||
</div> | ||
</div> | ||
{/if} | ||
</div> | ||
{#if user} | ||
<div class="flex flex-row gap-3 items-center"> | ||
<div class="hidden md:flex">{user?.fullName ? `Welcome, ${user.fullName}` : ''}</div> | ||
<a href="/preferences"> | ||
<Icon | ||
icon="fluent:person-28-filled" | ||
class="text-xl md:text-3xl hover:text-pink-500 duration-200" | ||
/> | ||
</a> | ||
</div> | ||
{:else} | ||
<a | ||
href="/login" | ||
class="hover:underline underline-offset-8 hover:underline-offset-4 decoration-pink-500 decoration-2 duration-150" | ||
>Log In</a | ||
> | ||
{/if} | ||
</div> | ||
</div> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script lang="ts"> | ||
let open = false; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { API_URL } from '../constants'; | ||
import type { User } from '$lib/types'; | ||
import { get } from 'svelte/store'; | ||
|
||
/** @type {import('./$types').LayoutServerLoad} */ | ||
export const load = async ({ fetch }): Promise<{ user: User | null }> => { | ||
const url = get(API_URL); | ||
|
||
try { | ||
const check = await fetch(`${url}/auth/me`, { | ||
credentials: 'include', | ||
cache: 'no-cache' | ||
}); | ||
|
||
if (check.status != 200) { | ||
return { user: null }; | ||
} | ||
const user: User = await check.json(); | ||
return { | ||
user | ||
}; | ||
} catch (e) { | ||
return { | ||
user: null | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
<script> | ||
import { userStore } from '../stores/user-store'; | ||
import '../app.css'; | ||
import Navbar from '../components/navbar.svelte'; | ||
import Footer from '../components/footer.svelte'; | ||
/** @type {import('./$types').LayoutData} */ | ||
export let data; | ||
userStore.set(data.user); | ||
</script> | ||
|
||
<div class="min-h-screen"> | ||
<Navbar /> | ||
<slot /> | ||
</div> | ||
<Footer /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,70 @@ | ||
<script lang="ts"> | ||
import Icon from '@iconify/svelte'; | ||
import ShootingStar from '../components/shooting-star.svelte'; | ||
import { API_URL } from '../constants'; | ||
import { get } from 'svelte/store'; | ||
import Footer from '../components/footer.svelte'; | ||
import Sponsors from '../components/home/sponsors.svelte'; | ||
import GlassContainer from '../components/glass-container.svelte'; | ||
import ShootingStar from '../components/shooting-star.svelte'; | ||
import { onMount } from 'svelte'; | ||
import { userStore } from '../stores/user-store'; | ||
import type { User } from '../lib/types'; | ||
import { slide } from 'svelte/transition'; | ||
let qrImg: string | null = null; | ||
const getUser = async () => { | ||
const response = await fetch(`${$API_URL}/auth/me`, { | ||
credentials: 'include' | ||
}).catch((err) => console.log(err)); | ||
let user: User | null = null; | ||
userStore.subscribe((data) => (user = data)); | ||
const user = await response?.json(); | ||
console.log('user', user); | ||
}; | ||
console.log(user); | ||
getUser(); | ||
onMount(() => { | ||
try { | ||
if (user) { | ||
fetch(`${$API_URL}/attendee/qr`, { | ||
credentials: 'include' | ||
}) | ||
.then((response) => response.text()) | ||
.then((text) => { | ||
qrImg = text; | ||
}); | ||
} | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
}); | ||
</script> | ||
|
||
<div class="h-full text-white flex items-center"> | ||
<ShootingStar /> | ||
<span | ||
class="flex flex-col md:flex-row mx-auto p-2 md:p-5 md:bg-white rounded-xl md:bg-opacity-10" | ||
> | ||
<div class="flex flex-col text-2xl mx-5 my-2 md:my-5 font-serif"> | ||
<div class="whitespace-nowrap flex flex-row"> | ||
<div>Reflections | Projections</div> | ||
</div> | ||
<div class="text-gray-300">2023</div> | ||
<div class="text-xl my-3">Coming Soon</div> | ||
<ShootingStar /> | ||
<div class="text-white flex items-center mx-10 xl:mx-2 my-5 xl:my-9"> | ||
<span class="w-full flex-col flex items-center"> | ||
<img class="w-[80%] sm:w-3/5 lg:w-2/5 mb-10" src="/rp-text-logo-white.svg" alt="rp logo" /> | ||
<div class="text-center xl:text-center text-md sm:text-2xl lg:text-xl uppercase xl:mb-5 mb-10"> | ||
September 18 - 22, 2023 | ||
</div> | ||
<div class="flex flex-col mx-5 my-2 md:my-5 md:w-96 font-sans"> | ||
<div class="text-md"> | ||
The largest student run technology conference in the midwest, held annually at the | ||
University of Illinois at Urbana-Champaign. | ||
{#if user} | ||
<div class="block w-full md:max-w-sm md:w-8/12 mx-auto" in:slide> | ||
<GlassContainer> | ||
<img class="w-full aspect-square" src={qrImg} alt="QR Pass" /> | ||
</GlassContainer> | ||
</div> | ||
{:else} | ||
<p | ||
class="w-full md:w-2/3 lg:w-1/2 text-center text-base md:text-lg font-medium text-gray-200" | ||
> | ||
Expand your horizons at the <b class="text-pink-200" | ||
>Midwest’s largest student run tech conference</b | ||
> this September. Join us for a week full of insightful talks from industry & academia leaders, | ||
hands-on workshops, and networking events. | ||
</p> | ||
<a | ||
href="https://2022.reflectionsprojections.org/" | ||
class="flex flex-row gap-2 w-fit items-center bg-white opacity-80 rounded-md py-2 px-4 my-5 hover:opacity-90 duration-200 text-rp-blue" | ||
href="/reister" | ||
class="bg-rp-cream text-center p-4 lg:p-6 my-6 rounded-full hover:bg-opacity-70 duration-300" | ||
> | ||
<div>Visit 2022 Site</div> | ||
<Icon icon="mdi:arrow-top-right-thin" /> | ||
<span class="uppercase text-black text-base md:text-xl font-semibold text-rp-gradient" | ||
>Register Now</span | ||
> | ||
</a> | ||
</div> | ||
{/if} | ||
</span> | ||
</div> | ||
<Sponsors /> |
Oops, something went wrong.