Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark Mode #1609

Merged
merged 22 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cecf77f
Test darkmode base colors
SimonRothUCF Feb 29, 2024
af3cb45
Fix merge conflict
SimonRothUCF Feb 29, 2024
6acfbf0
Add the majority of dark mode styling and graphics
SimonRothUCF Aug 13, 2024
19542e1
Add dark mode graphics
SimonRothUCF Sep 17, 2024
02d6cfe
Resolve merge conflicts
SimonRothUCF Sep 17, 2024
68faba4
Fix a few remaining style issues
SimonRothUCF Sep 19, 2024
57c05ce
Bring branch up to date with 10.3.0
SimonRothUCF Sep 19, 2024
8700956
Removes unnecessary style duplicates for darkmode across several comp…
clpetersonucf Sep 23, 2024
9bbfa29
Removes illustrator source file from public/img
clpetersonucf Sep 23, 2024
568239d
Merge pull request #1 from clpetersonucf/darkmode/removing-redundant-…
SimonRothUCF Sep 25, 2024
92b7711
Clean up unnecessary styles and fix issues detailed in Dark Mode pull…
SimonRothUCF Nov 7, 2024
af7cfaf
Updated with changes from dev/10.3.0 again
clpetersonucf Nov 20, 2024
77f3b1a
Even more upstream changes from dev/10.3.0
clpetersonucf Nov 26, 2024
084ef34
Minor settings page cleanup. Replaced browser default radio + checkbo…
clpetersonucf Nov 26, 2024
a36ad32
General tweaks and improvements to profile, my widgets pages
clpetersonucf Dec 2, 2024
0ae8e0c
Yet another merge with upstream changes from dev/10.3.0
clpetersonucf Dec 3, 2024
d49d086
Lots of misc polish and fixes to my widgets dark mode styling; tweaks…
clpetersonucf Dec 3, 2024
9144237
Tweaks to admin pages, header logo, generator modal, and score screen
clpetersonucf Dec 3, 2024
d72d8ea
Committing missing svg logos associated with prior commit
clpetersonucf Dec 3, 2024
abeb5e5
Additional tweaks: player, pre-embed, profile, and LTI views
clpetersonucf Dec 4, 2024
f74cad9
Guide page, help page, support page, profile page tweaks
clpetersonucf Dec 4, 2024
e9dff02
Logo file cleanup. Modest tweaks to font rendering across various pages.
clpetersonucf Dec 5, 2024
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
1 change: 1 addition & 0 deletions fuel/app/classes/controller/api/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function post_settings()
$set_meta = [
'useGravatar' => Input::json('useGravatar', null),
'notify' => Input::json('notify', null),
'darkMode' => Input::json('darkMode', null)
];

$success = Materia\Api::user_update_meta($set_meta);
Expand Down
1 change: 1 addition & 0 deletions fuel/app/classes/controller/qsets.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

class Controller_Qsets extends Controller
{
use Trait_CommonControllerTemplate;

public function action_import()
{
Expand Down
2 changes: 2 additions & 0 deletions fuel/app/classes/controller/questions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

class Controller_Questions extends Controller
{
use Trait_CommonControllerTemplate;

public function get_import()
{
// Validate Logged in
Expand Down
3 changes: 2 additions & 1 deletion fuel/app/classes/model/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class Model_User extends Orm\Model

protected static $_default_profile_fields = [
'useGravatar' => true,
'notify' => true
'notify' => true,
'darkMode' => false
];

protected static $_properties = [
Expand Down
6 changes: 6 additions & 0 deletions fuel/app/classes/trait/commoncontrollertemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
trait Trait_CommonControllerTemplate
{
use Trait_Analytics;
use Trait_DarkMode;

protected $_disable_browser_cache = false;

Expand All @@ -32,6 +33,11 @@ public function after($response)

$this->inject_common_js_constants();

if ($this->is_using_darkmode())
{
$this->theme->get_template()->set('darkmode', true);
}

return parent::after($response);
}

Expand Down
19 changes: 19 additions & 0 deletions fuel/app/classes/trait/darkmode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Materia
* License outlined in licenses folder
*/

trait Trait_DarkMode
{
protected function is_using_darkmode()
{
if (\Service_User::verify_session() == true)
{
$meta = \Model_User::find_current()->profile_fields;
$darkmode = ! empty($meta['darkMode']) && $meta['darkMode'];
return $darkmode;
}
else return false;
}
}
2 changes: 1 addition & 1 deletion fuel/app/themes/default/layouts/react.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<?= Css::render() ?>
<?= $partials['google_analytics'] ?? '' ?>
</head>
<body class="<?= (isset($page_type) ? $page_type : '') ?>">
<body class="<?= (isset($page_type) ? $page_type : '') ?> <?= (isset($darkmode) ? 'darkMode' : '') ?>">
<div id="app"></div>
<div id="modal"></div>
<?= Js::render() ?>
Expand Down
Binary file added public/img/404_beachandocean_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/404_insand_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/404_logo_balls_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/banner_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/kogneato_metal_detecting_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 134 additions & 0 deletions public/img/kogneato_metal_detecting_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions public/img/kogneato_mywidgets_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading