A corporation manager and dashboard for EVE Online
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.
 
 
 
 
 

36 lines
1.6 KiB

  1. <%inherit file="../_default.mako"/>
  2. <%block name="title">
  3. ${self.maketitle(campaign["title"], "Campaigns")}
  4. </%block>
  5. <h2>
  6. <span class="understate">Campaign:</span>
  7. <span${"" if enabled else ' class="disabled"'}>${campaign["title"] | h}</span>
  8. </h2>
  9. <div id="operations">
  10. % for section in campaign["layout"]:
  11. <% klass = "loose" if len(section) < 3 else "tight" %>
  12. <section class="${klass}">
  13. % for opname in section:
  14. <% operation = campaign["operations"][opname] %>
  15. <div class="operation">
  16. <h3><a href="${url_for('campaigns.operation', cname=name, opname=opname)}">${operation["title"] | h}</a></h3>
  17. <div class="stats">
  18. <!-- ... -->
  19. <%
  20. random = __import__("random")
  21. n = [random.randint(0, 500), random.randint(10000, 500000), random.randint(10000000, 50000000000)][random.randint(0, 2)]
  22. %>
  23. <%
  24. klass = "big" if n < 1000 else "medium" if n < 1000000 else "small"
  25. %>
  26. <div class="primary">
  27. <span class="${klass}">${"{:,}".format(n)}</span>
  28. </div>
  29. <div class="unit">${"ships" if klass == "big" else "points" if klass == "medium" else "ISK"}</div> <!-- ... plural -->
  30. </div>
  31. </div>
  32. % endfor
  33. </section>
  34. % endfor
  35. </div>