Skip to content

Commit 60b2a2e

Browse files
author
Ilia Rostovtsev
committed
Version 18.32-patch [enhancement #664 #291]
1 parent b8d711b commit 60b2a2e

32 files changed

+1083
-363
lines changed

README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
[![ScreenShot](https://raw.githubusercontent.com/qooob/authentic-theme/master/images/screenshot.png)](http://youtu.be/f_oy3qX2GXo)
1515
![](https://rostovtsev.ru/pub/media/screenshots/screenshot-pallets-1710.png)
16+
![](https://rostovtsev.ru/pub/media/screenshots/screenshot-content-page-18.40.png)
1617

1718
####Principles
1819
* Make the theme fully support all _Webmin/Usermin_ modules
@@ -85,10 +86,6 @@ The theme has inbuilt feature to notify an administrative user to install update
8586
####How do I customize the theme?
8687
Theme has configurable options, that are located in `Webmin->Webmin Configuration->Webmin Themes`. There as well, you can upload custom _logos_ and code custom _styles.css_, _scripts.js_ and _scripts.pm_.
8788

88-
89-
####How do I make user palettes work?
90-
_Authentic_ Theme utilizes built-in, custom color palettes, that a user can define using theme's extensions. It's possible, by using theme's _CSS_ extensions, to pass user custom selector, such as `user-palette-1`, `user-palette-2`, `user-palette-3`, `user-palette-4`, `user-palette-5`, `user-palette-6`, `user-palette-7`, `user-palette-8`, `user-palette-9` and `user-palette-10` to enable a usage of user palettes. For example, in order to use `user-palette-1`, in the theme's settings, you would need to set the option _Navigation Menu Color_ to the value of `User Palette 1`. After that, provide a custom code to the theme's _CSS_ extension, with [a pre-built template](http://codepen.io/qooob/pen/dYaPvj), corresponding with custom theme's identification.
91-
9289
####How do I execute shell command using search field?
9390
Type `!` in search, followed by your command. Example: `! ls -lsaZ /root`. It's required to have _Command Shell_ module available.
9491

authentic-init.pm

+15
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ sub embed_header {
105105
embed_css_bundle();
106106
}
107107

108+
embed_css_content_palette();
108109
embed_styles();
109110
embed_settings();
110111

@@ -309,6 +310,20 @@ sub embed_css_content {
309310
. '" rel="stylesheet">' . "\n";
310311
}
311312

313+
sub embed_css_content_palette {
314+
if ( length $__settings{'settings_background_color'}
315+
&& $__settings{'settings_background_color'} ne 'gainsboro' )
316+
{
317+
print '<link href="'
318+
. $gconfig{'webprefix'}
319+
. '/unauthenticated/css/palettes/'
320+
. lc( $__settings{'settings_background_color'} ) . '.'
321+
. ( theme_mode() eq 'debug' ? 'src' : 'min' ) . '.css?'
322+
. theme_version()
323+
. '" rel="stylesheet" data-palette>' . "\n";
324+
}
325+
}
326+
312327
sub embed_js_timeplot {
313328
print '<script src="'
314329
. $gconfig{'webprefix'}

authentic-lib.pm

+28-45
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,15 @@ sub get_extended_sysinfo {
418418
<a data-toggle="collapse" href="#'
419419
. $info->{'id'} . '-'
420420
. $info->{'module'}
421-
. '-collapse" aria-expanded="true" aria-controls="'
421+
. '-collapse" aria-expanded="'
422+
. (
423+
(
424+
$info->{'open'}
425+
|| $__settings{
426+
'settings_sysinfo_expand_all_accordions'} eq 'true'
427+
) ? 'true' : 'false'
428+
)
429+
. '" aria-controls="'
422430
. $info->{'id'} . '-'
423431
. $info->{'module'}
424432
. '-collapse">
@@ -1636,6 +1644,16 @@ sub csf_mod {
16361644
. $ext . '.css?'
16371645
. theme_version()
16381646
. '" rel="stylesheet">' . "\n";
1647+
if ( length $__settings{'settings_background_color'}
1648+
&& $__settings{'settings_background_color'} ne 'gainsboro' )
1649+
{
1650+
print $fh '<link href="'
1651+
. $gconfig{'webprefix'}
1652+
. '/unauthenticated/css/palettes/' .
1653+
lc( $__settings{'settings_background_color'} ) . '.' . $ext . '.css?'
1654+
. theme_version()
1655+
. '" rel="stylesheet">' . "\n";
1656+
}
16391657

16401658
if ( -r $scripts ) {
16411659
print $fh '<script src="'
@@ -2019,6 +2037,7 @@ sub embed_login_head {
20192037
. theme_version()
20202038
. '" rel="stylesheet">' . "\n";
20212039

2040+
embed_css_content_palette();
20222041
embed_css_fonts();
20232042
embed_styles();
20242043

@@ -2933,63 +2952,27 @@ sub _settings {
29332952
<option value="darkGrey"'
29342953
. ( $v eq 'darkGrey' && ' selected' ) . '>Dark Grey</option>
29352954
2936-
<option value="user-palette-1"'
2937-
. ( $v eq 'user-palette-1' && ' selected' )
2938-
. '>User Palette 1</option>
2939-
2940-
<option value="user-palette-2"'
2941-
. ( $v eq 'user-palette-2' && ' selected' )
2942-
. '>User Palette 2</option>
2943-
2944-
<option value="user-palette-3"'
2945-
. ( $v eq 'user-palette-3' && ' selected' )
2946-
. '>User Palette 3</option>
2947-
2948-
<option value="user-palette-4"'
2949-
. ( $v eq 'user-palette-4' && ' selected' )
2950-
. '>User Palette 4</option>
2955+
<option value="noir"'
2956+
. ( $v eq 'noir' && ' selected' ) . '>Noir</option>
29512957
2952-
<option value="user-palette-5"'
2953-
. ( $v eq 'user-palette-5' && ' selected' )
2954-
. '>User Palette 5</option>
2955-
2956-
<option value="user-palette-6"'
2957-
. ( $v eq 'user-palette-6' && ' selected' )
2958-
. '>User Palette 6</option>
2959-
2960-
<option value="user-palette-7"'
2961-
. ( $v eq 'user-palette-7' && ' selected' )
2962-
. '>User Palette 7</option>
2963-
2964-
<option value="user-palette-8"'
2965-
. ( $v eq 'user-palette-8' && ' selected' )
2966-
. '>User Palette 8</option>
2967-
2968-
<option value="user-palette-9"'
2969-
. ( $v eq 'user-palette-9' && ' selected' )
2970-
. '>User Palette 9</option>
2971-
2972-
<option value="user-palette-10"'
2973-
. ( $v eq 'user-palette-10' && ' selected' )
2974-
. '>User Palette 10</option>
2958+
<option value="gunmetal"'
2959+
. ( $v eq 'gunmetal' && ' selected' ) . '>Gunmetal</option>
29752960
29762961
29772962
</select>';
29782963
}
29792964
elsif ( $k eq 'settings_background_color' ) {
29802965
$v = '<select class="ui_select" name="' . $k . '">
29812966
2982-
<option value="gainsboro"'
2967+
2968+
<option value="gainsboro"'
29832969
. ( $v eq 'gainsboro' && ' selected' )
29842970
. '>Gainsboro ('
29852971
. $Atext{'theme_xhred_global_default'}
29862972
. ')</option>
29872973
2988-
<option value="lightGrey"'
2989-
. ( $v eq 'lightGrey' && ' selected' ) . '>White Smoke</option>
2990-
2991-
<option value="ghostWhite"'
2992-
. ( $v eq 'ghostWhite' && ' selected' ) . '>Ghost White</option>
2974+
<option value="nightRider"'
2975+
. ( $v eq 'nightRider' && ' selected' ) . '>Night Rider</option>
29932976
29942977
</select>';
29952978
}

authentic.pm

+3-1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ sub theme_footer {
193193
if ( get_env('script_name') ne '/session_login.cgi'
194194
&& get_env('script_name') ne '/pam_login.cgi' )
195195
{
196+
my $prefix;
197+
my $hostname = ( $prefix ) = split( /\./, get_display_hostname() );
196198
print '<div data-autocomplete="'
197199
. ( has_command('bash') ? 1 : 0 )
198200
. '" class="-shell-port-">
@@ -201,7 +203,7 @@ sub theme_footer {
201203
<div class="-shell-port-cmd">
202204
<span class="-shell-port-prompt"><span class="-shell-port-type">['
203205
. $remote_user . '@'
204-
. &get_display_hostname()
206+
. ($prefix ? $prefix : get_display_hostname())
205207
. ' <span class="-shell-port-pwd" data-home="'
206208
. get_user_home()
207209
. '" data-pwd="'

extensions/csf/csf.css

+197
Original file line numberDiff line numberDiff line change
@@ -851,4 +851,201 @@ html[data-post='profileapply'] form[action='index.cgi'] input[value='restartboth
851851

852852
html[data-post=''] input[name='comment'] {
853853
margin-top: 2px
854+
}
855+
856+
html[data-background-style='nightRider'] .csf form .value-other,
857+
html[data-background-style='nightRider'] .csf form .value-default,
858+
html[data-background-style='nightRider'] .csf form .comment,
859+
html[data-background-style='nightRider'] .csf form .section {
860+
background-color: #2f3237;
861+
border-color: #383a40;
862+
border-top-width: 1px
863+
}
864+
865+
html[data-background-style='nightRider'] .csf .btn:not(.btn-xxs):not(.btn-tiny):not(.ui_link_replaced).btn-csf-config.active {
866+
color: #bfc9d3 !important;
867+
border-color: rgba(27, 191, 137, .45) !important;
868+
background-color: rgba(27, 191, 137, .07) !important
869+
}
870+
871+
html[data-module='csf'][data-background-style='nightRider'] .tab-pane>.table.table-striped.table-condensed tbody>tr:first-child,
872+
html[data-module='csf'][data-background-style='nightRider'] .tab-pane>.table.table-striped.table-condensed tr:first-child>th:first-child,
873+
html[data-module='csf'][data-background-style='nightRider'] .table.table-striped.table-condensed+.table.table-striped.table-condensed tbody>tr:first-child,
874+
html[data-module='csf'][data-background-style='nightRider'] .table.table-striped.table-condensed+.table.table-striped.table-condensed tr:first-child>th:first-child {
875+
border-top-color: #3d3f43 !important;
876+
border-top-width: 1px;
877+
background-color: #2d3036
878+
}
879+
880+
html[data-background-style='nightRider'] hr,
881+
html[data-module='csf'][data-background-style='nightRider'] .csf .footer-string {
882+
border-top-color: #3d3f43 !important;
883+
border-top-width: 1px
884+
}
885+
886+
html[data-post=''][data-background-style='nightRider'] button[value='denyf'] {
887+
color: #bfc9d3 !important;
888+
border-color: rgba(247, 175, 62, .68) !important;
889+
background-color: rgba(247, 175, 62, .07) !important
890+
}
891+
892+
html[data-post=''][data-background-style='nightRider'] button[value='denyf']:active,
893+
html[data-post=''][data-background-style='nightRider'] button[value='denyf']:focus,
894+
html[data-post=''][data-background-style='nightRider'] button[value='denyf']:hover,
895+
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='denyf']+input[type='submit']:hover {
896+
color: #fff !important;
897+
border-color: #f7af3e !important;
898+
outline: 0 !important;
899+
background-color: rgba(247, 175, 62, .1) !important;
900+
box-shadow: none !important
901+
}
902+
903+
html[data-post=''][data-background-style='nightRider'] button[value='disable'] {
904+
color: #bfc9d3 !important;
905+
border-color: rgba(219, 82, 75, .69) !important;
906+
background-color: rgba(219, 82, 75, .07) !important
907+
}
908+
909+
html[data-post=''][data-background-style='nightRider'] button[value='disable']:active,
910+
html[data-post=''][data-background-style='nightRider'] button[value='disable']:focus,
911+
html[data-post=''][data-background-style='nightRider'] button[value='disable']:hover {
912+
color: #fff !important;
913+
border-color: #db524b !important;
914+
outline: 0 !important;
915+
background-color: rgba(219, 82, 75, .1) !important;
916+
box-shadow: none !important
917+
}
918+
919+
html[data-post=''][data-background-style='nightRider'] button[value='enable'] {
920+
color: #bfc9d3 !important;
921+
border-color: rgba(27, 191, 137, .55) !important;
922+
background-color: rgba(27, 191, 137, .07) !important
923+
}
924+
925+
html[data-post=''][data-background-style='nightRider'] button[value='enable']:active,
926+
html[data-post=''][data-background-style='nightRider'] button[value='enable']:focus,
927+
html[data-post=''][data-background-style='nightRider'] button[value='enable']:hover {
928+
color: #fff !important;
929+
border-color: #1bbf89 !important;
930+
outline: 0 !important;
931+
background-color: rgba(27, 191, 137, .1) !important;
932+
box-shadow: none !important
933+
}
934+
935+
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit'],
936+
html[data-post=''][data-background-style='nightRider'] button[value='restart'] {
937+
color: #bfc9d3 !important;
938+
border-color: rgba(86, 192, 224, .72) !important;
939+
background-color: rgba(86, 192, 224, .07) !important
940+
}
941+
942+
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit']:active,
943+
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit']:focus,
944+
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit']:hover,
945+
html[data-post=''][data-background-style='nightRider'] button[value='restart']:active,
946+
html[data-post=''][data-background-style='nightRider'] button[value='restart']:focus,
947+
html[data-post=''][data-background-style='nightRider'] button[value='restart']:hover {
948+
color: #fff !important;
949+
border-color: #56c0e0 !important;
950+
outline: 0 !important;
951+
background-color: rgba(86, 192, 224, .1) !important;
952+
box-shadow: none !important
953+
}
954+
955+
html[data-background-style='nightRider'] body.csf .table>thead>tr:first-child>th,
956+
html[data-background-style='nightRider'] body.csf .table>tbody>tr:first-child>th,
957+
html[data-background-style='nightRider'] body.csf table>tfoot>tr:first-child>th,
958+
html[data-background-style='nightRider'] body.csf .table>thead>tr:first-child>td,
959+
html[data-background-style='nightRider'] body.csf .table>tbody>tr:first-child>td,
960+
html[data-background-style='nightRider'] body.csf .table>tfoot>tr:first-child>td {
961+
border-top: 1px solid #424449 !important
962+
}
963+
964+
html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-heading {
965+
border: 1px solid #424449;
966+
background-color: #2d3036
967+
}
968+
969+
html[data-background-style='nightRider'] code {
970+
background-color: #2d3036 !important
971+
}
972+
973+
html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-body {
974+
border-color: #424449
975+
}
976+
977+
html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-heading {
978+
border-bottom: 0
979+
}
980+
981+
html[data-module='csf'][data-background-style='nightRider'] div.panel-body>div[style*='background: #F4F4EA'] {
982+
background-color: #2d3036 !important;
983+
border-color: #3d3f43 !important
984+
}
985+
986+
html[data-module='csf'][data-background-style='nightRider'] [style*='border-right: 1px solid #DDDDDD'] {
987+
border-color: rgba(61, 63, 67, 0.85) !important
988+
}
989+
990+
html[data-module='csf'][data-background-style='nightRider'] [style*='background:#FFD1DC'],
991+
html[data-module='csf'][data-background-style='nightRider'] [style*='background: #FFD1DC'] {
992+
border-color: rgba(61, 63, 67, 0.85) !important;
993+
outline: 0 !important;
994+
background-color: rgba(219, 82, 75, .1) !important
995+
}
996+
997+
html[data-module='csf'][data-background-style='nightRider'] [style*='background:#BDECB6'],
998+
html[data-module='csf'][data-background-style='nightRider'] [style*='background: #BDECB6'] {
999+
background-color: rgba(27, 191, 137, .1) !important;
1000+
border-color: rgba(61, 63, 67, 0.85) !important
1001+
}
1002+
1003+
html[data-module='csf'][data-background-style='nightRider'] [style*='background: #FFFDD8'],
1004+
html[data-module='csf'][data-background-style='nightRider'] [style*='background:#FFFDD8'] {
1005+
background-color: rgba(247, 175, 62, .1) !important
1006+
}
1007+
1008+
html[data-module='csf'][data-background-style='nightRider'] [style*='border: 1px solid #DDDDDD'],
1009+
html[data-module='csf'][data-background-style='nightRider'] [style*='border:1px solid #DDDDDD'] {
1010+
border-color: rgba(61, 63, 67, 0.85) !important
1011+
}
1012+
1013+
html[data-module='csf'][data-background-style='nightRider'] [style*='background: #990000'],
1014+
html[data-module='csf'][data-background-style='nightRider'] [style*='background:#990000'] {
1015+
background-color: #a84b4b !important
1016+
}
1017+
1018+
html[data-post='logtail'][data-background-style='nightRider'] .panel .panel-body .panel,
1019+
html[data-post='loggrep'][data-background-style='nightRider'] .panel .panel-body .panel {
1020+
border: 1px solid #424449
1021+
}
1022+
1023+
html[data-post='viewports'][data-background-style='nightRider'] .col_header_custom {
1024+
border-top: 1px solid #424449 !important;
1025+
border-right: 1px solid #424449 !important;
1026+
border-left: 1px solid #424449 !important
1027+
}
1028+
1029+
html[data-module='csf'][data-background-style='nightRider'] .dataTables_wrapper .dataTables_empty:hover,
1030+
html[data-module='csf'][data-background-style='nightRider'] .dataTables_wrapper .dataTables_empty {
1031+
background-color: #2f3237
1032+
}
1033+
1034+
html[data-module='csf'][data-background-style='nightRider'] .panel {
1035+
color: rgba(169, 174, 180, 0.94) !important
1036+
}
1037+
1038+
html[data-module='csf'][data-background-style='nightRider'] .cspinner .cspinner-icon.dark {
1039+
border-top-color: #70737b;
1040+
border-left-color: #5d5c5c
1041+
}
1042+
1043+
html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-heading,
1044+
html[data-module='csf'][data-background-style='nightRider'] .panel._devcon .panel-heading,
1045+
html[data-module='csf'][data-background-style='nightRider'] .panel._devcon {
1046+
border-color: #3a3e43
1047+
}
1048+
1049+
html[data-post=''][data-module='csf'][data-background-style='nightRider'] div#home table tr:nth-child(even) td {
1050+
background-color: #2a2d31
8541051
}

0 commit comments

Comments
 (0)