Merge pull request #2262 from yglb/master

luci-theme-rosy
This commit is contained in:
Jo-Philipp Wich 2018-11-12 07:52:50 +01:00 committed by GitHub
commit dc2877d39f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 159 additions and 96 deletions

View file

@ -108,6 +108,7 @@ strong {
html { html {
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
position: relative;
} }
body { body {
@ -118,8 +119,9 @@ body {
html, body { html, body {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
height: 100%; height: auto;
font-family: sans-serif, "Helvetica Neue", Helvetica, Hiragino Sans GB; min-height: 100%;
font-family: Microsoft Yahei, WenQuanYi Micro Hei, sans-serif, "Helvetica Neue", Helvetica, Hiragino Sans GB;
} }
select { select {
@ -241,6 +243,15 @@ h4 {
padding-bottom: 10px; padding-bottom: 10px;
} }
.mobile-hide {
display: inline-block;
}
.PC-hide {
width: 100%;
display: none;
}
.cbi-section { .cbi-section {
margin: 1rem 0 0 0; margin: 1rem 0 0 0;
padding: 2rem; padding: 2rem;
@ -337,7 +348,7 @@ div > .table > .tbody > .tr:nth-of-type(2n) {
border-radius: 20px; border-radius: 20px;
overflow: hidden; overflow: hidden;
border: none !important; border: none !important;
background-color: #468ea485; background-color: #9bc1cc;
} }
.cbi-section .table #memtotal > div > div > div, .cbi-section .table #memtotal > div > div > div,
@ -412,7 +423,6 @@ td > table > tbody > tr > td,
.btn, .cbi-button { .btn, .cbi-button {
margin: 0 .8rem .5rem 0; margin: 0 .8rem .5rem 0;
-webkit-appearance: none; -webkit-appearance: none;
text-transform: uppercase;
color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);
background-color: #F0F0F0; background-color: #F0F0F0;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
@ -538,6 +548,7 @@ td > table > tbody > tr > td,
.container .cbi-map .cbi-tabmenu + div { .container .cbi-map .cbi-tabmenu + div {
border-bottom-left-radius: 10px; border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px; border-bottom-right-radius: 10px;
overflow: hidden;
} }
.tabs { .tabs {
@ -562,7 +573,7 @@ td > table > tbody > tr > td,
.tabs > li[class~="active"], .tabs > li[class~="active"],
.tabs > li:hover { .tabs > li:hover {
cursor: pointer; cursor: pointer;
background-color: #0099CC; background-color: #337ab7;
} }
.tabs > li[class~="active"] > a, .tabs > li[class~="active"] > a,
@ -634,7 +645,7 @@ td > table > tbody > tr > td,
} }
.cbi-value { .cbi-value {
padding: .5rem 0; padding: 6px 0;
display: inline-block; display: inline-block;
width: 100%; width: 100%;
} }
@ -1103,6 +1114,9 @@ td > .ifacebadge,
overflow: hidden; overflow: hidden;
border-radius: 20px; border-radius: 20px;
} }
#iwsvg, #bwsvg {
margin-top: 1rem;
}
.ifacebox { .ifacebox {
background-color: #f9f9f9; background-color: #f9f9f9;
@ -1497,13 +1511,39 @@ header > .container > .pull-right > * {
.node-network-network .cbi-rowstyle-2 .ifacebox-body { .node-network-network .cbi-rowstyle-2 .ifacebox-body {
background-color: #fff; background-color: #fff;
} }
.lang_zh-cnInterfaces .container .cbi-map .cbi-tabmenu + div {
overflow: inherit;
}
/* fix Network Wireless*/ /* fix Network Wireless*/
.node-network-wireless .cbi-section-node { .node-network-wireless .cbi-section-node {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
/* applyreboot fix */ /* applyreboot fix */
#maincontainer {
text-align: center;
}
#maincontainer > #maincontent {
padding: 1rem;
margin: 0 auto;
border-radius: 10px;
display: inline-block;
max-width: 800px;
width: 40%;
}
#applyreboot-container {
margin-bottom: 1rem;
}
#applyreboot-section {
text-align: left;
background: #fff;
padding: 1rem;
border-radius: 10px;
}
#applyreboot-section > div {
margin: 1rem 0;
line-height: 1.5rem;
}
#applyreboot-container { #applyreboot-container {
margin: 90px 2rem 2rem 2rem; margin: 90px 2rem 2rem 2rem;
} }
@ -1513,30 +1553,15 @@ header > .container > .pull-right > * {
line-height: 300%; line-height: 300%;
} }
#applyreboot-section .bar-container {
background: transparent;
height: 20px;
border: 1px solid #b7b7b7;
border-radius: 20px;
}
#applyreboot-section .bar-container .bar {
background: #F24C7C;
height: 100%;
border-radius: 20px;
}
/* Shared style */ /* Shared style */
header, .main {
width: 100%;
position: absolute;
}
header { header {
height: 70px; height: 0;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
z-index: 100; z-index: 100;
overflow: hidden;
} }
header { header {
padding-right: 1rem; padding-right: 1rem;
@ -1700,7 +1725,7 @@ header .logout a {
footer { footer {
text-align: right; text-align: right;
padding: 1rem; padding-right: 1rem;
color: #aaa; color: #aaa;
font-size: 0.8rem; font-size: 0.8rem;
text-shadow: 0px 0px 2px #BBB; text-shadow: 0px 0px 2px #BBB;
@ -1713,8 +1738,7 @@ footer {
/* The style of the prompt message */ /* The style of the prompt message */
.alert-message { .alert-message {
padding: 20px 15%; padding: 13px 11%;
border: 1px solid #4A5368;
border-radius: 10px; border-radius: 10px;
background-color: #FFF; background-color: #FFF;
} }
@ -1734,37 +1758,42 @@ footer {
} }
.alert-message > h4 { .alert-message > h4 {
padding: 17px 0 17px 36px; padding: 7px 0 7px 36px;
margin: 0; margin: 0;
font-weight: normal; font-weight: normal;
font-size: 22px; font-size: 18px;
background: url(./no-pwd.png) no-repeat left 43%/ 28px; background: url(./no-pwd.png) no-repeat left 43%/ 28px;
display: inline-block; display: inline-block;
} }
.alert-message > p { .alert-message > p {
font-size: 16px; font-size: 14px;
line-height: 2rem; line-height: 1.5rem;
} }
.alert-message a { .alert-message a {
padding: 8px 0; padding: 4px 0;
margin-top: 17px; margin-top: 12px;
width: 100%; width: 100%;
background-color: transparent; background-color: transparent;
color: #fff; color: #fff;
font-size: 18px; font-size: 16px;
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 50px; border-radius: 50px;
} }
/* All styles of the login interface */ /* All styles of the login interface */
.node-main-login {
height: auto;
min-height: 100%;
background: #fff url(./loginBG.png) no-repeat center center / cover;
}
.node-main-login header { .node-main-login header {
display: none; display: none;
} }
.node-main-login .main { .node-main-login .main {
height: 100%; height: auto;
} }
.node-main-login > .main > .main-left { .node-main-login > .main > .main-left {
display: none; display: none;
@ -1772,50 +1801,55 @@ footer {
.node-main-login > .main > .main-right { .node-main-login > .main > .main-right {
width: 100%; width: 100%;
height: 100%; height: auto;
background: #fff url(./loginBG.png) no-repeat center center / cover; min-height: 100%;
} }
.node-main-login > .main #maincontent { .node-main-login > .main #maincontent {
position: absolute;
min-width: 492px;
width: 100%; width: 100%;
height: 100%; top: 47%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
height: auto;
text-align: center; text-align: center;
} }
.node-main-login > .main .container { .node-main-login > .main .container {
padding: 0;
width: 30%; width: 30%;
max-width: 600px; max-width: 492px;
display: inline-block; display: inline-block;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
} }
.node-main-login > .main .logoImg a { .node-main-login > .main .logoImg a {
margin: 0 0 20px 0; margin: 0 0 18px 0;
display: block; display: block;
font-size: 36px; font-size: 30px;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
} }
.node-main-login > .main .logoImg img:first-child {
width: 72px;
}
.node-main-login .warning { .node-main-login .warning {
background-color: #3f4a62; background-color: #3E4A62;
color: #E9E4E4; color: #fff;
} }
.node-main-login > .main form h2 { .node-main-login > .main form h2 {
margin: 20px 0 16px; margin: 17px 0;
padding: 0; padding: 0;
font-size: 24px; font-size: 24px;
color: #FFFFFC; color: #fff;
font-weight: normal; font-weight: normal;
border: 0; border: 0;
} }
.node-main-login > .main form .cbi-map-descr { .node-main-login > .main form .cbi-map-descr {
margin: 16px 0 13px; margin: 0 0 12px;
padding: 0; padding: 0;
font-size: 12px; font-size: 12px;
color: #B1B6BB; color: #B1B6BB;
@ -1839,7 +1873,7 @@ footer {
} }
.node-main-login > .main form .cbi-value-field { .node-main-login > .main form .cbi-value-field {
margin-bottom: 32px; margin-bottom: 16px;
display: block; display: block;
width: 100%; width: 100%;
position: relative; position: relative;
@ -1849,7 +1883,7 @@ footer {
padding-left: 48px; padding-left: 48px;
width: 100%; width: 100%;
border: 1px solid #556270; border: 1px solid #556270;
height: 48px; height: 42px;
border-radius: 50px; border-radius: 50px;
font-size: 20px; font-size: 20px;
color: #9c9fa1; color: #9c9fa1;
@ -1914,9 +1948,15 @@ footer {
/* Interface after login */ /* Interface after login */
.logged-in .main { .logged-in {
background-color: #EBF1F6; background-color: #EBF1F6;
} }
.logged-in header {
height: 70px;
}
.logged-in .main {
overflow: hidden;
}
.logged-in .main-right { .logged-in .main-right {
padding: 0 1rem 3rem 0; padding: 0 1rem 3rem 0;
margin-top: 90px; margin-top: 90px;
@ -1964,12 +2004,7 @@ footer {
width: auto; width: auto;
border: none; border: none;
background-color: #468EA4; background-color: #468EA4;
} color: #fff;
@media screen and (max-height: 580px) {
.logoImg img {
height: 48px;
}
} }
@media screen and (max-width: 1600px) { @media screen and (max-width: 1600px) {
@ -2049,7 +2084,9 @@ footer {
position: fixed; position: fixed;
z-index: 100; z-index: 100;
right: 100%; right: 100%;
left: 0;
top: 0; top: 0;
bottom: 0;
background: #0000007d; background: #0000007d;
border-radius: 0; border-radius: 0;
min-width: 0; min-width: 0;
@ -2068,9 +2105,6 @@ footer {
.node-main-login > .main .container { .node-main-login > .main .container {
width: 60%; width: 60%;
} }
.node-main-login .main {
background: #354057;
}
.showSide { .showSide {
padding: 0.1rem; padding: 0.1rem;
@ -2254,23 +2288,34 @@ footer {
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.node-main-login > .main > .main-right { .node-main-login {
background: #354057; background: none;
} }
.node-main-login > .main .logoImg a { .node-main-login > .main .logoImg a {
font-size: 18px; font-size: 30px;
margin: 0 0 10px 0; margin: 12px 0 22px 0;
color: #354057;
}
.node-main-login > .main #maincontent {
padding-top: 0;
padding-bottom: 1rem;
min-width: 100%;
top: 0;
transform: translateY(0) translateX(-50%);
} }
.alert-message { .alert-message {
padding: 8px 15%; padding: 8px 15%;
} }
.alert-message > h4, .alert-message > h4{
font-size: 14px;
}
.alert-message > p, .alert-message > p,
.alert-message a { .alert-message a {
font-size: 14px; font-size: 12px;
} }
.a .a
lert-message > h4 { lert-message > h4 {
@ -2282,13 +2327,20 @@ footer {
margin-top: 8px; margin-top: 8px;
} }
.node-main-login .warning {
background-color: #F5F5F6;
color: #354057;
}
.alert-message a {
color: #f24c7c;
background: #fff;
}
.node-main-login > .main form h2 { .node-main-login > .main form h2 {
font-size: 16px; font-size: 16px;
margin: 20px 0 16px; margin: 20px 0 16px;
} color: #354057;
.node-main-login > .main .container {
min-width: 90%;
} }
.node-main-login > .main form .cbi-value-field input { .node-main-login > .main form .cbi-value-field input {
@ -2318,6 +2370,14 @@ footer {
left: auto; left: auto;
right: 12px; right: 12px;
} }
.mobile-hide {
display: none;
}
.PC-hide {
display: inline-block;
}
} }
@media screen and (max-width: 480px) { @media screen and (max-width: 480px) {
@ -2364,10 +2424,6 @@ footer {
font-size: 10px; font-size: 10px;
} }
.mobile-hide {
display: none;
}
.panel-title { .panel-title {
font-size: 1.4rem; font-size: 1.4rem;
padding-bottom: 1rem; padding-bottom: 1rem;
@ -2392,6 +2448,7 @@ footer {
font-family: inherit; font-family: inherit;
min-width: inherit; min-width: inherit;
background-color: #FFF; background-color: #FFF;
border-radius: 20px;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
@ -2404,6 +2461,10 @@ footer {
margin-top: 1rem; margin-top: 1rem;
} }
.node-main-login > .main .container {
min-width: 90%;
}
.th, .td { .th, .td {
flex-basis: 50%; flex-basis: 50%;
} }
@ -2437,7 +2498,7 @@ footer {
} }
.alert-message { .alert-message {
padding: 8px 5%; padding: 8px 10%;
} }
} }

View file

@ -268,5 +268,6 @@
$('.logged-in .main-right').width( $(window).width() - $('.logged-in .main-left').width() - 50 ); $('.logged-in .main-right').width( $(window).width() - $('.logged-in .main-left').width() - 50 );
} }
$('body.logged-in').css('min-height', $(window).height());
})(jQuery); })(jQuery);

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -25,6 +25,8 @@
local categories = disp.node_childs(tree) local categories = disp.node_childs(tree)
%> %>
</div>
</div>
</div> </div>
<footer class="mobile-hide"> <footer class="mobile-hide">
<a href="https://github.com/openwrt/luci">Powered by<%= ver.luciname %> (<%= ver.luciversion %>)</a> / <a href="https://github.com/openwrt/luci">Powered by<%= ver.luciname %> (<%= ver.luciversion %>)</a> /
@ -37,8 +39,6 @@
</ul> </ul>
<% end %> <% end %>
</footer> </footer>
</div>
</div>
<script> <script>
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>; var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;

View file

@ -273,11 +273,12 @@
</div> </div>
<div class="main-right"> <div class="main-right">
<div id="maincontent"> <div id="maincontent">
<div class="logoImg">
<img class="mobile-hide" src="<%=media%>/logo.png" alt="Rosy">
<img src="<%=media%>/mobile-loginBG.png" class="PC-hide">
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
</div>
<div class="container"> <div class="container">
<div class="logoImg">
<img src="<%=media%>/logo.png" alt="Rosy">
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
</div>
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%> <%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<div class="alert-message warning"> <div class="alert-message warning">
<h4> <h4>