Skip to content

Commit

Permalink
Auto stash before merge of "master" and "origin/master"
Browse files Browse the repository at this point in the history
  • Loading branch information
Mona Lisa committed Apr 6, 2018
1 parent b61dd93 commit fefdc7c
Show file tree
Hide file tree
Showing 22 changed files with 2,235 additions and 49 deletions.
99 changes: 99 additions & 0 deletions assets/css/common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
html, body {
height: 100%;
}

body {
margin: 0;
}

* {
font-family: focalpoint;
}

@font-face {
font-family: focalpoint;
src: url("/assets/fonts/Proxima-Nova-Semibold.woff2");
}

.flex-container {
padding: 0;
margin: 0;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex-wrap: nowrap;
flex-direction: column !important;
justify-content: flex-start;
align-items: center;
}

.row {
margin: 0;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex-direction: row;
align-content: space-around;
justify-content: flex-start;
align-items: center;
width: auto;
padding: 8px;
}

.row > .row-item {
margin: 5px;
}

.flex-item {
text-align: center;
}

.right {
float: right;
}

.inv {
display: none;
}

.link {
font-family: focalpoint;
color: black;
cursor: pointer;
cursor: hand;
}

.link:hover > :first-child {
color: #1799B5 !important;
}

.dropdown {
position: relative;
display: inline-block;
}

.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 2;
margin-top: 10px;
}

.dropdown-content > * {
padding: 12px 16px;
}

.dropdown:hover .dropdown-content {
display: block;
}

.color-red {
color: red;
}
Binary file added assets/fonts/Arial.ttf.woff
Binary file not shown.
Binary file added assets/fonts/Proxima-Nova-Regular.woff2
Binary file not shown.
Binary file added assets/fonts/Proxima-Nova-Semibold.woff2
Binary file not shown.
Binary file added assets/img/classroom.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,967 changes: 1,967 additions & 0 deletions assets/img/classroom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/howls_moving_castle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/mountains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/parrot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions assets/js/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
let _api = { };

axios.defaults.withCredentials = true;

(function () {
const root = 'http://localhost:3000/api/';
const urls = {
loginUrl: 'signin',
logoutUrl: 'logout',
currentUserUrl: 'current-user',
videosUrl: 'videos'
};
function url(api) {
return root + urls[api];
}

function get(url, params, fn) {
axios.get(url, {
params: params
})
.then(function (response) {
fn(null, JSON.parse(response.data.split('\n')[1]));
})
.catch(function (error) {
fn(JSON.parse(error.response.data.split('\n')[1]));
});
}

function post(url, params, fn) {
axios.post(url, params)
.then(function (response) {
fn(null, JSON.parse(response.data.split('\n')[1]));
})
.catch(function (error) {
fn(JSON.parse(error.response.data.split('\n')[1]));
});
}

_api.currentUser = function (fn) {
get(url('currentUserUrl'), { }, fn);
};

_api.login = function (username, password, fn) {
post(url('loginUrl'), { username: username, password: password }, fn);
};

_api.logout = function(fn) {
post(url('logoutUrl'), {}, fn);
};

_api.videos = function(topicPath, accessLevel, offset, num, fn) {
get(url('videosUrl'), { subject: topicPath.subject, course: topicPath.course, topic: topicPath.topic, accessLevel: accessLevel, offset: offset, num: num }, fn);
};
})();
10 changes: 10 additions & 0 deletions assets/js/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const _const = {
headerOne: {
loginButton: 'Login / Create Account',
profileButton: 'Current user',
loginError: 'An error occurred. Please comtact support.'
},
videos: {
num: 8
}
};
5 changes: 5 additions & 0 deletions assets/js/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const _utils = {
page: {

}
};
23 changes: 17 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>

<head>
<meta charset="utf-8">
<title>pm2-demo</title>
</head>
<body>
<title>Image Board</title>
<link rel="stylesheet" type="text/css" href="/assets/css/common.css"></link>
</head>

