-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
212 lines (189 loc) · 13.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html lang="en">
<head class="noprint">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>PicoBrew Public Recipe Library</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description">
<meta name="keywords" content=",automatic,automated,beer brewing,machine,craft beer,home brewing,beer">
<meta name="robots" content="noimageindex" />
<link rel="canonical" href="https://picobrew.com/publicrecipes/publicrecipes" />
<link rel="icon" href="/favicon.ico">
<!--Styles-->
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,300i,400,500,700,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:200,300,400,400i,500,600,700,800,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Barlow+Condensed:600,700,900&display=swap" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
<link href="./assets/css/ThirdPartyCSS.css" rel="stylesheet"/>
<link href="./assets/css/ComponentCSS.css" rel="stylesheet"/>
<script src="./assets/js/ThirdPartyJS.js"></script>
<script>
function getSelectedRecipeList() {
return location.search.indexOf("community=1") === -1
? "official"
: "community";
}
function getRecipeListUrl() {
return getSelectedRecipeList() === "community"
? "./data/recipe-list-community.json"
: "./data/recipe-list-official.json";
}
var retryUpdateRadioButtonStateCount = 10;
function updateRecipeListRadioButtonState() {
// The elements may not exist yet because they're wrapped by Vue directives.
// In this case, let's just retry a few times.
if ($("#recipe-set-official").length === 0 && retryUpdateRadioButtonStateCount > 0) {
retryUpdateRadioButtonStateCount--;
setTimeout(function () {
updateRecipeListRadioButtonState();
}, 250);
return;
}
var recipeList = getSelectedRecipeList();
if (recipeList === "community") {
$("#recipe-set-official").addClass("fa-circle-o").removeClass("fa-check-circle");
$("#recipe-set-community").addClass("fa-check-circle").removeClass("fa-circle-o");
}
else {
$("#recipe-set-official").addClass("fa-check-circle").removeClass("fa-circle-o");
$("#recipe-set-community").addClass("fa-circle-o").removeClass("fa-check-circle");
}
}
</script>
<style>
.recipe-set-container {
text-align: center;
margin-bottom: 5px;
}
.recipe-set-container i {
margin-left: 5px;
}
</style>
</head>
<body>
<div id="main-internal-wrapper">
<header id="header" class="noprint">
<!-- Original navigation header (hidden) -->
<nav id="pico-nav-app" navitems="[]" passedusername="" style="display: none;">
<pico-nav :vm="vm" :promovm="promovm" :promoactive="promoactive" v-on:nav-link-event="handleNavLinkEvent"></pico-nav>
<div style="width:100%;" :style="padStyle"></div>
</nav>
<!-- Hardcoded navigation header -->
<nav>
<div class="pico-nav--wrap">
<div id="pico-brew-navbar" class="pico-nav">
<div class="pico-nav--contain">
<div class="pico-nav--top-items">
<div class="pico-nav--top-item"><a href="/">PicoBrew Public Recipe Library</a></div>
<div class="pico-nav--top-item"><a href="https://github.com/Justin-Credible/picobrew-recipes/blob/master/README.md">About This Site</a></div>
<div class="pico-nav--top-item"><a href="https://www.picobrew.com/PublicRecipes/PublicRecipes">Original Site</a></div>
</div>
<div class="pico-nav--right">
<div class="pico-nav--icon-wrap relpos -cart"><img src="./assets/images/mainlayout/nav/icons/cart_.svg" class="pico-nav--icon"></div>
<div class="pico-nav--top-item -login"><a href="https://github.com/Justin-Credible/picobrew-recipes">Contribute on GitHub</a></div>
</div>
</div>
</div>
<div id="pico-sub-nav" class="pico-nav--sub">
<div class="pico-nav--close"><img src="./assets/images/mainlayout/nav/icons/x_white.svg" class="pico-nav--close-icon"></div>
</div>
<div id="pico-sub-detail-nav" class="pico-nav--detail">
<div class="pico-nav--close -back"><img src="./assets/images/mainlayout/nav/icons/back_white.svg" class="pico-nav--close-icon"></div>
<div class="pico-nav--detail-item-wrap"></div>
</div>
<div id="pico-user-nav" class="pico-nav--user"></div>
</div>
<div style="width: 100%; height: 0px;"></div>
</nav>
</header>
<div id="main-internal" role="main">
<div id="page-text">
<script>
const featuredrecipes = JSON.parse('{"Title":"Featured Recipes","FeaturedRecipes":[{"Title":"Pico Pale Ale","Subtitle":"American Pale Ale","Img":"./assets/images/srm/200px/srm_12.png","Link":"./recipe.html?id=1353d607268546a0bea74227f1ded356","Stats":[{"Title":"ABV","Stat":"5.4%"},{"Title":"IBU","Stat":"40"}]},{"Title":"Prost","Subtitle":"Oktoberfest/Marzen","Img":"./assets/images/srm/200px/srm_12.png","Link":"./recipe.html?id=7ba8f384b5d54a798cc4f4b85a18e317","Stats":[{"Title":"ABV","Stat":"5.5%"},{"Title":"IBU","Stat":"29"}]},{"Title":"PB Bites","Subtitle":"Imperial IPA","Img":"./assets/images/srm/200px/srm_8.png","Link":"./recipe.html?id=b9740678aba14eaaa536234a2cea8527","Stats":[{"Title":"ABV","Stat":"7.9%"},{"Title":"IBU","Stat":"59"}]},{"Title":"B-52 Blonde","Subtitle":"Blonde Ale","Img":"./assets/images/srm/200px/srm_5.png","Link":"./recipe.html?id=3a0822cd15374e8a8139b5593f42c0a4","Stats":[{"Title":"ABV","Stat":"5.7%"},{"Title":"IBU","Stat":"23"}]},{"Title":"Atomic Amber","Subtitle":"American Amber Ale","Img":"./assets/images/srm/200px/srm_24.png","Link":"./recipe.html?id=1704720c78ac436b9ca46bbc8a2dfbe3","Stats":[{"Title":"ABV","Stat":"7.2%"},{"Title":"IBU","Stat":"39"}]},{"Title":"Party Porter","Subtitle":"Robust Porter","Img":"./assets/images/srm/200px/srm_28.png","Link":"./recipe.html?id=4d584296861b49169883af5c7c3cc6fa","Stats":[{"Title":"ABV","Stat":"6.9%"},{"Title":"IBU","Stat":"33"}]},{"Title":"Pepper Anderson","Subtitle":"American IPA","Img":"./assets/images/srm/200px/srm_9.png","Link":"./recipe.html?id=b93557d881104288916ca6f5192f3059","Stats":[{"Title":"ABV","Stat":"6.1%"},{"Title":"IBU","Stat":"74"}]},{"Title":"Mow the Damn Lawn","Subtitle":"Lite American Lager","Img":"./assets/images/srm/200px/srm_3.png","Link":"./recipe.html?id=cb4320ef48424f71a65bb720b139c0c6","Stats":[{"Title":"ABV","Stat":"4.1%"},{"Title":"IBU","Stat":"11"}]}]}')
</script>
<link href="./assets/css/PublicRecipesCSS.css" rel="stylesheet"/>
<div id="public-recipes-app" class="public-recipes"
:rest-url="setRestUrl(window.getRecipeListUrl())"
v-cloak>
<featured-recipes :vm="featuredvm"></featured-recipes>
<div v-if="loaded">
<h1 class="featured-recipes--title -library">Recipe Library</h1>
<div class="recipe-set-container">
<a href="./?community=0">
<i id="recipe-set-official" class="fa fa-circle-o"></i>
Official Only
</a>
<a href="./?community=1">
<i id="recipe-set-community" class="fa fa-circle-o"></i>
Official + Community
</a>
</div>
<div class="numRecipes">
<span style="display: inline-block"><span v-show="getFilteredRecipesLength != getPublicRecipesLength">{{getFilteredRecipesLength}} out of</span> {{getPublicRecipesLength}} Recipes</span>
</div>
<div class="recipe-org">
<div class="search-input--contain">
<input class="search-input" type="text" placeholder="search" v-model="searchInput" v-on:keyup="resetPageIndex" aria-label="Search Recipes">
</div>
<rounded-image-button :vm="filtervm.button" v-on:button-event="showFilter(true)"></rounded-image-button>
<rounded-image-button :vm="sortvm.button" v-on:button-event="showSort(true)"></rounded-image-button>
<filter-container :vm="filtervm"
v-on:mouse-leave-event="showFilter(false)"
v-on:filter-close-event="showFilter(false)"
v-on:filter-reset-event="handleFilterReset">
</filter-container>
<sort-container :vm="sortvm" v-on:mouse-leave-event="showSort(false)" v-on:sort-close-event="showSort(false)" v-on:sort-item-event="sort"></sort-container>
</div>
<template v-for="recipe in createCardList(getFilteredRecipesSlice)" :key="recipe.GUID">
<recipe-row :vm="recipe"></recipe-row>
</template>
<table class="pagingFooter" v-show="getFilteredRecipesLength > perPage">
<tr>
<td><button id="FooterPagePrev" v-on:click="pageIndex = pageIndex - perPage" class="FooterButton FooterPrev" v-show="pageIndex > 0"> << Previous</button></td>
<td>
<button id="FooterPage1" v-on:click="pageIndex = pageIndex - (perPage * 2)" class="FooterButton FooterPage" v-show="pageIndex - (perPage * 2) > 0">{{(pageIndex - perPage) / perPage}}</button>
<button id="FooterPage2" v-on:click="pageIndex = pageIndex - perPage" class="FooterButton FooterPage" v-show="pageIndex - perPage >= 0">{{pageIndex / perPage}}</button>
<button id="FooterPage3" class="FooterButton FooterCurrent">{{(pageIndex + perPage) / perPage}}</button>
<button id="FooterPage4" v-on:click="pageIndex = pageIndex + perPage" class="FooterButton FooterPage" v-show="pageIndex + perPage <= getFilteredRecipesLength">{{Math.floor((pageIndex + (perPage * 2)) / perPage)}}</button>
<button id="FooterPage5" v-on:click="pageIndex = pageIndex + (perPage * 2)" class="FooterButton FooterPage" v-show="pageIndex + (perPage * 2) <= getFilteredRecipesLength">{{Math.floor((pageIndex + (perPage * 3)) / perPage)}}</button>
</td>
<td><button id="FooterPageNext" v-on:click="pageIndex = pageIndex + perPage;" class="FooterButton FooterNext" v-show="pageIndex + perPage < getFilteredRecipesLength">Next >></button></td>
</tr>
</table>
</div>
<template id="session-loading-animation" v-else>
<div class="circle-container">
<span class="circle-text">LOADING RECIPES... </span>
<span class="circle-loading"></span>
</div>
</template>
</div>
</div>
</div> <!-- main-->
</div>
<!-- Original footer (hidden) -->
<div id="pico-footer-app" class="noprint" style="display: none;">
<pico-footer :vm="vm" v-on:footer-click-event="handleFooterClick"></pico-footer>
</div>
<!-- Hardcoded footer -->
<div class="pico-footer">
<div class="pico-footer--links">
<div class="pico-footer--link"><a href="/">PicoBrew Public Recipe Library</a></div>
<div class="pico-footer--link"><a href="https://github.com/Justin-Credible/picobrew-recipes/blob/master/README.md">About This Site</a></div>
<div class="pico-footer--link"><a href="https://www.picobrew.com/PublicRecipes/PublicRecipes">Original Site</a></div>
<div class="pico-footer--link"><a href="https://github.com/Justin-Credible/picobrew-recipes">Contribute on GitHub</a></div>
</div>
</div>
<script src="./assets/js/ComponentJS.js"></script>
<script src="./assets/js/PublicRecipesJS.js"></script>
<script>
$(function() {
updateRecipeListRadioButtonState();
});
</script>
</body>
</html>