瀏覽代碼

initial commit

unknown 9 年之前
當前提交
3020965552
共有 10 個文件被更改,包括 652 次插入0 次删除
  1. 12 0
      app/.meteor/.finished-upgraders
  2. 1 0
      app/.meteor/.gitignore
  3. 7 0
      app/.meteor/.id
  4. 24 0
      app/.meteor/packages
  5. 2 0
      app/.meteor/platforms
  6. 1 0
      app/.meteor/release
  7. 84 0
      app/.meteor/versions
  8. 287 0
      app/app.css
  9. 155 0
      app/app.html
  10. 79 0
      app/app.js

+ 12 - 0
app/.meteor/.finished-upgraders

@@ -0,0 +1,12 @@
+# This file contains information which helps Meteor properly upgrade your
+# app when you run 'meteor update'. You should check it into version control
+# with your project.
+
+notices-for-0.9.0
+notices-for-0.9.1
+0.9.4-platform-file
+notices-for-facebook-graph-api-2
+1.2.0-standard-minifiers-package
+1.2.0-meteor-platform-split
+1.2.0-cordova-changes
+1.2.0-breaking-changes

+ 1 - 0
app/.meteor/.gitignore

@@ -0,0 +1 @@
+local

+ 7 - 0
app/.meteor/.id

@@ -0,0 +1,7 @@
+# This file contains a token that is unique to your project.
+# Check it into your repository along with the rest of this directory.
+# It can be used for purposes such as:
+#   - ensuring you don't accidentally deploy one app on top of another
+#   - providing package authors with aggregated statistics
+
+9nee5czgahhs18mbx0x

+ 24 - 0
app/.meteor/packages

@@ -0,0 +1,24 @@
+# Meteor packages used by this project, one per line.
+# Check this file (and the other files in this directory) into your repository.
+#
+# 'meteor add' and 'meteor remove' will edit this file for you,
+# but you can also edit it by hand.
+
+meteor-base             # Packages every Meteor app needs to have
+mobile-experience       # Packages for a great mobile UX
+mongo                   # The database Meteor supports right now
+blaze-html-templates    # Compile .html files into Meteor Blaze views
+session                 # Client-side reactive dictionary for your app
+tracker                 # Meteor's client-side reactive programming library
+
+standard-minifiers      # JS/CSS minifiers run for production mode
+es5-shim                # ECMAScript 5 compatibility for older browsers.
+ecmascript              # Enable ECMAScript2015+ syntax in app code
+
+autopublish             # Publish all data to the clients (for prototyping)
+insecure                # Allow all DB writes from clients (for prototyping)
+accounts-password
+accounts-facebook
+accounts-github
+service-configuration
+twbs:bootstrap

+ 2 - 0
app/.meteor/platforms

@@ -0,0 +1,2 @@
+server
+browser

+ 1 - 0
app/.meteor/release

@@ -0,0 +1 @@
+METEOR@1.2

+ 84 - 0
app/.meteor/versions

