Bläddra i källkod

Switch style immediately with JS.

master
Ben Kurtovic 7 år sedan
förälder
incheckning
8aece18afa
3 ändrade filer med 10 tillägg och 3 borttagningar
  1. +2
    -2
      static/main.css
  2. +7
    -0
      static/main.js
  3. +1
    -1
      templates/_base.mako

+ 2
- 2
static/main.css Visa fil

@@ -199,7 +199,7 @@ footer ul li:not(:last-child):after {
#character-options {
position: absolute;
margin-top: 1em;
margin-left: -10px;
margin-left: -5px;
padding: 0.5em;
background-color: rgba(0, 0, 0, 0.8);
border-width: 1px;
@@ -240,7 +240,7 @@ footer ul li:not(:last-child):after {
margin-left: 0.25em;
}

#style-options input[type=submit] {
#style-options input[type="submit"] {
display: inline-block;
height: 24px;
width: 24px;


+ 7
- 0
static/main.js Visa fil

@@ -30,4 +30,11 @@ $(function() {
});
}
}).css("cursor", "pointer");

// Switch style immediately without reloading the page:
$("#style-options form").submit(function() {
var style = $(this).find('input[type="submit"]').prop("value");
var stylesheet = "/static/styles/" + style + ".css";
$("#user-style").prop("href", stylesheet);
});
});

+ 1
- 1
templates/_base.mako Visa fil

@@ -14,7 +14,7 @@
%>
% if style:
<% stylesheet = "styles/{}.css".format(style) %>
<link rel="stylesheet" type="text/css" href="${url_for('staticv', filename=stylesheet)}"/>
<link id="user-style" rel="stylesheet" type="text/css" href="${url_for('staticv', filename=stylesheet)}"/>
% endif
% for size in g.eve.image.corp_widths:
<link rel="icon" type="image/png" sizes="${size}x${size}" href="${g.eve.image.corp(g.config.get('corp.id'), size)}"/>


Laddar…
Avbryt
Spara