Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@charset "UTF-8";
@font-face {
font-family: "montserrat";
src: url("../assets/fonts/Montserrat.ttf") format("ttf");
Expand All @@ -10,9 +11,11 @@
font-weight: normal;
font-style: normal;
}
/* Define other theme-related styles here */
* {
margin: 0;
padding: 0;
transition: all 0.6s;
}

body {
Expand All @@ -27,7 +30,9 @@ body {
border-radius: 5px;
margin: auto 2em;
padding: 2em;
position: relative;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.18);
/* Define styles for the toggle switch */
}
.nav a {
color: #000;
Expand All @@ -54,6 +59,61 @@ body {
font-size: 20px;
text-align: center;
}
.nav .toggle-container {
position: absolute;
top: 10px;
right: 10px;
display: flex;
align-items: center;
}
.nav .toggle-label {
margin-right: 10px;
font-family: "montserrat";
}
.nav #theme-toggle {
visibility: hidden;
}
.nav .toggle-switch {
position: relative;
display: inline-block;
width: 55px;
height: 22px;
border: 1px solid black;
background-color: #ccc;
border-radius: 20px;
}
.nav .slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
line-height: 0;
background-color: yellow;
border-radius: 20px;
transition: 0.5s;
}
.nav .slider:before {
content: "🌑"; /* Default to Dark theme emoji */
position: absolute;
transform: translateX(5px);
top: 50%;
left: 0;
transform: translate(0, -50%);
transition: all 0.6s ease;
}
.nav input:checked + .slider {
background-color: #fff;
}
.nav input:checked + .slider:before {
content: "☀️"; /* Change to Light theme emoji when checked */
left: calc(100% - 0px);
transform: translate(-100%, -50%);
}
.nav input:focus + .slider {
box-shadow: 0 0 1px #fff;
}

main {
margin: 2em;
Expand Down
76 changes: 71 additions & 5 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,34 @@
font-weight: normal;
font-style: normal;
}
$background-color: #f5f5f5;
$background-color_light: #f5f5f5;
$primary-font: "montserrat";
$box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.18);

/* Define other theme-related styles here */

* {
margin: 0;
padding: 0;
transition: all .6s;
}



body {
background-color: #f5f5f5;
background-color: $background-color_light;
font-family: $primary-font;
}


.nav {
background-color: #f5f5f5;
background-color: $background-color_light;
padding: 10px 0;
margin-bottom: 20px;
border-radius: 5px;
margin: auto 2em;
padding: 2em;
position: relative;
box-shadow: $box-shadow;
a {
color: #000;
Expand All @@ -57,12 +67,68 @@ body {
}
}
}
.toggle-container {
position: absolute;
top: 10px;
right: 10px;
display: flex;
align-items: center;
}
.toggle-label {
margin-right: 10px;
font-family: $primary-font;
}
#theme-toggle{
visibility: hidden;
}
/* Define styles for the toggle switch */
.toggle-switch {
position: relative;
display: inline-block;
width: 55px;
height: 22px;
border:1px solid black;
background-color: #ccc;
border-radius: 20px;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
line-height: 0;
background-color: yellow;
border-radius: 20px;
transition: 0.5s;
}
.slider:before {
content: '🌑'; /* Default to Dark theme emoji */
position: absolute;
transform: translateX(5px);
top: 50%;
left: 0;
transform: translate(0, -50%);
transition: all .6s ease;
}
input:checked + .slider {
background-color: #fff;
}
input:checked + .slider:before {
content: '☀️'; /* Change to Light theme emoji when checked */
left: calc(100% - 0px);
transform: translate(-100%, -50%);
}
input:focus + .slider {
box-shadow: 0 0 1px #fff;
}
}
main {
margin: 2em;
display: flex;
.vertical-nav {
background-color: $background-color;
background-color: $background-color_light;
box-shadow: $box-shadow;
border-radius: 5px;
margin-right: 2em;
Expand Down Expand Up @@ -152,7 +218,7 @@ main {
}
}
.container-main {
background-color: $background-color;
background-color: $background-color_light;
box-shadow: $box-shadow;
border-radius: 5px;
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" >
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>STM Constitution</title>
<link rel="stylesheet" href="./css/style.css" />
<link rel="icon" href="./favicons/ms-icon-310x310.png" type="image/x-icon">
</head>
<body>
<body >
<opencodelaw spec-url="specs/opencon.yaml"></opencodelaw>
<!-- Include opencon.js -->
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
Expand Down
Loading