Skip to content

Commit

Permalink
Merge pull request #827 from Joduai/master
Browse files Browse the repository at this point in the history
update dark admin theme by @Joduai
  • Loading branch information
danpros authored Oct 17, 2024
2 parents 7bf770b + 7ad1f1f commit ef78599
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 16 deletions.
4 changes: 2 additions & 2 deletions config/config.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,5 @@ views.root = "themes/twentysixteen"
; Framework config. No need to edit.
views.layout = "layout"

; Admin theme: light or dark mode
admin.theme = "dark"
; Admin theme mode: light or dark
admin.theme = "light"
4 changes: 3 additions & 1 deletion lang/en_US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,6 @@ msg_error_field_req_feedurl = "You need to specify the feed url."
rss_feeds_description_select = "RSS Description"
rss_description_body = "Post Body"
rss_description_meta = "Post Meta Description"
admin_theme = "Admin theme"
admin_theme = "Admin theme"
admin_theme_light = "Light"
admin_theme_dark = "Dark"
17 changes: 15 additions & 2 deletions system/admin/editor/css/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ blockquote {
margin-bottom: 10px;
width: 100%;
border: 1px solid #CFDAE5;
border-radius:5px;
display: block;
float: left;
}

.dark-mode .wmd-button-bar {
background-color: #292d32;
border-color: #292d32 !important;
}
.wmd-button-bar:hover {
border: 1px solid #CCCCCC;
}
Expand Down Expand Up @@ -77,10 +81,19 @@ blockquote {
.wmd-button > span {
background-repeat: no-repeat;
background-position: 0px 0px;

display: inline-block;
}

.dark-mode .wmd-button > span.btn-light {
color: #fff;
background-color: #292d32;
border-color: #292d32;
box-shadow: none;
}
.dark-mode .wmd-button > span.btn-light:not(.disabled):hover {
background-color: #171a1d;
border-color: #343a40;
}
.wmd-spacer1 {
left: 50px;
}
Expand Down
4 changes: 2 additions & 2 deletions system/admin/views/add-content.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function extractLast( term ) {
<?php } ?>
<div class="notice" id="response"></div>
<div class="row">
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div id="post-settings" class="row">
Expand Down Expand Up @@ -178,7 +178,7 @@ function extractLast( term ) {
</div>
<div class="row">
<div class="col-sm-12" style="text-align:right;">
<button class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
<button class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
</div>
</div>
<div class="row">
Expand Down
4 changes: 2 additions & 2 deletions system/admin/views/add-page.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<?php } ?>
<div class="notice" id="response"></div>
<div class="row">
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div id="post-settings" class="row">
Expand All @@ -36,7 +36,7 @@
</div>
<div class="row">
<div class="col-sm-12" style="text-align:right;">
<button class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
<button class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
</div>
</div>
<div class="row">
Expand Down
4 changes: 2 additions & 2 deletions system/admin/views/config.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@
<div class="form-check">
<input class="form-check-input" type="radio" name="-config-admin.theme" id="admin.theme1" value="light" <?php if (config('admin.theme') === 'light' || is_null(config('admin.theme'))):?>checked<?php endif;?>>
<label class="form-check-label" for="admin.theme1">
Light
<?php echo i18n('admin_theme_light');?>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="-config-admin.theme" id="admin.theme2" value="dark" <?php if (config('admin.theme') === 'dark'):?>checked<?php endif;?>>
<label class="form-check-label" for="admin.theme2">
Dark
<?php echo i18n('admin_theme_dark');?>
</label>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions system/admin/views/edit-content.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function extractLast( term ) {
<?php } ?>
<div class="notice" id="response"></div>
<div class="row">
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div id="post-settings" class="row">
Expand Down Expand Up @@ -224,7 +224,7 @@ function extractLast( term ) {
</div>
<div class="row">
<div class="col-sm-12" style="text-align:right;">
<button class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
<button class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
</div>
</div>
<div class="row">
Expand Down
4 changes: 2 additions & 2 deletions system/admin/views/edit-page.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<?php } ?>
<div class="notice" id="response"></div>
<div class="row">
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>
<div class="wmd-panel" style="width:100%;">
<form method="POST">
<div id="post-settings" class="row">
Expand Down Expand Up @@ -137,7 +137,7 @@
</div>
<div class="row">
<div class="col-sm-12" style="text-align:right;">
<button class="note-btn btn btn-light btn-sm" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
<button class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" type="button" title="Toggle <?php echo i18n('Preview');?>" id="preview-toggle" class="btn btn-secondary btn-xs"><i class="fa fa-columns" aria-hidden="true"></i></button>
</div>
</div>
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion system/admin/views/layout.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<body class="hold-transition sidebar-mini <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "light-mode" : "dark-mode"); ?>">
<div id="top"></div>
<div class="wrapper">
<style>.error-message ul {margin:0;padding:0;}</style>
<style>.error-message ul {margin:0;padding:0;list-style-type:none;}</style>
<!-- Navbar -->
<nav class="main-header navbar navbar-expand <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "navbar-white navbar-light" : "navbar-gray-dark navbar-dark"); ?>">
<!-- Left navbar links -->
Expand Down

0 comments on commit ef78599

Please sign in to comment.