From aa0f98c63b16f6478649d744855c9159de2ef7f5 Mon Sep 17 00:00:00 2001 From: intellectualcoin <40910837+intellectualcoin@users.noreply.github.com> Date: Thu, 21 Aug 2025 04:57:46 +0300 Subject: [PATCH 1/2] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3472e5567..6803da415 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,5 @@ Thanks to globalzon to have released the initial Yaamp source code. -- -You can support this project donating to tpruvot : - -BTC : 1Auhps1mHZQpoX4mCcVL8odU81VakZQ6dR +You can support this project donating to tpruvot From c6836ef3ca774c4b69cc3cc392f7cfa31802f41b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 08:05:28 +0000 Subject: [PATCH 2/2] feat: Add dark mode This commit introduces a dark mode to the web interface. A new `dark.css` stylesheet is added with styles for the dark theme, including styles for tables. The main layout file `main.php` is modified to allow users to switch between light and dark themes. The theme preference is stored in a cookie. A link is added to the header to toggle between the themes. --- web/yaamp/ui/css/dark.css | 115 ++++++++++++++++++++++++++++++++++++++ web/yaamp/ui/main.php | 26 ++++++++- 2 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 web/yaamp/ui/css/dark.css diff --git a/web/yaamp/ui/css/dark.css b/web/yaamp/ui/css/dark.css new file mode 100644 index 000000000..bc5955fa6 --- /dev/null +++ b/web/yaamp/ui/css/dark.css @@ -0,0 +1,115 @@ +body +{ + background-color: #1a1a1a; + color: #ccc; +} + +a, a:visited +{ + color: #6db9ff; +} + +a:hover +{ + color: #a3d1ff; +} + +.page .tabmenu-out +{ + background-image: url(/images/base/top_header_dark.png); + -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, .75); + box-shadow: 0 2px 3px rgba(0, 0, 0, .75); +} + +.page .tabmenu-inner a +{ + color: #ccc; +} + +.page .tabmenu-inner .selected +{ + color: #fff; + border: 1px solid #383838; + background-image: url(/images/base/top_header_selected_dark.png); +} + +.main-left-box +{ + border: 1px solid #333; +} + +.main-left-title +{ + background-color: #2c2c2c; + color: #ccc; +} + +.main-text-input +{ + background-color: #222; + border: 1px solid #444; + color: #ccc; +} + +.main-submit-button +{ + background-color: #222; + border: 1px solid #444; + color: #ccc; +} + +.page .footer +{ + background-color: #222; + color: #aaa; +} + +hr +{ + border-top: 1px solid #333; +} + +/* tables */ +table.dataGrid, table.dataGrid2 { + color: #ccc; +} + +table.dataGrid th, table.dataGrid2 th { + background-color: #2c2c2c; + border-bottom: 1px solid #333; +} + +table.dataGrid tbody, table.dataGrid2 tbody { + border: 1px solid #333; +} + +table.dataGrid td, table.dataGrid2 td { + border-bottom: 1px solid #333; +} + +table.dataGrid th.tablesorter-headerAsc, +table.dataGrid th.tablesorter-headerDesc, +table.dataGrid2 th.tablesorter-headerAsc, +table.dataGrid2 th.tablesorter-headerDesc { + color: #6db9ff; +} + +table.reportgrid1 { + background: #1a1a1a; +} + +table.reportgrid1 th { + background: #2c2c2c; +} + +table.reportgrid1 tr.odd { + background: #222; +} + +.ssrow:hover { + background-color: #333; +} + +.ssselected { + background-color: #444; +} diff --git a/web/yaamp/ui/main.php b/web/yaamp/ui/main.php index 0d0394870..7597c5c2c 100644 --- a/web/yaamp/ui/main.php +++ b/web/yaamp/ui/main.php @@ -25,7 +25,17 @@ echo ''.$pageTitle.''; echo CHtml::cssFile("/extensions/jquery/themes/ui-lightness/jquery-ui.css"); -echo CHtml::cssFile('/yaamp/ui/css/main.css'); +$theme = isset($_COOKIE['theme']) ? $_COOKIE['theme'] : 'main'; +if (isset($_GET['theme'])) { + $theme = $_GET['theme']; + setcookie('theme', $theme, time() + (86400 * 30), "/"); // 30 days +} + +if ($theme == 'dark') { + echo CHtml::cssFile('/yaamp/ui/css/dark.css'); +} else { + echo CHtml::cssFile('/yaamp/ui/css/main.css'); +} echo CHtml::cssFile('/yaamp/ui/css/table.css'); //echo CHtml::scriptFile('/extensions/jquery/js/jquery-1.8.3-dev.js'); @@ -124,11 +134,23 @@ function showPageHeader() echo ''; + $theme = isset($_COOKIE['theme']) ? $_COOKIE['theme'] : 'main'; + $params = $_GET; + if ($theme == 'dark') { + $params['theme'] = 'main'; + $text = 'Light Mode'; + } else { + $params['theme'] = 'dark'; + $text = 'Dark Mode'; + } + $url = controller()->createUrl('', $params); + echo ''.$text.'  '; + $mining = getdbosql('db_mining'); $nextpayment = date('H:i T', $mining->last_payout+YAAMP_PAYMENTS_FREQ); echo 'Next Payout: '.$nextpayment.''; - + echo ""; echo ""; echo ""; }