Skip to content
Draft
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
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
require("./ckeditor.js");
require("./bootstrap.js");
require("./helpers.js");
require("./theme.js");
80 changes: 80 additions & 0 deletions resources/assets/js/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*!
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
* Copyright 2011-2025 The Bootstrap Authors
* Licensed under the Creative Commons Attribution 3.0 Unported License.
*/

(() => {
'use strict'

const getStoredTheme = () => localStorage.getItem('theme')
const setStoredTheme = theme => localStorage.setItem('theme', theme)

const getPreferredTheme = () => {
const storedTheme = getStoredTheme()
if (storedTheme) {
return storedTheme
}

return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}

const setTheme = theme => {
if (theme === 'auto') {
document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
} else {
document.documentElement.setAttribute('data-bs-theme', theme)
}
}

setTheme(getPreferredTheme())

const showActiveTheme = (theme, focus = false) => {
const themeSwitcher = document.querySelector('#bd-theme')

if (!themeSwitcher) {
return
}

const themeSwitcherText = document.querySelector('#bd-theme-text')
const activeThemeIcon = document.querySelector('.theme-icon-active use')
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href')

document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
element.classList.remove('active')
element.setAttribute('aria-pressed', 'false')
})

btnToActive.classList.add('active')
btnToActive.setAttribute('aria-pressed', 'true')
activeThemeIcon.setAttribute('href', svgOfActiveBtn)
const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})`
themeSwitcher.setAttribute('aria-label', themeSwitcherLabel)

if (focus) {
themeSwitcher.focus()
}
}

window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
const storedTheme = getStoredTheme()
if (storedTheme !== 'light' && storedTheme !== 'dark') {
setTheme(getPreferredTheme())
}
})

window.addEventListener('DOMContentLoaded', () => {
showActiveTheme(getPreferredTheme())

document.querySelectorAll('[data-bs-theme-value]')
.forEach(toggle => {
toggle.addEventListener('click', () => {
const theme = toggle.getAttribute('data-bs-theme-value')
setStoredTheme(theme)
setTheme(theme)
showActiveTheme(theme, true)
})
})
})
})()
1 change: 1 addition & 0 deletions resources/assets/sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Body

$body-bg: #f5f8fa;

// Typography
Expand Down
24 changes: 19 additions & 5 deletions resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ $font-family-base: "Hind Siliguri", sans-serif;

html,
body {
background-color: #fff;
color: black;
//background-color: #fff;
//color: black;
--bs-body-font-family: "Hind Siliguri", sans-serif;
--bs-body-font-size: 1rem;
--bs-body-font-weight: 100;
Expand Down Expand Up @@ -151,15 +151,16 @@ body {
}

.view-header {
background-color: #f0f0f0;
background-color: var(--bs-secondary-bg);
}

.tab-link {
color: black;
// color: black;
}

.item-black {
color: black;
// color: black;
color: var(--bs-body-color);
}

.bronze {
Expand All @@ -168,6 +169,7 @@ body {

div.bronze-bg {
background-color: #c9ae5d;
color: rgb(33,37,41);
}

.pyrite {
Expand All @@ -176,6 +178,7 @@ div.bronze-bg {

div.pyrite-bg {
background-color: #ffdf00;
color: rgb(33,37,41);
}

div.hours-danger,
Expand Down Expand Up @@ -219,3 +222,14 @@ td.hours-success {
a {
text-decoration: none;
}

[data-bs-theme=dark] .logo-light {
display: none;
}
[data-bs-theme=light] .logo-dark {
display: none;
}

.tab-link {
color: var(--bs-secondary-color);
}
2 changes: 1 addition & 1 deletion resources/assets/sass/mix/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ input:checked + .slider:before {

div.clocks div.card-body {
text-align: center;
background-color: lightgrey;
background-color: var(--bs-tertiary-bg);
}

div.clocks iframe {
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/sass/mix/footer_white.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ table.availability td.available {
text-align: center;
padding-top: 25px;
padding-bottom: 25px;
background-color: #eee;
background-color: var(--bs-secondary-bg);
}

#myFooter .fa {
Expand Down
5 changes: 5 additions & 0 deletions resources/assets/sass/mix/roster.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ thead.sticky th {
top: 0;
box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
}


[data-bs-theme=dark] thead.sticky th {
background: var(--bs-secondary-bg);
}
4 changes: 2 additions & 2 deletions resources/assets/sass/mix/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
}

#pill-sidebar button {
color: #606060;
color: var(--bs-secondary-color);
font-weight: bold;
font-size: 12px;
}
#pill-sidebar a.nav-link {
color: black;
color: var(--bs-body-color);
font-size: 14px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<div class="container">
<ul class="nav nav-tabs nav-justified" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#new" role="tab" data-bs-toggle="tab" style="color:black">New Reports</a>
<a class="nav-link active" href="#new" role="tab" data-bs-toggle="tab" >New Reports</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#archive" role="tab" data-bs-toggle="tab" style="color:black">Archived Reports</a>
<a class="nav-link" href="#archive" role="tab" data-bs-toggle="tab" >Archived Reports</a>
</li>
</ul>
<div class="tab-content">
Expand Down
6 changes: 3 additions & 3 deletions resources/views/dashboard/admin/roster/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
<div class="container">
<ul class="nav nav-tabs nav-justified" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#profile" role="tab" data-bs-toggle="tab" style="color:black"><i class="fas fa-id-card"></i>&nbsp;Member Profile</a>
<a class="nav-link active" href="#profile" role="tab" data-bs-toggle="tab" ><i class="fas fa-id-card"></i>&nbsp;Member Profile</a>
</li>
@if(Auth::user()->isAbleTo('roster') || Auth::user()->isAbleTo('train') || Auth::user()->hasRole('ec'))
<li class="nav-item">
<a class="nav-link" href="#certifications" role="tab" data-bs-toggle="tab" style="color:black"><i class="fas fa-graduation-cap"></i>&nbsp;Controller Certifications</a>
<a class="nav-link" href="#certifications" role="tab" data-bs-toggle="tab" ><i class="fas fa-graduation-cap"></i>&nbsp;Controller Certifications</a>
</li>
@endif
@if(Auth::user()->isAbleTo('roster') || Auth::user()->isAbleTo('events'))
<li class="nav-item">
<a class="nav-link" href="#events" role="tab" data-bs-toggle="tab" style="color:black"><i class="fa-solid fa-chart-line"></i>&nbsp;Event Participation</a>
<a class="nav-link" href="#events" role="tab" data-bs-toggle="tab" ><i class="fa-solid fa-chart-line"></i>&nbsp;Event Participation</a>
</li>
@endif
</ul>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/dashboard/admin/roster/purge.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@php ($active = ' active')
@endif
<li class="nav-item">
<a class="nav-link{{ $active }}" href="#{{ $statCategory }}" role="tab" data-bs-toggle="tab" style="color:black">{{ ucfirst($statCategory) }} Controllers</a>
<a class="nav-link{{ $active }}" href="#{{ $statCategory }}" role="tab" data-bs-toggle="tab" >{{ ucfirst($statCategory) }} Controllers</a>
</li>
@endforeach
<li class="nav-item">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/dashboard/admin/scenery/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@php ($active = ' active')
@endif
<li class="nav-item">
<a class="nav-link tab-link{{ $active }}" href="#{{ $sceneryCategory }}" role="tab" data-bs-toggle="tab" style="color:black">{{ $sceneryDescription }}</a>
<a class="nav-link tab-link{{ $active }}" href="#{{ $sceneryCategory }}" role="tab" data-bs-toggle="tab" >{{ $sceneryDescription }}</a>
</li>
@endforeach
</ul>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/dashboard/controllers/files.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@php ($activeMarker = ' active')
@endif
<li class="nav-item">
<a class="nav-link{{ $activeMarker }}" href="#{{ strtolower($fileCategory) }}" role="tab" data-bs-toggle="tab" style="color:black">{{ $fileCategory }}</a>
<a class="nav-link{{ $activeMarker }}" href="#{{ strtolower($fileCategory) }}" role="tab" data-bs-toggle="tab" >{{ $fileCategory }}</a>
</li>
@php ($displayedTabs[] = strtolower($fileCategory))
@endforeach
Expand Down
4 changes: 2 additions & 2 deletions resources/views/dashboard/controllers/roster.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
@endif
<ul class="nav nav-tabs nav-justified" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#hcontrollers" role="tab" data-bs-toggle="tab" style="color:black"><i class="fas fa-home"></i>&nbsp;Home Controllers</a>
<a class="nav-link active" href="#hcontrollers" role="tab" data-bs-toggle="tab" ><i class="fas fa-home"></i>&nbsp;Home Controllers</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#vcontrollers" role="tab" data-bs-toggle="tab" style="color:black"><i class="fas fa-suitcase"></i>&nbsp;Visiting Controllers</a>
<a class="nav-link" href="#vcontrollers" role="tab" data-bs-toggle="tab" ><i class="fas fa-suitcase"></i>&nbsp;Visiting Controllers</a>
</li>
</ul>
@php
Expand Down
Loading
Loading