Skip to content

Commit

Permalink
Version 18.32-patch [enhancement #664 #291]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Rostovtsev committed Mar 1, 2017
1 parent b8d711b commit 60b2a2e
Show file tree
Hide file tree
Showing 32 changed files with 1,083 additions and 363 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

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

####Principles
* Make the theme fully support all _Webmin/Usermin_ modules
Expand Down Expand Up @@ -85,10 +86,6 @@ The theme has inbuilt feature to notify an administrative user to install update
####How do I customize the theme?
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_.


####How do I make user palettes work?
_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.

####How do I execute shell command using search field?
Type `!` in search, followed by your command. Example: `! ls -lsaZ /root`. It's required to have _Command Shell_ module available.

Expand Down
15 changes: 15 additions & 0 deletions authentic-init.pm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ sub embed_header {
embed_css_bundle();
}

embed_css_content_palette();
embed_styles();
embed_settings();

Expand Down Expand Up @@ -309,6 +310,20 @@ sub embed_css_content {
. '" rel="stylesheet">' . "\n";
}

sub embed_css_content_palette {
if ( length $__settings{'settings_background_color'}
&& $__settings{'settings_background_color'} ne 'gainsboro' )
{
print '<link href="'
. $gconfig{'webprefix'}
. '/unauthenticated/css/palettes/'
. lc( $__settings{'settings_background_color'} ) . '.'
. ( theme_mode() eq 'debug' ? 'src' : 'min' ) . '.css?'
. theme_version()
. '" rel="stylesheet" data-palette>' . "\n";
}
}

sub embed_js_timeplot {
print '<script src="'
. $gconfig{'webprefix'}
Expand Down
73 changes: 28 additions & 45 deletions authentic-lib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,15 @@ sub get_extended_sysinfo {
<a data-toggle="collapse" href="#'
. $info->{'id'} . '-'
. $info->{'module'}
. '-collapse" aria-expanded="true" aria-controls="'
. '-collapse" aria-expanded="'
. (
(
$info->{'open'}
|| $__settings{
'settings_sysinfo_expand_all_accordions'} eq 'true'
) ? 'true' : 'false'
)
. '" aria-controls="'
. $info->{'id'} . '-'
. $info->{'module'}
. '-collapse">
Expand Down Expand Up @@ -1636,6 +1644,16 @@ sub csf_mod {
. $ext . '.css?'
. theme_version()
. '" rel="stylesheet">' . "\n";
if ( length $__settings{'settings_background_color'}
&& $__settings{'settings_background_color'} ne 'gainsboro' )
{
print $fh '<link href="'
. $gconfig{'webprefix'}
. '/unauthenticated/css/palettes/' .
lc( $__settings{'settings_background_color'} ) . '.' . $ext . '.css?'
. theme_version()
. '" rel="stylesheet">' . "\n";
}

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

embed_css_content_palette();
embed_css_fonts();
embed_styles();

Expand Down Expand Up @@ -2933,63 +2952,27 @@ sub _settings {
<option value="darkGrey"'
. ( $v eq 'darkGrey' && ' selected' ) . '>Dark Grey</option>
<option value="user-palette-1"'
. ( $v eq 'user-palette-1' && ' selected' )
. '>User Palette 1</option>
<option value="user-palette-2"'
. ( $v eq 'user-palette-2' && ' selected' )
. '>User Palette 2</option>
<option value="user-palette-3"'
. ( $v eq 'user-palette-3' && ' selected' )
. '>User Palette 3</option>
<option value="user-palette-4"'
. ( $v eq 'user-palette-4' && ' selected' )
. '>User Palette 4</option>
<option value="noir"'
. ( $v eq 'noir' && ' selected' ) . '>Noir</option>
<option value="user-palette-5"'
. ( $v eq 'user-palette-5' && ' selected' )
. '>User Palette 5</option>
<option value="user-palette-6"'
. ( $v eq 'user-palette-6' && ' selected' )
. '>User Palette 6</option>
<option value="user-palette-7"'
. ( $v eq 'user-palette-7' && ' selected' )
. '>User Palette 7</option>
<option value="user-palette-8"'
. ( $v eq 'user-palette-8' && ' selected' )
. '>User Palette 8</option>
<option value="user-palette-9"'
. ( $v eq 'user-palette-9' && ' selected' )
. '>User Palette 9</option>
<option value="user-palette-10"'
. ( $v eq 'user-palette-10' && ' selected' )
. '>User Palette 10</option>
<option value="gunmetal"'
. ( $v eq 'gunmetal' && ' selected' ) . '>Gunmetal</option>
</select>';
}
elsif ( $k eq 'settings_background_color' ) {
$v = '<select class="ui_select" name="' . $k . '">
<option value="gainsboro"'
<option value="gainsboro"'
. ( $v eq 'gainsboro' && ' selected' )
. '>Gainsboro ('
. $Atext{'theme_xhred_global_default'}
. ')</option>
<option value="lightGrey"'
. ( $v eq 'lightGrey' && ' selected' ) . '>White Smoke</option>
<option value="ghostWhite"'
. ( $v eq 'ghostWhite' && ' selected' ) . '>Ghost White</option>
<option value="nightRider"'
. ( $v eq 'nightRider' && ' selected' ) . '>Night Rider</option>
</select>';
}
Expand Down
4 changes: 3 additions & 1 deletion authentic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ sub theme_footer {
if ( get_env('script_name') ne '/session_login.cgi'
&& get_env('script_name') ne '/pam_login.cgi' )
{
my $prefix;
my $hostname = ( $prefix ) = split( /\./, get_display_hostname() );
print '<div data-autocomplete="'
. ( has_command('bash') ? 1 : 0 )
. '" class="-shell-port-">
Expand All @@ -201,7 +203,7 @@ sub theme_footer {
<div class="-shell-port-cmd">
<span class="-shell-port-prompt"><span class="-shell-port-type">['
. $remote_user . '@'
. &get_display_hostname()
. ($prefix ? $prefix : get_display_hostname())
. ' <span class="-shell-port-pwd" data-home="'
. get_user_home()
. '" data-pwd="'
Expand Down
197 changes: 197 additions & 0 deletions extensions/csf/csf.css
Original file line number Diff line number Diff line change
Expand Up @@ -851,4 +851,201 @@ html[data-post='profileapply'] form[action='index.cgi'] input[value='restartboth

html[data-post=''] input[name='comment'] {
margin-top: 2px
}

html[data-background-style='nightRider'] .csf form .value-other,
html[data-background-style='nightRider'] .csf form .value-default,
html[data-background-style='nightRider'] .csf form .comment,
html[data-background-style='nightRider'] .csf form .section {
background-color: #2f3237;
border-color: #383a40;
border-top-width: 1px
}

html[data-background-style='nightRider'] .csf .btn:not(.btn-xxs):not(.btn-tiny):not(.ui_link_replaced).btn-csf-config.active {
color: #bfc9d3 !important;
border-color: rgba(27, 191, 137, .45) !important;
background-color: rgba(27, 191, 137, .07) !important
}

html[data-module='csf'][data-background-style='nightRider'] .tab-pane>.table.table-striped.table-condensed tbody>tr:first-child,
html[data-module='csf'][data-background-style='nightRider'] .tab-pane>.table.table-striped.table-condensed tr:first-child>th:first-child,
html[data-module='csf'][data-background-style='nightRider'] .table.table-striped.table-condensed+.table.table-striped.table-condensed tbody>tr:first-child,
html[data-module='csf'][data-background-style='nightRider'] .table.table-striped.table-condensed+.table.table-striped.table-condensed tr:first-child>th:first-child {
border-top-color: #3d3f43 !important;
border-top-width: 1px;
background-color: #2d3036
}

html[data-background-style='nightRider'] hr,
html[data-module='csf'][data-background-style='nightRider'] .csf .footer-string {
border-top-color: #3d3f43 !important;
border-top-width: 1px
}

html[data-post=''][data-background-style='nightRider'] button[value='denyf'] {
color: #bfc9d3 !important;
border-color: rgba(247, 175, 62, .68) !important;
background-color: rgba(247, 175, 62, .07) !important
}

html[data-post=''][data-background-style='nightRider'] button[value='denyf']:active,
html[data-post=''][data-background-style='nightRider'] button[value='denyf']:focus,
html[data-post=''][data-background-style='nightRider'] button[value='denyf']:hover,
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='denyf']+input[type='submit']:hover {
color: #fff !important;
border-color: #f7af3e !important;
outline: 0 !important;
background-color: rgba(247, 175, 62, .1) !important;
box-shadow: none !important
}

html[data-post=''][data-background-style='nightRider'] button[value='disable'] {
color: #bfc9d3 !important;
border-color: rgba(219, 82, 75, .69) !important;
background-color: rgba(219, 82, 75, .07) !important
}

html[data-post=''][data-background-style='nightRider'] button[value='disable']:active,
html[data-post=''][data-background-style='nightRider'] button[value='disable']:focus,
html[data-post=''][data-background-style='nightRider'] button[value='disable']:hover {
color: #fff !important;
border-color: #db524b !important;
outline: 0 !important;
background-color: rgba(219, 82, 75, .1) !important;
box-shadow: none !important
}

html[data-post=''][data-background-style='nightRider'] button[value='enable'] {
color: #bfc9d3 !important;
border-color: rgba(27, 191, 137, .55) !important;
background-color: rgba(27, 191, 137, .07) !important
}

html[data-post=''][data-background-style='nightRider'] button[value='enable']:active,
html[data-post=''][data-background-style='nightRider'] button[value='enable']:focus,
html[data-post=''][data-background-style='nightRider'] button[value='enable']:hover {
color: #fff !important;
border-color: #1bbf89 !important;
outline: 0 !important;
background-color: rgba(27, 191, 137, .1) !important;
box-shadow: none !important
}

html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit'],
html[data-post=''][data-background-style='nightRider'] button[value='restart'] {
color: #bfc9d3 !important;
border-color: rgba(86, 192, 224, .72) !important;
background-color: rgba(86, 192, 224, .07) !important
}

html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit']:active,
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit']:focus,
html[data-background-style='nightRider'] .csf td>form[action='index.cgi']>input[value='lfdrestart']+input[type='submit']:hover,
html[data-post=''][data-background-style='nightRider'] button[value='restart']:active,
html[data-post=''][data-background-style='nightRider'] button[value='restart']:focus,
html[data-post=''][data-background-style='nightRider'] button[value='restart']:hover {
color: #fff !important;
border-color: #56c0e0 !important;
outline: 0 !important;
background-color: rgba(86, 192, 224, .1) !important;
box-shadow: none !important
}

html[data-background-style='nightRider'] body.csf .table>thead>tr:first-child>th,
html[data-background-style='nightRider'] body.csf .table>tbody>tr:first-child>th,
html[data-background-style='nightRider'] body.csf table>tfoot>tr:first-child>th,
html[data-background-style='nightRider'] body.csf .table>thead>tr:first-child>td,
html[data-background-style='nightRider'] body.csf .table>tbody>tr:first-child>td,
html[data-background-style='nightRider'] body.csf .table>tfoot>tr:first-child>td {
border-top: 1px solid #424449 !important
}

html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-heading {
border: 1px solid #424449;
background-color: #2d3036
}

html[data-background-style='nightRider'] code {
background-color: #2d3036 !important
}

html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-body {
border-color: #424449
}

html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-heading {
border-bottom: 0
}

html[data-module='csf'][data-background-style='nightRider'] div.panel-body>div[style*='background: #F4F4EA'] {
background-color: #2d3036 !important;
border-color: #3d3f43 !important
}

html[data-module='csf'][data-background-style='nightRider'] [style*='border-right: 1px solid #DDDDDD'] {
border-color: rgba(61, 63, 67, 0.85) !important
}

html[data-module='csf'][data-background-style='nightRider'] [style*='background:#FFD1DC'],
html[data-module='csf'][data-background-style='nightRider'] [style*='background: #FFD1DC'] {
border-color: rgba(61, 63, 67, 0.85) !important;
outline: 0 !important;
background-color: rgba(219, 82, 75, .1) !important
}

html[data-module='csf'][data-background-style='nightRider'] [style*='background:#BDECB6'],
html[data-module='csf'][data-background-style='nightRider'] [style*='background: #BDECB6'] {
background-color: rgba(27, 191, 137, .1) !important;
border-color: rgba(61, 63, 67, 0.85) !important
}

html[data-module='csf'][data-background-style='nightRider'] [style*='background: #FFFDD8'],
html[data-module='csf'][data-background-style='nightRider'] [style*='background:#FFFDD8'] {
background-color: rgba(247, 175, 62, .1) !important
}

html[data-module='csf'][data-background-style='nightRider'] [style*='border: 1px solid #DDDDDD'],
html[data-module='csf'][data-background-style='nightRider'] [style*='border:1px solid #DDDDDD'] {
border-color: rgba(61, 63, 67, 0.85) !important
}

html[data-module='csf'][data-background-style='nightRider'] [style*='background: #990000'],
html[data-module='csf'][data-background-style='nightRider'] [style*='background:#990000'] {
background-color: #a84b4b !important
}

html[data-post='logtail'][data-background-style='nightRider'] .panel .panel-body .panel,
html[data-post='loggrep'][data-background-style='nightRider'] .panel .panel-body .panel {
border: 1px solid #424449
}

html[data-post='viewports'][data-background-style='nightRider'] .col_header_custom {
border-top: 1px solid #424449 !important;
border-right: 1px solid #424449 !important;
border-left: 1px solid #424449 !important
}

html[data-module='csf'][data-background-style='nightRider'] .dataTables_wrapper .dataTables_empty:hover,
html[data-module='csf'][data-background-style='nightRider'] .dataTables_wrapper .dataTables_empty {
background-color: #2f3237
}

html[data-module='csf'][data-background-style='nightRider'] .panel {
color: rgba(169, 174, 180, 0.94) !important
}

html[data-module='csf'][data-background-style='nightRider'] .cspinner .cspinner-icon.dark {
border-top-color: #70737b;
border-left-color: #5d5c5c
}

html[data-module='csf'][data-background-style='nightRider'] .panel-body>form>.panel.panel-default>.panel-body>.panel-heading,
html[data-module='csf'][data-background-style='nightRider'] .panel._devcon .panel-heading,
html[data-module='csf'][data-background-style='nightRider'] .panel._devcon {
border-color: #3a3e43
}

html[data-post=''][data-module='csf'][data-background-style='nightRider'] div#home table tr:nth-child(even) td {
background-color: #2a2d31
}
Loading

0 comments on commit 60b2a2e

Please sign in to comment.