Skip to content
Open
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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

115 changes: 115 additions & 0 deletions web/yaamp/ui/css/dark.css
Original file line number Diff line number Diff line change
@@ -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;
}
26 changes: 24 additions & 2 deletions web/yaamp/ui/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@
echo '<title>'.$pageTitle.'</title>';

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');
Expand Down Expand Up @@ -124,11 +134,23 @@ function showPageHeader()

echo '<span style="float: right;">';

$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 '<a href="'.$url.'" style="font-size: .8em; color: #ccc;">'.$text.'</a>&nbsp;&nbsp;';

$mining = getdbosql('db_mining');
$nextpayment = date('H:i T', $mining->last_payout+YAAMP_PAYMENTS_FREQ);

echo '<span style="font-size: .8em;">Next Payout: '.$nextpayment.'</span>';

echo "</span>";
echo "</div>";
echo "</div>";
}
Expand Down