Browse Source

Improve image stuff.

pull/24/head
Ben Kurtovic 11 years ago
parent
commit
4ce5cf7a22
5 changed files with 5 additions and 6 deletions
  1. +2
    -3
      pages/settings.mako
  2. +3
    -3
      pages/support/header.mako
  3. BIN
     
  4. BIN
     
  5. BIN
     

+ 2
- 3
pages/settings.mako View File

@@ -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 View File

@@ -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;">


BIN
View File


BIN
View File


BIN
View File


Loading…
Cancel
Save