ソースを参照

Set the POTD as the default background.

pull/24/head
Ben Kurtovic 11年前
コミット
41c0df6cb9
2個のファイルの変更6行の追加7行の削除
  1. +4
    -4
      pages/settings.mako
  2. +2
    -3
      pages/support/header.mako

+ 4
- 4
pages/settings.mako ファイルの表示

@@ -41,11 +41,11 @@
</tr>
<%
background_options = [
("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.'),
("list", 'Randomly select from <a href="http://commons.wikimedia.org/wiki/User:The_Earwig/POTD">a subset</a> of previous <a href="//commons.wikimedia.org/">Wikimedia Commons</a> <a href="//commons.wikimedia.org/wiki/Commons:Picture_of_the_day">Pictures of the Day</a> that work well as widescreen backgrounds, refreshed daily (default).'),
("potd", 'Use the current Commons Picture of the Day, unfiltered. Certain POTDs may be unsuitable as backgrounds due to their aspect ratio or subject matter.'),
("plain", "Use a plain background."),
]
selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "plain"
selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "list"
%>\
% for i, (value, desc) in enumerate(background_options):
<tr>


+ 2
- 3
pages/support/header.mako ファイルの表示

@@ -14,12 +14,11 @@
<link rel="stylesheet" href="${root}/static/style.css" type="text/css" />
<script src="${root}/static/script.js" type="text/javascript"></script>
</head>
<% selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "plain" %>\
<% selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "list" %>\
% if selected == "plain":
<body style="background-image: url('${root}/static/background.png');">
% else:
<% bg_url = set_background(cookies, selected) %>\
<body onload="update_screen_size()" style="background-image: url('${bg_url | h}'); background-size: cover;">
<body onload="update_screen_size()" style="background-image: url('${set_background(cookies, selected) | h}'); background-size: cover;">
% endif
<div id="header">
<p id="heading"><a class="dark" href="${root}">Earwig's Copyvio Detector</a></p>


読み込み中…
キャンセル
保存