-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6: Fix hero component and create new pages #929
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6b97770
Fix hero component and create new pages
karnikaavelumani e7c15f1
Fixed hero component alignment
tomasohCHOM 0b0db9c
Merge branch 'main' into fix/hero-component
karnikaavelumani 5b4379e
Merge branch 'main' into fix/hero-component
EthanThatOneKid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,41 @@ | ||
<script lang="ts"> | ||
import { preloadData } from '$app/navigation'; | ||
import { onMount } from 'svelte'; | ||
import Navbar from '$lib/components/nav/bar.svelte'; | ||
import Footer from '$lib/components/footer/footer.svelte'; | ||
import AcmToaster from '$lib/components/toaster/toaster.svelte'; | ||
import { AcmTheme, theme } from '$lib/public/legacy/theme'; | ||
|
||
function changeTheme(event: MediaQueryListEvent) { | ||
theme.set(event.matches ? AcmTheme.Dark : AcmTheme.Light); | ||
} | ||
|
||
onMount(() => { | ||
theme.init(); | ||
|
||
if ('matchMedia' in window) { | ||
const mediaList = matchMedia('(prefers-color-scheme: dark)'); | ||
mediaList.addEventListener('change', changeTheme); | ||
return () => mediaList.removeEventListener('change', changeTheme); | ||
} | ||
|
||
// preloadData improves the load time of the events page, see #772 | ||
// https://kit.svelte.dev/docs/modules#$app-navigation-preloaddata | ||
preloadData('/events'); | ||
}); | ||
</script> | ||
|
||
<Navbar /> | ||
<main><slot /></main> | ||
<Footer /> | ||
<AcmToaster /> | ||
|
||
<svelte:head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
</svelte:head> | ||
|
||
<style> | ||
main { | ||
min-height: 100vh; | ||
} | ||
</style> |
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,39 @@ | ||
<script> | ||
import Spacing from '$lib/public/legacy/spacing.svelte'; | ||
import Hero from './hero.svelte'; | ||
import Desc from './desc.svelte'; | ||
import Teams from './teams.svelte'; | ||
import Testimony from './testimony.svelte'; | ||
import Lucky from './lucky.svelte'; | ||
import Blog from './blog.svelte'; | ||
</script> | ||
|
||
<svelte:head> | ||
<title>ACM at CSUF</title> | ||
</svelte:head> | ||
|
||
<Spacing --min="175px" --med="200px" --max="200px" /> | ||
|
||
<Hero /> | ||
|
||
<Spacing --min="120px" --med="175px" --max="200px" /> | ||
|
||
<Desc /> | ||
|
||
<Spacing --min="120px" --med="175px" --max="200px" /> | ||
|
||
<Teams /> | ||
|
||
<Spacing --min="120px" --med="175px" --max="200px" /> | ||
|
||
<Testimony /> | ||
|
||
<Spacing --min="120px" --med="175px" --max="200px" /> | ||
|
||
<Lucky /> | ||
|
||
<Spacing --min="120px" --med="175px" --max="200px" /> | ||
|
||
<Blog /> | ||
|
||
<Spacing --min="75px" --med="100px" --max="120px" /> |
Empty file.
Empty file.
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,94 @@ | ||
<script lang="ts"> | ||
import AcmButton from '$lib/components/button/button.svelte'; | ||
</script> | ||
|
||
<section class="hero-container"> | ||
<div class="hero-inner-container"> | ||
<div class="hero-text"> | ||
<h1 class="brand-header size-xl"> | ||
<span>We are the largest</span> <span class="multicolor-text">Computer Science</span> | ||
<span>community at CSUF</span> | ||
</h1> | ||
<div class="join-button"> | ||
<AcmButton text="Join today!" link="/discord" redirect={true} /> | ||
</div> | ||
</div> | ||
|
||
<img | ||
src="/assets/png/capy-power.png" | ||
alt="Chip the Capybara surrounded by all ACM Team badges" | ||
/> | ||
</div> | ||
</section> | ||
|
||
<style> | ||
section { | ||
display: grid; | ||
} | ||
|
||
section .hero-inner-container { | ||
display: grid; | ||
grid-template-columns: 1fr; | ||
align-items: center; | ||
gap: 1em; | ||
} | ||
|
||
section .hero-inner-container .hero-text { | ||
display: grid; | ||
align-items: center; | ||
text-align: center; | ||
gap: 1em; | ||
} | ||
|
||
section .hero-inner-container .hero-text span.multicolor-text { | ||
background: linear-gradient( | ||
to right, | ||
var(--acm-turquoise), | ||
var(--acm-blue), | ||
var(--acm-bluer), | ||
var(--acm-purple), | ||
var(--acm-pink) | ||
); | ||
-webkit-background-clip: text; | ||
color: transparent; | ||
} | ||
|
||
section .hero-inner-container .hero-text span { | ||
display: block; | ||
} | ||
|
||
section .hero-inner-container .hero-text .join-button { | ||
display: grid; | ||
justify-self: center; | ||
} | ||
|
||
section .hero-inner-container img { | ||
max-width: clamp(20rem, 17.342rem + 10.13vw, 30rem); | ||
justify-self: center; | ||
} | ||
|
||
@media screen and (min-width: 768px) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace |
||
section { | ||
display: grid; | ||
place-items: center; | ||
align-items: center; | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
} | ||
|
||
section .hero-inner-container { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
align-items: center; | ||
gap: 4em; | ||
} | ||
|
||
section .hero-inner-container .hero-text { | ||
text-align: start; | ||
} | ||
|
||
section .hero-inner-container .hero-text .join-button { | ||
justify-self: start; | ||
} | ||
} | ||
</style> |
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move
<img>
above text container in mobile view