Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
*.iml
out
gen
package-lock.json
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# hacktivoverflow
# HacktivOverflow

[API](https://documenter.getpostman.com/view/4225021/S17tRTsE) : https://documenter.getpostman.com/view/4225021/S17tRTsE

[Server](http://hacktivoverflow-server.cloudeyeglobal.com) : http://hacktivoverflow-server.cloudeyeglobal.com

[Client](http://hacktivoverflow.cloudeyeglobal.com) : http://hacktivoverflow.cloudeyeglobal.com
3 changes: 3 additions & 0 deletions client/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8
7 changes: 7 additions & 0 deletions client/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
1 change: 1 addition & 0 deletions client/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_APP_BASE_URL = 'http://localhost:3000'
17 changes: 17 additions & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/essential',
'@vue/airbnb',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
};
21 changes: 21 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
29 changes: 29 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# client

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 5 additions & 0 deletions client/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app',
],
};
39 changes: 39 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "client",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service lint --fix; vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"deploy": "vue-cli-service s3-deploy"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.8.0",
"axios": "^0.18.0",
"bulma": "^0.7.4",
"bulma-badge": "^3.0.0",
"firebase": "^5.9.0",
"highlight.js": "^9.15.6",
"marked": "^0.6.1",
"vue": "^2.6.6",
"vue-cli-plugin-s3-deploy": "^3.0.0",
"vue-input-tag": "^2.0.5",
"vue-router": "^3.0.1",
"vue-simplemde": "^0.5.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.5.0",
"@vue/cli-plugin-eslint": "^3.5.0",
"@vue/cli-service": "^3.5.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"fibers": "^3.1.1",
"sass": "^1.17.2",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.5.21"
}
}
5 changes: 5 additions & 0 deletions client/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {},
},
};
Binary file added client/public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions client/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>client</title>
</head>
<body>
<noscript>
<strong>We're sorry but client doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
107 changes: 107 additions & 0 deletions client/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<template>
<div id="app" class="app">
<Navbar :bg-navbar="bgNavbar"/>
<router-view :key="$router.currentRoute.path"/>
</div>
</template>

<script>
import Navbar from '@/components/Navbar';

export default {
data() {
return {
bgNavbar: 'white',
email: '',
fullname: 'Profile',
username: '',
auth2: '',
};
},
created() {
this.$api.interceptors.response.use(undefined, err => new Promise(function (resolve, reject) {
if (err.status === 401 && err.config && !err.config.__isRetryRequest) {
this.$store.dispatch(logout);
}
throw err;
}));
},
methods: {
attachSignin(element) {
this.auth2.attachClickHandler(element, {},
this.signIn, (error) => {
console.log(error);
});
},
checkLogin: function checkLogin(id_token) {
this.$api
.post('/auth/verify', {
id_token,
})
.then(({ data }) => {
this.isLogin = true;
localStorage.setItem('xf', data.fullname);
localStorage.setItem('xu', data.username);
localStorage.setItem('xi', data.id);
localStorage.setItem('xs', data.token);
this.$router.replace('/');
})
.catch((err) => {
console.log(err);
});
},
signIn(googleUser) {
const { id_token } = googleUser.getAuthResponse();
this.checkLogin(id_token);
},
},
components: {
Navbar,
},
};
</script>

<style lang="scss">
@import "./assets/stylesheet/config";
@import "~@fortawesome/fontawesome-free/css/all.css";

$link: $color-primary;
$title-color: $color-primary;

$content-heading-color: $color-primary;

$menu-item-hover-color: white;
$menu-item-hover-background-color: $color-primary;

$navbar-dropdown-item-hover-color: white;
$navbar-dropdown-item-hover-background-color: $color-primary;

$footer-background-color: white;
$footer-padding: 0;

$panel-heading-background-color: white;
$panel-heading-radius: 0;
$panel-item-border: none;
$panel-heading-color: $color-primary;
$panel-heading-weight: bold;

.is-fullwidth {
width: 100%;
}

.app {
padding-top: .5rem;
}

.router-link-exact-active {
@extend .is-active;
}

.mt-30 {
margin-top: 30px;
}

@import "~bulma/bulma.sass";
@import "~bulma-badge/src/sass/index";

</style>
Binary file added client/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions client/src/assets/stylesheet/config.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@charset "utf-8";

$color-shadow: rgba(black, .125) !global;

$color-primary: #00D1B4 !global;
$color-accent: #00D1B4 !global;

$color-background: #00D1B4 !global;
$color-background-shade: #00D1B4 !global;
$color-background-invert: #00D1B4 !global;

$color-text: #00D1B4 !global;
$color-text-weak: #00D1B4 !global;
$color-text-strong: #00D1B4 !global;
$color-text-heading: $color-primary !global;

$color-text-invert: #00D1B4 !global;
$color-text-strong-invert: #00D1B4 !global;

$color-text-link: #00D1B4 !global;
$color-text-link-visited: #00D1B4 !global;
$color-text-link-hover: #00D1B4 !global;

$color-border: #00D1B4 !global;

/**
* padding
*/
$p-10: 10px;
Loading