@@ -0,0 +1,84 @@
+accounts-base@1.2.1
+accounts-facebook@1.0.5
+accounts-github@1.0.5
+accounts-oauth@1.1.6
+accounts-password@1.1.2
+autopublish@1.0.4
+autoupdate@1.2.3
+babel-compiler@5.8.24
+babel-runtime@0.1.4
+base64@1.0.4
+binary-heap@1.0.4
+blaze@2.1.3
+blaze-html-templates@1.0.1
+blaze-tools@1.0.4
+boilerplate-generator@1.0.4
+caching-compiler@1.0.0
+caching-html-compiler@1.0.1
+callback-hook@1.0.4
+check@1.0.6
+ddp@1.2.1
+ddp-client@1.2.1
+ddp-common@1.2.1
+ddp-rate-limiter@1.0.0
+ddp-server@1.2.1
+deps@1.0.8
+diff-sequence@1.0.1
+ecmascript@0.1.3
+ecmascript-collections@0.1.6
+ejson@1.0.7
+email@1.0.7
+es5-shim@4.1.13
+facebook@1.2.2
+fastclick@1.0.7
+geojson-utils@1.0.4
+github@1.1.4
+hot-code-push@1.0.0
+html-tools@1.0.5
+htmljs@1.0.5
+http@1.1.1
+id-map@1.0.4
+insecure@1.0.4
+jquery@1.11.4
+launch-screen@1.0.3
+livedata@1.0.14
+localstorage@1.0.4
+logging@1.0.8
+meteor@1.1.7
+meteor-base@1.0.1
+minifiers@1.1.6
+minimongo@1.0.9
+mobile-experience@1.0.1
+mobile-status-bar@1.0.6
+mongo@1.1.1
+mongo-id@1.0.1
+npm-bcrypt@0.7.8_2
+npm-mongo@1.4.39_1
+oauth@1.1.6
+oauth2@1.1.4
+observe-sequence@1.0.7
+ordered-dict@1.0.4
+promise@0.4.8
+random@1.0.4
+rate-limit@1.0.0
+reactive-dict@1.1.1
+reactive-var@1.0.6
+reload@1.1.4
+retry@1.0.4
+routepolicy@1.0.6
+service-configuration@1.0.5
+session@1.1.1
+sha@1.0.4
+spacebars@1.0.7
+spacebars-compiler@1.0.7
+srp@1.0.4
+standard-minifiers@1.0.0
+templating@1.1.2
+templating-tools@1.0.0
+tracker@1.0.8
+twbs:bootstrap@3.3.5
+ui@1.0.7
+underscore@1.0.4
+url@1.0.5
+webapp@1.2.2
+webapp-hashing@1.0.4

+ 287 - 0
app/app.css

