diff --git a/assets/css/common.css b/assets/css/common.css
new file mode 100755
index 0000000..9ec4f62
--- /dev/null
+++ b/assets/css/common.css
@@ -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;
+}
diff --git a/assets/fonts/Arial.ttf.woff b/assets/fonts/Arial.ttf.woff
new file mode 100755
index 0000000..1bc1baf
Binary files /dev/null and b/assets/fonts/Arial.ttf.woff differ
diff --git a/assets/fonts/Proxima-Nova-Regular.woff2 b/assets/fonts/Proxima-Nova-Regular.woff2
new file mode 100755
index 0000000..0a2d8d4
Binary files /dev/null and b/assets/fonts/Proxima-Nova-Regular.woff2 differ
diff --git a/assets/fonts/Proxima-Nova-Semibold.woff2 b/assets/fonts/Proxima-Nova-Semibold.woff2
new file mode 100755
index 0000000..0b1218d
Binary files /dev/null and b/assets/fonts/Proxima-Nova-Semibold.woff2 differ
diff --git a/assets/img/classroom.jpeg b/assets/img/classroom.jpeg
new file mode 100755
index 0000000..7e47099
Binary files /dev/null and b/assets/img/classroom.jpeg differ
diff --git a/assets/img/classroom.svg b/assets/img/classroom.svg
new file mode 100755
index 0000000..5ed5ed7
--- /dev/null
+++ b/assets/img/classroom.svg
@@ -0,0 +1,1967 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+image/svg+xml Openclipart 58294main_The.Brain.in.Space-page-47-kids-classroom 2010-04-06T07:38:20 This is clipart converted and broken apart that has been released into the public domain because the document says so, and its from NASA, a USA government agency. The publication is called "The Brain in Space:"
\n
\nhttp://www.nasa.gov/audience/foreducators/topnav/materials/listbytype/The.Brain.in.Space.html http://openclipart.org/detail/38197/-by-rejon-38197 rejon astronomy brain clip art clipart converted government nasa science space usa
diff --git a/assets/img/howls_moving_castle.png b/assets/img/howls_moving_castle.png
new file mode 100755
index 0000000..ba9519a
Binary files /dev/null and b/assets/img/howls_moving_castle.png differ
diff --git a/assets/img/mountains.png b/assets/img/mountains.png
new file mode 100755
index 0000000..7d74724
Binary files /dev/null and b/assets/img/mountains.png differ
diff --git a/assets/img/parrot.png b/assets/img/parrot.png
new file mode 100755
index 0000000..ea6eea7
Binary files /dev/null and b/assets/img/parrot.png differ
diff --git a/assets/js/api.js b/assets/js/api.js
new file mode 100755
index 0000000..9f65cb8
--- /dev/null
+++ b/assets/js/api.js
@@ -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);
+ };
+})();
diff --git a/assets/js/constants.js b/assets/js/constants.js
new file mode 100755
index 0000000..f62dfcd
--- /dev/null
+++ b/assets/js/constants.js
@@ -0,0 +1,10 @@
+const _const = {
+ headerOne: {
+ loginButton: 'Login / Create Account',
+ profileButton: 'Current user',
+ loginError: 'An error occurred. Please comtact support.'
+ },
+ videos: {
+ num: 8
+ }
+};
diff --git a/assets/js/utils.js b/assets/js/utils.js
new file mode 100755
index 0000000..3d26776
--- /dev/null
+++ b/assets/js/utils.js
@@ -0,0 +1,5 @@
+const _utils = {
+ page: {
+
+ }
+};
\ No newline at end of file
diff --git a/index.html b/index.html
index dde46d0..b1fbe4f 100644
--- a/index.html
+++ b/index.html
@@ -1,11 +1,22 @@
-
+
-
+
+
- pm2-demo
-
-
+ Image Board
+
+
+
+
+
+
+
+
+
+
+
-
+
+
diff --git a/package-lock.json b/package-lock.json
index 9cceb71..1632755 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1562,7 +1562,7 @@
},
"compression": {
"version": "1.7.2",
- "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz",
"integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=",
"dev": true,
"requires": {
@@ -8152,6 +8152,11 @@
}
}
},
+ "vue-router": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.1.tgz",
+ "integrity": "sha512-vLLoY452L+JBpALMP5UHum9+7nzR9PeIBCghU9ZtJ1eWm6ieUI8Zb/DI3MYxH32bxkjzYV1LRjNv4qr8d+uX/w=="
+ },
"vue-style-loader": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-3.1.2.tgz",
diff --git a/package.json b/package.json
index 52d5803..3d3df71 100644
--- a/package.json
+++ b/package.json
@@ -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",
@@ -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",
diff --git a/src/App.vue b/src/App.vue
old mode 100644
new mode 100755
index 9c2b560..75f4109
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,32 +1,15 @@
-
{{ msg }}
-
Essential Links
-
-
Ecosystem
-
+
Home
+
About
+
@@ -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;
-}
diff --git a/src/Router.js b/src/Router.js
new file mode 100644
index 0000000..c3af0cb
--- /dev/null
+++ b/src/Router.js
@@ -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
+ }
+ ]
+})
diff --git a/src/components/About.vue b/src/components/About.vue
new file mode 100644
index 0000000..cde9ef0
--- /dev/null
+++ b/src/components/About.vue
@@ -0,0 +1,15 @@
+
+
+
What is a Crypto-Currency?
+
+ 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.
+
+
+
+
+
diff --git a/src/components/Catalog.vue b/src/components/Catalog.vue
new file mode 100644
index 0000000..e69de29
diff --git a/src/components/Index.vue b/src/components/Index.vue
new file mode 100644
index 0000000..5af2e4c
--- /dev/null
+++ b/src/components/Index.vue
@@ -0,0 +1,16 @@
+
+
+
{{ msg }}
+
+
+
+
diff --git a/src/components/Thread.vue b/src/components/Thread.vue
new file mode 100644
index 0000000..e69de29
diff --git a/src/main.js b/src/main.js
old mode 100644
new mode 100755
index 385fcfe..1d2737b
--- a/src/main.js
+++ b/src/main.js
@@ -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: ' ',
+ components: { App }
})