Skip to content

Commit

Permalink
Standardize design of sections
Browse files Browse the repository at this point in the history
  • Loading branch information
utarwyn committed May 2, 2024
1 parent b8ca03c commit 8eb7001
Show file tree
Hide file tree
Showing 9 changed files with 252 additions and 344 deletions.
4 changes: 2 additions & 2 deletions src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ p {
font-weight: 900;
text-align: center;
margin: 0 1rem;
max-width: 780px;
max-width: 1200px;
color: var(--color-primary);
}

Expand All @@ -42,7 +42,7 @@ p {
font-weight: 900;
text-align: center;
margin: 0 1rem;
max-width: 780px;
max-width: 1050px;
color: var(--color-secondary);
}

Expand Down
4 changes: 4 additions & 0 deletions src/assets/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
--color-primary-lighter: hsl(220, 43%, 65%);
--color-primary-focus-ring: hsl(220, 43%, 37%, 20%);
--color-secondary: #57c18b;
--color-on-secondary: #ffffff;
--color-tertiary: #f05067;
--color-on-tertiary: #ffffff;
--color-quaternary: #5374c9;
--color-on-quaternary: #ffffff;

--color-on-surface: #022826;
--color-card-background: white;
Expand Down
82 changes: 82 additions & 0 deletions src/components/global/Hero.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<script setup lang="ts">
defineProps<{
variant: 'primary' | 'secondary' | 'quaternary';
title: string;
subTitle: string;
}>()
</script>

<template>
<div class="hero-container" :class="variant">
<slot></slot>
<h1>{{ title }}</h1>
<h2>{{ subTitle }}</h2>
<div class="actions">
<slot name="actions"></slot>
</div>
</div>
</template>

<style lang="scss" scoped>
.hero-container {
display: flex;
align-items: center;
flex-direction: column;
gap: 3rem;
padding: 4rem;
text-align: center;
&.primary {
background-color: var(--color-primary);
color: var(--color-on-primary);
}
&.secondary {
background-color: var(--color-secondary);
color: var(--color-on-secondary);
}
&.quaternary {
background-color: var(--color-quaternary);
color: var(--color-on-quaternary);
}
h1 {
max-width: 1200px;
font-size: 2.5rem;
font-weight: 900;
}
h2 {
font-size: 1.25rem;
font-weight: 500;
}
.actions {
display: flex;
gap: 4rem;
&:empty {
display: none;
}
}
@media screen and (max-width: 768px) {
padding: 2rem 1rem;
gap: 2rem;
h1 {
font-size: 1.5rem;
}
h2 {
font-size: 1rem;
}
.actions {
flex-direction: column;
gap: 1.2rem;
}
}
}
</style>
187 changes: 0 additions & 187 deletions src/components/global/Title.vue

This file was deleted.

Loading

0 comments on commit 8eb7001

Please sign in to comment.