@@ -0,0 +1,287 @@
+@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300);
+
+*{
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  font-weight: 300;
+}
+body {
+  font-family: 'Source Sans Pro', sans-serif;
+  font-weight: 300;
+}
+body ::-webkit-input-placeholder {
+  /* WebKit browsers */
+  font-family: 'Source Sans Pro', sans-serif;
+  font-weight: 300;
+}
+body :-moz-placeholder {
+  /* Mozilla Firefox 4 to 18 */
+  font-family: 'Source Sans Pro', sans-serif;
+  opacity: 1;
+  font-weight: 300;
+}
+body ::-moz-placeholder {
+  /* Mozilla Firefox 19+ */
+  font-family: 'Source Sans Pro', sans-serif;
+  opacity: 1;
+  font-weight: 300;
+}
+body :-ms-input-placeholder {
+  /* Internet Explorer 10+ */
+  font-family: 'Source Sans Pro', sans-serif;
+  font-weight: 300;
+}
+.landing {
+  background: #50a3a2;
+  background: -webkit-linear-gradient(top left, #50a3a2 0%, #53e3a6 100%);
+  background: linear-gradient(to bottom right, #50a3a2 0%, #53e3a6 100%);
+  position: absolute;
+  /*top: 20%;*/
+  left: 0;
+  width: 100%;
+  height: 100%; /*400px*/
+  /*margin-top: -200px;*/
+  overflow: hidden;
+}
+.container {
+  max-width: 600px;
+  margin: 0 auto;
+  padding: 80px 0;
+  height: 400px;
+  text-align: center;
+}
+.container h1 {
+  font-size: 40px;
+  color: white;
+  -webkit-transition-duration: 1s;
+          transition-duration: 1s;
+  -webkit-transition-timing-function: ease-in-put;
+          transition-timing-function: ease-in-put;
+  font-weight: 200;
+}
+form {
+  padding: 20px 0;
+  position: relative;
+  z-index: 2;
+}
+form input {
+  -webkit-appearance: none;
+     -moz-appearance: none;
+          appearance: none;
+  outline: 0;
+  border: 1px solid rgba(255, 255, 255, 0.4);
+  background-color: rgba(255, 255, 255, 0.2);
+  width: 250px;
+  border-radius: 3px;
+  padding: 10px 15px;
+  margin: 0 auto 10px auto;
+  display: block;
+  text-align: center;
+  font-size: 18px;
+  color: white;
+  -webkit-transition-duration: 0.25s;
+          transition-duration: 0.25s;
+  font-weight: 300;
+}
+form input:hover {
+  background-color: rgba(255, 255, 255, 0.4);
+}
+form input:focus {
+  /*opacity: 0.4;*/
+  width: 300px;
+  color: white;
+}
+form button {
+  -webkit-appearance: none;
+     -moz-appearance: none;
+          appearance: none;
+  outline: 0;
+  background-color: white;
+  border: 0;
+  padding: 10px 15px;
+  color: #53e3a6;
+  border-radius: 3px;
+  width: 250px;
+  cursor: pointer;
+  font-size: 18px;
+  -webkit-transition-duration: 0.25s;
+          transition-duration: 0.25s;
+}
+::-webkit-input-placeholder {
+   color: white;
+}
+::-moz-placeholder {  /* Firefox 19+ */
+   color: white;  
+}
+:-ms-input-placeholder {
+   color: white;  
+}
+form button:hover {
+  background-color: #f5f7f9;
+}
+.bg-bubbles {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 1;
+}
+.bg-bubbles li {
+  position: absolute;
+  list-style: none;
+  display: block;
+  width: 40px;
+  height: 40px;
+  border-radius: 100px;
+  background-color: rgba(255, 255, 255, 0.15);
+  bottom: -160px;
+  -webkit-animation: square 25s infinite;
+  animation: square 25s infinite;
+  -webkit-transition-timing-function: linear;
+  transition-timing-function: linear;
+}
+.bg-bubbles li:nth-child(1) {
+  left: 10%;
+}
+.bg-bubbles li:nth-child(2) {
+  left: 20%;
+  width: 80px;
+  height: 80px;
+  -webkit-animation-delay: 2s;
+          animation-delay: 2s;
+  -webkit-animation-duration: 17s;
+          animation-duration: 17s;
+}
+.bg-bubbles li:nth-child(3) {
+  left: 25%;
+  -webkit-animation-delay: 4s;
+          animation-delay: 4s;
+}
+.bg-bubbles li:nth-child(4) {
+  left: 40%;
+  width: 60px;
+  height: 60px;
+  -webkit-animation-duration: 22s;
+          animation-duration: 22s;
+  background-color: rgba(255, 255, 255, 0.25);
+}
+.bg-bubbles li:nth-child(5) {
+  left: 70%;
+}
+.bg-bubbles li:nth-child(6) {
+  left: 80%;
+  width: 120px;
+  height: 120px;
+  -webkit-animation-delay: 3s;
+          animation-delay: 3s;
+  background-color: rgba(255, 255, 255, 0.2);
+}
+.bg-bubbles li:nth-child(7) {
+  left: 32%;
+  width: 160px;
+  height: 160px;
+  -webkit-animation-delay: 7s;
+          animation-delay: 7s;
+}
+.bg-bubbles li:nth-child(8) {
+  left: 55%;
+  width: 20px;
+  height: 20px;
+  -webkit-animation-delay: 15s;
+          animation-delay: 15s;
+  -webkit-animation-duration: 40s;
+          animation-duration: 40s;
+}
+.bg-bubbles li:nth-child(9) {
+  left: 25%;
+  width: 10px;
+  height: 10px;
+  -webkit-animation-delay: 2s;
+          animation-delay: 2s;
+  -webkit-animation-duration: 40s;
+          animation-duration: 40s;
+  background-color: rgba(255, 255, 255, 0.3);
+}
+.bg-bubbles li:nth-child(10) {
+  left: 90%;
+  width: 160px;
+  height: 160px;
+  -webkit-animation-delay: 11s;
+          animation-delay: 11s;
+}
+@-webkit-keyframes square {
+  0% {
+    -webkit-transform: translateY(0);
+            transform: translateY(0);
+  }
+  100% {
+    -webkit-transform: translateY(-700px) rotate(600deg);
+            transform: translateY(-700px) rotate(600deg);
+  }
+}
+@keyframes square {
+  0% {
+    -webkit-transform: translateY(0);
+            transform: translateY(0);
+  }
+  100% {
+    -webkit-transform: translateY(-700px) rotate(600deg);
+            transform: translateY(-700px) rotate(600deg);
+  }
+}
+.fa-facebook{
+  margin-top: 3px;
+}
+#facebook-login{
+  background-color: #3b5998;
+  color: white;
+  outline: none;
+}
+.fa-github{
+  margin-top: 3px;
+}
+#github-login{
+  background-color: #999;
+  color: white;
+  outline: none;
+}
+footer {
+   text-align: center;
+   position:absolute;
+   bottom:0;
+   width:100%;
+   height:60px;   /* Height of the footer */
+}
+.button {
+  -webkit-appearance: none;
+     -moz-appearance: none;
+          appearance: none;
+  outline: 0;
+  background-color: white;
+  border: 0;
+  padding: 10px 15px;
+  color: #53e3a6;
+  border-radius: 3px;
+  width: 250px;
+  cursor: pointer;
+  font-size: 18px;
+  -webkit-transition-duration: 0.25s;
+          transition-duration: 0.25s;
+}
+.button:hover {
+  background-color: #f5f7f9;
+}
+.about {
+}
+.footer-info{
+  padding: 0;
+  color: white;
+}
+.footer-info a{
+  color: white;
+}
+#dashboard{
+  color: black;
+}

