|
@@ -0,0 +1,154 @@
|
|
1
|
+<?xml version="1.0"?>
|
|
2
|
+
|
|
3
|
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
4
|
+
|
|
5
|
+ <xsl:template match="/Data/Venues/Venue[1]">
|
|
6
|
+ <html>
|
|
7
|
+ <head>
|
|
8
|
+ <meta charset="UTF-8"/>
|
|
9
|
+ <title>Document</title>
|
|
10
|
+ <style>
|
|
11
|
+ html, body {
|
|
12
|
+ display: flex;
|
|
13
|
+ flex-flow: column wrap;
|
|
14
|
+ margin: 0;
|
|
15
|
+ padding: 0;
|
|
16
|
+ font-size: 1.1em;
|
|
17
|
+ font-family: sans-serif;
|
|
18
|
+ min-height: 100%;
|
|
19
|
+ max-width: 960px;
|
|
20
|
+ }
|
|
21
|
+ @media screen {
|
|
22
|
+ body {
|
|
23
|
+ padding: 32px;
|
|
24
|
+ }
|
|
25
|
+ }
|
|
26
|
+ .vegetarian {
|
|
27
|
+ color: #ac2b37;
|
|
28
|
+ }
|
|
29
|
+ .vegan {
|
|
30
|
+ color: #ac2b37;
|
|
31
|
+ font-style: italic;
|
|
32
|
+ }
|
|
33
|
+ .header {
|
|
34
|
+ background-image: url('{{ url_for('static', filename='img/Dining-Services_Subranded_Print_black.png') }}');
|
|
35
|
+ background-origin: content-box;
|
|
36
|
+ background-position: top right;
|
|
37
|
+ background-repeat: no-repeat;
|
|
38
|
+ background-size: 30%;
|
|
39
|
+ border: 1px #000 solid;
|
|
40
|
+ margin-bottom: 16px;
|
|
41
|
+ padding: 8px 8px 8px 8px;
|
|
42
|
+ text-align: center;
|
|
43
|
+ -webkit-print-color-adjust: exact;
|
|
44
|
+ }
|
|
45
|
+ .header:before {
|
|
46
|
+ content: '';
|
|
47
|
+ position: absolute;
|
|
48
|
+ background-size: 100%;
|
|
49
|
+ background-image: url('{{ url_for('static', filename='img/WPIEATS_SocialMediaBanner_WhiteBG_Blacktext.png') }}');
|
|
50
|
+ margin-left: -150px;
|
|
51
|
+ width: 300px;
|
|
52
|
+ height: 48px;
|
|
53
|
+ -webkit-print-color-adjust: exact;
|
|
54
|
+ }
|
|
55
|
+ .header h1 {
|
|
56
|
+ margin-top: 48px;
|
|
57
|
+ }
|
|
58
|
+ .meal-periods {
|
|
59
|
+ flex: 1;
|
|
60
|
+ display: flex;
|
|
61
|
+ align-items: stretch;
|
|
62
|
+ align-content: stretch;
|
|
63
|
+ }
|
|
64
|
+ .meal-period {
|
|
65
|
+ flex: 1;
|
|
66
|
+ border: 1px #000 solid;
|
|
67
|
+ margin-right: 16px;
|
|
68
|
+ margin-bottom: 16px;
|
|
69
|
+ padding: 8px;
|
|
70
|
+ float: left;
|
|
71
|
+ }
|
|
72
|
+ .meal-period:last-child {
|
|
73
|
+ margin-right: 0;
|
|
74
|
+ }
|
|
75
|
+ .footer {
|
|
76
|
+ clear: both;
|
|
77
|
+ line-height: .5em;
|
|
78
|
+ }
|
|
79
|
+ h2 {
|
|
80
|
+ text-align: center;
|
|
81
|
+ }
|
|
82
|
+ h3 {
|
|
83
|
+ text-decoration: underline;
|
|
84
|
+ }
|
|
85
|
+ .menu-item::after {
|
|
86
|
+ content: ', ';
|
|
87
|
+ }
|
|
88
|
+ .menu-item:last-child::after {
|
|
89
|
+ content: '';
|
|
90
|
+ }
|
|
91
|
+ .easter-egg {
|
|
92
|
+ display: none;
|
|
93
|
+ }
|
|
94
|
+ h1::before {
|
|
95
|
+ content: 'POD';
|
|
96
|
+ }
|
|
97
|
+ @media print {
|
|
98
|
+ .easter-egg {
|
|
99
|
+ display: block;
|
|
100
|
+ font-size: 8px;
|
|
101
|
+ color: #f8f8f8;
|
|
102
|
+ position: absolute;
|
|
103
|
+ right: 0;
|
|
104
|
+ bottom: 0;
|
|
105
|
+ -webkit-print-color-adjust: exact;
|
|
106
|
+ }
|
|
107
|
+ {% if easter_egg %}
|
|
108
|
+ h1::before {
|
|
109
|
+ content: 'DAKA';
|
|
110
|
+ }
|
|
111
|
+ {% endif %}
|
|
112
|
+ }
|
|
113
|
+ </style>
|
|
114
|
+ </head>
|
|
115
|
+ <body>
|
|
116
|
+ <div class="header">
|
|
117
|
+ <h1> Menu</h1>
|
|
118
|
+ <h2>{{ date }}</h2>
|
|
119
|
+ </div>
|
|
120
|
+ <div class="meal-periods">
|
|
121
|
+ <xsl:for-each select="MealPeriods/MealPeriod[@name='Lunch' or @name='Dinner']">
|
|
122
|
+ <div class="meal-period">
|
|
123
|
+ <h2><xsl:value-of select="@name" /></h2>
|
|
124
|
+ <xsl:for-each select="MealStation">
|
|
125
|
+ <div class="meal-station">
|
|
126
|
+ <h3><xsl:value-of select="@name" /></h3>
|
|
127
|
+ <xsl:for-each select="MenuItem">
|
|
128
|
+ <xsl:choose>
|
|
129
|
+ <xsl:when test="Categories/Category[text()[contains(.,'Vegetarian')]]">
|
|
130
|
+ <span class="menu-item vegetarian"><xsl:value-of select="@name" />*</span>
|
|
131
|
+ </xsl:when>
|
|
132
|
+ <xsl:when test="Categories/Category[text()[contains(.,'Vegan')]]">
|
|
133
|
+ <span class="menu-item vegan"><xsl:value-of select="@name" />**</span>
|
|
134
|
+ </xsl:when>
|
|
135
|
+ <xsl:otherwise>
|
|
136
|
+ <span class="menu-item"><xsl:value-of select="@name" /></span>
|
|
137
|
+ </xsl:otherwise>
|
|
138
|
+ </xsl:choose>
|
|
139
|
+ </xsl:for-each>
|
|
140
|
+ </div>
|
|
141
|
+ </xsl:for-each>
|
|
142
|
+ </div>
|
|
143
|
+ </xsl:for-each>
|
|
144
|
+ </div>
|
|
145
|
+ <div class="footer">
|
|
146
|
+ <p class="vegetarian">* Vegetarian</p>
|
|
147
|
+ <p class="vegan">** Vegan</p>
|
|
148
|
+ <p class="easter-egg">{{ easter_egg_message }}</p>
|
|
149
|
+ </div>
|
|
150
|
+ </body>
|
|
151
|
+ </html>
|
|
152
|
+ </xsl:template>
|
|
153
|
+
|
|
154
|
+</xsl:stylesheet>
|