<body>
<div id="app"></div>

<script src="//unpkg.com/axios/dist/axios.min.js"></script>
<script src="//unpkg.com/vue-router/dist/vue-router.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/zenscroll/4.0.0/zenscroll-min.js"></script>
<script src="/assets/js/constants.js"></script>
<script src="/assets/js/api.js"></script>
<script src="/assets/js/utils.js"></script>
<script src="/dist/build.js"></script>
</body>
</body>

</html>
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"server": "pm2 start index.js --watch --name server --ignore-watch 'uploads'",
"vue": "cross-env NODE_ENV=development pm2 start webpack-dev-server --name vue -- --open --hot --port 3002",
"vue": "cross-env NODE_ENV=development pm2 start webpack-dev-server --name vue -- --open --hot --inline --port 3002",
"start": "npm run server | npm run vue",
"stop": "pm2 stop all",
"log": "pm2 log",
Expand Down Expand Up @@ -35,7 +35,8 @@
"string-format": "^0.5.0",
"striptags": "^3.1.1",
"validator": "^9.4.1",
"vue": "^2.5.11"
"vue": "^2.5.11",
"vue-router": "^3.0.1"
},
"devDependencies": {
"babel-core": "^6.26.0",
Expand Down
43 changes: 4 additions & 39 deletions src/App.vue
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
<template>
<div id="app">
<img src="./assets/logo.png">
<h1>{{ msg }}</h1>
<h2>Essential Links</h2>
<ul>
<li><a href="https://vuejs.org" target="_blank">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank">Twitter</a></li>
</ul>
<h2>Ecosystem</h2>
<ul>
<li><a href="http://router.vuejs.org/" target="_blank">vue-router</a></li>
<li><a href="http://vuex.vuejs.org/" target="_blank">vuex</a></li>
<li><a href="http://vue-loader.vuejs.org/" target="_blank">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank">awesome-vue</a></li>
</ul>
<router-link :to="{ name: 'Hello' }">Home</router-link>
<router-link to="/about">About</router-link>
<router-view></router-view>
</div>
</template>

<script>
export default {
name: 'app',
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
}
name: 'app'
}
</script>

Expand All @@ -39,22 +22,4 @@ export default {
color: #2c3e50;
margin-top: 60px;
}
h1, h2 {
font-weight: normal;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
33 changes: 33 additions & 0 deletions src/Router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Vue from 'vue'
import Router from 'vue-router'
import Index from './components/Index'
import Catalog from './components/Catalog'
import Thread from './components/Thread'
import About from './components/About'

Vue.use(Router)

export default new Router({
routes: [
{
path: '/',
name: 'Index',
component: Index
},
{
path: '/catalog/:board',
name: 'Catalog',
component: Catalog
},
{
path: '/:board/thread/:thread'
name: 'Thread',
component: Thread
},
{
path: '/about',
name: 'About',
component: About
}
]
})
15 changes: 15 additions & 0 deletions src/components/About.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div class="about">
<h1>What is a Crypto-Currency?</h1>
<p>
It's a digital currency in which encryption techniques are used to regulate the generation of units of currency
and verify the transfer of funds, operating independently of a central bank.
</p>
</div>
</template>

<script>
export default {
name: 'About'
}
</script>
Empty file added src/components/Catalog.vue
Empty file.
16 changes: 16 additions & 0 deletions src/components/Index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
</div>
</template>

<script>
export default {
name: 'Hello',
data () {
return {
msg: 'Welcome to Crypto Info'
}
}
}
</script>
Empty file added src/components/Thread.vue
Empty file.
7 changes: 6 additions & 1 deletion src/main.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import Vue from 'vue'
import router from './Router'
import App from './App.vue'

Vue.config.productionTip = false

new Vue({
el: '#app',
render: h => h(App)
router,
template: '<App/>',
components: { App }
})

0 comments on commit fefdc7c

Please sign in to comment.