A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

53 regels
2.7 KiB

  1. <%page args="environ, cookies, title, slug=None, add_css=(), add_js=()"/>\
  2. <%namespace module="toolserver.background" import="set_background"/>\
  3. <%namespace name="index" file="/index.mako" import="get_tools"/>\
  4. <%!
  5. from os import path
  6. %>\
  7. <%
  8. tools = get_tools()
  9. root = path.dirname(environ["SCRIPT_NAME"])
  10. this = environ["PATH_INFO"]
  11. pretty = path.split(root)[0]
  12. if not slug:
  13. slug = path.split(this)[1]
  14. if slug.endswith(".fcgi"):
  15. slug = slug[:-5]
  16. %>\
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
  19. <head>
  20. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  21. <title>${title} - earwig@toolserver</title>
  22. <link rel="stylesheet" href="${root}/static/css/main.css" type="text/css" />
  23. % for filename in add_css:
  24. <link rel="stylesheet" href="${root}/static/css/${filename}" type="text/css" />
  25. % endfor
  26. <script src="${root}/static/js/cookies.js" type="text/javascript"></script>
  27. <script src="${root}/static/js/potd.js" type="text/javascript"></script>
  28. % for filename in add_js:
  29. <script src="${root}/static/js/${filename}" type="text/javascript"></script>
  30. % endfor
  31. </head>
  32. <% selected = cookies["EarwigBackground"].value if "EarwigBackground" in cookies else "list" %>\
  33. % if selected in ["plain-brown", "plain-blue"]:
  34. <body style="background-image: url('${root}/static/images/background-${selected[6:]}.png');">
  35. % else:
  36. <% bg_url = set_background(cookies, selected) %>\
  37. <body onload="update_screen_size()" style="background-image: url('${bg_url | h}'); background-size: cover;">
  38. % endif
  39. <div id="header">
  40. <p id="heading"><a class="dark" href="${pretty}">earwig</a><span class="light">@</span><a class="mid" href="https://wiki.toolserver.org/">toolserver</a><span class="light">:</span><a class="dark" href="${this}">${slug}</a></p>
  41. <p id="links"><span class="light">&gt;</span>
  42. % for num, tool in enumerate(tools, 1):
  43. % if tool != "DIVIDER":
  44. <% name, tool, link, complete, desc = tool %>\
  45. <abbr title="${name}${' (incomplete)' if not complete else ''}"><a class="${'dark' if complete else 'mid'}" href="${pretty}/${link}">${tool}</a></abbr>
  46. % endif
  47. % if num < len(tools):
  48. <span class="light">&#124;</span>
  49. % endif
  50. % endfor
  51. </p>
  52. </div>
  53. <div id="container">