Browse Source

Remove all traces of easter egg until April Fools

Ian Adam Naval 5 years ago
parent
commit
c1d8fe9299
2 changed files with 4 additions and 5 deletions
  1. 0
    3
      server.py
  2. 4
    2
      templates/pod_menu.xsl

+ 0
- 3
server.py View File

@@ -6,8 +6,6 @@ from flask import Flask, render_template, Response
6 6
 
7 7
 app = Flask(__name__)
8 8
 
9
-
10
-EASTER_EGG_MESSAGE = "It's DAKA." if its_april_fools() else ""
11 9
 DAKA_MENU_XML_URL = ("http://campusdining.compass-usa.com/wpi/Pages/"
12 10
                      "SignageXML.aspx?location=Pulse+On+Dining+Marketplace")
13 11
 
@@ -28,7 +26,6 @@ def index():
28 26
 @app.route('/pod_menu.xsl')
29 27
 def pod_menu():
30 28
     xsl = render_template("pod_menu.xsl",
31
-                          easter_egg_message=EASTER_EGG_MESSAGE,
32 29
                           easter_egg=its_april_fools(),
33 30
                           date=datetime.now().strftime("%A, %B %d, %Y"))
34 31
     return Response(xsl, mimetype='text/xsl')

+ 4
- 2
templates/pod_menu.xsl View File

@@ -88,12 +88,14 @@
88 88
 					.menu-item:last-child::after {
89 89
 						content: '';
90 90
 					}
91
+					{% if easter_egg %}
91 92
 					.easter-egg {
92 93
 						display: none;
93 94
 					}
94 95
 					h1::before {
95 96
 						content: 'POD';
96 97
 					}
98
+					{% endif %}
97 99
 					@media print {
98 100
 						.easter-egg {
99 101
 							display: block;
@@ -114,7 +116,7 @@
114 116
 			</head>
115 117
 			<body>
116 118
 				<div class="header">
117
-					<h1> Menu</h1>
119
+					<h1>{% if not easter_egg %}POD{% endif %} Menu</h1>
118 120
 					<h2>{{ date }}</h2>
119 121
 				</div>
120 122
 				<div class="meal-periods">
@@ -145,7 +147,7 @@
145 147
 				<div class="footer">
146 148
 					<p class="vegetarian">* Vegetarian</p>
147 149
 					<p class="vegan">** Vegan</p>
148
-					<p class="easter-egg">{{ easter_egg_message }}</p>
150
+					{% if easter_egg %}<p class="easter-egg">It's DAKA.</p>{% endif %}
149 151
 				</div>
150 152
 			</body>
151 153
 		</html>

Loading…
Cancel
Save