forked from bkkhack/hackmap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
176 additions
and
414 deletions.
There are no files selected for viewing
This file contains 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,18 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"modules": false, | ||
"targets": { | ||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"] | ||
} | ||
}], | ||
"stage-2" | ||
], | ||
"plugins": ["transform-runtime"], | ||
"env": { | ||
"test": { | ||
"presets": ["env", "stage-2"], | ||
"plugins": ["istanbul"] | ||
} | ||
} | ||
} |
This file contains 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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains 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,2 @@ | ||
build/*.js | ||
config/*.js |
This file contains 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,27 @@ | ||
// http://eslint.org/docs/user-guide/configuring | ||
|
||
module.exports = { | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
env: { | ||
browser: true, | ||
}, | ||
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style | ||
extends: 'standard', | ||
// required to lint *.vue files | ||
plugins: [ | ||
'html' | ||
], | ||
// add your custom rules here | ||
'rules': { | ||
// allow paren-less arrow functions | ||
'arrow-parens': 0, | ||
// allow async-await | ||
'generator-star-spacing': 0, | ||
// allow debugger during development | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 | ||
} | ||
} |
This file contains 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,8 @@ | ||
// https://github.com/michael-ciniawsky/postcss-load-config | ||
|
||
module.exports = { | ||
"plugins": { | ||
// to edit target browsers: use "browserslist" field in package.json | ||
"autoprefixer": {} | ||
} | ||
} |
This file contains 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,6 @@ | ||
var merge = require('webpack-merge') | ||
var prodEnv = require('./prod.env') | ||
|
||
module.exports = merge(prodEnv, { | ||
NODE_ENV: '"development"' | ||
}) |
This file contains 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,38 @@ | ||
// see http://vuejs-templates.github.io/webpack for documentation. | ||
var path = require('path') | ||
|
||
module.exports = { | ||
build: { | ||
env: require('./prod.env'), | ||
index: path.resolve(__dirname, '../dist/index.html'), | ||
assetsRoot: path.resolve(__dirname, '../dist'), | ||
assetsSubDirectory: 'static', | ||
assetsPublicPath: '/', | ||
productionSourceMap: true, | ||
// Gzip off by default as many popular static hosts such as | ||
// Surge or Netlify already gzip all static assets for you. | ||
// Before setting to `true`, make sure to: | ||
// npm install --save-dev compression-webpack-plugin | ||
productionGzip: false, | ||
productionGzipExtensions: ['js', 'css'], | ||
// Run the build command with an extra argument to | ||
// View the bundle analyzer report after build finishes: | ||
// `npm run build --report` | ||
// Set to `true` or `false` to always turn it on or off | ||
bundleAnalyzerReport: process.env.npm_config_report | ||
}, | ||
dev: { | ||
env: require('./dev.env'), | ||
port: 8080, | ||
autoOpenBrowser: true, | ||
assetsSubDirectory: 'static', | ||
assetsPublicPath: '/', | ||
proxyTable: {}, | ||
// CSS Sourcemaps off by default because relative paths are "buggy" | ||
// with this option, according to the CSS-Loader README | ||
// (https://github.com/webpack/css-loader#sourcemaps) | ||
// In our experience, they generally work as expected, | ||
// just be aware of this issue when enabling this option. | ||
cssSourceMap: false | ||
} | ||
} |
This file contains 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 @@ | ||
module.exports = { | ||
NODE_ENV: '"production"' | ||
} |
This file contains 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 |
---|---|---|
@@ -1,83 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>BKKHackmap</title> | ||
<!-- bkkhack github organization favicon --> | ||
<link rel="icon" href="https://avatars2.githubusercontent.com/u/15698632?v=3&s=200"> | ||
<link rel="stylesheet" href="style/main.css"> | ||
</head> | ||
<body> | ||
<div class="projects side-column"> | ||
<div class="project-form" v-bind:class="{ open: form.isOpen }"> | ||
<input v-model="form.title" type="text" placeholder="Topic" autofocus> | ||
<textarea v-model="form.description" placeholder="More description (optional)"></textarea> | ||
</div> | ||
<button class="glow-button" v-on:click="toggleForm">+ Add your hack</button> | ||
<div v-for="project in projects" | ||
v-on:dragstart="drag" | ||
v-on:click="selectedProject = project" | ||
v-bind:key="project.id" | ||
v-bind:data-id="project.id" | ||
v-bind:class="{ selected: selectedProject === project }" | ||
v-bind:draggable="project.username === username" | ||
v-cloak | ||
class="project"> | ||
<img v-bind:src="project.avatar_thumbnail" v-bind:alt="project.username" draggable="false" /> | ||
{{project.title}} | ||
</div> | ||
<div class="details" v-if="projects.length === 0"> | ||
No hacks yet! You can be first! | ||
</div> | ||
<div class="loader" v-if="projects.loading"> | ||
<div class="loader1"></div> | ||
<div class="loader2"></div> | ||
<div class="loader3"></div> | ||
</div> | ||
</div> | ||
<div class="center-column"> | ||
<h1>BKKHackmap</h1> | ||
<a class="help-icon">?<div class="help-text" v-html="helpText"></div></a> | ||
<a class="account-status" v-if="username" v-on:click="logout" v-cloak>{{username}} (Log out)</a> | ||
<a class="account-status" v-else v-on:click="login" v-cloak>Log in</a> | ||
<div class="droptarget" | ||
v-on:dragover="dragover" | ||
v-on:drop="drop"> | ||
<img src="images/carmana.svg" class="floorplan" /> | ||
<img class="marker" | ||
v-for="project in projects" | ||
v-if="project.x" | ||
v-bind:key="project.id" | ||
v-bind:draggable="project.username === username" | ||
v-on:dragstart="drag" | ||
v-on:click="selectedProject = project" | ||
v-bind:class="{ selected: selectedProject === project }" | ||
v-bind:data-id="project.id" | ||
v-bind:style="{ left: mapWidth * project.x - 20 + 'px', top: mapHeight * project.y - 20 + 'px' }" | ||
v-bind:src="project.avatar_thumbnail" | ||
v-bind:alt="project.username" | ||
v-bind:title="project.title" /> | ||
</div> | ||
</div> | ||
<div class="details side-column"> | ||
<template v-if="selectedProject.id" v-cloak> | ||
<a class="edit-button" v-if="selectedProject.username === username" v-on:click="toggleEditMode">{{selectedProject.editMode ? "X" : "Edit"}}</a> | ||
<img class="avatar" | ||
v-bind:src="selectedProject.avatar" | ||
v-bind:alt="selectedProject.username" /> | ||
<p><a v-bind:href="'https://github.com/' + selectedProject.username">@{{selectedProject.username}}</a> is hacking on:</p> | ||
<template v-if="!selectedProject.editMode"> | ||
<h2>{{selectedProject.title}}</h2> | ||
<p class='selected-project-description'>{{selectedProject.description}}</p> | ||
</template> | ||
<template v-else> | ||
<input v-model="selectedProject.title" type="text" autofocus> | ||
<textarea v-model="selectedProject.description"></textarea> | ||
<button class="glow-button" v-on:click="updateProject">Update</button> | ||
</template> | ||
</template> | ||
</div> | ||
<script src="build/vendor.bundle.js"></script> | ||
<script src="build/bundle.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>BKKHackmap</title> | ||
<!-- bkkhack github organization favicon --> | ||
<link rel="icon" href="https://avatars2.githubusercontent.com/u/15698632?v=3&s=200"> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
</body> | ||
</html> |
This file contains 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
Oops, something went wrong.