This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* home view styling | |
*/ | |
#find { | |
background-color: rgba(255, 0, 0, 0.4); | |
grid-area: find; | |
height: 21vh; | |
max-height: 180px; | |
width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% include partials/header %> | |
<body id="home"> | |
<script defer src="/js/home.js"></script> | |
<form action="/random" method="post" id="form"> | |
<input type="hidden" name="price" value="$$"> | |
<input type="hidden" name="drive" value="true"> | |
<input type="hidden" name="latitude" value="0" min="0" step="Any" id="latitude" required> | |
<input type="hidden" name="longitude" value="0" min="0" step="Any" id="longitude" required> | |
</form> | |
<div class="button" id="find"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0"> | |
<title>chowchow</title> | |
<link rel="icon" type="image/png" href="/media/chowchow.png"> | |
<link rel="stylesheet" href="/css/main.css"> | |
<script src="/js/bowser-191.min.js"></script> | |
<script defer src="/js/fontawesome-all-5.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (min-width: 600px) and (min-height: 800px) { | |
html { | |
padding-top: 5vh; | |
} | |
body > div { | |
border-radius: 10px 40px; | |
margin-top: 1vh; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* random view styling | |
*/ | |
#random { | |
display: grid; | |
grid-template-columns: auto; | |
grid-template-rows: repeat(4, auto) 5vh; | |
grid-template-areas: | |
"content content" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% include partials/header %> | |
<body id="random"> | |
<script defer src="/js/random.js"></script> | |
<% if (biz.image_url) { %> | |
<div id="random-content" style="background-image: url('<%= biz.image_url %>'); background-position: center; background-size: cover"> | |
<% } else { %> | |
<div id="random-content" style="border: 1px solid #000"> | |
<% } %> | |
<div id="random-biz" class="text-shadow"> | |
<p><%= shorten(biz.name) %></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* list view styling | |
*/ | |
#list { | |
display: grid; | |
grid-template-columns: auto; | |
grid-template-rows: auto auto 5vh; | |
grid-template-areas: "content" "home" "footer"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% include partials/header %> | |
<body id="list"> | |
<script defer src="/js/list.js"></script> | |
<div id="list-content"> | |
<% results.forEach(function(biz) { %> | |
<% if (biz.image_url) { %> | |
<div class="list-item" style="background-image: url('<%= biz.image_url %>'); background-position: center; background-size: cover"> | |
<% } else { %> | |
<div class="list-item" style="background-color: rgba(0, 0, 0, 0.5);"> | |
<% } %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!navigator.geolocation || !navigator.cookieEnabled) { | |
location.href = '/nolocation' | |
} else { | |
navigator.geolocation.getCurrentPosition(geoSuccess, geoError, geoOpts) | |
} | |
function geoSuccess(position) { | |
latitude.value = position.coords.latitude | |
longitude.value = position.coords.longitude | |
loading.innerHTML = 'FIND <i class="fas fa-utensils fa-lg" aria-hidden="true"></i> FOOD' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geoOpts = { | |
enableHighAccuracy: true, | |
maximumAge: 300000, | |
timeout: 20000 | |
} |