├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── dev-client.js ├── dev-server.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js └── prod.env.js ├── docs ├── index.html └── static │ ├── css │ ├── app.b4c9c6c2f84208879b2eb1d7562ee77f.css │ └── app.b4c9c6c2f84208879b2eb1d7562ee77f.css.map │ └── js │ ├── app.c6935b7e1b0ac9f401eb.js │ ├── app.c6935b7e1b0ac9f401eb.js.map │ ├── manifest.64adacca0bcbf4e18f7d.js │ ├── manifest.64adacca0bcbf4e18f7d.js.map │ ├── vendor.4f298bd6d375ab3203a2.js │ └── vendor.4f298bd6d375ab3203a2.js.map ├── firebase.json ├── firebase.token.example.js ├── index.html ├── package-lock.json ├── package.json ├── screenshot.png ├── src ├── App.vue ├── assets │ ├── logo.png │ └── main.css ├── components │ └── Hello.vue └── main.js ├── static └── .gitkeep └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { "modules": false }], 4 | "stage-2" 5 | ], 6 | "plugins": ["transform-runtime"], 7 | "env": { 8 | "test": { 9 | "presets": ["env", "stage-2"], 10 | "plugins": [ "istanbul" ] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | *.suo 11 | *.ntvs* 12 | *.njsproj 13 | *.sln 14 | 15 | 16 | firebase.token.js -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserlist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Vue Blog](https://phonbopit.github.io/vuejs-blog-with-firebase/) 2 | 3 | > Blogging with Vue.js + Firebase Example [DEMO](https://phonbopit.github.io/vuejs-blog-with-firebase/) 4 | 5 | ![Screenshot](screenshot.png) 6 | 7 | ## Build Setup 8 | 9 | ``` bash 10 | # install dependencies 11 | npm install 12 | 13 | # serve with hot reload at localhost:8080 14 | npm run dev 15 | 16 | # build for production with minification 17 | npm run build 18 | 19 | # build for production and view the bundle analyzer report 20 | npm run build --report 21 | ``` 22 | 23 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 24 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | var ora = require('ora') 6 | var rm = require('rimraf') 7 | var path = require('path') 8 | var chalk = require('chalk') 9 | var webpack = require('webpack') 10 | var config = require('../config') 11 | var webpackConfig = require('./webpack.prod.conf') 12 | 13 | var spinner = ora('building for production...') 14 | spinner.start() 15 | 16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 17 | if (err) throw err 18 | webpack(webpackConfig, function (err, stats) { 19 | spinner.stop() 20 | if (err) throw err 21 | process.stdout.write(stats.toString({ 22 | colors: true, 23 | modules: false, 24 | children: false, 25 | chunks: false, 26 | chunkModules: false 27 | }) + '\n\n') 28 | 29 | console.log(chalk.cyan(' Build complete.\n')) 30 | console.log(chalk.yellow( 31 | ' Tip: built files are meant to be served over an HTTP server.\n' + 32 | ' Opening index.html over file:// won\'t work.\n' 33 | )) 34 | }) 35 | }) 36 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | }, 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | console.log('') 39 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 40 | console.log() 41 | for (var i = 0; i < warnings.length; i++) { 42 | var warning = warnings[i] 43 | console.log(' ' + warning) 44 | } 45 | console.log() 46 | process.exit(1) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | var config = require('../config') 4 | if (!process.env.NODE_ENV) { 5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 6 | } 7 | 8 | var opn = require('opn') 9 | var path = require('path') 10 | var express = require('express') 11 | var webpack = require('webpack') 12 | var proxyMiddleware = require('http-proxy-middleware') 13 | var webpackConfig = require('./webpack.dev.conf') 14 | 15 | // default port where dev server listens for incoming traffic 16 | var port = process.env.PORT || config.dev.port 17 | // automatically open browser, if not set will be false 18 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 19 | // Define HTTP proxies to your custom API backend 20 | // https://github.com/chimurai/http-proxy-middleware 21 | var proxyTable = config.dev.proxyTable 22 | 23 | var app = express() 24 | var compiler = webpack(webpackConfig) 25 | 26 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 27 | publicPath: webpackConfig.output.publicPath, 28 | quiet: true 29 | }) 30 | 31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 32 | log: () => {} 33 | }) 34 | // force page reload when html-webpack-plugin template changes 35 | compiler.plugin('compilation', function (compilation) { 36 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 37 | hotMiddleware.publish({ action: 'reload' }) 38 | cb() 39 | }) 40 | }) 41 | 42 | // proxy api requests 43 | Object.keys(proxyTable).forEach(function (context) { 44 | var options = proxyTable[context] 45 | if (typeof options === 'string') { 46 | options = { target: options } 47 | } 48 | app.use(proxyMiddleware(options.filter || context, options)) 49 | }) 50 | 51 | // handle fallback for HTML5 history API 52 | app.use(require('connect-history-api-fallback')()) 53 | 54 | // serve webpack bundle output 55 | app.use(devMiddleware) 56 | 57 | // enable hot-reload and state-preserving 58 | // compilation error display 59 | app.use(hotMiddleware) 60 | 61 | // serve pure static assets 62 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 63 | app.use(staticPath, express.static('./static')) 64 | 65 | var uri = 'http://localhost:' + port 66 | 67 | var _resolve 68 | var readyPromise = new Promise(resolve => { 69 | _resolve = resolve 70 | }) 71 | 72 | console.log('> Starting dev server...') 73 | devMiddleware.waitUntilValid(() => { 74 | console.log('> Listening at ' + uri + '\n') 75 | // when env is testing, don't need open it 76 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 77 | opn(uri) 78 | } 79 | _resolve() 80 | }) 81 | 82 | var server = app.listen(port) 83 | 84 | module.exports = { 85 | ready: readyPromise, 86 | close: () => { 87 | server.close() 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.cssLoaders = function (options) { 13 | options = options || {} 14 | 15 | var cssLoader = { 16 | loader: 'css-loader', 17 | options: { 18 | minimize: process.env.NODE_ENV === 'production', 19 | sourceMap: options.sourceMap 20 | } 21 | } 22 | 23 | // generate loader string to be used with extract text plugin 24 | function generateLoaders (loader, loaderOptions) { 25 | var loaders = [cssLoader] 26 | if (loader) { 27 | loaders.push({ 28 | loader: loader + '-loader', 29 | options: Object.assign({}, loaderOptions, { 30 | sourceMap: options.sourceMap 31 | }) 32 | }) 33 | } 34 | 35 | // Extract CSS when that option is specified 36 | // (which is the case during production build) 37 | if (options.extract) { 38 | return ExtractTextPlugin.extract({ 39 | use: loaders, 40 | fallback: 'vue-style-loader' 41 | }) 42 | } else { 43 | return ['vue-style-loader'].concat(loaders) 44 | } 45 | } 46 | 47 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 48 | return { 49 | css: generateLoaders(), 50 | postcss: generateLoaders(), 51 | less: generateLoaders('less'), 52 | sass: generateLoaders('sass', { indentedSyntax: true }), 53 | scss: generateLoaders('sass'), 54 | stylus: generateLoaders('stylus'), 55 | styl: generateLoaders('stylus') 56 | } 57 | } 58 | 59 | // Generate loaders for standalone style files (outside of .vue) 60 | exports.styleLoaders = function (options) { 61 | var output = [] 62 | var loaders = exports.cssLoaders(options) 63 | for (var extension in loaders) { 64 | var loader = loaders[extension] 65 | output.push({ 66 | test: new RegExp('\\.' + extension + '$'), 67 | use: loader 68 | }) 69 | } 70 | return output 71 | } 72 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | var isProduction = process.env.NODE_ENV === 'production' 4 | 5 | module.exports = { 6 | loaders: utils.cssLoaders({ 7 | sourceMap: isProduction 8 | ? config.build.productionSourceMap 9 | : config.dev.cssSourceMap, 10 | extract: isProduction 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var config = require('../config') 4 | var vueLoaderConfig = require('./vue-loader.conf') 5 | 6 | function resolve (dir) { 7 | return path.join(__dirname, '..', dir) 8 | } 9 | 10 | module.exports = { 11 | entry: { 12 | app: './src/main.js' 13 | }, 14 | output: { 15 | path: config.build.assetsRoot, 16 | filename: '[name].js', 17 | publicPath: process.env.NODE_ENV === 'production' 18 | ? config.build.assetsPublicPath 19 | : config.dev.assetsPublicPath 20 | }, 21 | resolve: { 22 | extensions: ['.js', '.vue', '.json'], 23 | alias: { 24 | 'vue$': 'vue/dist/vue.esm.js', 25 | '@': resolve('src') 26 | } 27 | }, 28 | module: { 29 | rules: [ 30 | { 31 | test: /\.vue$/, 32 | loader: 'vue-loader', 33 | options: vueLoaderConfig 34 | }, 35 | { 36 | test: /\.js$/, 37 | loader: 'babel-loader', 38 | include: [resolve('src'), resolve('test')] 39 | }, 40 | { 41 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 42 | loader: 'url-loader', 43 | options: { 44 | limit: 10000, 45 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 46 | } 47 | }, 48 | { 49 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 50 | loader: 'url-loader', 51 | options: { 52 | limit: 10000, 53 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 54 | } 55 | } 56 | ] 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | 9 | // add hot-reload related code to entry chunks 10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 12 | }) 13 | 14 | module.exports = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: '#cheap-module-eval-source-map', 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env': config.dev.env 23 | }), 24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 25 | new webpack.HotModuleReplacementPlugin(), 26 | new webpack.NoEmitOnErrorsPlugin(), 27 | // https://github.com/ampedandwired/html-webpack-plugin 28 | new HtmlWebpackPlugin({ 29 | filename: 'index.html', 30 | template: 'index.html', 31 | inject: true 32 | }), 33 | new FriendlyErrorsPlugin() 34 | ] 35 | }) 36 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var CopyWebpackPlugin = require('copy-webpack-plugin') 8 | var HtmlWebpackPlugin = require('html-webpack-plugin') 9 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 10 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 11 | 12 | var env = config.build.env 13 | 14 | var webpackConfig = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ 17 | sourceMap: config.build.productionSourceMap, 18 | extract: true 19 | }) 20 | }, 21 | devtool: config.build.productionSourceMap ? '#source-map' : false, 22 | output: { 23 | path: config.build.assetsRoot, 24 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 25 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 26 | }, 27 | plugins: [ 28 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 29 | new webpack.DefinePlugin({ 30 | 'process.env': env 31 | }), 32 | new webpack.optimize.UglifyJsPlugin({ 33 | compress: { 34 | warnings: false 35 | }, 36 | sourceMap: true 37 | }), 38 | // extract css into its own file 39 | new ExtractTextPlugin({ 40 | filename: utils.assetsPath('css/[name].[contenthash].css') 41 | }), 42 | // Compress extracted CSS. We are using this plugin so that possible 43 | // duplicated CSS from different components can be deduped. 44 | new OptimizeCSSPlugin({ 45 | cssProcessorOptions: { 46 | safe: true 47 | } 48 | }), 49 | // generate dist index.html with correct asset hash for caching. 50 | // you can customize output by editing /index.html 51 | // see https://github.com/ampedandwired/html-webpack-plugin 52 | new HtmlWebpackPlugin({ 53 | filename: config.build.index, 54 | template: 'index.html', 55 | inject: true, 56 | minify: { 57 | removeComments: true, 58 | collapseWhitespace: true, 59 | removeAttributeQuotes: true 60 | // more options: 61 | // https://github.com/kangax/html-minifier#options-quick-reference 62 | }, 63 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 64 | chunksSortMode: 'dependency' 65 | }), 66 | // split vendor js into its own file 67 | new webpack.optimize.CommonsChunkPlugin({ 68 | name: 'vendor', 69 | minChunks: function (module, count) { 70 | // any required modules inside node_modules are extracted to vendor 71 | return ( 72 | module.resource && 73 | /\.js$/.test(module.resource) && 74 | module.resource.indexOf( 75 | path.join(__dirname, '../node_modules') 76 | ) === 0 77 | ) 78 | } 79 | }), 80 | // extract webpack runtime and module manifest to its own file in order to 81 | // prevent vendor hash from being updated whenever app bundle is updated 82 | new webpack.optimize.CommonsChunkPlugin({ 83 | name: 'manifest', 84 | chunks: ['vendor'] 85 | }), 86 | // copy custom static assets 87 | new CopyWebpackPlugin([ 88 | { 89 | from: path.resolve(__dirname, '../static'), 90 | to: config.build.assetsSubDirectory, 91 | ignore: ['.*'] 92 | } 93 | ]) 94 | ] 95 | }) 96 | 97 | if (config.build.productionGzip) { 98 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 99 | 100 | webpackConfig.plugins.push( 101 | new CompressionWebpackPlugin({ 102 | asset: '[path].gz[query]', 103 | algorithm: 'gzip', 104 | test: new RegExp( 105 | '\\.(' + 106 | config.build.productionGzipExtensions.join('|') + 107 | ')$' 108 | ), 109 | threshold: 10240, 110 | minRatio: 0.8 111 | }) 112 | ) 113 | } 114 | 115 | if (config.build.bundleAnalyzerReport) { 116 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 117 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 118 | } 119 | 120 | module.exports = webpackConfig 121 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: '/', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | dev: { 25 | env: require('./dev.env'), 26 | port: 8080, 27 | autoOpenBrowser: true, 28 | assetsSubDirectory: 'static', 29 | assetsPublicPath: '/', 30 | proxyTable: {}, 31 | // CSS Sourcemaps off by default because relative paths are "buggy" 32 | // with this option, according to the CSS-Loader README 33 | // (https://github.com/webpack/css-loader#sourcemaps) 34 | // In our experience, they generally work as expected, 35 | // just be aware of this issue when enabling this option. 36 | cssSourceMap: false 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | Vue Blog : Blogging with Vue.js + Firebase
-------------------------------------------------------------------------------- /docs/static/css/app.b4c9c6c2f84208879b2eb1d7562ee77f.css: -------------------------------------------------------------------------------- 1 | #app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center}.new-post{padding:2em 0}.posts{margin:2em 0}.posts .date{font-size:.75rem}.is-centered{text-align:center;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.footer{padding:3rem 1.5rem} -------------------------------------------------------------------------------- /docs/static/css/app.b4c9c6c2f84208879b2eb1d7562ee77f.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./src/App.vue"],"names":[],"mappings":"AACA,KACE,8CACA,mCACA,kCACA,iBAAmB,CAErB,UACE,aAAe,CAEjB,OACE,YAAc,CAEhB,aACE,gBAAmB,CAErB,aACE,kBACA,2BACI,0BACA,iBAAmB,CAEzB,QACE,mBAAqB","file":"static/css/app.b4c9c6c2f84208879b2eb1d7562ee77f.css","sourcesContent":["\n#app {\n font-family: 'Avenir', Helvetica, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: center;\n}\n.new-post {\n padding: 2em 0;\n}\n.posts {\n margin: 2em 0;\n}\n.posts .date {\n font-size: 0.75rem;\n}\n.is-centered {\n text-align: center;\n -ms-flex-item-align: center;\n -ms-grid-row-align: center;\n align-self: center;\n}\n.footer {\n padding: 3rem 1.5rem;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/App.vue"],"sourceRoot":""} -------------------------------------------------------------------------------- /docs/static/js/app.c6935b7e1b0ac9f401eb.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1],{143:function(s,t,e){function a(s){e(149)}var n=e(182)(e(147),e(183),a,null,null);s.exports=n.exports},146:function(s,t,e){"use strict";t.a={apiKey:"AIzaSyB0scjl5N81Ci8dmcjWQtTVl2h3MqBcVlM",authDomain:"vue-blog-40664.firebaseapp.com",databaseURL:"https://vue-blog-40664.firebaseio.com",projectId:"vue-blog-40664",storageBucket:"vue-blog-40664.appspot.com",messagingSenderId:"88184996276"}},147:function(s,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e(154),n=e.n(a),i=e(0),o=e.n(i),l=e(146),r=n.a.initializeApp(l.a),c=r.database(),j=c.ref("posts");t.default={name:"app",firebase:{posts:j},data:function(){return{title:"Vue Blog",subtitle:"Blogging with Vue.js + Firebase Example",newPost:{title:"",text:""}}},methods:{addPost:function(){this.newPost.created_at=o()().format("DD MMM, YYYY HH:mm:ss"),j.push(this.newPost),this.newPost.title="",this.newPost.text=""},removePost:function(s){j.child(s[".key"]).remove()}}}},148:function(s,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e(144),n=e(143),i=e.n(n),o=e(145),l=e.n(o);a.a.config.productionTip=!1,a.a.use(l.a),new a.a({el:"#app",template:"",components:{App:i.a}})},149:function(s,t){},178:function(s,t,e){function a(s){return e(n(s))}function n(s){var t=i[s];if(!(t+1))throw new Error("Cannot find module '"+s+"'.");return t}var i={"./af":28,"./af.js":28,"./ar":35,"./ar-dz":29,"./ar-dz.js":29,"./ar-kw":30,"./ar-kw.js":30,"./ar-ly":31,"./ar-ly.js":31,"./ar-ma":32,"./ar-ma.js":32,"./ar-sa":33,"./ar-sa.js":33,"./ar-tn":34,"./ar-tn.js":34,"./ar.js":35,"./az":36,"./az.js":36,"./be":37,"./be.js":37,"./bg":38,"./bg.js":38,"./bn":39,"./bn.js":39,"./bo":40,"./bo.js":40,"./br":41,"./br.js":41,"./bs":42,"./bs.js":42,"./ca":43,"./ca.js":43,"./cs":44,"./cs.js":44,"./cv":45,"./cv.js":45,"./cy":46,"./cy.js":46,"./da":47,"./da.js":47,"./de":50,"./de-at":48,"./de-at.js":48,"./de-ch":49,"./de-ch.js":49,"./de.js":50,"./dv":51,"./dv.js":51,"./el":52,"./el.js":52,"./en-au":53,"./en-au.js":53,"./en-ca":54,"./en-ca.js":54,"./en-gb":55,"./en-gb.js":55,"./en-ie":56,"./en-ie.js":56,"./en-nz":57,"./en-nz.js":57,"./eo":58,"./eo.js":58,"./es":60,"./es-do":59,"./es-do.js":59,"./es.js":60,"./et":61,"./et.js":61,"./eu":62,"./eu.js":62,"./fa":63,"./fa.js":63,"./fi":64,"./fi.js":64,"./fo":65,"./fo.js":65,"./fr":68,"./fr-ca":66,"./fr-ca.js":66,"./fr-ch":67,"./fr-ch.js":67,"./fr.js":68,"./fy":69,"./fy.js":69,"./gd":70,"./gd.js":70,"./gl":71,"./gl.js":71,"./gom-latn":72,"./gom-latn.js":72,"./he":73,"./he.js":73,"./hi":74,"./hi.js":74,"./hr":75,"./hr.js":75,"./hu":76,"./hu.js":76,"./hy-am":77,"./hy-am.js":77,"./id":78,"./id.js":78,"./is":79,"./is.js":79,"./it":80,"./it.js":80,"./ja":81,"./ja.js":81,"./jv":82,"./jv.js":82,"./ka":83,"./ka.js":83,"./kk":84,"./kk.js":84,"./km":85,"./km.js":85,"./kn":86,"./kn.js":86,"./ko":87,"./ko.js":87,"./ky":88,"./ky.js":88,"./lb":89,"./lb.js":89,"./lo":90,"./lo.js":90,"./lt":91,"./lt.js":91,"./lv":92,"./lv.js":92,"./me":93,"./me.js":93,"./mi":94,"./mi.js":94,"./mk":95,"./mk.js":95,"./ml":96,"./ml.js":96,"./mr":97,"./mr.js":97,"./ms":99,"./ms-my":98,"./ms-my.js":98,"./ms.js":99,"./my":100,"./my.js":100,"./nb":101,"./nb.js":101,"./ne":102,"./ne.js":102,"./nl":104,"./nl-be":103,"./nl-be.js":103,"./nl.js":104,"./nn":105,"./nn.js":105,"./pa-in":106,"./pa-in.js":106,"./pl":107,"./pl.js":107,"./pt":109,"./pt-br":108,"./pt-br.js":108,"./pt.js":109,"./ro":110,"./ro.js":110,"./ru":111,"./ru.js":111,"./sd":112,"./sd.js":112,"./se":113,"./se.js":113,"./si":114,"./si.js":114,"./sk":115,"./sk.js":115,"./sl":116,"./sl.js":116,"./sq":117,"./sq.js":117,"./sr":119,"./sr-cyrl":118,"./sr-cyrl.js":118,"./sr.js":119,"./ss":120,"./ss.js":120,"./sv":121,"./sv.js":121,"./sw":122,"./sw.js":122,"./ta":123,"./ta.js":123,"./te":124,"./te.js":124,"./tet":125,"./tet.js":125,"./th":126,"./th.js":126,"./tl-ph":127,"./tl-ph.js":127,"./tlh":128,"./tlh.js":128,"./tr":129,"./tr.js":129,"./tzl":130,"./tzl.js":130,"./tzm":132,"./tzm-latn":131,"./tzm-latn.js":131,"./tzm.js":132,"./uk":133,"./uk.js":133,"./ur":134,"./ur.js":134,"./uz":136,"./uz-latn":135,"./uz-latn.js":135,"./uz.js":136,"./vi":137,"./vi.js":137,"./x-pseudo":138,"./x-pseudo.js":138,"./yo":139,"./yo.js":139,"./zh-cn":140,"./zh-cn.js":140,"./zh-hk":141,"./zh-hk.js":141,"./zh-tw":142,"./zh-tw.js":142};a.keys=function(){return Object.keys(i)},a.resolve=n,s.exports=a,a.id=178},183:function(s,t){s.exports={render:function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("div",{attrs:{id:"app"}},[e("section",{staticClass:"hero is-info"},[e("div",{staticClass:"hero-body"},[e("div",{staticClass:"container"},[e("h1",{staticClass:"title"},[s._v(s._s(s.title))]),s._v(" "),e("h2",[s._v(s._s(s.subtitle))])])])]),s._v(" "),e("section",{staticClass:"new-post"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-half is-offset-one-quarter"},[e("h2",{staticClass:"title"},[s._v("Create new post")]),s._v(" "),e("form",{attrs:{id:"form"},on:{submit:function(t){t.preventDefault(),s.addPost(t)}}},[e("div",{staticClass:"field"},[e("label",{staticClass:"label"},[s._v("Title")]),s._v(" "),e("p",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:s.newPost.title,expression:"newPost.title"}],staticClass:"input",attrs:{type:"text",placeholder:"Title"},domProps:{value:s.newPost.title},on:{input:function(t){t.target.composing||(s.newPost.title=t.target.value)}}})])]),s._v(" "),e("div",{staticClass:"field"},[e("label",{staticClass:"label"},[s._v("Content")]),s._v(" "),e("p",{staticClass:"control"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:s.newPost.text,expression:"newPost.text"}],staticClass:"textarea",attrs:{placeholder:"Put your content here."},domProps:{value:s.newPost.text},on:{input:function(t){t.target.composing||(s.newPost.text=t.target.value)}}})])]),s._v(" "),e("div",{staticClass:"field"},[e("input",{staticClass:"button is-primary",attrs:{type:"submit",value:"Add Post",disabled:""===s.newPost.title&&""===s.newPost.text}})])])])])])]),s._v(" "),e("hr"),s._v(" "),e("section",{staticClass:"posts"},[e("div",{staticClass:"container"},[e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-half is-offset-one-quarter"},[e("h2",{staticClass:"title"},[s._v("Posts")]),s._v(" "),s._l(s.posts,function(t){return e("div",{staticClass:"box"},[e("div",{staticClass:"media-content columns"},[e("div",{staticClass:"column is-10"},[e("p",[e("strong",[s._v(s._s(t.title))]),s._v(" "),e("br"),s._v("\n "+s._s(t.text)+"\n ")]),s._v(" "),e("br"),s._v(" "),e("span",{staticClass:"date"},[s._v("On "+s._s(t.created_at))])]),s._v(" "),e("div",{staticClass:"column is-2 is-centered"},[e("a",{staticClass:"button is-danger is-outlined is-pulled-right",on:{click:function(e){s.removePost(t)}}},[s._v("Delete")])])])])})],2)])])]),s._v(" "),s._m(0)])},staticRenderFns:[function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("footer",{staticClass:"footer"},[e("div",{staticClass:"container"},[e("div",{staticClass:"content has-text-centered"},[e("p",[s._v("Powered by "),e("a",{attrs:{href:"https://devahoy.com",target:"_blank"}},[s._v("DevAhoy")])])])])])}]}}},[148]); 2 | //# sourceMappingURL=app.c6935b7e1b0ac9f401eb.js.map -------------------------------------------------------------------------------- /docs/static/js/app.c6935b7e1b0ac9f401eb.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///static/js/app.c6935b7e1b0ac9f401eb.js","webpack:///./src/App.vue?35a7","webpack:///./firebase.token.js","webpack:///App.vue","webpack:///./src/main.js","webpack:///./~/moment/locale ^\\.\\/.*$","webpack:///./src/App.vue?1899"],"names":["webpackJsonp","143","module","exports","__webpack_require__","injectStyle","ssrContext","Component","146","__webpack_exports__","apiKey","authDomain","databaseURL","projectId","storageBucket","messagingSenderId","147","Object","defineProperty","value","__WEBPACK_IMPORTED_MODULE_0_firebase__","__WEBPACK_IMPORTED_MODULE_0_firebase___default","n","__WEBPACK_IMPORTED_MODULE_1_moment__","__WEBPACK_IMPORTED_MODULE_1_moment___default","__WEBPACK_IMPORTED_MODULE_2__firebase_token__","app","a","initializeApp","db","database","postsRef","ref","name","firebase","posts","data","title","subtitle","newPost","text","methods","addPost","this","created_at","format","push","removePost","post","child","remove","148","__WEBPACK_IMPORTED_MODULE_0_vue__","__WEBPACK_IMPORTED_MODULE_1__App__","__WEBPACK_IMPORTED_MODULE_1__App___default","__WEBPACK_IMPORTED_MODULE_2_vuefire__","__WEBPACK_IMPORTED_MODULE_2_vuefire___default","config","productionTip","use","el","template","components","App","149","178","webpackContext","req","webpackContextResolve","id","map","Error","./af","./af.js","./ar","./ar-dz","./ar-dz.js","./ar-kw","./ar-kw.js","./ar-ly","./ar-ly.js","./ar-ma","./ar-ma.js","./ar-sa","./ar-sa.js","./ar-tn","./ar-tn.js","./ar.js","./az","./az.js","./be","./be.js","./bg","./bg.js","./bn","./bn.js","./bo","./bo.js","./br","./br.js","./bs","./bs.js","./ca","./ca.js","./cs","./cs.js","./cv","./cv.js","./cy","./cy.js","./da","./da.js","./de","./de-at","./de-at.js","./de-ch","./de-ch.js","./de.js","./dv","./dv.js","./el","./el.js","./en-au","./en-au.js","./en-ca","./en-ca.js","./en-gb","./en-gb.js","./en-ie","./en-ie.js","./en-nz","./en-nz.js","./eo","./eo.js","./es","./es-do","./es-do.js","./es.js","./et","./et.js","./eu","./eu.js","./fa","./fa.js","./fi","./fi.js","./fo","./fo.js","./fr","./fr-ca","./fr-ca.js","./fr-ch","./fr-ch.js","./fr.js","./fy","./fy.js","./gd","./gd.js","./gl","./gl.js","./gom-latn","./gom-latn.js","./he","./he.js","./hi","./hi.js","./hr","./hr.js","./hu","./hu.js","./hy-am","./hy-am.js","./id","./id.js","./is","./is.js","./it","./it.js","./ja","./ja.js","./jv","./jv.js","./ka","./ka.js","./kk","./kk.js","./km","./km.js","./kn","./kn.js","./ko","./ko.js","./ky","./ky.js","./lb","./lb.js","./lo","./lo.js","./lt","./lt.js","./lv","./lv.js","./me","./me.js","./mi","./mi.js","./mk","./mk.js","./ml","./ml.js","./mr","./mr.js","./ms","./ms-my","./ms-my.js","./ms.js","./my","./my.js","./nb","./nb.js","./ne","./ne.js","./nl","./nl-be","./nl-be.js","./nl.js","./nn","./nn.js","./pa-in","./pa-in.js","./pl","./pl.js","./pt","./pt-br","./pt-br.js","./pt.js","./ro","./ro.js","./ru","./ru.js","./sd","./sd.js","./se","./se.js","./si","./si.js","./sk","./sk.js","./sl","./sl.js","./sq","./sq.js","./sr","./sr-cyrl","./sr-cyrl.js","./sr.js","./ss","./ss.js","./sv","./sv.js","./sw","./sw.js","./ta","./ta.js","./te","./te.js","./tet","./tet.js","./th","./th.js","./tl-ph","./tl-ph.js","./tlh","./tlh.js","./tr","./tr.js","./tzl","./tzl.js","./tzm","./tzm-latn","./tzm-latn.js","./tzm.js","./uk","./uk.js","./ur","./ur.js","./uz","./uz-latn","./uz-latn.js","./uz.js","./vi","./vi.js","./x-pseudo","./x-pseudo.js","./yo","./yo.js","./zh-cn","./zh-cn.js","./zh-hk","./zh-hk.js","./zh-tw","./zh-tw.js","keys","resolve","183","render","_vm","_h","$createElement","_c","_self","attrs","staticClass","_v","_s","on","submit","$event","preventDefault","directives","rawName","expression","type","placeholder","domProps","input","target","composing","disabled","_l","click","_m","staticRenderFns","href"],"mappings":"AAAAA,cAAc,IAERC,IACA,SAAUC,EAAQC,EAASC,GCHjC,QAAAC,GAAAC,GACAF,EAAA,KAEA,GAAAG,GAAAH,EAAA,KAEAA,EAAA,KAEAA,EAAA,KAEAC,EAEA,KAEA,KAGAH,GAAAC,QAAAI,EAAAJ,SDUMK,IACA,SAAUN,EAAQO,EAAqBL,GAE7C,YE7BAK,GAAA,GACAC,OAAA,0CACAC,WAAA,iCACAC,YAAA,wCACAC,UAAA,iBACAC,cAAA,6BACAC,kBAAA,gBFmCMC,IACA,SAAUd,EAAQO,EAAqBL,GAE7C,YACAa,QAAOC,eAAeT,EAAqB,cAAgBU,OAAO,GAC7C,IAAIC,GAAyChB,EAAoB,KAC7DiB,EAAiDjB,EAAoBkB,EAAEF,GACvEG,EAAuCnB,EAAoB,GAC3DoB,EAA+CpB,EAAoBkB,EAAEC,GACrEE,EAAgDrB,EAAoB,KG2B7FsB,EAAAL,EAAAM,EAAAC,cAAAH,EAAA,GACAI,EAAAH,EAAAI,WAEAC,EAAAF,EAAAG,IAAA,QAEAvB,GAAA,SHoDEwB,KGjDF,MHmDEC,UACEC,MGhDJJ,GHmDEK,KAAM,WACJ,OACEC,MGlDN,WHmDMC,SGlDN,0CHmDMC,SACEF,MGlDR,GHmDQG,KGhDR,MHsDEC,SACEC,QAAS,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,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,aAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,aAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,aAAA,GACAC,gBAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,UAAA,GACAC,aAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GACAC,UAAA,GACAC,OAAA,GAC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AAC,OAGKkQ,EAAAO,GAAA,qBACF,SAAAP,EAAAO,GAAA,KAAAP,EAAAyB,GAAA,MACFC,iBAAA,WAA+B,GAAA1B,GAAAvQ,KAAawQ,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,CACvE,OAAAE,GAAA,UACAG,YAAA,WACGH,EAAA,OACHG,YAAA,cACGH,EAAA,OACHG,YAAA,8BACGH,EAAA,KAAAH,EAAAO,GAAA,eAAAJ,EAAA,KACHE,OACAsB,KAAA,sBACAP,OAAA,YAEGpB,EAAAO,GAAA,2BNkdA","file":"static/js/app.c6935b7e1b0ac9f401eb.js","sourcesContent":["webpackJsonp([1],{\n\n/***/ 143:\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction injectStyle (ssrContext) {\n __webpack_require__(149)\n}\nvar Component = __webpack_require__(182)(\n /* script */\n __webpack_require__(147),\n /* template */\n __webpack_require__(183),\n /* styles */\n injectStyle,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n\n/***/ 146:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n apiKey: \"AIzaSyB0scjl5N81Ci8dmcjWQtTVl2h3MqBcVlM\",\n authDomain: \"vue-blog-40664.firebaseapp.com\",\n databaseURL: \"https://vue-blog-40664.firebaseio.com\",\n projectId: \"vue-blog-40664\",\n storageBucket: \"vue-blog-40664.appspot.com\",\n messagingSenderId: \"88184996276\"\n});\n\n/***/ }),\n\n/***/ 147:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_firebase__ = __webpack_require__(154);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_firebase___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_firebase__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_moment__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__firebase_token__ = __webpack_require__(146);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\nvar app = __WEBPACK_IMPORTED_MODULE_0_firebase___default.a.initializeApp(__WEBPACK_IMPORTED_MODULE_2__firebase_token__[\"a\" /* default */]);\nvar db = app.database();\n\nvar postsRef = db.ref('posts');\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'app',\n\n firebase: {\n posts: postsRef\n },\n\n data: function data() {\n return {\n title: 'Vue Blog',\n subtitle: 'Blogging with Vue.js + Firebase Example',\n newPost: {\n title: '',\n text: ''\n }\n };\n },\n\n\n methods: {\n addPost: function addPost() {\n\n this.newPost.created_at = __WEBPACK_IMPORTED_MODULE_1_moment___default()().format('DD MMM, YYYY HH:mm:ss');\n postsRef.push(this.newPost);\n\n this.newPost.title = '';\n this.newPost.text = '';\n },\n removePost: function removePost(post) {\n postsRef.child(post['.key']).remove();\n }\n }\n});\n\n/***/ }),\n\n/***/ 148:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(144);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App__ = __webpack_require__(143);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__App__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vuefire__ = __webpack_require__(145);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vuefire___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_vuefire__);\n// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\n\n\n\n\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */].config.productionTip = false;\n\n__WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */].use(__WEBPACK_IMPORTED_MODULE_2_vuefire___default.a);\n\n/* eslint-disable no-new */\nnew __WEBPACK_IMPORTED_MODULE_0_vue__[\"a\" /* default */]({\n el: '#app',\n template: '',\n components: { App: __WEBPACK_IMPORTED_MODULE_1__App___default.a }\n});\n\n/***/ }),\n\n/***/ 149:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 178:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./af\": 28,\n\t\"./af.js\": 28,\n\t\"./ar\": 35,\n\t\"./ar-dz\": 29,\n\t\"./ar-dz.js\": 29,\n\t\"./ar-kw\": 30,\n\t\"./ar-kw.js\": 30,\n\t\"./ar-ly\": 31,\n\t\"./ar-ly.js\": 31,\n\t\"./ar-ma\": 32,\n\t\"./ar-ma.js\": 32,\n\t\"./ar-sa\": 33,\n\t\"./ar-sa.js\": 33,\n\t\"./ar-tn\": 34,\n\t\"./ar-tn.js\": 34,\n\t\"./ar.js\": 35,\n\t\"./az\": 36,\n\t\"./az.js\": 36,\n\t\"./be\": 37,\n\t\"./be.js\": 37,\n\t\"./bg\": 38,\n\t\"./bg.js\": 38,\n\t\"./bn\": 39,\n\t\"./bn.js\": 39,\n\t\"./bo\": 40,\n\t\"./bo.js\": 40,\n\t\"./br\": 41,\n\t\"./br.js\": 41,\n\t\"./bs\": 42,\n\t\"./bs.js\": 42,\n\t\"./ca\": 43,\n\t\"./ca.js\": 43,\n\t\"./cs\": 44,\n\t\"./cs.js\": 44,\n\t\"./cv\": 45,\n\t\"./cv.js\": 45,\n\t\"./cy\": 46,\n\t\"./cy.js\": 46,\n\t\"./da\": 47,\n\t\"./da.js\": 47,\n\t\"./de\": 50,\n\t\"./de-at\": 48,\n\t\"./de-at.js\": 48,\n\t\"./de-ch\": 49,\n\t\"./de-ch.js\": 49,\n\t\"./de.js\": 50,\n\t\"./dv\": 51,\n\t\"./dv.js\": 51,\n\t\"./el\": 52,\n\t\"./el.js\": 52,\n\t\"./en-au\": 53,\n\t\"./en-au.js\": 53,\n\t\"./en-ca\": 54,\n\t\"./en-ca.js\": 54,\n\t\"./en-gb\": 55,\n\t\"./en-gb.js\": 55,\n\t\"./en-ie\": 56,\n\t\"./en-ie.js\": 56,\n\t\"./en-nz\": 57,\n\t\"./en-nz.js\": 57,\n\t\"./eo\": 58,\n\t\"./eo.js\": 58,\n\t\"./es\": 60,\n\t\"./es-do\": 59,\n\t\"./es-do.js\": 59,\n\t\"./es.js\": 60,\n\t\"./et\": 61,\n\t\"./et.js\": 61,\n\t\"./eu\": 62,\n\t\"./eu.js\": 62,\n\t\"./fa\": 63,\n\t\"./fa.js\": 63,\n\t\"./fi\": 64,\n\t\"./fi.js\": 64,\n\t\"./fo\": 65,\n\t\"./fo.js\": 65,\n\t\"./fr\": 68,\n\t\"./fr-ca\": 66,\n\t\"./fr-ca.js\": 66,\n\t\"./fr-ch\": 67,\n\t\"./fr-ch.js\": 67,\n\t\"./fr.js\": 68,\n\t\"./fy\": 69,\n\t\"./fy.js\": 69,\n\t\"./gd\": 70,\n\t\"./gd.js\": 70,\n\t\"./gl\": 71,\n\t\"./gl.js\": 71,\n\t\"./gom-latn\": 72,\n\t\"./gom-latn.js\": 72,\n\t\"./he\": 73,\n\t\"./he.js\": 73,\n\t\"./hi\": 74,\n\t\"./hi.js\": 74,\n\t\"./hr\": 75,\n\t\"./hr.js\": 75,\n\t\"./hu\": 76,\n\t\"./hu.js\": 76,\n\t\"./hy-am\": 77,\n\t\"./hy-am.js\": 77,\n\t\"./id\": 78,\n\t\"./id.js\": 78,\n\t\"./is\": 79,\n\t\"./is.js\": 79,\n\t\"./it\": 80,\n\t\"./it.js\": 80,\n\t\"./ja\": 81,\n\t\"./ja.js\": 81,\n\t\"./jv\": 82,\n\t\"./jv.js\": 82,\n\t\"./ka\": 83,\n\t\"./ka.js\": 83,\n\t\"./kk\": 84,\n\t\"./kk.js\": 84,\n\t\"./km\": 85,\n\t\"./km.js\": 85,\n\t\"./kn\": 86,\n\t\"./kn.js\": 86,\n\t\"./ko\": 87,\n\t\"./ko.js\": 87,\n\t\"./ky\": 88,\n\t\"./ky.js\": 88,\n\t\"./lb\": 89,\n\t\"./lb.js\": 89,\n\t\"./lo\": 90,\n\t\"./lo.js\": 90,\n\t\"./lt\": 91,\n\t\"./lt.js\": 91,\n\t\"./lv\": 92,\n\t\"./lv.js\": 92,\n\t\"./me\": 93,\n\t\"./me.js\": 93,\n\t\"./mi\": 94,\n\t\"./mi.js\": 94,\n\t\"./mk\": 95,\n\t\"./mk.js\": 95,\n\t\"./ml\": 96,\n\t\"./ml.js\": 96,\n\t\"./mr\": 97,\n\t\"./mr.js\": 97,\n\t\"./ms\": 99,\n\t\"./ms-my\": 98,\n\t\"./ms-my.js\": 98,\n\t\"./ms.js\": 99,\n\t\"./my\": 100,\n\t\"./my.js\": 100,\n\t\"./nb\": 101,\n\t\"./nb.js\": 101,\n\t\"./ne\": 102,\n\t\"./ne.js\": 102,\n\t\"./nl\": 104,\n\t\"./nl-be\": 103,\n\t\"./nl-be.js\": 103,\n\t\"./nl.js\": 104,\n\t\"./nn\": 105,\n\t\"./nn.js\": 105,\n\t\"./pa-in\": 106,\n\t\"./pa-in.js\": 106,\n\t\"./pl\": 107,\n\t\"./pl.js\": 107,\n\t\"./pt\": 109,\n\t\"./pt-br\": 108,\n\t\"./pt-br.js\": 108,\n\t\"./pt.js\": 109,\n\t\"./ro\": 110,\n\t\"./ro.js\": 110,\n\t\"./ru\": 111,\n\t\"./ru.js\": 111,\n\t\"./sd\": 112,\n\t\"./sd.js\": 112,\n\t\"./se\": 113,\n\t\"./se.js\": 113,\n\t\"./si\": 114,\n\t\"./si.js\": 114,\n\t\"./sk\": 115,\n\t\"./sk.js\": 115,\n\t\"./sl\": 116,\n\t\"./sl.js\": 116,\n\t\"./sq\": 117,\n\t\"./sq.js\": 117,\n\t\"./sr\": 119,\n\t\"./sr-cyrl\": 118,\n\t\"./sr-cyrl.js\": 118,\n\t\"./sr.js\": 119,\n\t\"./ss\": 120,\n\t\"./ss.js\": 120,\n\t\"./sv\": 121,\n\t\"./sv.js\": 121,\n\t\"./sw\": 122,\n\t\"./sw.js\": 122,\n\t\"./ta\": 123,\n\t\"./ta.js\": 123,\n\t\"./te\": 124,\n\t\"./te.js\": 124,\n\t\"./tet\": 125,\n\t\"./tet.js\": 125,\n\t\"./th\": 126,\n\t\"./th.js\": 126,\n\t\"./tl-ph\": 127,\n\t\"./tl-ph.js\": 127,\n\t\"./tlh\": 128,\n\t\"./tlh.js\": 128,\n\t\"./tr\": 129,\n\t\"./tr.js\": 129,\n\t\"./tzl\": 130,\n\t\"./tzl.js\": 130,\n\t\"./tzm\": 132,\n\t\"./tzm-latn\": 131,\n\t\"./tzm-latn.js\": 131,\n\t\"./tzm.js\": 132,\n\t\"./uk\": 133,\n\t\"./uk.js\": 133,\n\t\"./ur\": 134,\n\t\"./ur.js\": 134,\n\t\"./uz\": 136,\n\t\"./uz-latn\": 135,\n\t\"./uz-latn.js\": 135,\n\t\"./uz.js\": 136,\n\t\"./vi\": 137,\n\t\"./vi.js\": 137,\n\t\"./x-pseudo\": 138,\n\t\"./x-pseudo.js\": 138,\n\t\"./yo\": 139,\n\t\"./yo.js\": 139,\n\t\"./zh-cn\": 140,\n\t\"./zh-cn.js\": 140,\n\t\"./zh-hk\": 141,\n\t\"./zh-hk.js\": 141,\n\t\"./zh-tw\": 142,\n\t\"./zh-tw.js\": 142\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 178;\n\n/***/ }),\n\n/***/ 183:\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n attrs: {\n \"id\": \"app\"\n }\n }, [_c('section', {\n staticClass: \"hero is-info\"\n }, [_c('div', {\n staticClass: \"hero-body\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('h1', {\n staticClass: \"title\"\n }, [_vm._v(_vm._s(_vm.title))]), _vm._v(\" \"), _c('h2', [_vm._v(_vm._s(_vm.subtitle))])])])]), _vm._v(\" \"), _c('section', {\n staticClass: \"new-post\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('div', {\n staticClass: \"columns\"\n }, [_c('div', {\n staticClass: \"column is-half is-offset-one-quarter\"\n }, [_c('h2', {\n staticClass: \"title\"\n }, [_vm._v(\"Create new post\")]), _vm._v(\" \"), _c('form', {\n attrs: {\n \"id\": \"form\"\n },\n on: {\n \"submit\": function($event) {\n $event.preventDefault();\n _vm.addPost($event)\n }\n }\n }, [_c('div', {\n staticClass: \"field\"\n }, [_c('label', {\n staticClass: \"label\"\n }, [_vm._v(\"Title\")]), _vm._v(\" \"), _c('p', {\n staticClass: \"control\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newPost.title),\n expression: \"newPost.title\"\n }],\n staticClass: \"input\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": \"Title\"\n },\n domProps: {\n \"value\": (_vm.newPost.title)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.newPost.title = $event.target.value\n }\n }\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"field\"\n }, [_c('label', {\n staticClass: \"label\"\n }, [_vm._v(\"Content\")]), _vm._v(\" \"), _c('p', {\n staticClass: \"control\"\n }, [_c('textarea', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newPost.text),\n expression: \"newPost.text\"\n }],\n staticClass: \"textarea\",\n attrs: {\n \"placeholder\": \"Put your content here.\"\n },\n domProps: {\n \"value\": (_vm.newPost.text)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.newPost.text = $event.target.value\n }\n }\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"field\"\n }, [_c('input', {\n staticClass: \"button is-primary\",\n attrs: {\n \"type\": \"submit\",\n \"value\": \"Add Post\",\n \"disabled\": _vm.newPost.title === '' && _vm.newPost.text === ''\n }\n })])])])])])]), _vm._v(\" \"), _c('hr'), _vm._v(\" \"), _c('section', {\n staticClass: \"posts\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('div', {\n staticClass: \"columns\"\n }, [_c('div', {\n staticClass: \"column is-half is-offset-one-quarter\"\n }, [_c('h2', {\n staticClass: \"title\"\n }, [_vm._v(\"Posts\")]), _vm._v(\" \"), _vm._l((_vm.posts), function(post) {\n return _c('div', {\n staticClass: \"box\"\n }, [_c('div', {\n staticClass: \"media-content columns\"\n }, [_c('div', {\n staticClass: \"column is-10\"\n }, [_c('p', [_c('strong', [_vm._v(_vm._s(post.title))]), _vm._v(\" \"), _c('br'), _vm._v(\"\\n \" + _vm._s(post.text) + \"\\n \")]), _vm._v(\" \"), _c('br'), _vm._v(\" \"), _c('span', {\n staticClass: \"date\"\n }, [_vm._v(\"On \" + _vm._s(post.created_at))])]), _vm._v(\" \"), _c('div', {\n staticClass: \"column is-2 is-centered\"\n }, [_c('a', {\n staticClass: \"button is-danger is-outlined is-pulled-right\",\n on: {\n \"click\": function($event) {\n _vm.removePost(post)\n }\n }\n }, [_vm._v(\"Delete\")])])])])\n })], 2)])])]), _vm._v(\" \"), _vm._m(0)])\n},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('footer', {\n staticClass: \"footer\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('div', {\n staticClass: \"content has-text-centered\"\n }, [_c('p', [_vm._v(\"Powered by \"), _c('a', {\n attrs: {\n \"href\": \"https://devahoy.com\",\n \"target\": \"_blank\"\n }\n }, [_vm._v(\"DevAhoy\")])])])])])\n}]}\n\n/***/ })\n\n},[148]);\n\n\n// WEBPACK FOOTER //\n// static/js/app.c6935b7e1b0ac9f401eb.js","function injectStyle (ssrContext) {\n require(\"!!../node_modules/extract-text-webpack-plugin/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-7eca9856\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar Component = require(\"!../node_modules/vue-loader/lib/component-normalizer\")(\n /* script */\n require(\"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"),\n /* template */\n require(\"!!../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-7eca9856\\\"}!../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"),\n /* styles */\n injectStyle,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/App.vue\n// module id = 143\n// module chunks = 1","export default {\n apiKey: \"AIzaSyB0scjl5N81Ci8dmcjWQtTVl2h3MqBcVlM\",\n authDomain: \"vue-blog-40664.firebaseapp.com\",\n databaseURL: \"https://vue-blog-40664.firebaseio.com\",\n projectId: \"vue-blog-40664\",\n storageBucket: \"vue-blog-40664.appspot.com\",\n messagingSenderId: \"88184996276\"\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./firebase.token.js\n// module id = 146\n// module chunks = 1","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// App.vue?5337a2b4","// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport App from './App'\nimport VueFire from 'vuefire'\n\nVue.config.productionTip = false\n\nVue.use(VueFire)\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n template: '',\n components: { App }\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","var map = {\n\t\"./af\": 28,\n\t\"./af.js\": 28,\n\t\"./ar\": 35,\n\t\"./ar-dz\": 29,\n\t\"./ar-dz.js\": 29,\n\t\"./ar-kw\": 30,\n\t\"./ar-kw.js\": 30,\n\t\"./ar-ly\": 31,\n\t\"./ar-ly.js\": 31,\n\t\"./ar-ma\": 32,\n\t\"./ar-ma.js\": 32,\n\t\"./ar-sa\": 33,\n\t\"./ar-sa.js\": 33,\n\t\"./ar-tn\": 34,\n\t\"./ar-tn.js\": 34,\n\t\"./ar.js\": 35,\n\t\"./az\": 36,\n\t\"./az.js\": 36,\n\t\"./be\": 37,\n\t\"./be.js\": 37,\n\t\"./bg\": 38,\n\t\"./bg.js\": 38,\n\t\"./bn\": 39,\n\t\"./bn.js\": 39,\n\t\"./bo\": 40,\n\t\"./bo.js\": 40,\n\t\"./br\": 41,\n\t\"./br.js\": 41,\n\t\"./bs\": 42,\n\t\"./bs.js\": 42,\n\t\"./ca\": 43,\n\t\"./ca.js\": 43,\n\t\"./cs\": 44,\n\t\"./cs.js\": 44,\n\t\"./cv\": 45,\n\t\"./cv.js\": 45,\n\t\"./cy\": 46,\n\t\"./cy.js\": 46,\n\t\"./da\": 47,\n\t\"./da.js\": 47,\n\t\"./de\": 50,\n\t\"./de-at\": 48,\n\t\"./de-at.js\": 48,\n\t\"./de-ch\": 49,\n\t\"./de-ch.js\": 49,\n\t\"./de.js\": 50,\n\t\"./dv\": 51,\n\t\"./dv.js\": 51,\n\t\"./el\": 52,\n\t\"./el.js\": 52,\n\t\"./en-au\": 53,\n\t\"./en-au.js\": 53,\n\t\"./en-ca\": 54,\n\t\"./en-ca.js\": 54,\n\t\"./en-gb\": 55,\n\t\"./en-gb.js\": 55,\n\t\"./en-ie\": 56,\n\t\"./en-ie.js\": 56,\n\t\"./en-nz\": 57,\n\t\"./en-nz.js\": 57,\n\t\"./eo\": 58,\n\t\"./eo.js\": 58,\n\t\"./es\": 60,\n\t\"./es-do\": 59,\n\t\"./es-do.js\": 59,\n\t\"./es.js\": 60,\n\t\"./et\": 61,\n\t\"./et.js\": 61,\n\t\"./eu\": 62,\n\t\"./eu.js\": 62,\n\t\"./fa\": 63,\n\t\"./fa.js\": 63,\n\t\"./fi\": 64,\n\t\"./fi.js\": 64,\n\t\"./fo\": 65,\n\t\"./fo.js\": 65,\n\t\"./fr\": 68,\n\t\"./fr-ca\": 66,\n\t\"./fr-ca.js\": 66,\n\t\"./fr-ch\": 67,\n\t\"./fr-ch.js\": 67,\n\t\"./fr.js\": 68,\n\t\"./fy\": 69,\n\t\"./fy.js\": 69,\n\t\"./gd\": 70,\n\t\"./gd.js\": 70,\n\t\"./gl\": 71,\n\t\"./gl.js\": 71,\n\t\"./gom-latn\": 72,\n\t\"./gom-latn.js\": 72,\n\t\"./he\": 73,\n\t\"./he.js\": 73,\n\t\"./hi\": 74,\n\t\"./hi.js\": 74,\n\t\"./hr\": 75,\n\t\"./hr.js\": 75,\n\t\"./hu\": 76,\n\t\"./hu.js\": 76,\n\t\"./hy-am\": 77,\n\t\"./hy-am.js\": 77,\n\t\"./id\": 78,\n\t\"./id.js\": 78,\n\t\"./is\": 79,\n\t\"./is.js\": 79,\n\t\"./it\": 80,\n\t\"./it.js\": 80,\n\t\"./ja\": 81,\n\t\"./ja.js\": 81,\n\t\"./jv\": 82,\n\t\"./jv.js\": 82,\n\t\"./ka\": 83,\n\t\"./ka.js\": 83,\n\t\"./kk\": 84,\n\t\"./kk.js\": 84,\n\t\"./km\": 85,\n\t\"./km.js\": 85,\n\t\"./kn\": 86,\n\t\"./kn.js\": 86,\n\t\"./ko\": 87,\n\t\"./ko.js\": 87,\n\t\"./ky\": 88,\n\t\"./ky.js\": 88,\n\t\"./lb\": 89,\n\t\"./lb.js\": 89,\n\t\"./lo\": 90,\n\t\"./lo.js\": 90,\n\t\"./lt\": 91,\n\t\"./lt.js\": 91,\n\t\"./lv\": 92,\n\t\"./lv.js\": 92,\n\t\"./me\": 93,\n\t\"./me.js\": 93,\n\t\"./mi\": 94,\n\t\"./mi.js\": 94,\n\t\"./mk\": 95,\n\t\"./mk.js\": 95,\n\t\"./ml\": 96,\n\t\"./ml.js\": 96,\n\t\"./mr\": 97,\n\t\"./mr.js\": 97,\n\t\"./ms\": 99,\n\t\"./ms-my\": 98,\n\t\"./ms-my.js\": 98,\n\t\"./ms.js\": 99,\n\t\"./my\": 100,\n\t\"./my.js\": 100,\n\t\"./nb\": 101,\n\t\"./nb.js\": 101,\n\t\"./ne\": 102,\n\t\"./ne.js\": 102,\n\t\"./nl\": 104,\n\t\"./nl-be\": 103,\n\t\"./nl-be.js\": 103,\n\t\"./nl.js\": 104,\n\t\"./nn\": 105,\n\t\"./nn.js\": 105,\n\t\"./pa-in\": 106,\n\t\"./pa-in.js\": 106,\n\t\"./pl\": 107,\n\t\"./pl.js\": 107,\n\t\"./pt\": 109,\n\t\"./pt-br\": 108,\n\t\"./pt-br.js\": 108,\n\t\"./pt.js\": 109,\n\t\"./ro\": 110,\n\t\"./ro.js\": 110,\n\t\"./ru\": 111,\n\t\"./ru.js\": 111,\n\t\"./sd\": 112,\n\t\"./sd.js\": 112,\n\t\"./se\": 113,\n\t\"./se.js\": 113,\n\t\"./si\": 114,\n\t\"./si.js\": 114,\n\t\"./sk\": 115,\n\t\"./sk.js\": 115,\n\t\"./sl\": 116,\n\t\"./sl.js\": 116,\n\t\"./sq\": 117,\n\t\"./sq.js\": 117,\n\t\"./sr\": 119,\n\t\"./sr-cyrl\": 118,\n\t\"./sr-cyrl.js\": 118,\n\t\"./sr.js\": 119,\n\t\"./ss\": 120,\n\t\"./ss.js\": 120,\n\t\"./sv\": 121,\n\t\"./sv.js\": 121,\n\t\"./sw\": 122,\n\t\"./sw.js\": 122,\n\t\"./ta\": 123,\n\t\"./ta.js\": 123,\n\t\"./te\": 124,\n\t\"./te.js\": 124,\n\t\"./tet\": 125,\n\t\"./tet.js\": 125,\n\t\"./th\": 126,\n\t\"./th.js\": 126,\n\t\"./tl-ph\": 127,\n\t\"./tl-ph.js\": 127,\n\t\"./tlh\": 128,\n\t\"./tlh.js\": 128,\n\t\"./tr\": 129,\n\t\"./tr.js\": 129,\n\t\"./tzl\": 130,\n\t\"./tzl.js\": 130,\n\t\"./tzm\": 132,\n\t\"./tzm-latn\": 131,\n\t\"./tzm-latn.js\": 131,\n\t\"./tzm.js\": 132,\n\t\"./uk\": 133,\n\t\"./uk.js\": 133,\n\t\"./ur\": 134,\n\t\"./ur.js\": 134,\n\t\"./uz\": 136,\n\t\"./uz-latn\": 135,\n\t\"./uz-latn.js\": 135,\n\t\"./uz.js\": 136,\n\t\"./vi\": 137,\n\t\"./vi.js\": 137,\n\t\"./x-pseudo\": 138,\n\t\"./x-pseudo.js\": 138,\n\t\"./yo\": 139,\n\t\"./yo.js\": 139,\n\t\"./zh-cn\": 140,\n\t\"./zh-cn.js\": 140,\n\t\"./zh-hk\": 141,\n\t\"./zh-hk.js\": 141,\n\t\"./zh-tw\": 142,\n\t\"./zh-tw.js\": 142\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 178;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale ^\\.\\/.*$\n// module id = 178\n// module chunks = 1","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n attrs: {\n \"id\": \"app\"\n }\n }, [_c('section', {\n staticClass: \"hero is-info\"\n }, [_c('div', {\n staticClass: \"hero-body\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('h1', {\n staticClass: \"title\"\n }, [_vm._v(_vm._s(_vm.title))]), _vm._v(\" \"), _c('h2', [_vm._v(_vm._s(_vm.subtitle))])])])]), _vm._v(\" \"), _c('section', {\n staticClass: \"new-post\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('div', {\n staticClass: \"columns\"\n }, [_c('div', {\n staticClass: \"column is-half is-offset-one-quarter\"\n }, [_c('h2', {\n staticClass: \"title\"\n }, [_vm._v(\"Create new post\")]), _vm._v(\" \"), _c('form', {\n attrs: {\n \"id\": \"form\"\n },\n on: {\n \"submit\": function($event) {\n $event.preventDefault();\n _vm.addPost($event)\n }\n }\n }, [_c('div', {\n staticClass: \"field\"\n }, [_c('label', {\n staticClass: \"label\"\n }, [_vm._v(\"Title\")]), _vm._v(\" \"), _c('p', {\n staticClass: \"control\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newPost.title),\n expression: \"newPost.title\"\n }],\n staticClass: \"input\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": \"Title\"\n },\n domProps: {\n \"value\": (_vm.newPost.title)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.newPost.title = $event.target.value\n }\n }\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"field\"\n }, [_c('label', {\n staticClass: \"label\"\n }, [_vm._v(\"Content\")]), _vm._v(\" \"), _c('p', {\n staticClass: \"control\"\n }, [_c('textarea', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.newPost.text),\n expression: \"newPost.text\"\n }],\n staticClass: \"textarea\",\n attrs: {\n \"placeholder\": \"Put your content here.\"\n },\n domProps: {\n \"value\": (_vm.newPost.text)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.newPost.text = $event.target.value\n }\n }\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"field\"\n }, [_c('input', {\n staticClass: \"button is-primary\",\n attrs: {\n \"type\": \"submit\",\n \"value\": \"Add Post\",\n \"disabled\": _vm.newPost.title === '' && _vm.newPost.text === ''\n }\n })])])])])])]), _vm._v(\" \"), _c('hr'), _vm._v(\" \"), _c('section', {\n staticClass: \"posts\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('div', {\n staticClass: \"columns\"\n }, [_c('div', {\n staticClass: \"column is-half is-offset-one-quarter\"\n }, [_c('h2', {\n staticClass: \"title\"\n }, [_vm._v(\"Posts\")]), _vm._v(\" \"), _vm._l((_vm.posts), function(post) {\n return _c('div', {\n staticClass: \"box\"\n }, [_c('div', {\n staticClass: \"media-content columns\"\n }, [_c('div', {\n staticClass: \"column is-10\"\n }, [_c('p', [_c('strong', [_vm._v(_vm._s(post.title))]), _vm._v(\" \"), _c('br'), _vm._v(\"\\n \" + _vm._s(post.text) + \"\\n \")]), _vm._v(\" \"), _c('br'), _vm._v(\" \"), _c('span', {\n staticClass: \"date\"\n }, [_vm._v(\"On \" + _vm._s(post.created_at))])]), _vm._v(\" \"), _c('div', {\n staticClass: \"column is-2 is-centered\"\n }, [_c('a', {\n staticClass: \"button is-danger is-outlined is-pulled-right\",\n on: {\n \"click\": function($event) {\n _vm.removePost(post)\n }\n }\n }, [_vm._v(\"Delete\")])])])])\n })], 2)])])]), _vm._v(\" \"), _vm._m(0)])\n},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('footer', {\n staticClass: \"footer\"\n }, [_c('div', {\n staticClass: \"container\"\n }, [_c('div', {\n staticClass: \"content has-text-centered\"\n }, [_c('p', [_vm._v(\"Powered by \"), _c('a', {\n attrs: {\n \"href\": \"https://devahoy.com\",\n \"target\": \"_blank\"\n }\n }, [_vm._v(\"DevAhoy\")])])])])])\n}]}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler?{\"id\":\"data-v-7eca9856\"}!./~/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = 183\n// module chunks = 1"],"sourceRoot":""} -------------------------------------------------------------------------------- /docs/static/js/manifest.64adacca0bcbf4e18f7d.js: -------------------------------------------------------------------------------- 1 | !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var i,u,f,s=0,l=[];s 2 | 3 | 4 | 5 | Vue Blog : Blogging with Vue.js + Firebase 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-blog", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "Chai Phonbopit ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "start": "node build/dev-server.js", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "bulma": "^0.4.2", 14 | "firebase": "^4.1.3", 15 | "moment": "^2.18.1", 16 | "vue": "^2.3.4", 17 | "vuefire": "^1.4.3" 18 | }, 19 | "devDependencies": { 20 | "autoprefixer": "^6.7.2", 21 | "babel-core": "^6.22.1", 22 | "babel-loader": "^6.2.10", 23 | "babel-plugin-transform-runtime": "^6.22.0", 24 | "babel-preset-env": "^1.3.2", 25 | "babel-preset-stage-2": "^6.22.0", 26 | "babel-register": "^6.22.0", 27 | "chalk": "^1.1.3", 28 | "connect-history-api-fallback": "^1.3.0", 29 | "copy-webpack-plugin": "^4.0.1", 30 | "css-loader": "^0.28.0", 31 | "eventsource-polyfill": "^0.9.6", 32 | "express": "^4.14.1", 33 | "extract-text-webpack-plugin": "^2.0.0", 34 | "file-loader": "^0.11.1", 35 | "friendly-errors-webpack-plugin": "^1.1.3", 36 | "html-webpack-plugin": "^2.28.0", 37 | "http-proxy-middleware": "^0.17.3", 38 | "webpack-bundle-analyzer": "^2.2.1", 39 | "semver": "^5.3.0", 40 | "shelljs": "^0.7.6", 41 | "opn": "^4.0.2", 42 | "optimize-css-assets-webpack-plugin": "^1.3.0", 43 | "ora": "^1.2.0", 44 | "rimraf": "^2.6.0", 45 | "url-loader": "^0.5.8", 46 | "vue-loader": "^12.1.0", 47 | "vue-style-loader": "^3.0.1", 48 | "vue-template-compiler": "^2.3.3", 49 | "webpack": "^2.6.1", 50 | "webpack-dev-middleware": "^1.10.0", 51 | "webpack-hot-middleware": "^2.18.0", 52 | "webpack-merge": "^4.1.0" 53 | }, 54 | "engines": { 55 | "node": ">= 4.0.0", 56 | "npm": ">= 3.0.0" 57 | }, 58 | "browserslist": [ 59 | "> 1%", 60 | "last 2 versions", 61 | "not ie <= 8" 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/vuejs-blog-with-firebase/f729671b149ccc7f7badcdbed35cc2e63ca49a91/screenshot.png -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 71 | 72 | 116 | 117 | 145 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/vuejs-blog-with-firebase/f729671b149ccc7f7badcdbed35cc2e63ca49a91/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/Hello.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 33 | 34 | 35 | 54 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import VueFire from 'vuefire' 6 | 7 | Vue.config.productionTip = false 8 | 9 | Vue.use(VueFire) 10 | 11 | /* eslint-disable no-new */ 12 | new Vue({ 13 | el: '#app', 14 | template: '', 15 | components: { App } 16 | }) 17 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phonbopit/vuejs-blog-with-firebase/f729671b149ccc7f7badcdbed35cc2e63ca49a91/static/.gitkeep --------------------------------------------------------------------------------