summaryrefslogtreecommitdiff
path: root/css/layout.css
diff options
context:
space:
mode:
Diffstat (limited to 'css/layout.css')
-rw-r--r--css/layout.css199
1 files changed, 199 insertions, 0 deletions
diff --git a/css/layout.css b/css/layout.css
new file mode 100644
index 0000000..66037bc
--- /dev/null
+++ b/css/layout.css
@@ -0,0 +1,199 @@
+/**
+ * THIS FILE DEFINES THE STYLING OF THE SITE-WIDE LAYOUT / STRUCTURE, MEANING:
+ * - header / nav
+ * - sections
+ * - footer
+ * RULES DEFINING THE STYLE OF MORE SPECIFIC PAGE CONTENT SHOULD BE KEPT ELSEWHERE
+ */
+
+/** COLOR VARIABLES */
+:root {
+ --bg-green: #19211a;
+ --bg-green: #182118;
+ --fg-green: #e1ffdb;
+ --white: #eeeeee;
+ --page-width: 650px;
+}
+
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+
+ background-color: var(--bg-green);
+ color: var(--fg-green);
+
+ letter-spacing: 0.01rem;
+ font-family: sans-serif;
+}
+
+
+/** HEADER + NAV STYLING */
+header {
+ position: sticky;
+ top: 0;
+ z-index: 999;
+
+ line-height: 1.5rem;
+
+ display: flex;
+ justify-content: space-between;
+ width: var(--page-width);
+ align-items: center;
+
+ height: 4.5rem;
+
+ margin: 0 auto;
+ padding: 1rem 1rem;
+}
+
+.logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ transition: color 0.5s ease;
+ color: var(--fg-green);
+ text-decoration: none;
+}
+.logo:hover {
+ color: var(--white);
+}
+
+.navLink {
+ color: var(--fg-green);
+ font-weight: bold;
+ text-decoration: none;
+}
+.navLink:hover {
+ color: var(--white);
+ text-decoration: underline;
+}
+
+.activeTab {
+ color: var(--white);
+ text-decoration: underline;
+}
+
+main {
+ margin: 0 auto;
+ padding: 0 1rem;
+ width: var(--page-width);
+}
+
+section {
+ margin: 6rem 0;
+}
+
+a:hover {
+ color: var(--white);
+}
+
+
+/** FOOTER */
+footer {
+ display: flex;
+ justify-content: space-between;
+
+ margin: 5rem auto;
+ padding: 0 1rem;
+
+ width: var(--page-width);
+
+ text-align: center;
+}
+
+
+#footer-left {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+
+ width: 50%;
+ align-items: flex-start;
+}
+#footer-right {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+
+ width: 50%;
+ align-items: flex-end;
+}
+
+/** "SKIP LINK" FOR ACCESSIBILITY / SCREEN READERS */
+.skipLink {
+ position: absolute;
+ top: -50px;
+ left: 6px;
+ background: #fff;
+ color: var(--bg-green);
+ padding: 8px;
+ text-decoration: none;
+ font-weight: bold;
+ border-radius: 4px;
+ z-index: 1000;
+}
+.skipLink:focus {
+ top: 6px;
+}
+
+
+
+/** DESKTOP RULES */
+/* @media screen and (min-width: 851px) { */
+@media screen and (min-width: 651px) {
+
+
+ header {
+ border-bottom: 1px solid var(--fg-green);
+ }
+
+ nav {
+ display: flex;
+ flex-direction: row;
+ gap: 3rem;
+
+ list-style: none;
+ }
+
+}
+
+/* MOBILE RULES */
+/* @media screen and (max-width: 850px) { */
+@media screen and (max-width: 650px) {
+ /** header */
+ header {
+ padding: 1rem 1rem;
+ border-bottom: none;
+ background-size: cover;
+ }
+
+ nav {
+ display: flex;
+ flex-direction: column;
+ position: fixed;
+ gap: 2rem;
+
+ /** this shit messay buut the nav has to be manually aligned with decimal values */
+ transition: top 0.5s ease;
+ padding: 4.8rem 0 4.8rem 0;
+ top: -13.68rem;
+ left: 0;
+
+ font-size: 2rem;
+ text-align: center;
+ border-bottom: 1px solid var(--fg-green);
+
+ box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
+ z-index: -1;
+ }
+
+ nav.active {
+ top: 2rem;
+ }
+
+
+ header, nav, main, body, section, footer { width: 100% }
+
+
+}