8 |
9 |
10 |
18 |
19 |
68 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "daily-animal-fact-frontend",
3 | "version": "1.0.0",
4 | "description": "The frontend for the daily animal fact app",
5 | "author": "Paul Highum ",
6 | "private": true,
7 | "scripts": {
8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9 | "start": "npm run dev",
10 | "build": "node build/build.js"
11 | },
12 | "dependencies": {
13 | "cypress": "^2.1.0",
14 | "dotenv": "^5.0.1",
15 | "npm": "^6.0.0",
16 | "stripe": "^5.5.0",
17 | "vue": "^2.5.2",
18 | "vue-stripe-elements": "^0.2.3"
19 | },
20 | "devDependencies": {
21 | "autoprefixer": "^7.2.6",
22 | "babel-core": "^6.22.1",
23 | "babel-helper-vue-jsx-merge-props": "^2.0.3",
24 | "babel-loader": "^7.1.4",
25 | "babel-plugin-syntax-jsx": "^6.18.0",
26 | "babel-plugin-transform-runtime": "^6.22.0",
27 | "babel-plugin-transform-vue-jsx": "^3.7.0",
28 | "babel-preset-env": "^1.3.2",
29 | "babel-preset-stage-2": "^6.22.0",
30 | "chalk": "^2.3.2",
31 | "copy-webpack-plugin": "^4.5.0",
32 | "css-loader": "^0.28.10",
33 | "extract-text-webpack-plugin": "^3.0.0",
34 | "file-loader": "^1.1.11",
35 | "friendly-errors-webpack-plugin": "^1.6.1",
36 | "html-webpack-plugin": "^2.30.1",
37 | "node-notifier": "^5.1.2",
38 | "optimize-css-assets-webpack-plugin": "^3.2.0",
39 | "ora": "^1.4.0",
40 | "portfinder": "^1.0.13",
41 | "postcss-import": "^11.1.0",
42 | "postcss-loader": "^2.1.1",
43 | "postcss-url": "^7.3.1",
44 | "rimraf": "^2.6.0",
45 | "semver": "^5.3.0",
46 | "shelljs": "^0.7.6",
47 | "uglifyjs-webpack-plugin": "^1.2.2",
48 | "url-loader": "^0.5.8",
49 | "vue-loader": "^13.3.0",
50 | "vue-style-loader": "^3.0.1",
51 | "vue-template-compiler": "^2.5.2",
52 | "webpack": "^3.11.0",
53 | "webpack-bundle-analyzer": "^2.11.1",
54 | "webpack-dev-server": "^2.11.2",
55 | "webpack-merge": "^4.1.2"
56 | },
57 | "engines": {
58 | "node": ">= 6.0.0",
59 | "npm": ">= 3.0.0"
60 | },
61 | "browserslist": [
62 | "> 1%",
63 | "last 2 versions",
64 | "not ie <= 8"
65 | ]
66 | }
67 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {},
14 |
15 | // Various Dev Server settings
16 | host: 'localhost', // can be overwritten by process.env.HOST
17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18 | autoOpenBrowser: false,
19 | errorOverlay: true,
20 | notifyOnErrors: true,
21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22 |
23 |
24 | /**
25 | * Source Maps
26 | */
27 |
28 | // https://webpack.js.org/configuration/devtool/#development
29 | devtool: 'cheap-module-eval-source-map',
30 |
31 | // If you have problems debugging vue-files in devtools,
32 | // set this to false - it *may* help
33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
34 | cacheBusting: true,
35 |
36 | cssSourceMap: true
37 | },
38 |
39 | build: {
40 | // Template for index.html
41 | index: path.resolve(__dirname, '../dist/index.html'),
42 |
43 | // Paths
44 | assetsRoot: path.resolve(__dirname, '../dist'),
45 | assetsSubDirectory: 'static',
46 | assetsPublicPath: '/',
47 |
48 | /**
49 | * Source Maps
50 | */
51 |
52 | productionSourceMap: true,
53 | // https://webpack.js.org/configuration/devtool/#production
54 | devtool: '#source-map',
55 |
56 | // Gzip off by default as many popular static hosts such as
57 | // Surge or Netlify already gzip all static assets for you.
58 | // Before setting to `true`, make sure to:
59 | // npm install --save-dev compression-webpack-plugin
60 | productionGzip: false,
61 | productionGzipExtensions: ['js', 'css'],
62 |
63 | // Run the build command with an extra argument to
64 | // View the bundle analyzer report after build finishes:
65 | // `npm run build --report`
66 | // Set to `true` or `false` to always turn it on or off
67 | bundleAnalyzerReport: process.env.npm_config_report
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
4 |
5 | ## App Description
6 | Welcome to Animal Dose, a Vue web app that displays random animals facts. Users can generate new facts, add comments, and make a donation.
7 |
8 | ## User Experience
9 | A user opens the web app and is presented with an animal name, animal scientific name, animal image, and a fact about that animal. If there are any comments associated with that animal they will display beneath the fact. The user has the ability to add a new comment, change a comment, and delete comment. The user can also make a donation. For a demo video please click [here](https://photos.app.goo.gl/NYflVME8ItgorpVn2)
10 |
11 |
12 |
13 | ## Installation Instructions
14 | Using the app does not require any installation, just visit https://daily-animal-fact.firebaseapp.com/. You are also free to use the source code for both the fronted of this app, located in this repository, and the backend of this app, located in the [backend repository](https://github.com/paulhighum/Daily-Animal-Fact-Backend). To install the backend please visit the other repository. To install the frontend please follow these installation instructions:
15 |
16 | Fork and clone this repository.
17 |
18 | Navigate into daily-animal-fact-frontend
19 |
20 | ### Build Setup
21 |
22 | ```
23 | # install dependencies
24 | npm install
25 |
26 | # serve with hot reload at localhost:8080
27 | npm run dev
28 |
29 | # build for production with minification
30 | npm run build
31 |
32 | # build for production and view the bundle analyzer report
33 | npm run build --report
34 | ```
35 |
36 | Vue: If you need help with Vue visit the [Vue docs](https://vuejs.org/v2/guide/). For a detailed explanation on how vue-cli works, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
37 |
38 | Stripe: In order to use the stripe functionality of this app you will need to create a stripe account [here](https://stripe.com/). From there you will need to click on your dashboard and then find your publishable key and secret key, which should be located under the API menu on the lift hand side. You will then need to include these keys in the code you cloned, the secret key goes in the backend .env file you will need to make and the publishable key goes in the frontend Donation component. You can find the stripe docs [here](https://stripe.com/docs)
39 |
40 |
41 | ## Technologies
42 | Vue.js, JavaScript, HTML, CSS, Stripe
43 |
44 | ## Author
45 | [Paul Highum](https://github.com/paulhighum)
46 |
47 | ## License
48 | MIT
49 |
50 | 
51 |
--------------------------------------------------------------------------------
/src/components/UpdateModal.vue:
--------------------------------------------------------------------------------
1 |
2 |