瀏覽代碼

Improve image stuff.

pull/24/head
Ben Kurtovic 12 年之前
父節點
當前提交
4ce5cf7a22
共有 5 個檔案被更改,包括 5 行新增6 行删除
  1. +2
    -3
      pages/settings.mako
  2. +3
    -3
      pages/support/header.mako
  3. 二進制
     
  4. 二進制
     
  5. 二進制
     

+ 2
- 3
pages/settings.mako 查看文件

@@ -42,10 +42,9 @@
</tr>
<%
background_options = [
("plain-brown", "Use a plain tiled background (brown version)."),
("plain-blue", "Use a plain tiled background (blue version)."),
("plain", "Use a plain tiled background (default)"),
("potd", 'Use the current <a href="//commons.wikimedia.org/">Wikimedia Commons</a> <a href="//commons.wikimedia.org/wiki/Commons:Picture_of_the_day">Picture of the Day</a>, unfiltered. Certain POTDs may be unsuitable as backgrounds due to their aspect ratio or subject matter (generally portraits do not work well).'),
("list", 'Randomly select from <a href="http://commons.wikimedia.org/wiki/User:The_Earwig/POTD">a subset of previous Commons Pictures of the Day</a> that work well as widescreen backgrounds, refreshed daily (default).'),
("list", 'Randomly select from <a href="http://commons.wikimedia.org/wiki/User:The_Earwig/POTD">a subset of previous Commons Pictures of the Day</a> that work well as widescreen backgrounds, refreshed daily.'),
]
selected = cookies["EarwigBackground"].value if "EarwigBackground" in cookies else "list"
%>\


+ 3
- 3
pages/support/header.mako 查看文件

@@ -29,9 +29,9 @@
<script src="${root}/static/js/${filename}" type="text/javascript"></script>
% endfor
</head>
<% selected = cookies["EarwigBackground"].value if "EarwigBackground" in cookies else "list" %>\
% if selected in ["plain-brown", "plain-blue"]:
<body style="background-image: url('${root}/static/images/background-${selected[6:]}.png');">
<% selected = cookies["EarwigBackground"].value if "EarwigBackground" in cookies else "plain" %>\
% if selected == "plain":
<body style="background-image: url('${root}/static/images/background.png');">
% else:
<% bg_url = set_background(cookies, selected) %>\
<body onload="update_screen_size()" style="background-image: url('${bg_url | h}'); background-size: cover;">


二進制
查看文件


二進制
查看文件


二進制
查看文件


Loading…
取消
儲存