瀏覽代碼

Make styling responsive.

master
Ben Kurtovic 8 年之前
父節點
當前提交
34b77bcecd
共有 2 個文件被更改,包括 67 次插入32 次删除
  1. +56
    -22
      static/main.css
  2. +11
    -10
      templates/_base.mako

+ 56
- 22
static/main.css 查看文件

@@ -1,5 +1,3 @@
/* MOBILE... */

@import url(//fonts.googleapis.com/css?family=Open+Sans:400,400italic,700);

body {
@@ -41,8 +39,6 @@ main, header, footer {
}

main {
margin: 2em auto;
padding: 0.5em 1.5em;
border-width: 1px;
border-style: solid;
}
@@ -54,6 +50,7 @@ header {
}

footer {
padding: 0.5em 0;
font-size: 85%;
text-align: center;
color: #BABABA;
@@ -61,33 +58,56 @@ footer {
border-top-style: solid;
}

main, header > div, footer > div {
max-width: 1000px;
width: 80%;
}

header > div {
margin: 0 auto;
padding: 0.5em;
}

footer > div {
header > div, footer > div {
margin: 0 auto;
padding: 1em;
}

header > div > div {
display: inline-block;
}

header > div > .left {
text-align: left;
width: 70%;
@media (min-width: 800px) {
main, header > div, footer > div {
max-width: 1000px;
width: 80%;
}

main {
margin: 2em auto;
padding: 0.5em 1.5em;
}

footer > div {
padding: 0.5em 1.5em;
}

header > div > .left {
margin: 0.5em 1.5em 0.5em 0;
}

header > div > .right {
margin: 0.5em 0;
float: right;
}
}

header > div > .right {
text-align: right;
width: 30%;
@media (max-width: 799px) {
main {
margin: 1.5em auto;
padding: 0 1em;
}

footer > div {
padding: 0.5em 1em;
}

header > div > div {
margin: 0.5em 1em;
}

header > div > .left {
margin-bottom: 0em;
}
}

header a {
@@ -103,6 +123,20 @@ header .aligned {
vertical-align: middle;
}

footer ul {
margin: 0;
padding: 0;
}

footer ul li {
display: inline-block;
list-style: none;
}

footer ul li:not(:last-child):after {
content: " \00b7";
}

#corp-masthead {
height: 30px;
margin-right: 0.25em;


+ 11
- 10
templates/_base.mako 查看文件

@@ -5,13 +5,14 @@
<title>
<%block name="title">${g.config.get("corp.name") | h}</%block>
</title>
<link rel="stylesheet" type="text/css" href="${url_for('staticv', filename='main.css')}" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="${url_for('staticv', filename='main.css')}"/>
% if g.config.get("style"):
<% stylesheet = "styles/{}.css".format(g.config.get("style")) %>
<link rel="stylesheet" type="text/css" href="${url_for('staticv', filename=stylesheet)}" />
<link 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)}" />
<link rel="icon" type="image/png" sizes="${size}x${size}" href="${g.eve.image.corp(g.config.get('corp.id'), size)}"/>
% endfor
</head>
<body>
@@ -25,8 +26,8 @@
</a>
<a href="/" class="aligned">${g.config.get("corp.name") | h}</a>
</%block>
</div><!--
--><div class="right">
</div>
<div class="right">
<%block name="righthead"/>
</div>
</div>
@@ -44,11 +45,11 @@
<%block name="footer">
<footer>
<div>
YC ${g.eve.clock.now()}
&bull;
Running <a href="https://github.com/earwig/calefaction">Calefaction</a> ${g.version}
&bull;
<a href="https://eveonline.com">EVE Online</a> and all related trademarks are property of <a href="https://ccpgames.com">CCP hf</a>.
<ul>
<li>YC&nbsp;${g.eve.clock.now()}</li>
<li>Running <a href="https://github.com/earwig/calefaction">Calefaction</a>&nbsp;${g.version}</li>
<li><a href="https://eveonline.com">EVE&nbsp;Online</a> and all related trademarks are property of <a href="https://ccpgames.com">CCP&nbsp;hf</a>.</li>
</ul>
</div>
</footer>
</%block>


Loading…
取消
儲存