Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ module.exports = {
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
parser: '@babel/eslint-parser'
}
}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
presets: [
'@vue/app'
'@vue/cli-plugin-babel/preset'
]
}
36 changes: 19 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
"name": "canmore-brewing",
"version": "0.1.0",
"private": true,
"license": "MIT",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"data": "node src/scripts/getJSONStoreData.js"
},
"dependencies": {
"@babel/cli": "^7.10.5",
"@babel/core": "^7.12.9",
"@babel/node": "^7.16.8",
"@babel/polyfill": "^7.10.4",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^6.1.0",
"@fortawesome/free-solid-svg-icons": "^6.1.0",
"@fortawesome/vue-fontawesome": "^2.0.6",
"@tailwindcss/typography": "^0.2.0",
"axios": "^0.26.1",
"dedent": "^0.7.0",
"marked": "^4.0.12",
"moment": "^2.29.1",
Expand All @@ -39,32 +38,35 @@
"vuex": "^3.6.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.4.1",
"@vue/cli-plugin-eslint": "^4.5.11",
"@vue/cli-plugin-pwa": "^4.5.11",
"@vue/cli-plugin-unit-jest": "^4.5.16",
"@vue/cli-service": "^4.4.6",
"@vue/eslint-config-standard": "^5.1.2",
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.3",
"@vue/cli-plugin-eslint": "~5.0.3",
"@vue/cli-plugin-pwa": "~5.0.3",
"@vue/cli-plugin-unit-jest": "~5.0.3",
"@vue/cli-service": "~5.0.3",
"@vue/eslint-config-standard": "^6.1.0",
"@vue/test-utils": "^1.1.3",
"@vue/vue2-jest": "^27.0.0-alpha.3",
"babel-core": "^6.26.3",
"babel-eslint": "^10.1.0",
"babel-jest": "^27.5.1",
"core-js": "^3.9.1",
"csv-parse": "^4.16.0",
"dotenv": "^8.2.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.3.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^7.15.0",
"eslint-plugin-vue": "^8.0.3",
"jest": "^27.1.0",
"lint-staged": "^12.3.7",
"r2": "^2.0.1",
"vue-template-compiler": "^2.6.12"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
],
"license": "MIT"
}
16 changes: 2 additions & 14 deletions src/assets/content/beers.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,5 @@
"description": "Get your daily fix of Outsider Cider - for the outsider in you. Crisp apple, tropical fruit, a hint of tartness and a dry finish. Just what the doctor ordered. Made with 100% Canadian apples. \n\n(It’s also gluten-free and vegan.)"
}
],
"seasonal": [
{
"bg": "#FFa585",
"logo": "https://res.cloudinary.com/canmore-brewing-company/image/upload/v1627064952/beers/logos/PitStop_LOGO_150dpi_anhalq.png",
"name": "Pit Stop Phuzzy Peach Sour",
"srm": 4,
"can": "https://res.cloudinary.com/canmore-brewing-company/image/upload/v1627064622/beers/cans/Pit-stop-sour-NO-BG_282x674_bqn7ln.png",
"abv": 5.2,
"textColour": "black",
"ibu": 36,
"description": "There are NO peaches in this beer. The Philly Sour yeast, which was recently found on the bark of a dogwood tree in West Philadelphia, is responsible for the wonderful peach notes in this beer. The addition of Sabro hops makes the magic complete - giving us the incredibly juicy Phuzzy Peach Sour."
}
]
}
"seasonal": []
}
4 changes: 2 additions & 2 deletions src/assets/content/notification.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enabled": true,
"title": "We are open for indoor or patio seating. Keep an eye out for upcoming concert events!",
"enabled": false,
"title": "Join us for a drink either inside or on our heated patio.",
"subtitle": [],
"content": "Shop our online store for beer or clothing.",
"button": [
Expand Down
2 changes: 1 addition & 1 deletion src/components/Beer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<script>
import Marked from '@/components/Marked.vue'
export default {
name: 'Beer',
name: 'BeerItem',
components: { Marked },
props: {
title: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<script>
export default {
name: 'Header',
name: 'PageHeader',
props: {
title: {
required: true,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Marked.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import sanitize from 'sanitize-html'

export default {
name: 'Marked',
name: 'MarkedContainer',
props: {
dedent: {
type: Boolean,
Expand Down
16 changes: 2 additions & 14 deletions src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<script>
export default {
name: 'Navbar',
name: 'NavBar',
data () {
return {
items: [
Expand All @@ -65,32 +65,20 @@
el: '#tasting-room'
}
},
{
name: 'Food',
target: {
el: '#food'
}
},
{
name: 'Tours',
target: {
el: '#tours'
}
},
{
name: 'Social',
target: {
el: '#social'
}
},
{
name: 'Events',
target: {
el: '#events'
}
},
{
name: 'Our Beers',
name: 'Beers',
target: {
el: '#our-beers'
}
Expand Down
11 changes: 7 additions & 4 deletions src/components/sections/Contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@
</template>

<script>
import { get } from 'r2'
import axios from 'axios'
// import { get } from 'r2'
import ClientOnly from '../client-only.js'

import MapMarker from '../MapMarker'
Expand All @@ -133,7 +134,7 @@
import hours from '../../assets/content/hours.json'

export default {
name: 'Contact',
name: 'ContactPage',
components: {
ClientOnly,
MapMarker,
Expand All @@ -155,7 +156,7 @@
? 'https://thingproxy.freeboard.io/fetch/https://maps.googleapis.com/'
: '/cors/'

const place = await get(
const placeReq = await axios.get(
// 'https://thingproxy.freeboard.io/fetch/' +
proxy +
'maps/api/place/details/json?' +
Expand All @@ -164,7 +165,9 @@
// Specifies the place_id to get the hours from
'&place_id=ChIJwRQhBJPFcFMRdW4gwcwgaRY' +
'&fields=opening_hours'
).json
)

const place = placeReq.data

if (place.status === 'OK') {
this.days = place.result.opening_hours.weekday_text
Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/Events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import HeaderTitle from '../Header'

export default {
name: 'Events',
name: 'EventsSection',
components: {
HeaderTitle
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/Food.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
import HeaderTitle from '../Header'

export default {
name: 'Food',
name: 'FoodSection',
components: {
HeaderTitle
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/sections/Landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@
</template>

<script>
import { enabled } from '../../assets/content/notification.json'
import notification from '../../assets/content/notification.json'

export default {
name: 'LandingPage',
data () {
return {
enabled,
enabled: notification.enabled,
buttons: [
{
text: 'Tasting Room',
Expand Down
5 changes: 3 additions & 2 deletions src/components/sections/Notice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
</template>

<script>
import { enabled, colour, title, subtitle, content, button_status as buttonStatus, button, url } from '../../assets/content/notification.json'
import notification from '../../assets/content/notification.json'
const { enabled, colour, title, subtitle, content, button_status: buttonStatus, button, url } = notification

export default {
name: 'Notice',
name: 'NoticeElement',
data () {
return {
currentTime: (new Date()).getTime(),
Expand Down
3 changes: 2 additions & 1 deletion src/components/sections/OurBeers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
import Beer from '../Beer'
import HeaderTitle from '../Header'

import { core, seasonal } from '../../assets/content/beers.json'
import beers from '../../assets/content/beers.json'
const { core, seasonal } = beers

// TODO: add fallback if we have no seasonal beers

Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/Social.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
// TODO: switch to grid for posts layout

export default {
name: 'Social',
name: 'SocialFeed',
components: {
HeaderTitle,
SocialPost,
Expand Down
2 changes: 1 addition & 1 deletion src/components/sections/Tours.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
import HeaderTitle from '../Header'

export default {
name: 'Tours',
name: 'ToursSection',
components: {
HeaderTitle
},
Expand Down
30 changes: 17 additions & 13 deletions src/components/vue-instagram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</template>

<script>
// import axios from 'axios'
import { get } from 'r2'
import axios from 'axios'
// import { get } from 'r2'

export default {
props: {
Expand Down Expand Up @@ -73,22 +73,26 @@
methods: {
async getUserFeed () {
this.loading = true
const req = await get(`https://graph.instagram.com/me/media?access_token=${this.token}&fields=${this.fields}`)
try {
const req = await axios.get(`https://graph.instagram.com/me/media?access_token=${this.token}&fields=${this.fields}`)

const response = await req.response
const data = await req.json
// const response = await req.response
const data = await req.data

this.loading = false
if (response.status === 400) this.error = response.error.message
if (response.status === 200) {
for (const n in data.data) {
if (this.mediatypes.includes(data.data[n].media_type)) {
this.feeds.push(data.data[n])
if (this.feeds.length >= this.count) {
return
this.loading = false

if (req.status === 200) {
for (const n in data.data) {
if (this.mediatypes.includes(data.data[n].media_type)) {
this.feeds.push(data.data[n])
if (this.feeds.length >= this.count) {
return
}
}
}
}
} catch (err) {
this.error = err.message
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/getJSONStoreData.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ const main = async () => {
}

// Run the main function.
return main()
main()
4 changes: 2 additions & 2 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import Contact from '../components/sections/Contact'
import CopyFooter from '../components/sections/CopyFooter'

import { enabled } from '../assets/content/notification.json'
import notification from '../assets/content/notification.json'

// TODO: add an awards section

Expand All @@ -58,7 +58,7 @@
},
data () {
return {
enabled
enabled: notification.enabled
}
}
}
Expand Down
Loading