Skip to content

Commit

Permalink
Added new purple theme to HTML report.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Nov 23, 2018
1 parent aa87e50 commit 4fff177
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 0 deletions.
128 changes: 128 additions & 0 deletions resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -857,3 +857,131 @@ html.dark.gray,
.dark .chart-tooltip tr {
border: 1px solid #363737;
}

/* DARK PURPLE THEME */
html.dark.purple,
.dark.purple body {
background: #1e1e2f;
}
.dark.purple .container {
background: #1e1e2f;
}
.dark.purple .page-header {
border-bottom: 1px solid #2b3553;
}
.dark.purple .label-info {
background-color: #181823;
}
.dark.purple nav {
border-right: 1px solid #e14eca;
background: #181823;
}
.dark.purple div.wrap-panel > div {
background: #27293d;
border-top: 1px solid #2b3553;
}
.dark.purple .wrap-panel table tbody.tbody-meta {
border-top: 1px solid #2b3553;
border-bottom: 1px solid #2b3553;
}
.dark.purple .wrap-panel table tbody.tbody-data tr.shaded {
background-color: #1e1e2f;
}
.dark.purple .gray {
border-top: 4px solid #2b3553;
}
.dark.purple .red {
border-top: 4px solid #fd5d93;
}
.dark.purple .green {
border-top: 4px solid #00f2c3;
}
.dark.purple .blue {
border-top: 4px solid #1f8ef1;
}
.dark.purple h3, .dark.purple h4, .dark.purple h5 {
color: #9a9a9a;
}
.dark.purple .grid-module {
background: #27293d;
}
.dark.purple .grid-module h3 {
color: #FFF;
}
.dark.purple .btn-default {
color: #9E9E9E;
background-color: #1e1e2f;
border-color: #2b3553;
}
.dark.purple .btn-default:active,
.dark.purple .btn-default:hover,
.dark.purple .btn-default.active,
.dark.purple .open>.dropdown-toggle.btn-default {
color: #59595f;
background-color: #1e1e2f;
border-color: #2b3553;
}
.dark.purple .pagination>.disabled>a,
.dark.purple .pagination>.disabled>a:hover,
.dark.purple .pagination>.disabled>a:focus {
color: #777;
}
.dark.purple .pagination>li>a {
background-color: #1e1e2f;
border: 1px solid #3B444C;
}
.dark.purple .pagination>li>a:hover,
.dark.purple .pagination>li>a:active,
.dark.purple .pagination>li>a:focus {
color: #0370B0;
background-color: #181823;
}
.dark.purple .dropdown-menu>li>a:hover,
.dark.purple .dropdown-menu>li>a:focus {
color: #FFF;
background-color: #181823;
}
.dark.purple .dropdown-menu {
background-color: #1e1e2f;
}
.dark.purple::-webkit-scrollbar-track,
.dark.purple .table-responsive::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #9E9E9E;
}
.dark.purple::-webkit-scrollbar,
.dark.purple .table-responsive::-webkit-scrollbar {
width: 10px;
height: 10px;
background-color: #9E9E9E;
}
.dark.purple::-webkit-scrollbar-thumb,
.dark.purple .table-responsive::-webkit-scrollbar-thumb {
background-color: #1e1e2f;
}
.dark.purple .chart-tooltip {
background-color: #181823;
}
.dark.purple .report-title {
background: #1F2328;
}
.dark.purple .area0,
.dark.purple .bars.y0 .bar,
.dark.purple rect.legend.y0 {
fill: #007BC3;
}
.dark.purple .area1,
.dark.purple .bars.y1 .bar,
.dark.purple .points.y1,
.dark.purple rect.legend.y1 {
fill: #d048b6;
}
.dark.purple .points.y0 {
fill: #00D4E1;
}
.dark.purple .line0 {
stroke: #007BC3;
}
.dark.purple .line1 {
stroke: #d048b6;
}
10 changes: 10 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ GoAccess.Nav = {
}.bind(this);
}.bind(this));

$$('.theme-dark-purple', function (item) {
item.onclick = function (e) {
this.setTheme('darkPurple');
}.bind(this);
}.bind(this));

$$('.layout-horizontal', function (item) {
item.onclick = function (e) {
this.setLayout('horizontal');
Expand Down Expand Up @@ -475,6 +481,10 @@ GoAccess.Nav = {
$('html').classList.add('dark');
$('html').classList.add('blue');
break;
case 'darkPurple':
$('html').classList.add('dark');
$('html').classList.add('purple');
break;
}
GoAccess.AppPrefs['theme'] = theme;
GoAccess.setPrefs();
Expand Down
3 changes: 3 additions & 0 deletions resources/tpls.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ <h3><i class="fa fa-hashtag"></i> {{labels.theme}}</h3>
<li {{#darkBlue}}class="active"{{/darkBlue}}>
<a href="javascript:void(0);" class="theme-dark-blue"><i class="fa fa-circle{{^darkBlue}}-o{{/darkBlue}}"></i> {{labels.dark_blue}}</a>
</li>
<li {{#darkPurple}}class="active"{{/darkPurple}}>
<a href="javascript:void(0);" class="theme-dark-purple"><i class="fa fa-circle{{^darkPurple}}-o{{/darkPurple}}"></i> {{labels.dark_purple}}</a>
</li>
</ul>
<h3><i class="fa fa-list-alt"></i> {{labels.panels}}</h3>
<ul class="perpage-wrap">
Expand Down
2 changes: 2 additions & 0 deletions src/labels.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@
N_("Bright")
#define HTML_REPORT_NAV_DARK_BLUE \
N_("Dark Blue")
#define HTML_REPORT_NAV_DARK_PURPLE \
N_("Dark Purple")
#define HTML_REPORT_NAV_PANELS \
N_("Panels")
#define HTML_REPORT_NAV_ITEMS_PER_PAGE \
Expand Down
1 change: 1 addition & 0 deletions src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,7 @@ print_json_i18n_def (FILE * fp)
{"dark_gray" , HTML_REPORT_NAV_DARK_GRAY} ,
{"bright" , HTML_REPORT_NAV_BRIGHT} ,
{"dark_blue" , HTML_REPORT_NAV_DARK_BLUE} ,
{"dark_purple" , HTML_REPORT_NAV_DARK_PURPLE} ,
{"panels" , HTML_REPORT_NAV_PANELS} ,
{"items_per_page" , HTML_REPORT_NAV_ITEMS_PER_PAGE} ,
{"tables" , HTML_REPORT_NAV_TABLES} ,
Expand Down

0 comments on commit 4fff177

Please sign in to comment.