- Is the site UI compatible with a range of display sizes?
- All content is responsive and displays on a range of display sizes.
- Content should make use of available screen real estate and should display correctly at all screen sizes.
- An image's associated title and text renders next to the image in all viewport sizes.
- Are images responsive?
- Images in the site are sized appropriate to the viewport and do not crowd or overlap other elements in the browser, regardless of viewport size.
This file contains 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
namespace Awesome.Csharp.Utilities.EveryoneNeeds | |
{ | |
public static class FileMagicNumberHelper | |
{ | |
public static bool CheckUploadedFileMagicNumber(byte[] file) | |
{ | |
//No file | |
if (file == null) return false; | |
//File contains less than 2 bytes | |
if (file.Count() < 2) return false; |
This file contains 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
//Inspired from https://stackoverflow.com/a/59017439 | |
function csvToJSON(csv, seperator) { | |
var lines = csv.split("\n"); | |
var result = []; | |
var headers; | |
headers = lines[0].split(seperator); | |
for (var i = 1; i < lines.length; i++) { | |
var obj = {}; | |
This file contains 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
let waitTime = 1000 | |
const waitStep = 100; | |
htmlFiles.forEach((htmlFile) => { | |
delay(wait).then(() => { | |
console.log("downloading: " + htmlFile.filename); | |
download(htmlFile.content, htmlFile.filename, "text/html") | |
console.log("downloaded: " + htmlFile.filename); | |
}); | |
wait += waitStep; | |
}); |
This file contains 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
const locations = { | |
usa: { | |
alaska: ["Fairbanks", "Wasilla"], | |
california: ["San Fransisco", "Los Angeles"], | |
nevada: ["Las Vegas"], | |
massachusetts: ["Charlton"], | |
washington: ["Seattle"], | |
} | |
} |
This file contains 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
let appAlias = ""; | |
if (location.hostname === "localhost") { | |
appAlias = "/mws-restaurant-stage-1"; | |
} | |
function registerServiceWorker() { | |
if (!navigator.serviceWorker) { | |
console.log("ServiceWorker is not compatible with this browser..."); | |
return; | |
} |
This file contains 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
let appAlias = ""; | |
if (location.hostname === "localhost") { | |
appAlias = "/mws-restaurant-stage-1"; | |
} | |
const staticCacheName = "rreviews-data-v2"; | |
const contentImgsCache = "rreviews-imgs"; | |
const allCaches = [staticCacheName, contentImgsCache]; | |
self.addEventListener("install", function(event) { | |
event.waitUntil( |