Skip to content

Commit

Permalink
Add light theme
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviocv committed Dec 8, 2024
1 parent 213a1a6 commit 3d3c228
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 11 deletions.
43 changes: 43 additions & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,52 @@
* {
margin: 0px;
}

:root {
/* dark theme config */
--dark-theme-backgroung-color: #000;
--dark-theme-green: #00FF55;
--dark-theme-yellow: #FFB800;
--dark-theme-purple: #CC00FF;
--dark-theme-blue: #00A3FF;
--dark-theme-pink: #FF006B;
--dark-theme-text-color: var(--dark-theme-green);

/* light theme config */
--light-theme-backgroung-color: #FFF6DF;
--light-theme-green: #006A24;
--light-theme-yellow: #CA9100;
--light-theme-purple: #A300CC;
--light-theme-blue: #008DDC;
--light-theme-pink: #CF0057;
--light-theme-text-color: var(--light-theme-green);

/* default config */
--theme-backgroung-color: var(--dark-theme-backgroung-color);
--theme-green: var(--dark-theme-green);
--theme-yellow: var(--dark-theme-yellow);
--theme-purple: var(--dark-theme-purple);
--theme-blue: var(--dark-theme-blue);
--theme-pink: var(--dark-theme-pink);
--theme-text-color: var(--dark-theme-green);
}

@media (prefers-color-scheme: light) {
:root {
--theme-backgroung-color: var(--light-theme-backgroung-color);
--theme-green: var(--light-theme-green);
--theme-yellow: var(--light-theme-yellow);
--theme-purple: var(--light-theme-purple);
--theme-blue: var(--light-theme-blue);
--theme-pink: var(--light-theme-pink);
--theme-text-color: var(--light-theme-green);
}
}

body::-webkit-scrollbar {
display: none;
}

</style>
%sveltekit.head%
</head>
Expand Down
26 changes: 15 additions & 11 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<script>
</script>

<div class="app">

<div class="content">
<br>

Expand All @@ -16,9 +20,9 @@
</p>
<p class="right">
───────── <br>
<a class="bold darkblue" href="https://x.com/otaviocv">twitter</a><br>
<a class="bold darkred" href="https://www.youtube.com/@otaviocv">youtube</a><br>
<a class="bold darkpurple" href="https://www.linkedin.com/in/otaviocv/">linkedin</a><br>
<a class="bold blue" href="https://x.com/otaviocv">twitter</a><br>
<a class="bold pink" href="https://www.youtube.com/@otaviocv">youtube</a><br>
<a class="bold purple" href="https://www.linkedin.com/in/otaviocv/">linkedin</a><br>
─────────
</p>

Expand Down Expand Up @@ -93,8 +97,8 @@ a:link, a:visited, a:hover, a:active {
font-size: 2em;
width: 100%;
display: content;
background: #000;
color: #00ff00;
background: var(--theme-backgroung-color);
color: var(--theme-text-color);
}
h1 {
Expand Down Expand Up @@ -123,16 +127,16 @@ h1 {
font-weight: 700;
}
.darkblue {
color: #00A3FF;
.blue {
color: var(--theme-blue);
}
.darkred {
color: #FF006B;
.pink {
color: var(--theme-pink);
}
.darkpurple {
color: #CC00FF;
.purple {
color: var(--theme-purple);
}
Expand Down

0 comments on commit 3d3c228

Please sign in to comment.