Skip to content

Commit

Permalink
feat: add webmanifest (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts committed Dec 12, 2019
1 parent bfaa789 commit 67fdc3e
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 5 deletions.
7 changes: 7 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
"name": "inaba-jinja",
"regions": ["hnd1", "sfo1"],
"routes": [
{
"continue": true,
"headers": {
"content-type": "application/manifest+json"
},
"src": ".*\\.webmanifest"
},
{
"continue": true,
"headers": {
Expand Down
23 changes: 23 additions & 0 deletions public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"background_color": "#fafafa",
"description": "因幡神社は因幡はねる様をご祭神としてお祀りする東京都北区赤羽のどこかにある神社です。",
"display": "minimal-ui",
"icons": [
{
"sizes": "192x192",
"src": "/images/favicon-192x192.png",
"type": "image/png"
},
{
"sizes": "512x512",
"src": "/images/favicon-512x512.png",
"type": "image/png"
}
],
"lang": "ja",
"name": "因幡神社",
"scope": "/",
"short_name": "因幡神社",
"start_url": ".",
"theme_color": "#ff5722"
}
8 changes: 4 additions & 4 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"id": "app.open_drawer",
"defaultMessage": "Open drawer"
},
{
"id": "app.title",
"defaultMessage": "Inaba Jinja"
},
{
"id": "app.open_drawer",
"defaultMessage": "Open drawer"
},
{
"id": "home.description"
}
Expand Down
2 changes: 1 addition & 1 deletion src/locales/ja.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app.open_drawer": "メニューを開く",
"app.title": "因幡神社",
"home.description": "因幡神社は因幡はねる様をご祭神としてお祀りする東京都北区赤羽のどこかにある神社です"
"home.description": "因幡神社は東京都北区赤羽のどこかにある神社です。因幡はねる様をご祭神としてお祀りしています"
}
2 changes: 2 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const MyApp: FC<AppProps> = ({ Component, pageProps }) => {
<IntlProvider locale="ja" messages={messages}>
<ThemeProvider theme={theme}>
<Head>
<meta content="#ff5722" name="theme-color" />
<link href="/manifest.webmanifest" rel="manifest" />
<link
href="/images/favicon-192x192.png"
rel="icon"
Expand Down
8 changes: 8 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import Hero from '../components/molecules/Hero'
import Page from '../layouts/Main'

const messages = defineMessages({
description: {
defaultMessage: '',
id: 'home.description'
},
title: {
defaultMessage: 'Inaba Jinja',
id: 'app.title'
Expand Down Expand Up @@ -36,6 +40,10 @@ const Home: NextPage = () => {
<>
<Head>
<title>{intl.formatMessage(messages.title)}</title>
<meta
content={intl.formatMessage(messages.description)}
name="description"
/>
</Head>

<Page hideHeader>
Expand Down

0 comments on commit 67fdc3e

Please sign in to comment.