Skip to content
Snippets Groups Projects
Commit b3856be1 authored by Trygve Jørgensen's avatar Trygve Jørgensen
Browse files

chore(style): simplified project styling

parent b48da2e8
No related branches found
No related tags found
3 merge requests!66Final merge,!5Frontend setup,!4Pipeline fix
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>
<RouterView />
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
<main>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<p>Paragraph</p>
<button>Button</button>
<br>
<a href="#">Link</a>
<div>Div</div>
<section>Section</section>
<article>Article</article>
<RouterView />
</main>
</template>
<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
}
.logo {
display: block;
margin: 0 auto 2rem;
}
nav {
width: 100%;
font-size: 12px;
text-align: center;
margin-top: 2rem;
display: flex;
justify-content: center;
gap: 1rem;
margin: 1rem 0;
}
nav a.router-link-exact-active {
......@@ -45,41 +41,4 @@ nav a.router-link-exact-active {
nav a.router-link-exact-active:hover {
background-color: transparent;
}
nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}
nav a:first-of-type {
border: 0;
}
@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}
.logo {
margin: 0 2rem 0 0;
}
header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}
nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;
padding: 1rem 0;
margin-top: 1rem;
}
}
</style>
/* color palette from <https://github.com/vuejs/theme> */
:root {
--vt-c-white: #ffffff;
--vt-c-white-soft: #f8f8f8;
--vt-c-white-mute: #f2f2f2;
--vt-c-black: #181818;
--vt-c-black-soft: #222222;
--vt-c-black-mute: #282828;
@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;700&display=swap');
--vt-c-indigo: #2c3e50;
:root {
--black: #363739;
--white: #ffffff;
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
--bright: #f7da7c;
--vt-c-text-light-1: var(--vt-c-indigo);
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
--vt-c-text-dark-1: var(--vt-c-white);
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
--accent1: #f4bab9;
--accent2: #b2c79f;
--accent3: #ef9691;
}
/* semantic color variables for this project */
:root {
--color-background: var(--vt-c-white);
--color-background-soft: var(--vt-c-white-soft);
--color-background-mute: var(--vt-c-white-mute);
--color-border: var(--vt-c-divider-light-2);
--color-border-hover: var(--vt-c-divider-light-1);
--color-heading: var(--vt-c-text-light-1);
--color-text: var(--vt-c-text-light-1);
--color-background: var(--white);
--color-text: var(--black);
--color-button: var(--bright);
--color-link: var(--accent3);
--section-gap: 160px;
}
@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--vt-c-black);
--color-background-soft: var(--vt-c-black-soft);
--color-background-mute: var(--vt-c-black-mute);
--color-border: var(--vt-c-divider-dark-2);
--color-border-hover: var(--vt-c-divider-dark-1);
--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
/* TODO: add dark mode colors */
}
}
......@@ -66,19 +42,7 @@ body {
color 0.5s,
background-color 0.5s;
line-height: 1.6;
font-family:
Inter,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Fira Sans',
'Droid Sans',
'Helvetica Neue',
sans-serif;
font-family: 'Karla', sans-serif;
font-size: 15px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
......
@import './base.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
#app {
max-width: 1280px;
margin: 0 auto;
margin: 0 auto auto auto;
width: 100%;
padding: 2rem;
font-weight: normal;
display: flex;
flex-direction: column;
}
h1,
h2,
h3 {
font-weight: bold;
}
h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
}
h2 {
font-size: 2rem;
margin-bottom: 1rem;
}
h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
}
a,
.green {
button {
background-color: var(--color-button);
color: var(--color-text);
border: none;
padding: 0.2rem 1rem;
border-radius: 1rem;
cursor: pointer;
transition: 0.4s;
}
a {
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
color: var(--color-link);
transition: 0.4s;
padding: 3px;
}
@media (hover: hover) {
......@@ -23,16 +57,3 @@ a,
background-color: hsla(160, 100%, 37%, 0.2);
}
}
@media (min-width: 1024px) {
body {
display: flex;
place-items: center;
}
#app {
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0 2rem;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment