/[smecontribs]/rpms/smeserver-manager-AdminLTE/contribs10/smeserver-manager-AdminLTE-0.1.3-Add-css-for-dark-mode.patch
ViewVC logotype

Annotation of /rpms/smeserver-manager-AdminLTE/contribs10/smeserver-manager-AdminLTE-0.1.3-Add-css-for-dark-mode.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Feb 10 12:04:54 2022 UTC (2 years, 9 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-manager-AdminLTE-0_1_3-19_el7_sme, smeserver-manager-AdminLTE-0_1_3-18_el7_sme, smeserver-manager-AdminLTE-0_1_4-1_el7_sme, smeserver-manager-AdminLTE-0_1_3-16_el7_sme, smeserver-manager-AdminLTE-0_1_3-20_el7_sme, smeserver-manager-AdminLTE-0_1_3-21_el7_sme, HEAD
* Tue Feb 08 2022 Brian Read <brianr@bjsystems.co.uk> 0.1.3-16.sme
- Add css for dark-mode [SME: 11863]

1 brianr 1.1 diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-content.css smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-content.css
2     --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-content.css 2022-02-08 16:37:31.593501043 +0000
3     +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-content.css 2022-02-08 15:49:00.000000000 +0000
4     @@ -140,5 +140,9 @@
5     margin-top:1rem;
6     }
7    
8     +.dark-mode .label {
9     + color:black;
10     + background-color:lightgrey;
11     +}
12    
13    
14     diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-header-and-footer.css smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-header-and-footer.css
15     --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-header-and-footer.css 2022-02-08 16:37:31.578500884 +0000
16     +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-header-and-footer.css 2022-02-10 11:46:00.000000000 +0000
17     @@ -30,6 +30,31 @@
18     padding-top: 0.5rem;
19     }
20    
21     + #darkmodeswt {
22     + padding-left: 0.5rem;
23     + padding-top: 0.5rem;
24     +}
25     +
26     .sm2-footer {
27     width:100%;
28     }
29     +
30     +.dark-mode container-fluid {
31     + background-color:lightblue;
32     +}
33     +
34     +.dark-mode div .mb-2 {
35     + background-color:#454d55;
36     +}
37     +
38     +.dark-mode .navbar-white {
39     + background-image: linear-gradient(to right, lightgrey,#454d55);
40     +}
41     +
42     +.dark-mode .active {
43     + background-color:lightgrey;
44     +}
45     +
46     +.dark-mode .button {
47     + background:darkgrey;
48     +}
49     diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-menu.css smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-menu.css
50     --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-menu.css 2022-02-08 16:37:31.578500884 +0000
51     +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/adminlte-menu.css 2022-02-09 11:59:00.000000000 +0000
52     @@ -27,9 +27,11 @@
53     color:green!important;
54     font-weight:bold;
55     }
56     +
57     .section-title {
58     color:blue!important;
59     }
60     +
61     a#toguser.menu-title {
62     color:blue!important;
63     font-weight:normal;
64     @@ -60,4 +62,32 @@
65     td a:hover {
66     color:red;
67     }
68     +
69     +.dark-mode .main-sidebar {
70     + background-color:#343a40;
71     +}
72     +
73     +.dark-mode [class*="sidebar-light-"] .sidebar a {
74     + color:inherit;
75     +}
76     +
77     +.dark-mode .login-page input[type="text"] {
78     + background-color:#343a40;
79     +}
80     +
81     +.dark-mode input:-webkit-autofill,
82     +.dark-mode input:-webkit-autofill,
83     +.dark-mode input:-webkit-autofill:hover,
84     +.dark-mode input:-webkit-autofill:focus,
85     +.dark-mode textarea:-webkit-autofill,
86     +.dark-mode textarea:-webkit-autofill:hover,
87     +.dark-mode textarea:-webkit-autofill:focus,
88     +.dark-mode select:-webkit-autofill,
89     +.dark-mode select:-webkit-autofill:hover,
90     +.dark-mode select:-webkit-autofill:focus {
91     + -webkit-text-fill-color:#343a40;
92     +}
93     +
94     +
95     +
96    
97     \ No newline at end of file
98     diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep
99     --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep 2022-02-08 16:37:31.587500980 +0000
100     +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep 2022-02-09 18:58:00.000000000 +0000
101     @@ -36,7 +36,7 @@
102     %= content_for 'refresh'
103    
104     </head>
105     -<body class="hold-transition sidebar-mini layout-boxed">
106     +<body class="hold-transition sidebar-mini layout-boxed ">
107     <div class="wrapper">
108    
109     <!-- Navbar -->
110     @@ -65,11 +65,17 @@
111    
112     </li>
113    
114     - <li id = "swtsize" "class="nav-item d-none d-sm-inline-block">
115     + <li id = "swtsize" class="nav-item d-none d-sm-inline-block">
116     % param 'fontsize'=>'text-md' unless 'fontsize';
117     %=label_for fontsize=>'Font size:'
118     %=select_field fontsize=>[['very small'=>'text-xs'],['small'=>'text-sm'],['medium'=>'text-md'],['large'=>'text-lg'],['very large'=>'text-xl']],onchange=>"SetFontSize()",id=>"fontsizeid"
119     - </li>
120     + </li>
121     +
122     + <li id = "darkmodeswt" class="nav-item d-none d-sm-inline-block">
123     + %# param 'darkmodeswtcheck'=>0 unless 'darkmodeswtcheck';
124     + %=label_for darkmodeswtcheck=>'Dark Mode:'
125     + %=check_box darkmodeswtcheck=>0, onchange=>"SetDarkMode();", id=>"darkmodeswtid"
126     + </li>
127    
128     <li class="nav-item d-none d-sm-inline-block">
129     % if ( not defined $c->session->{lang} ) {
130     @@ -308,12 +314,13 @@
131     $("#h2e23").addClass("float-right");
132     $("#h2e12").addClass("float-right");
133    
134     - /*Dark mode changes
135     - $("body").addClass("dark-mode");
136     - $(".main-sidebar").addClass("dark-mode");
137     - $(".main-header").addClass("dark-mode");
138     - */
139     -
140     + /*Dark mode changes*/
141     + var mode = localStorage.getItem('darkmode');
142     + var myselect = document.getElementById("darkmodeswtid");
143     + if (mode == "") {myselect.checked = false;}
144     + else {myselect.checked = true;}
145     + $("#darkmodeswtid").val(mode).change();
146     +
147    
148     /* Sort out font size */
149     var fontsize = localStorage.getItem('fontsize');
150     @@ -346,6 +353,16 @@
151     $("body").removeClass('text-xs text-sm text-md text-lg text-xl').addClass(textclass);
152     localStorage.setItem('fontsize',textclass);
153     };
154     +
155     + function SetDarkMode(){
156     + var myselect = document.getElementById("darkmodeswtid");
157     + var mode = '';
158     + if (myselect.checked) {mode = "dark-mode";}
159     + $("body").removeClass('dark-mode').addClass(mode);
160     + localStorage.setItem('darkmode',mode);
161     + };
162     +
163     +
164     (function ($) {
165     $.fn.replaceClass = function (pFromClass, pToClass) {
166     return this.removeClass(pFromClass).addClass(pToClass);
167     @@ -374,14 +391,6 @@
168     };
169     }(jQuery));
170    
171     -
172     -
173     -
174     -
175     -
176     </script>
177     -
178     -
179     -
180     </body>
181     </html>
182     diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep
183     --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep 2022-02-08 16:37:31.552500609 +0000
184     +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep 2022-02-09 11:11:00.000000000 +0000
185     @@ -2,7 +2,13 @@
186    
187     % content_for 'module' => begin
188    
189     -<div id="module" class="content-login hold-transition login-box" >
190     +<div id="module" class="content-login hold-transition login page login-box" >
191     +
192     +<!---
193     + <div class="login-logo">
194     + <a href="../../index2.html"><b>Admin</b>LTE</a>
195     + </div>
196     +-->
197    
198     %if ($config->{debug} == 1) {
199     <p>
200     @@ -14,14 +20,14 @@
201     %}
202    
203     % if ( stash 'error' ) {
204     - <br><div class=sme-error>
205     + <br><div class=sme-error>
206     %= $c->render_to_string(inline => stash 'error')
207     </div>
208     %}
209    
210     <div class="card">
211     - <div class="card-body login-card-body">
212     - <p class="login-box-msg"><%=l 'use_TITLE' %></p>
213     + <div class="card-body login-card-body">
214     + <p class="login-box-msg"><%=l 'use_TITLE' %></p>
215    
216     % my $btn = l('use_SIGNIN');
217    
218     @@ -33,51 +39,49 @@
219    
220     %= form_for '/login' => (method => 'POST') => begin
221    
222     - <!---
223     - <p><span class=label>
224     - %=l 'USER_NAME'
225     - </span><span class=input>
226     - %= text_field 'Username'
227     - </span></p>
228     -
229     - <p><span class=label>
230     - %=l 'PASSWORD'
231     - </span><span class=input>
232     - %= password_field 'Password'
233     - </span></p>
234     - --->
235     -
236     -
237     - <div class="input-group mb-3">
238     - <input type="text" name='Username' class="form-control" placeholder="<%=l 'USER_NAME'%>">
239     - <div class="input-group-append">
240     - <div class="input-group-text">
241     - <span class="fas fa-user"></span>
242     + <!---
243     + <p><span class=label>
244     + %=l 'USER_NAME'
245     + </span><span class=input>
246     + %= text_field 'Username'
247     + </span></p>
248     +
249     + <p><span class=label>
250     + %=l 'PASSWORD'
251     + </span><span class=input>
252     + %= password_field 'Password'
253     + </span></p>
254     + --->
255     +
256     + <div class="input-group mb-3">
257     + <input type="text" name='Username' class="form-control" placeholder="<%=l 'USER_NAME'%>">
258     + <div class="input-group-append">
259     + <div class="input-group-text">
260     + <span class="fas fa-user"></span>
261     + </div>
262     + </div>
263     </div>
264     - </div>
265     - </div>
266     - <div class="input-group mb-3">
267     - <input type="password" name='Password' id='login-password' class="form-control" placeholder="<%=l 'PASSWORD'%>">
268     - <div class="input-group-append">
269     - <div class="input-group-text">
270     - <i class="far fa-eye" id="togglePassword"></i>
271     - <!---<span class="fas fa-lock"></span>-->
272     + <div class="input-group mb-3">
273     + <input type="password" name='Password' id='login-password' class="form-control" placeholder="<%=l 'PASSWORD'%>">
274     + <div class="input-group-append">
275     + <div class="input-group-text">
276     + <i class="far fa-eye" id="togglePassword"></i>
277     + <!---<span class="fas fa-lock"></span>-->
278     + </div>
279     + </div>
280     </div>
281     - </div>
282     - </div>
283    
284    
285     - %= hidden_field 'From' => $c->tx->req->url
286     - %= hidden_field 'Trt' => stash 'trt'
287     + %= hidden_field 'From' => $c->tx->req->url
288     + %= hidden_field 'Trt' => stash 'trt'
289    
290     - <br>
291     - <div class='center'>
292     - %= submit_button "$btn", class => 'action'
293     - </div>
294     -
295     -
296     - % end
297     - </div></div>
298     + <br>
299     + <div class='center'>
300     + %= submit_button "$btn", class => 'action'
301     + </div>
302     + % end
303     + </div>
304     + </div>
305    
306     </div>
307     %end

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed