create basic components for index
- Updated layout - Include CSS reset - Include Catppuccin color variables - Add basic styling - Create navbar component
This commit is contained in:
parent
894baef9c8
commit
11473a6b53
7 changed files with 152 additions and 82 deletions
61
src/assets/style/global.css
Normal file
61
src/assets/style/global.css
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
@import url('./themes.css');
|
||||
@import url('./utils.css');
|
||||
|
||||
html {
|
||||
background-color: var(--prj-bg);
|
||||
color: var(--prj-text);
|
||||
}
|
||||
|
||||
body {
|
||||
max-width: 95vw; /* leave some space in the end by default */
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* TODO: Optimize, clean and realocate where it belogns the links styles */
|
||||
a {
|
||||
--boder-color: transparent;
|
||||
color: var(--prj-link-text);
|
||||
border: 1px solid var(--boder-color);
|
||||
border-radius: 4px;
|
||||
|
||||
transition: background-color 200ms, color 200ms;
|
||||
}
|
||||
|
||||
a.active {
|
||||
border: 1px solid var(--prj-accent-bg);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
--border-color: var(--prj-accent-bg);
|
||||
background-color: var(--prj-accent-bg);
|
||||
color: var(--prj-accent-text);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
/* Main content fix width, taken from Tailwind: https://tailwindcss.com/docs/container#using-the-container */
|
||||
|
||||
@media screen and (min-width: 640px) {
|
||||
body {
|
||||
min-width: 640px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
body {
|
||||
min-width: 768px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1024px) {
|
||||
body {
|
||||
min-width: 1024px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1280px) {
|
||||
body {
|
||||
min-width: 1280px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1536px) {
|
||||
body {
|
||||
max-width: 1536px;
|
||||
}
|
||||
}
|
||||
13
src/assets/style/themes.css
Normal file
13
src/assets/style/themes.css
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* Reference: https://github.com/catppuccin/palette/blob/main/css/catppuccin.css */
|
||||
@import url('https://unpkg.com/@catppuccin/palette/css/catppuccin.css');
|
||||
|
||||
/* Variables prefixed with prj to avoid collisions */
|
||||
:root {
|
||||
/* Using catppuccin for now, make a theme switcher later */
|
||||
--prj-bg: var(--ctp-macchiato-base);
|
||||
--prj-text: var(--ctp-macchiato-text);
|
||||
--prj-link-text: var(--ctp-macchiato-teal);
|
||||
|
||||
--prj-accent-bg: var(--ctp-macchiato-teal);
|
||||
--prj-accent-text: var(--ctp-macchiato-base);
|
||||
}
|
||||
9
src/assets/style/utils.css
Normal file
9
src/assets/style/utils.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
.hstack {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-unstyle {
|
||||
list-style: none;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue