Sha256: 5c95e04e8482c5cdab2f33c2ffa91941952b7174ea02edd4ab386814e6ce26e4

Contents?: true

Size: 1.97 KB

Versions: 1

Compression:

Stored size: 1.97 KB

Contents

---
layout: default
---
{% if content != "" %}
	<p>{{ content }}</p>
{% endif %}
<div id="menu">
	{% assign has_vegan = false %}
	{% assign has_gluten_free = false %}

	{% for section in page.sections %}
		{% unless forloop.first %}
			<hr>
		{% endunless %}
		<h1>{{ section.title | upcase }}</h1>
		<p>{{ section.time }}</p>
		<div id="{{ menu.title }}">
			{% for heading in section.headings %}
				{% if heading.name %}
					<h2>{{ heading.name }}</h2>
				{% endif %}
				{% for food in heading.foods %}
					<div onclick=""> <!-- onclick lets iOS recognise hover events -->
						<h2>{{ food.name }}
							<span>${{ food.price }}</span>
							{% if food.vegan %}
								{% assign has_vegan = true %}
								<img src="{{ '/assets/images/menu/diet/vegan.png' | relative_url }}" class="dietIcon" title="Vegan" alt="Vegan">
							{% endif %}
							{% if food.gluten_free %}
								{% assign has_gluten_free = true %}
								<img src="{{ '/assets/images/menu/diet/glutenFree.png' | relative_url }}" class="dietIcon" title="Gluten free" alt="Gluten free">
							{% endif %}
						</h2>
						<p>{{ food.description }}</p>
						{% if food.options.size > 0 %}
							<ul>
								{% for option in food.options %}
									<li>{{ option.name }}<span>${{ option.price }}</span></li>
								{% endfor %}
							</ul>
						{% endif %}
						{% assign slugified_food_name = food.name | slugify %}
						<img src="{{ '/assets/images/menu/' | append: slugified_food_name | append: '.webp' | relative_url }}" alt="{{ food.name }}">
					</div>
				{% endfor %}
			{% endfor %}
		</div>
	{% endfor %}
</div>
{% if has_vegan or has_gluten_free %}
<div id="menuKey">
	{% if has_vegan %}
	Vegan <img src="{{ '/assets/images/menu/diet/vegan.png' | relative_url }}" class="dietIcon" title="Vegan" alt="Vegan">
	{% endif %}
	{% if has_gluten_free %}
	Gluten free <img src="{{ '/assets/images/menu/diet/glutenFree.png' | relative_url }}" class="dietIcon" title="Gluten free" alt="Gluten free">
	{% endif %}
</div>
{% endif %}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cafe-theme-0.1.6 _layouts/menu.html