Skip to content

Commit

Permalink
🎨 Fix code format
Browse files Browse the repository at this point in the history
  • Loading branch information
k-urtica committed May 9, 2020
1 parent 483f59e commit 34d0452
Show file tree
Hide file tree
Showing 19 changed files with 154 additions and 154 deletions.
10 changes: 5 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ module.exports = {
root: true,
env: {
browser: true,
node: true
node: true,
},
parserOptions: {
parser: "babel-eslint"
parser: "babel-eslint",
},
extends: [
"@nuxtjs",
"prettier",
"prettier/vue",
"plugin:prettier/recommended",
"plugin:nuxt/recommended"
"plugin:nuxt/recommended",
],
plugins: ["prettier"],
rules: {
"vue/max-attributes-per-line": "off"
}
"vue/max-attributes-per-line": "off",
},
};
10 changes: 5 additions & 5 deletions api/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ const app = Express();
const newsApi = axios.create({
headers: {
common: {
Authorization: "Bearer " + process.env.API_KEY
}
}
Authorization: "Bearer " + process.env.API_KEY,
},
},
});

// ε…±ι€šγƒ˜γƒƒγƒ€γƒΌ
app.use((req, res, next) => {
res.set({
"Cache-Control": "public, max-age=300, s-maxage=7200",
"Content-Type": "application/json; charset=utf-8"
"Content-Type": "application/json; charset=utf-8",
});
next();
});
Expand All @@ -30,7 +30,7 @@ app.get("/api/news", async (req, res, next) => {
"entertainment",
"sports",
"science",
"health"
"health",
];
const response = [];
try {
Expand Down
54 changes: 27 additions & 27 deletions components/common/TheDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
<template v-slot:activator="{ on }">
<v-switch
v-model="darkMode"
v-on="on"
color="warning"
class="mx-auto"
hide-details
inset
dense
validate-on-blur
v-on="on"
/>
</template>
<span class="caption">γƒ†γƒΌγƒžεˆ‡γ‚Šζ›Ώγˆ</span>
Expand Down Expand Up @@ -103,87 +103,87 @@ const ShareDialog = () => import("~/components/share/ShareDialog.vue");
export default {
components: {
ShareDialog
ShareDialog,
},
data: () => ({
drawerItems: [
{
title: "γƒˆγƒƒγƒ—γƒ‹γƒ₯γƒΌγ‚Ή",
icon: "mdi-newspaper-variant-multiple-outline",
link: { name: "index" }
link: { name: "index" },
},
{
title: "γƒ˜γƒƒγƒ‰γƒ©γ‚€γƒ³",
icon: "mdi-fire",
link: {
name: "headline-category",
params: { category: "general" }
}
}
params: { category: "general" },
},
},
],
headlineCategory: [
{
title: "γƒ†γ‚―γƒŽγƒ­γ‚ΈγƒΌ",
icon: "mdi-laptop-mac",
link: {
name: "headline-category",
params: { category: "technology" }
}
params: { category: "technology" },
},
},
{
title: "ビジネス",
icon: "mdi-domain",
link: {
name: "headline-category",
params: { category: "business" }
}
params: { category: "business" },
},
},
{
title: "γ‚¨γƒ³γ‚ΏγƒΌγƒ†γ‚€γƒ‘γƒ³γƒˆ",
icon: "mdi-filmstrip",
link: {
name: "headline-category",
params: { category: "entertainment" }
}
params: { category: "entertainment" },
},
},
{
title: "スポーツ",
icon: "mdi-soccer",
link: {
name: "headline-category",
params: { category: "sports" }
}
params: { category: "sports" },
},
},
{
title: "ァむエンス",
icon: "mdi-atom",
link: {
name: "headline-category",
params: { category: "science" }
}
params: { category: "science" },
},
},
{
title: "γƒ˜γƒ«γ‚Ή",
icon: "mdi-heart-circle-outline",
link: {
name: "headline-category",
params: { category: "health" }
}
}
params: { category: "health" },
},
},
],
bottomItems: [
{
title: "Twitter",
link: "https://twitter.com/intent/follow?screen_name=k_urtica",
icon: "mdi-twitter"
icon: "mdi-twitter",
},
{
title: "GitHub Repo",
link: "https://github.com/kiysi/nuxt-news-app",
icon: "mdi-github-circle"
}
icon: "mdi-github-circle",
},
],
darkMode: false
darkMode: false,
}),
computed: {
drawer: {
Expand All @@ -192,13 +192,13 @@ export default {
},
set(val) {
this.$store.commit("setDrawer", val);
}
}
},
},
},
watch: {
darkMode() {
this.$vuetify.theme.dark = !this.$vuetify.theme.dark;
}
}
},
},
};
</script>
6 changes: 3 additions & 3 deletions components/common/TheHeader.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-app-bar class="header-bar" flat dense app clipped-left>
<v-app-bar-nav-icon @click.stop="drawer" dark aria-label="drawer" />
<v-app-bar-nav-icon dark aria-label="drawer" @click.stop="drawer" />
<v-toolbar-title>
<nuxt-link :to="{ name: 'index' }">
<h1>NUXTΓ—NEWS APP</h1>
Expand All @@ -14,8 +14,8 @@ export default {
methods: {
drawer() {
this.$store.commit("setDrawer", !this.$store.state.drawer);
}
}
},
},
};
</script>

Expand Down
10 changes: 5 additions & 5 deletions components/common/TheScrollTopButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<v-btn
v-show="isShow"
v-scroll="onScroll"
@click="$vuetify.goTo(0, options)"
fixed
bottom
fab
right
color="indigo lighten-1"
title="γƒˆγƒƒγƒ—γ«γ‚Ήγ‚―γƒ­γƒΌγƒ«γ—γΎγ™"
@click="$vuetify.goTo(0, options)"
>
<v-icon color="white">mdi-chevron-up</v-icon>
</v-btn>
Expand All @@ -20,9 +20,9 @@
export default {
data: () => ({
options: {
duration: 600
duration: 600,
},
isShow: false
isShow: false,
}),
methods: {
onScroll() {
Expand All @@ -31,7 +31,7 @@ export default {
} else {
this.isShow = false;
}
}
}
},
},
};
</script>
12 changes: 6 additions & 6 deletions components/main/NewsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ import ShareButtons from "~/components/share/ShareButtons.vue";
export default {
components: {
ShareButtons
ShareButtons,
},
props: {
news: {
type: Object,
default: null,
required: true
}
required: true,
},
},
computed: {
...mapState(["headlineNewsList"])
...mapState(["headlineNewsList"]),
},
methods: {
getFormtedDate(date) {
Expand All @@ -60,8 +60,8 @@ export default {
} else {
return require("@/assets/img/no-image.png");
}
}
}
},
},
};
</script>

Expand Down
12 changes: 6 additions & 6 deletions components/parts/SnackBar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-snackbar v-model="snackBar" :timeout="3000" color="success">
{{ message }}
<v-btn @click="snackBar = false" text>ι–‰γ˜γ‚‹</v-btn>
<v-btn text @click="snackBar = false">ι–‰γ˜γ‚‹</v-btn>
</v-snackbar>
</template>

Expand All @@ -11,8 +11,8 @@ export default {
message: {
type: String,
default: "",
required: true
}
required: true,
},
},
computed: {
snackBar: {
Expand All @@ -21,8 +21,8 @@ export default {
},
set(val) {
this.$store.commit("setSnackBar", val);
}
}
}
},
},
},
};
</script>
Loading

0 comments on commit 34d0452

Please sign in to comment.