+ 155 - 0
app/app.html

@@ -0,0 +1,155 @@
+<head>
+  <title>Music App</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <meta charset="utf-8">
+  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
+  <link href='http://fonts.googleapis.com/css?family=Oxygen:400,300,700' rel='stylesheet' type='text/css'>
+  <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
+  <script src="https://connect.soundcloud.com/sdk.js"></script>
+  <script>
+    function init() {
+      /*SC.initialize({
+          client_id: "577d3fbbdb5fe05bb4af698d686508fe"
+      });
+
+      var sound = [];
+      SC.stream("/tracks/293", function(sound){
+          sound.play();
+      });*/
+    }
+  </script>
+</head>
+
+<body onload="init()">
+  {{#if currentUser}}
+    {{> dashboard}}
+  {{else}}
+    <!-- {{> about}} -->
+    {{> auth}}
+    {{> footer}}
+  {{/if}}
+</body>
+
+<template name="about">
+
+</template>
+
+<!-- <template name="register">
+  <div class="landing">
+  	<div class="container">
+  	  <div class="about">
+        <button class="button">About</button>
+      </div>
+  		<h1>Register</h1>
+  		<form class="form">
+  			<input type="text" name="registerUsername" placeholder="Enter a username" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a username'" required/>
+        <input type="email" name="registerEmail" placeholder="Enter your email" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter your email'" required>
+  			<input type="password" name="registerPassword" placeholder="Enter a password" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a password'" required/>
+  			<button type="submit">Register</button>
+  		</form>
+  		<form>
+  		  <button class="btn" id="facebook-login"><i class="fa fa-facebook pull-left"></i>Login with Facebook</button><p></p>
+        <button class="btn" id="github-login"><i class="fa fa-github pull-left"></i>Login with Github</button>
+  		</form>
+  	</div>
+
+  	<ul class="bg-bubbles">
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  		<li></li>
+  	</ul>
+  </div>
+</template> -->
+
+<template name="auth" id="auth">
+  <div class="landing">
+    {{> login}}
+  </div>
+</template>
+
+<template name="register">
+  <div class="container">
+    <div class="about">
+      <button class="button">About</button>
+    </div>
+    <h1>Register</h1>
+    <form class="form">
+      <input type="text" name="registerUsername" placeholder="Enter a username" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a username'" required/>
+      <input type="email" name="registerEmail" placeholder="Enter your email" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter your email'" required>
+      <input type="password" name="registerPassword" placeholder="Enter a password" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a password'" required/>
+      <button type="submit">Register</button>
+    </form>
+    <form>
+      <button class="btn" id="facebook-login"><i class="fa fa-facebook pull-left"></i>Login with Facebook</button><p></p>
+      <button class="btn" id="github-login"><i class="fa fa-github pull-left"></i>Login with Github</button>
+    </form>
+  </div>
+
+  <ul class="bg-bubbles">
+    <li></li>
+    <li></li>
+    <li></li>
+    <li></li>
+    <li></li>
+    <li></li>
+    <li></li>
+    <li></li>
+    <li></li>
+    <li></li>
+  </ul>
+</template>
+
+<template name="login">
+  <div class="container">
+    <form>
+      <button class="button" id="register">Register</button>
+    </form>
+  	<h1>Login</h1>
+    <form class="form">
+    	<input type="text" name="loginUsername" placeholder="Enter your username" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter your username'" required/>
+    	<input type="password" name="loginPassword" placeholder="Enter your password" onfocus="this.placeholder = ''" onblur="this.placeholder='Enter a password'" required/>
+    	<button type="submit">Login</button>
+    </form>
+    <form>
+      <button class="btn" id="facebook-login"><i class="fa fa-facebook pull-left"></i>Login with Facebook</button><p></p>
+      <button class="btn" id="github-login"><i class="fa fa-github pull-left"></i>Login with Github</button>
+    </form>
+  </div>
+
+  <ul class="bg-bubbles">
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  	<li></li>
+  </ul>
+</template>
+
+<template name="dashboard" id="dashboard">
+  <h1>Hello {{currentUser.services.facebook.first_name}}</h1>
+  <p><a href="#" class="logout">Logout</a></p>
+</template>
+
+<template name="footer">
+  <footer>
+    <form class="footer-info">
+      <p>Copyright © 2015 All Right Reserved</p>
+      <p>Built by <a href="https://github.com/AkiraLaine" target="_blank">@AkiraLaine</a> |
+      <a href="https://github.com/KrisVos130" target="_blank">@KrisVos130</a> |
+      <a href="https://github.com/Johand199" target="_blank">@Johand199</a> |
+      <a href="https://github.com/Septimus" target="_blank">@Septimus</a></p>
+    </form>
+  </footer>
+</template>

+ 79 - 0
app/app.js

@@ -0,0 +1,79 @@
+if (Meteor.isClient) {
+  Template.register.events({
+    "submit form": function(e){
+        e.preventDefault();
+        var username = e.target.registerUsername.value;
+        var email = e.target.registerEmail.value;
+        var password = e.target.registerPassword.value;
+        Accounts.createUser({
+            username: username,
+            email: email,
+            password: password
+        });
+    },
+
+    "click #facebook-login": function(){
+        Meteor.loginWithFacebook()
+    },
+
+    "click #github-login": function(){
+        Meteor.loginWithGithub()
+    },
+
+    "click #login": function(){
+
+    }
+  });
+
+  Template.login.events({
+    "submit form": function(e){
+        e.preventDefault();
+        var username = e.target.loginUsername.value;
+        var password = e.target.loginPassword.value;
+        Meteor.loginWithPassword(username, password);
+    },
+
+    "click #facebook-login": function(){
+        Meteor.loginWithFacebook()
+    },
+
+    "click #github-login": function(){
+        Meteor.loginWithGithub()
+    },
+
+    "click #register": function(){
+        // if(!this.register){
+        //   Session.set(this.register, true);
+        // }
+    }
+  });
+
+  Template.dashboard.events({
+    "click .logout": function(e){
+        e.preventDefault();
+        Meteor.logout();
+    }
+  })
+}
+
+if (Meteor.isServer) {
+  ServiceConfiguration.configurations.remove({
+      service: "facebook"
+  });
+
+  ServiceConfiguration.configurations.insert({
+      service: "facebook",
+      appId: "1496014310695890",
+      secret: "9a039f254a08a1488c08bb0737dbd2a6"
+  });
+
+  ServiceConfiguration.configurations.remove({
+      service: "github"
+  });
+
+  ServiceConfiguration.configurations.insert({
+      service: "github",
+      clientId: "dcecd720f47c0e4001f7",
+      secret: "375939d001ef1a0ca67c11dbf8fb9aeaa551e01b"
+  });
+}