Skip to content

Commit

Permalink
feature: Configure global theme (font/colors) (#10)
Browse files Browse the repository at this point in the history
* Configure global theme (font/colors)

* Fix linting errors
  • Loading branch information
WillBAnders authored Oct 21, 2023
1 parent 004cab1 commit b0d3612
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
27 changes: 11 additions & 16 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,20 @@
@tailwind utilities;

:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
}
--theme-color-primary: #057CDE;
--theme-color-secondary: #035496;
--theme-color-accent: #59B1F9;
--theme-color-text: white;

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
--background-gradiant-light: #004278;
--background-gradiant-dark: #030304;
}

body {
color: rgb(var(--foreground-rgb));
color: var(--theme-color-text);
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
to bottom right,
var(--background-gradiant-dark),
var(--background-gradiant-light)
)
}
9 changes: 6 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import "./globals.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { Poppins } from "next/font/google";

const inter = Inter({ subsets: ["latin"] });
const font = Poppins({
weight: ["400", "700"],
subsets: ["latin"],
});

export const metadata: Metadata = {
title: "Society of Software Developers",
Expand All @@ -16,7 +19,7 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={font.className}>{children}</body>
</html>
);
}

0 comments on commit b0d3612

Please sign in to comment.