| @@ -19,8 +19,8 @@ def home(): | |||||
| current = get_current() | current = get_current() | ||||
| if current: | if current: | ||||
| campaign = config["campaigns"][current] | campaign = config["campaigns"][current] | ||||
| return render_template( | |||||
| "campaigns/campaign.mako", name=current, campaign=campaign) | |||||
| return render_template("campaigns/campaign.mako", | |||||
| name=current, campaign=campaign, enabled=True) | |||||
| return render_template("campaigns/empty.mako") | return render_template("campaigns/empty.mako") | ||||
| def navitem(): | def navitem(): | ||||
| @@ -41,11 +41,12 @@ def current_campaign(): | |||||
| @blueprint.rroute("/campaigns/<name>") | @blueprint.rroute("/campaigns/<name>") | ||||
| def campaign(name): | def campaign(name): | ||||
| """Render and return a campaign page.""" | """Render and return a campaign page.""" | ||||
| if name not in config["enabled"]: | |||||
| if name not in config["campaigns"]: | |||||
| abort(404) | abort(404) | ||||
| campaign = config["campaigns"][name] | campaign = config["campaigns"][name] | ||||
| return render_template( | |||||
| "campaigns/campaign.mako", name=name, campaign=campaign) | |||||
| enabled = name in config["enabled"] | |||||
| return render_template("campaigns/campaign.mako", | |||||
| name=name, campaign=campaign, enabled=enabled) | |||||
| @blueprint.rroute("/settings/campaign", methods=["POST"]) | @blueprint.rroute("/settings/campaign", methods=["POST"]) | ||||
| def set_campaign(): | def set_campaign(): | ||||
| @@ -348,6 +348,18 @@ footer ul li:not(:last-child)::after { | |||||
| -moz-appearance: none; | -moz-appearance: none; | ||||
| } | } | ||||
| h2 .disabled { | |||||
| color: #989898; | |||||
| text-decoration: line-through; | |||||
| } | |||||
| h2 .disabled::after { | |||||
| display: inline-block; | |||||
| padding-left: 0.75em; | |||||
| font-size: 75%; | |||||
| content: "✘"; | |||||
| } | |||||
| /* -------------------------------- Members -------------------------------- */ | /* -------------------------------- Members -------------------------------- */ | ||||
| #members-list { | #members-list { | ||||
| @@ -14,7 +14,7 @@ | |||||
| </%block> | </%block> | ||||
| <%block name="righthead"> | <%block name="righthead"> | ||||
| <div id="character-portrait"> | <div id="character-portrait"> | ||||
| <img class="styled-border" alt="Portrait" src="${g.eve.image.character(g.auth.get_character_id(), 256)}"/> | |||||
| <img class="styled-border" alt="Portrait" src="${g.eve.image.character(g.auth.get_character_id() or 1, 256)}"/> | |||||
| <div id="character-options" class="styled-border"> | <div id="character-options" class="styled-border"> | ||||
| <div id="style-options"> | <div id="style-options"> | ||||
| <% cur_style = g.auth.get_character_prop("style") or g.config.get("style.default") %> | <% cur_style = g.auth.get_character_prop("style") or g.config.get("style.default") %> | ||||
| @@ -2,5 +2,8 @@ | |||||
| <%block name="title"> | <%block name="title"> | ||||
| ${self.maketitle(campaign["title"], "Campaigns")} | ${self.maketitle(campaign["title"], "Campaigns")} | ||||
| </%block> | </%block> | ||||
| <h2><span class="understate">Campaign:</span> ${campaign["title"] | h}</h2> | |||||
| <h2> | |||||
| <span class="understate">Campaign:</span> | |||||
| <span${"" if enabled else ' class="disabled"'}>${campaign["title"] | h}</span> | |||||
| </h2> | |||||
| <p>Hello! ...</p> | <p>Hello! ...</p> | ||||