Merge branch 'master' of https://github.com/DereC4/ut-grade-distribution-viewer
This commit is contained in:
4
docs/colorScheme.js
Normal file
4
docs/colorScheme.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
const colorToggle = document.getElementById("colorToggle")
|
||||||
|
colorToggle.addEventListener("change", () => {
|
||||||
|
document.body.classList.toggle("dark")
|
||||||
|
})
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
|
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js">
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -86,6 +87,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="footy">Created by Derek Chen
|
<div class="footy">Created by Derek Chen
|
||||||
<!-- because VAPA lecture was a bit boring that day -->
|
<!-- because VAPA lecture was a bit boring that day -->
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" class="checkbox" id="colorToggle">
|
||||||
|
<label for="colorToggle" class="checkbox-label">
|
||||||
|
<i class="fas fa-moon"></i>
|
||||||
|
<i class="fas fa-sun"></i>
|
||||||
|
<span class="ball"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<iframe
|
<iframe
|
||||||
src="https://ghbtns.com/github-btn.html?user=Derec4&repo=ut-grade-distribution-viewer&type=star&count=true&size=large"
|
src="https://ghbtns.com/github-btn.html?user=Derec4&repo=ut-grade-distribution-viewer&type=star&count=true&size=large"
|
||||||
frameborder="0" scrolling="0" width="100" height="30" title="GitHub">
|
frameborder="0" scrolling="0" width="100" height="30" title="GitHub">
|
||||||
@@ -93,6 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src='main.js'></script>
|
<script src='main.js'></script>
|
||||||
|
<script src='colorScheme.js'></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -6,16 +6,32 @@
|
|||||||
--label-size: 12px;
|
--label-size: 12px;
|
||||||
--h1-size: 16px;
|
--h1-size: 16px;
|
||||||
--footer-size: 10px;
|
--footer-size: 10px;
|
||||||
--background-gradient: linear-gradient(90deg, rgba(61, 87, 92, 1) 0, #454454 100%);
|
--font-color: white;
|
||||||
|
--background-color: #2b323c;
|
||||||
|
--container-color: #526d82c5;
|
||||||
|
|
||||||
|
/* --background-gradient-webkit: -webkit-linear-gradient(to right, #2C5364, #203A43, #0F2027);
|
||||||
|
--background-gradient: linear-gradient(to right, #2C5364, #203A43, #0F2027); */
|
||||||
--link-color: #2c82c9;
|
--link-color: #2c82c9;
|
||||||
font-family: 'Helvetica Neue', sans-serif;
|
font-family: 'Helvetica Neue', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Helvetica Neue', sans-serif;
|
font-family: 'Helvetica Neue', sans-serif;
|
||||||
background: #1b1a2a;
|
background: var(--background-color);
|
||||||
background: var(--background-gradient);
|
/* background: var(--background-gradient-webkit);
|
||||||
|
background: var(--background-gradient); */
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
transition: background 0.2s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.dark {
|
||||||
|
--background-color: #FAF3F0;
|
||||||
|
--container-color: #ADC4CE;
|
||||||
|
/* --font-color: #000; */
|
||||||
|
/* --background-gradient-webkit: -webkit-linear-gradient(to right, #eef2f3, #8e9eab);
|
||||||
|
--background-gradient: linear-gradient(to right, #eef2f3, #8e9eab); */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -29,7 +45,7 @@ main {
|
|||||||
|
|
||||||
.footy {
|
.footy {
|
||||||
background-color: #2e2d2d;
|
background-color: #2e2d2d;
|
||||||
color: #fff;
|
color: var(--font-color);
|
||||||
padding: 1%;
|
padding: 1%;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@@ -52,7 +68,7 @@ main {
|
|||||||
gap: 2vw;
|
gap: 2vw;
|
||||||
grid-auto-rows: minmax(100px, auto);
|
grid-auto-rows: minmax(100px, auto);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: var(--font-color);
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
/* background-color: rgba(0, 0, 0, .4); */
|
/* background-color: rgba(0, 0, 0, .4); */
|
||||||
@@ -73,26 +89,24 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.about-text {
|
.about-text {
|
||||||
background-color: rgba(0, 0, 0, .4);
|
background-color: var(--container-color);
|
||||||
border: 3px solid #f1f1f1;
|
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 10px;
|
border-radius: 5px;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
padding: var(--about-text-padding);
|
padding: var(--about-text-padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-form {
|
.bg-form {
|
||||||
background-color: rgba(0, 0, 0, .4);
|
background-color: var(--container-color);
|
||||||
border: 3px solid #f1f1f1;
|
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
width: auto;
|
width: auto;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 10px;
|
border-radius: 5px;
|
||||||
padding: var(--bg-form-padding);
|
padding: var(--bg-form-padding);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -121,6 +135,47 @@ h1 {
|
|||||||
margin: 0 0 1rem 0
|
margin: 0 0 1rem 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-label {
|
||||||
|
background-color: #111;
|
||||||
|
width: 50px;
|
||||||
|
height: 26px;
|
||||||
|
border-radius: 50px;
|
||||||
|
position: relative;
|
||||||
|
padding: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-moon {
|
||||||
|
color: #f1c40f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-sun {
|
||||||
|
color: #f39c12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-label .ball {
|
||||||
|
background-color: #fff;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
position: absolute;
|
||||||
|
left: 2px;
|
||||||
|
top: 2px;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: transform 0.2s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox:checked+.checkbox-label .ball {
|
||||||
|
transform: translateX(24px);
|
||||||
|
}
|
||||||
|
|
||||||
/* Tablet */
|
/* Tablet */
|
||||||
@media (min-width:600px) {
|
@media (min-width:600px) {
|
||||||
:root {
|
:root {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ submitButton.addEventListener("click", parseName);
|
|||||||
if (chartDiv.getAttribute('value') == 'invisible') {
|
if (chartDiv.getAttribute('value') == 'invisible') {
|
||||||
chartDiv.style.display = 'none';
|
chartDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
Chart.defaults.global.defaultFontColor = "#F8F0E5";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the input forms and determines if any fields are missing
|
* Parse the input forms and determines if any fields are missing
|
||||||
@@ -165,7 +166,7 @@ function createChart(gradeDist, courseName) {
|
|||||||
options: {
|
options: {
|
||||||
legend: {
|
legend: {
|
||||||
labels: {
|
labels: {
|
||||||
fontColor: "#00FF59",
|
fontColor: "#F8F0E5",
|
||||||
fontSize: 15
|
fontSize: 15
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user