| @@ -187,6 +187,7 @@ footer ul li:not(:last-child):after { | |||||
| #character-portrait { | #character-portrait { | ||||
| height: 32px; | height: 32px; | ||||
| width: 32px; | |||||
| margin-right: 0.25em; | margin-right: 0.25em; | ||||
| box-sizing: border-box; | box-sizing: border-box; | ||||
| border-width: 1px; | border-width: 1px; | ||||
| @@ -200,7 +201,6 @@ footer ul li:not(:last-child):after { | |||||
| position: absolute; | position: absolute; | ||||
| margin-top: 1em; | margin-top: 1em; | ||||
| margin-left: -5px; | margin-left: -5px; | ||||
| padding: 0.5em; | |||||
| background-color: rgba(0, 0, 0, 0.8); | background-color: rgba(0, 0, 0, 0.8); | ||||
| border-width: 1px; | border-width: 1px; | ||||
| } | } | ||||
| @@ -229,27 +229,35 @@ footer ul li:not(:last-child):after { | |||||
| } | } | ||||
| #style-options { | #style-options { | ||||
| margin: 4px; | |||||
| line-height: 0; | line-height: 0; | ||||
| } | } | ||||
| #style-options form { | |||||
| #style-options > * { | |||||
| display: inline-block; | display: inline-block; | ||||
| padding: 4px; | |||||
| } | } | ||||
| #style-options form:not(:first-child) { | |||||
| margin-left: 0.25em; | |||||
| } | |||||
| #style-options input[type="submit"] { | |||||
| #style-options > * > * { | |||||
| display: inline-block; | display: inline-block; | ||||
| height: 24px; | height: 24px; | ||||
| width: 24px; | width: 24px; | ||||
| margin: 0; | |||||
| padding: 0; | |||||
| background-color: transparent; | background-color: transparent; | ||||
| background-size: contain; | background-size: contain; | ||||
| background-position: center; | background-position: center; | ||||
| background-repeat: no-repeat; | background-repeat: no-repeat; | ||||
| font-size: 0; | font-size: 0; | ||||
| border: 0; | border: 0; | ||||
| vertical-align: middle; | |||||
| } | |||||
| #style-options .cur { | |||||
| background-color: rgba(255, 255, 255, 0.3); | |||||
| } | |||||
| #style-options > :not(.cur) > * { | |||||
| cursor: pointer; | cursor: pointer; | ||||
| } | } | ||||
| @@ -8,10 +8,7 @@ | |||||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
| <link rel="canonical" href="${g.config.scheme}://${g.config.get('site.canonical')}${request.script_root}${request.path}"> | <link rel="canonical" href="${g.config.scheme}://${g.config.get('site.canonical')}${request.script_root}${request.path}"> | ||||
| <link rel="stylesheet" type="text/css" href="${url_for('staticv', filename='main.css')}"/> | <link rel="stylesheet" type="text/css" href="${url_for('staticv', filename='main.css')}"/> | ||||
| <% | |||||
| charstyle = g.auth.get_character_prop("style") | |||||
| style = charstyle if charstyle else g.config.get("style.default") | |||||
| %> | |||||
| <% style = g.auth.get_character_prop("style") or g.config.get("style.default") %> | |||||
| % if style: | % if style: | ||||
| <% stylesheet = "styles/{}.css".format(style) %> | <% stylesheet = "styles/{}.css".format(style) %> | ||||
| <link id="user-style" 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)}"/> | ||||
| @@ -9,10 +9,21 @@ | |||||
| <img id="character-portrait" class="styled-border aligned" alt="" src="${g.eve.image.character(g.auth.get_character_id(), 256)}"/> | <img id="character-portrait" class="styled-border aligned" alt="" src="${g.eve.image.character(g.auth.get_character_id(), 256)}"/> | ||||
| <div id="character-options" class="styled-border"> | <div id="character-options" class="styled-border"> | ||||
| <div id="style-options"> | <div id="style-options"> | ||||
| <% cur_style = g.auth.get_character_prop("style") or g.config.get("style.default") %> | |||||
| % for style in g.config.get("style.enabled"): | % for style in g.config.get("style.enabled"): | ||||
| <form action="${url_for('set_style', style=style)}" method="post"> | |||||
| <input type="submit" title="${style.title()}" value="${style}" style="background-image: url('${url_for('staticv', filename='images/style/{}.png'.format(style))}')"> | |||||
| </form> | |||||
| <% | |||||
| stitle = style.title() | |||||
| url = url_for('staticv', filename='images/style/{}.png'.format(style)) | |||||
| %> | |||||
| % if style == cur_style: | |||||
| <div class="cur"> | |||||
| <div style="background-image: url('${url}')">${stitle}</div> | |||||
| </div> | |||||
| % else: | |||||
| <form action="${url_for('set_style', style=style)}" method="post"> | |||||
| <input type="submit" title="${stitle}" value="${stitle}" style="background-image: url('${url}')"> | |||||
| </form> | |||||
| % endif | |||||
| % endfor | % endfor | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||