Skip to content

Instantly share code, notes, and snippets.

View lukenetti3's full-sized avatar

Luke Netti lukenetti3

View GitHub Profile
@lukenetti3
lukenetti3 / index.html
Created January 12, 2020 02:04
Simon Game
<html>
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700,700i" rel="stylesheet">
<body>
<audio id="greenSound">
<source src="https://s3.amazonaws.com/freecodecamp/simonSound1.mp3"></source>
</audio>
<audio id="redSound">
<source src="https://s3.amazonaws.com/freecodecamp/simonSound2.mp3"></source>
</audio>
<audio id="yellowSound">
<% include ./partials/header.ejs %>
<div class="ui text container main center aligned">
<h2 class="title"><a href="/" ><i class="fas fa-arrow-circle-left fa-sm"></i></a><%= book.object.title %></h2>
<div class="ui stackable two column grid">
<div class="column">
<div class="ui segment center aligned">
<img class="ui medium bordered centered image" src="<%= book.object.metadata.image.imgix_url %>">
</div>
<% include ./partials/header.ejs %>
<div class="ui text container main center aligned">
<h1 class="title center aligned">List of Favorite Books</h1>
<div class="ui stackable two column grid">
<% for(var i = 0; i<books.total; i++) { %>
<div class="column">
<div class="ui segment">
<a href="/books/<%= books.objects[i].slug %>"><h4 id="title"><%= books.objects[i].title %></h4></a>
<a href="/books/<%= books.objects[i].slug %>">
{
"name": "cosmicjs_bookapp",
"version": "1.0.0",
"description": "Book App for Cosmic JS",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"author": "Luke Netti",
"license": "ISC",
var bodyParser = require("body-parser"),
express = require("express"),
app = express(),
Cosmic = require("cosmicjs");
var api = Cosmic();
var bucket = api.bucket({
slug: "favorite-book",
read_key: "QxlWYVywWwJu94x9vVp3DJFt11OqLIUJRBBp0i4FyqbpvtOOhp"
});