-
Notifications
You must be signed in to change notification settings - Fork 15
Lab22-Cayla #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
caylazabel
wants to merge
6
commits into
codefellows-javascript-401d13:master
Choose a base branch
from
caylazabel:tuesday-branch1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Lab22-Cayla #21
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0540429
basic lab done, trying for bonus now
caylazabel 61d0887
bonus working I think
caylazabel 15b5207
redid some styles
caylazabel 08601f1
small changes
caylazabel c5ecf34
some basics on here right now
caylazabel cd931ab
this was alot
caylazabel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["es2015"] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"rules": { | ||
"no-console": "off", | ||
"indent": [ "error", 2 ], | ||
"quotes": [ "error", "single" ], | ||
"semi": ["error", "always"], | ||
"linebreak-style": [ "error", "unix" ] | ||
}, | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"mocha": true, | ||
"jasmine": true | ||
}, | ||
"ecmaFeatures": { | ||
"modules": true, | ||
"experimentalObjectRestSpread": true, | ||
"impliedStrict": true | ||
}, | ||
"extends": "eslint:recommended" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Created by https://www.gitignore.io/api/node,vim,osx,macos,linux | ||
|
||
*node_modules | ||
|
||
#ignore data files | ||
data/ | ||
|
||
#ignore build directories | ||
build | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
|
||
|
||
### Vim ### | ||
# swap | ||
[._]*.s[a-v][a-z] | ||
[._]*.sw[a-p] | ||
[._]s[a-v][a-z] | ||
[._]sw[a-p] | ||
# session | ||
Session.vim | ||
# temporary | ||
.netrwhist | ||
*~ | ||
# auto-generated tag files | ||
tags | ||
|
||
|
||
### OSX ### | ||
*.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
# Thumbnails | ||
._* | ||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
|
||
### macOS ### | ||
# Icon must end with two \r | ||
# Thumbnails | ||
# Files that might appear in the root of a volume | ||
# Directories potentially created on remote AFP share | ||
|
||
|
||
### Linux ### | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
# End of https://www.gitignore.io/api/node,vim,osx,macos,linux |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
'use strict'; | ||
|
||
require('./scss/reset.scss'); //not js files// | ||
require('./scss/main.scss'); //loaders and webpack turn from static assests into js files// | ||
|
||
const angular = require('angular'); //angular js// | ||
const cowsay = require('cowsay-browser'); //so we can interact with the cowsay browser// | ||
|
||
const cowsayApp = angular.module('cowsayApp', []); //cowsayApp is the name of the app, no other major dependencies in this structure// | ||
|
||
cowsayApp.controller('CowsayController', ['$log', CowsayController]); | ||
|
||
function CowsayController($log) { | ||
$log.debug('CowsayController'); | ||
|
||
this.title = 'Cow Creator.'; | ||
this.secondTitle = 'make it, view it, and undo it!'; | ||
this.subTitle1 = 'view it!'; | ||
this.subTitle2 = 'check out the cow you just made!'; | ||
this.history = []; | ||
|
||
cowsay.list((err, cowfiles)=> { | ||
this.cowfiles = cowfiles; | ||
this.current = this.cowfiles[0]; | ||
}); | ||
|
||
|
||
this.update = function(input) { | ||
$log.debug('cowsayCtrl.update'); | ||
return cowsay.say({ text: input || 'suppppp duuuuuude', f: this.current}); | ||
}; | ||
|
||
this.speak = function(input) { | ||
$log.debug('cowsayCtrl.speak'); | ||
this.spoken = this.update(input); | ||
this.history.push(this.spoken); | ||
}; | ||
|
||
this.undo = function() { | ||
$log.debug('cowsayCtrl.undo()'); | ||
this.history.pop(); | ||
this.spoken = this.history.pop() || ''; | ||
}; | ||
} | ||
|
||
cowsayApp.controller('NavController',['$log', NavController]); | ||
|
||
function NavController($log) { | ||
$log.debug('NavController'); | ||
|
||
this.routes = [ | ||
{ | ||
name: 'home', | ||
url: '/home' | ||
}, | ||
{ | ||
name: 'cow creator', | ||
url: '/cowcreator' | ||
}, | ||
{ | ||
name: 'account', | ||
url: '/myaccount' | ||
} | ||
]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!DOCTYPE html> | ||
<html ng-app="cowsayApp"> | ||
<head> | ||
<title>Welcome to Cowville</title> | ||
</head> | ||
<body> | ||
<header> | ||
<nav ng-controller="NavController as navCtrl"> | ||
<h4>cowcontrol.io</h4> | ||
<ul> | ||
<li ng-repeat="route in navCtrl.routes"> | ||
<a href="{{ route.url }}">{{ route.name }}</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
|
||
<main> | ||
<section | ||
class="container" | ||
ng-controller="CowsayController as cowsayCtrl" | ||
ng-init="cowsayCtrl.current = 'squirell'"> | ||
<section> | ||
<h2>{{ cowsayCtrl.title }}</h2> <h3> {{ cowsayCtrl.secondTitle }}</h3> | ||
</section> | ||
|
||
<div class="animal"> | ||
<pre class="cow"> | ||
{{ cowsayCtrl.update(cowsayCtrl.text) }} | ||
</pre> | ||
</div> | ||
|
||
|
||
<form | ||
ng-submit="cowsayCtrl.speak(cowsayCtrl.text)" | ||
name="cowsayForm" | ||
novalidate> | ||
|
||
|
||
<aside class="extra"> | ||
<div class="extra-wrapper"> Select a cowfile | ||
<select ng-model="cowsayCtrl.current"> | ||
<option ng-repeat="cowfile in cowsayCtrl.cowfiles" value="{{ cowfile }}"> | ||
</option> | ||
</select> | ||
</div> | ||
<div class="extra-wrapper">What does it say? | ||
<input type="text" ng-model="cowsayCtrl.text" required> | ||
|
||
</div> | ||
<div class="extra-wrapper"> View it! | ||
<button type="submit">Say Something</button> | ||
</div> | ||
</aside> | ||
|
||
<div class="animal" ng-show="cowsayCtrl.spoken" class="history"> | ||
<p class="divider">_____________________________________________________________________</p> | ||
<section> | ||
<h2>{{ cowsayCtrl.subTitle1 }}</h2> <h3> {{ cowsayCtrl.subTitle2 }}</h3> | ||
</section> | ||
<pre> | ||
{{ cowsayCtrl.spoken }} | ||
</pre> | ||
|
||
<button type="button" ng-click="cowsayCtrl.undo()">Undo</button> | ||
</div> | ||
</form> | ||
<!-- <footer><h5>cowcontrol.io</h5></footer> --> | ||
</section> | ||
</main> | ||
</body> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the culprit! So I guess you were missing the '{{ cowfile }}' between the option tags, so that the names could appear on the page like so:
{{ cowfile }}