Skip to content

Commit

Permalink
update to Nuxt v2.7. Possibly fix RSS
Browse files Browse the repository at this point in the history
  • Loading branch information
shentao committed May 27, 2019
1 parent 40a55a3 commit ed90519
Show file tree
Hide file tree
Showing 23 changed files with 6,113 additions and 3,106 deletions.
2 changes: 1 addition & 1 deletion api/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
space: process.env.SPACE,
accessToken: process.env.ACCESS_TOKEN,
host: process.env.HOST,
Expand Down
6 changes: 3 additions & 3 deletions components/Issue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ article.issue
import Story from './Story'
import Library from './Library'
import PlayPodcastButton from './PlayPodcastButton'
import eventBus from '~/helpers/eventBus'
import IssueHeader from '~/components/IssueHeader'
import MarkdownRenderer from '~/components/MarkdownRenderer'
import eventBus from '@/helpers/eventBus'
import IssueHeader from '@/components/IssueHeader'
import MarkdownRenderer from '@/components/MarkdownRenderer'
export default {
components: { Story, Library, PlayPodcastButton, IssueHeader, MarkdownRenderer },
Expand Down
2 changes: 1 addition & 1 deletion components/IssueHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nuxt-link(:to="{ name: 'issues-number', params: { number: issue.issueNumber } }"
</template>

<script>
import { parseDate } from '~/helpers/parsers'
import { parseDate } from '@/helpers/parsers'
export default {
props: {
Expand Down
2 changes: 1 addition & 1 deletion components/PlayPodcastButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ button.button.play-podcast-button
<style lang="sass">
@import 'assets/branding'
.play-podcast-button
.button.play-podcast-button
background-color: $color-green
color: #fff
padding: 5px 20px 5px 5px
Expand Down
2 changes: 1 addition & 1 deletion components/PodcastPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<script>
import ProgressBar from './ProgressBar'
import { mapGetters } from 'vuex'
import eventBus from '~/helpers/eventBus'
import eventBus from '@/helpers/eventBus'
import Icon from '@fortawesome/vue-fontawesome'
export default {
Expand Down
2 changes: 1 addition & 1 deletion components/ProgressBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default {
.podcast-progress
height: 10px
background: linear-gradient(right, lighten($color-green, 5%), darken($color-green, 5%))
background: linear-gradient(to left, lighten($color-green, 5%), darken($color-green, 5%))
pointer-events: none
position: relative
</style>
4 changes: 2 additions & 2 deletions components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</template>

<script>
import SubscribeContent from '~/components/SubscribeContent'
import SubscribeContent from '@/components/SubscribeContent'
export default {
components: { SubscribeContent }
Expand All @@ -30,7 +30,7 @@ export default {
.sidebar-header
font-size: 20px
font-weight: 600
margin: 40px 0 10px
margin: 30px 0 10px
.h1
margin-bottom: 10px
Expand Down
4 changes: 2 additions & 2 deletions components/Story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</template>

<script>
import MarkdownRenderer from '~/components/MarkdownRenderer'
import MarkdownRenderer from '@/components/MarkdownRenderer'
export default {
components: { MarkdownRenderer },
Expand Down Expand Up @@ -69,7 +69,7 @@ export default {
specialTypeStory () {
switch (true) {
case this.tagNames.includes('tweet'):
return () => import('~/components/stories/TweetStory')
return () => import('@/components/stories/TweetStory')
default:
return false
}
Expand Down
13 changes: 11 additions & 2 deletions components/SubscribeContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ div
)
small.small Previously known as Vue.js Newsletter

h2.sidebar-header Or subscribe using
a.button.podcast-subscribe(
href="https://news.vuejs.org/feed.xml"
target="_blank"
rel="noopener"
@click="subscribe"
)
| RSS

h2.sidebar-header Subscribe to the podcast
.podcast-list
a.button.podcast-subscribe(
Expand Down Expand Up @@ -53,7 +62,7 @@ div
rel="noopener"
@click="subscribe"
)
| RSS
| Podcast RSS
</template>

<script>
Expand Down Expand Up @@ -86,7 +95,7 @@ export default {
outline: none
border-color: #42b983
.newsletter-button
.button.newsletter-button
position: absolute
padding: 4px 20px
right: 4px
Expand Down
2 changes: 1 addition & 1 deletion components/stories/TweetStory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<script>
import { Tweet } from 'vue-tweet-embed'
import Spinner from '~/components/Spinner'
import Spinner from '@/components/Spinner'
export default {
components: { Tweet, Spinner },
Expand Down
15 changes: 4 additions & 11 deletions helpers/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const dateOptions = {
timeZone: 'UTC'
}

function flattenIssue (issue) {
export function flattenIssue (issue) {
return {
id: issue.sys.id,
issueNumber: issue.fields.issueNumber,
Expand All @@ -19,7 +19,7 @@ function flattenIssue (issue) {
}
}

function flattenPodcast (podcast) {
export function flattenPodcast (podcast) {
return {
id: podcast.fields.id,
source: podcast.fields.source,
Expand All @@ -29,21 +29,14 @@ function flattenPodcast (podcast) {
}
}

function flattenTag (tag) {
export function flattenTag (tag) {
return {
id: tag.sys.id,
name: tag.fields.name
}
}

function parseDate (publishedOn) {
export function parseDate (publishedOn) {
const date = new Date(publishedOn)
return date.toLocaleString('en-US', dateOptions)
}

module.exports = {
flattenIssue,
flattenPodcast,
flattenTag,
parseDate
}
218 changes: 0 additions & 218 deletions helpers/vuenimate.js

This file was deleted.

Loading

0 comments on commit ed90519

Please sign in to comment.