├── .nvmrc ├── tool ├── dummy.json ├── .gitignore ├── downloads │ └── .gitignore ├── composer.json └── README.md ├── .node-version ├── .nuxtignore ├── .dockerignore ├── .prettierrc ├── plugins ├── vuetify.ts └── chartjs-adapter-dayjs.ts ├── .eslintignore ├── static ├── google1ce98b9bcf81e6d4.html ├── flow.png ├── icon.png ├── line.png ├── ogp.png ├── github.png ├── .well-known │ └── pki-validation │ │ └── 06c9242ba3a94dc1e48d8ea4ad24b59c.txt ├── facebook.png ├── favicon.ico ├── flow_sp.png ├── twitter.png ├── youtube.png ├── ogp-agency.png ├── ogp │ ├── ogp-agency.png │ ├── ogp-number-of-tested.png │ ├── ogp-details-of-confirmed-cases.png │ ├── ogp-number-of-confirmed-cases.png │ ├── ogp-attributes-of-confirmed-cases.png │ ├── ogp-predicted-number-of-toei-subway-passengers.png │ ├── ogp-number-of-reports-to-covid19-consultation-desk.png │ └── ogp-number-of-reports-to-covid19-telephone-advisory-center.png ├── flow │ ├── sp │ │ ├── sp_flow_02@2x.png │ │ ├── sp_flow_03@2x.png │ │ ├── sp_flow_04@2x.png │ │ ├── sp_flow_06@2x.png │ │ ├── sp_flow_01_01@2x.png │ │ ├── sp_flow_01_02@2x.png │ │ ├── sp_flow_05_bg@2x.png │ │ ├── sp_flow_06_01@2x.png │ │ ├── sp_flow_06_02@2x.png │ │ ├── sp_flow_06_03@2x.png │ │ ├── sp_flow_04_nav@2x.png │ │ ├── sp_flow_tel_01@2x.png │ │ ├── sp_flow_tel_03@2x.png │ │ ├── sp_flow_06_nav_01@2x.png │ │ ├── sp_flow_06_nav_02@2x.png │ │ ├── sp_flow_06_nav_03@2x.png │ │ ├── sp_flow_06_nav_04@2x.png │ │ └── sp_flow_01_02_03_nav@2x.png │ ├── arrow_forward-24px.svg │ ├── check_circle-24px.svg │ ├── hotel-24px.svg │ ├── accessibility-24px.svg │ ├── house-24px.svg │ ├── flow_arrow.svg │ ├── directions_walk-24px.svg │ ├── phone-24px.svg │ ├── apartment-24px.svg │ ├── pregnant_woman-24px.svg │ ├── arrow_green.svg │ ├── sentiment_very_dissatisfied-24px.svg │ ├── arrow_downward.svg │ └── accessible-24px.svg ├── ogp-number-of-tested.png ├── apple-touch-icon-precomposed.png ├── ogp-number-of-confirmed-cases.png ├── ogp-details-of-confirmed-cases.png ├── ogp-attributes-of-confirmed-cases.png ├── ogp-predicted-number-of-toei-subway-passengers.png ├── ogp-number-of-reports-to-covid19-consultation-desk.png ├── ogp-number-of-reports-to-covid19-telephone-advisory-center.png ├── _redirects ├── selectmenu.svg ├── parent.svg ├── printer.svg ├── covid.svg ├── data │ ├── 130001_tokyo_covid19_combined_telephone_advice_center.csv │ ├── 130001_tokyo_covid19_call_center.csv │ └── 130001_tokyo_covid19_patients.csv ├── earth.svg ├── vaccine.svg └── youtube.svg ├── netlify.toml ├── types ├── shims-sfc.d.ts ├── svg-shim.d.ts ├── shims-vue.d.ts └── chart.d.ts ├── utils ├── urls.ts ├── tab-event-bus.ts ├── card-event-bus.ts ├── vueScrollTo.ts ├── formatTestedCases.ts ├── formatGraph.ts ├── monitoringStatusValueFormatters.ts ├── i18nUtils.ts ├── formatTable.ts ├── colors.ts ├── formatConfirmedCases.ts ├── formatDayBeforeRatio.ts └── formatDate.ts ├── pages ├── index.vue ├── README.md ├── print │ └── flow.vue ├── parent.vue ├── worker.vue ├── flow.vue └── link.vue ├── layouts ├── error.vue ├── README.md ├── error.i18n.json └── print.vue ├── components ├── README.md ├── cards │ ├── AgencyCard.vue │ ├── ConfirmedCasesNumberCard.vue │ ├── ConfirmedCasesDetailsCard.vue │ ├── TelephoneAdvisoryReportsNumberCard.vue │ ├── ConsultationDeskReportsNumberCard.vue │ ├── TestedNumberCard.vue │ ├── ConfirmedCasesAttributesCard.vue │ └── MetroCard.vue ├── OpenDataLink.vue ├── flow │ ├── FlowPcAdvisory2.vue │ ├── FlowSpHospitalized.vue │ ├── FlowPcHospitalized.vue │ ├── FlowSp.vue │ ├── FlowPcPcr.vue │ ├── FlowPcNotRequired.vue │ ├── FlowPcRequired.vue │ ├── FlowPcSuspect.vue │ ├── FlowSpAdvisory.vue │ └── FlowPcAdvisory.vue ├── SvgCard.vue ├── PrinterButton.vue ├── NumberDisplay.vue ├── DataViewBasicInfoPanel.vue ├── DataSelector.vue ├── NoScript.vue ├── TextCard.vue ├── PageHeader.vue ├── StaticInfo.vue ├── MetroBarChart.vue ├── AppLink.vue ├── LanguageSelector.vue ├── DataViewTable.vue ├── DataTable.vue └── ScrollableChart.vue ├── Dockerfile ├── .editorconfig ├── .babelrc ├── assets ├── README.md ├── global.scss ├── variables.scss └── url_list.json ├── docker-compose.yml ├── .vscode ├── settings.json └── cspell.json ├── jest.config.js ├── .github ├── workflows │ ├── reviewdog.yml │ ├── build.yml │ ├── deploy.yml │ ├── staging.yml │ ├── screenshot.yml │ ├── develop.yml │ └── ogp_builder.yml ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── IMPROVE_SUGGESTIONS.md │ └── BUG_REPORT.md ├── CODE_OF_CONDUCT_ZH_TW.md ├── CODE_OF_CONDUCT.md ├── CODE_OF_CONDUCT_KO.md ├── CODE_OF_CONDUCT_EN.md ├── CODE_OF_CONDUCT_VI.md ├── CODE_OF_CONDUCT_ES.md ├── CONTRIBUTING_ZH_TW.md ├── CONTRIBUTING_KO.md ├── CONTRIBUTING.md ├── CONTRIBUTING_ES.md ├── CONTRIBUTING_EN.md └── CONTRIBUTING_VI.md ├── .eslintrc ├── ui-test ├── screenshot.py └── ogp_screenshot.py ├── tsconfig.json ├── bin └── cp_data.sh ├── forkedSites.md ├── LICENSE.txt ├── data ├── metro.json └── agency.json ├── README_ZH_CN.md ├── README_ZH_TW.md ├── README_KO.md ├── README_VI.md ├── .gitignore ├── README_ES.md ├── README_EN.md ├── README.md ├── package.json └── nuxt-i18n.config.ts /.nvmrc: -------------------------------------------------------------------------------- 1 | 14.16.0 2 | -------------------------------------------------------------------------------- /tool/dummy.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 14.16.0 2 | -------------------------------------------------------------------------------- /tool/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | -------------------------------------------------------------------------------- /.nuxtignore: -------------------------------------------------------------------------------- 1 | ./components/flow 2 | -------------------------------------------------------------------------------- /tool/downloads/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | node_modules 3 | .nuxt 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true 4 | } 5 | -------------------------------------------------------------------------------- /plugins/vuetify.ts: -------------------------------------------------------------------------------- 1 | import '@mdi/font/css/materialdesignicons.css' 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .nuxt/ 2 | dist/ 3 | node_modules/ 4 | static/ 5 | assets/ 6 | -------------------------------------------------------------------------------- /static/google1ce98b9bcf81e6d4.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google1ce98b9bcf81e6d4.html -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [[redirects]] 2 | from = "/*" 3 | to = "/404.html" 4 | status = 404 5 | -------------------------------------------------------------------------------- /static/flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow.png -------------------------------------------------------------------------------- /static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/icon.png -------------------------------------------------------------------------------- /static/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/line.png -------------------------------------------------------------------------------- /static/ogp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp.png -------------------------------------------------------------------------------- /static/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/github.png -------------------------------------------------------------------------------- /static/.well-known/pki-validation/06c9242ba3a94dc1e48d8ea4ad24b59c.txt: -------------------------------------------------------------------------------- 1 | 5b3416de8c02d5eb7669889d692d5184 -------------------------------------------------------------------------------- /static/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/facebook.png -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/flow_sp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow_sp.png -------------------------------------------------------------------------------- /static/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/twitter.png -------------------------------------------------------------------------------- /static/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/youtube.png -------------------------------------------------------------------------------- /static/ogp-agency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-agency.png -------------------------------------------------------------------------------- /types/shims-sfc.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /types/svg-shim.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.svg' { 2 | const content: any 3 | export default content 4 | } 5 | -------------------------------------------------------------------------------- /static/ogp/ogp-agency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-agency.png -------------------------------------------------------------------------------- /utils/urls.ts: -------------------------------------------------------------------------------- 1 | export function isExternal(path: string): boolean { 2 | return /^https?:\/\//.test(path) 3 | } 4 | -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_02@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_03@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_04@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_04@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06@2x.png -------------------------------------------------------------------------------- /static/ogp-number-of-tested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-number-of-tested.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_01_01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_01_01@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_01_02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_01_02@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_05_bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_05_bg@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06_01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06_01@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06_02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06_02@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06_03@2x.png -------------------------------------------------------------------------------- /static/ogp/ogp-number-of-tested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-number-of-tested.png -------------------------------------------------------------------------------- /utils/tab-event-bus.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | export const EventBus = new Vue() 3 | export const TOGGLE_EVENT = 'TOGGLE_TAB' 4 | -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_04_nav@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_04_nav@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_tel_01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_tel_01@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_tel_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_tel_03@2x.png -------------------------------------------------------------------------------- /utils/card-event-bus.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | export const EventBus = new Vue() 3 | export const TOGGLE_EVENT = 'TOGGLE_DETAILS' 4 | -------------------------------------------------------------------------------- /static/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06_nav_01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06_nav_01@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06_nav_02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06_nav_02@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06_nav_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06_nav_03@2x.png -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_06_nav_04@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_06_nav_04@2x.png -------------------------------------------------------------------------------- /static/ogp-number-of-confirmed-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-number-of-confirmed-cases.png -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /static/flow/sp/sp_flow_01_02_03_nav@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/flow/sp/sp_flow_01_02_03_nav@2x.png -------------------------------------------------------------------------------- /static/ogp-details-of-confirmed-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-details-of-confirmed-cases.png -------------------------------------------------------------------------------- /layouts/error.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /static/ogp-attributes-of-confirmed-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-attributes-of-confirmed-cases.png -------------------------------------------------------------------------------- /static/ogp/ogp-details-of-confirmed-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-details-of-confirmed-cases.png -------------------------------------------------------------------------------- /static/ogp/ogp-number-of-confirmed-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-number-of-confirmed-cases.png -------------------------------------------------------------------------------- /static/ogp/ogp-attributes-of-confirmed-cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-attributes-of-confirmed-cases.png -------------------------------------------------------------------------------- /static/ogp-predicted-number-of-toei-subway-passengers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-predicted-number-of-toei-subway-passengers.png -------------------------------------------------------------------------------- /static/ogp-number-of-reports-to-covid19-consultation-desk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-number-of-reports-to-covid19-consultation-desk.png -------------------------------------------------------------------------------- /static/ogp/ogp-predicted-number-of-toei-subway-passengers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-predicted-number-of-toei-subway-passengers.png -------------------------------------------------------------------------------- /static/ogp/ogp-number-of-reports-to-covid19-consultation-desk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-number-of-reports-to-covid19-consultation-desk.png -------------------------------------------------------------------------------- /static/ogp-number-of-reports-to-covid19-telephone-advisory-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp-number-of-reports-to-covid19-telephone-advisory-center.png -------------------------------------------------------------------------------- /static/ogp/ogp-number-of-reports-to-covid19-telephone-advisory-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stop-COVID19-Nagano/covid19/HEAD/static/ogp/ogp-number-of-reports-to-covid19-telephone-advisory-center.png -------------------------------------------------------------------------------- /tool/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "phpoffice/phpspreadsheet": "^1.10", 4 | "nesbot/carbon": "^2.30", 5 | "ext-json": "*", 6 | "tightenco/collect": "^6.17" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /types/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { NuxtI18nSeo } from 'nuxt-i18n/types/vue' 3 | 4 | declare module 'vue/types/vue' { 5 | interface Vue { 6 | $nuxtI18nSeo(): NuxtI18nSeo 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /components/README.md: -------------------------------------------------------------------------------- 1 | # COMPONENTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | The components directory contains your Vue.js Components. 6 | 7 | _Nuxt.js doesn't supercharge these components._ 8 | -------------------------------------------------------------------------------- /tool/README.md: -------------------------------------------------------------------------------- 1 | # Need 2 | 3 | - php 7.x 4 | - composer 5 | 6 | # Usage 7 | 8 | - download source xlsx files to `downloads` dir 9 | - composer install 10 | - php convert.php 11 | - will be update data.json to {project_dir}/data/data.json 12 | 13 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14.16-alpine 2 | 3 | WORKDIR /app 4 | 5 | COPY package.json yarn.lock ./ 6 | 7 | RUN apk --no-cache add curl 8 | RUN yarn install 9 | 10 | COPY . ./app 11 | 12 | EXPOSE 3000 13 | ENV HOST 0.0.0.0 14 | 15 | CMD ["yarn", "dev"] 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "test": { 4 | "presets": [ 5 | [ 6 | "@babel/preset-env", 7 | { 8 | "targets": { 9 | "node": "current" 10 | } 11 | } 12 | ] 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Application Layouts. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts). 8 | -------------------------------------------------------------------------------- /pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. 4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application. 5 | 6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing). 7 | -------------------------------------------------------------------------------- /utils/vueScrollTo.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * v-scroll-to完了時のcallback 3 | * ページ内リンクであることを前提に、URLにハッシュを付与する 4 | */ 5 | export const onDoneScroll = (element: Element) => { 6 | const elementHasId = typeof element.id !== 'undefined' 7 | if (elementHasId) { 8 | history.pushState(null, '', `#${element.id}`) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /static/flow/arrow_forward-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/flow/check_circle-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /assets/README.md: -------------------------------------------------------------------------------- 1 | # ASSETS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked). 8 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | app: 4 | container_name: covid19 5 | build: 6 | context: . 7 | dockerfile: Dockerfile 8 | tty: true 9 | ports: 10 | - 3000:3000 11 | volumes: 12 | - .:/app 13 | - node_modules:/app/node_modules 14 | volumes: 15 | node_modules: {} 16 | -------------------------------------------------------------------------------- /assets/global.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | box-sizing: border-box; 3 | } 4 | 5 | body { 6 | background-color: $gray-5; 7 | } 8 | 9 | img { 10 | max-width: 100%; 11 | height: auto; 12 | vertical-align: bottom; 13 | } 14 | 15 | .clearfix { 16 | &:after { 17 | content: ""; 18 | display: block; 19 | clear: both; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /static/_redirects: -------------------------------------------------------------------------------- 1 | https://stop-covid19-nagano.netlify.com/* https://nagano.stopcovid19.jp/:splat 301! 2 | http://stop-covid19-nagano.netlify.com/* http://nagano.stopcovid19.jp/:splat 301! 3 | https://stop-covid19-nagano.netlify.app/* https://nagano.stopcovid19.jp/:splat 301! 4 | http://stop-covid19-nagano.netlify.app/* http://nagano.stopcovid19.jp/:splat 301! 5 | -------------------------------------------------------------------------------- /pages/print/flow.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 17 | -------------------------------------------------------------------------------- /static/selectmenu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /static/flow/hotel-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.renderControlCharacters": true, 3 | "editor.formatOnSave": false, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll.eslint": true 6 | }, 7 | "eslint.format.enable": true, 8 | "eslint.packageManager": "yarn", 9 | "eslint.workingDirectories": ["./"], 10 | "eslint.validate": [ 11 | "javascript", 12 | "vue" 13 | ] 14 | } -------------------------------------------------------------------------------- /.vscode/cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1", 3 | "language": "en", 4 | "words": [ 5 | "asynciterable", 6 | "chartjs", 7 | "covid", 8 | "datasets", 9 | "esnext", 10 | "fullhuman", 11 | "interop", 12 | "mixins", 13 | "nullish", 14 | "nuxt", 15 | "nuxtjs", 16 | "precomposed", 17 | "purgecss", 18 | "querents", 19 | "tightenco", 20 | "vuetify" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /static/flow/accessibility-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/flow/house-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/parent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | moduleNameMapper: { 3 | '^@/(.*)$': '/$1', 4 | '^~/(.*)$': '/$1', 5 | '^vue$': 'vue/dist/vue.common.js' 6 | }, 7 | moduleFileExtensions: ['js', 'vue', 'json'], 8 | transform: { 9 | '^.+\\.js$': 'babel-jest', 10 | '.*\\.(vue)$': 'vue-jest' 11 | }, 12 | collectCoverage: true, 13 | collectCoverageFrom: [ 14 | '/components/**/*.vue', 15 | '/pages/**/*.vue' 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /components/cards/AgencyCard.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 22 | -------------------------------------------------------------------------------- /static/flow/flow_arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/reviewdog.yml: -------------------------------------------------------------------------------- 1 | name: reviewdog 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - development 7 | 8 | jobs: 9 | eslint: 10 | name: check_eslint_error 11 | runs-on: ubuntu-18.04 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: eslint review 15 | uses: reviewdog/action-eslint@v1 16 | with: 17 | github_token: ${{ secrets.github_token }} 18 | reporter: github-pr-check 19 | eslint_flags: './**/*.{vue,ts,js}' 20 | -------------------------------------------------------------------------------- /static/flow/directions_walk-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ## 👏 解決する issue / Resolved Issues 5 | - close #0 6 | - close #0 7 | 8 | ## 📝 関連する issue / Related Issues 9 | - #0 10 | - #0 11 | 12 | ## ⛏ 変更内容 / Details of Changes 13 | 14 | 15 | - xxxxxx 16 | - xxx 17 | 18 | ## 📸 スクリーンショット / Screenshots 19 | 20 | 21 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "eslint-plugin-tsdoc" 4 | ], 5 | "extends": [ 6 | "@nuxtjs/eslint-config-typescript", 7 | "prettier", 8 | "plugin:prettier/recommended" 9 | ], 10 | "rules": { 11 | "vue/max-attributes-per-line": "off", 12 | "vue/html-self-closing": ["error", { 13 | "html": { 14 | "void": "always" 15 | } 16 | }], 17 | "prettier/prettier": [ 18 | "error", { 19 | "semi": false, 20 | "singleQuote": true 21 | } 22 | ], 23 | "tsdoc/syntax": "error" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /static/flow/phone-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui-test/screenshot.py: -------------------------------------------------------------------------------- 1 | from selenium import webdriver 2 | import os 3 | 4 | os.mkdir('screenshots') 5 | 6 | SIZES = [[320,480],[375,812],[768,1024],[1024,768],[1920,1080]] 7 | PATHS = ['/', '/about'] 8 | BROWSERS = ['Chrome', 'Firefox'] 9 | 10 | for browser in BROWSERS: 11 | driver = getattr(webdriver, browser)() 12 | for size in SIZES: 13 | driver.set_window_size(size[0], size[1]) 14 | for path in PATHS: 15 | driver.get("http://localhost:8000"+path) 16 | driver.save_screenshot('screenshots/'+browser+'_'+str(size[0])+'x'+str(size[1])+'_'+path.replace('/', '_')+'.png') 17 | -------------------------------------------------------------------------------- /static/flow/apartment-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/flow/pregnant_woman-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /components/OpenDataLink.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 22 | 23 | 31 | -------------------------------------------------------------------------------- /static/flow/arrow_green.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/IMPROVE_SUGGESTIONS.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: '改善提案 / Improvement Suggestions' 3 | about: '「こうするともっとよくなる」といったWebサイトへの提案はこちら' 4 | labels: enhancement 5 | --- 6 | 7 | ## 改善詳細 / Details of Improvement 8 | - xxxx(できるだけ簡潔に/as concise as possible) 9 | 10 | ## スクリーンショット / Screenshot 11 | 12 | 13 | 14 | ## 期待する見せ方・挙動 / Expected behavior 15 | - xxxx(できるだけ簡潔に/as concise as possible) 16 | 17 | ## 動作環境・ブラウザ / Environment 18 | - macOS / Windows / Linux / iOS / Android 19 | - Chrome / Safari / Firefox / Edge / Internet Explorer 20 | -------------------------------------------------------------------------------- /static/flow/sentiment_very_dissatisfied-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/flow/arrow_downward.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/BUG_REPORT.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'バグ報告 / Bug Report' 3 | about: '既存のWebサイトに不具合がある場合・更新しなければならないタスクなどはこちら' 4 | labels: bug 5 | --- 6 | 7 | ## 起こっている問題 / The Problem 8 | - xxxx(できるだけ簡潔に/as concise as possible) 9 | 10 | ## スクリーンショット / Screenshot 11 | 12 | 13 | 14 | ## 期待する見せ方・挙動 / Expected Behavior 15 | - xxxx(できるだけ簡潔に/as concise as possible) 16 | 17 | 18 | ## 起こっている問題の再現手段 / Steps to Reproduce 19 | 1. xxx 20 | 2. xxx 21 | 3. xxx 22 | 23 | ## 動作環境・ブラウザ / Environment 24 | - macOS / Windows / Linux / iOS / Android 25 | - Chrome / Safari / Firefox / Edge / Internet Explorer 26 | -------------------------------------------------------------------------------- /static/flow/accessible-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT_ZH_TW.md: -------------------------------------------------------------------------------- 1 | version 1.0, 2020/3/3 2 | 3 | # 我們的使命 4 | 5 | * 我們為了保護東京都都民的生命以及健康。 6 | * 我們為了向海內外人士提供正確的數據。 7 | * 我們將會展示我們的品德以及視覺化我們的工作成果。 8 | 9 | 10 | # 建立網站的行動原則(CoC) 11 | 12 | ## 從用戶角度出發(User perspective) 13 | 14 | * 資訊只有在對人們傳達後才有意義。我們十分重視 UX(使用者體驗)。 15 | * 我們使用基於統計出來的證據來做出決策、例如存取分析、關鍵字數據以及社群媒體數據。 16 | 17 | ## 沒有人會被留下(No one left behind) 18 | 19 | * 目標是成為一個無論國籍、年齡或是有障礙的人士,任何人都可以愉快地使用的網站。 20 | * 符合通用設計準則。 21 | 22 | ## 國際化(International) 23 | 24 | * 使用外國人直覺的表達方式。 25 | * 提供多種語言。 26 | 27 | ## 保持開放(Be open) 28 | 29 | * 開放原始碼:我們盡可能地開放網站相關的原始碼以及技術,並提供給其他的地方政府使用。 30 | * 公開資料:以容易理解、任何人都可以輕易上手的資料格式公開資料。 31 | 32 | ## 與人們共築(Build with people) 33 | 34 | * 與形形色色的人們一起創造,而非僅僅是東京都政府的人們。 35 | * 歡迎民間工程師們提交貢獻。 36 | * 與需要資訊的人們共同發展網站。 37 | -------------------------------------------------------------------------------- /components/flow/FlowPcAdvisory2.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 30 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | version 1.0, 2020/3/3 2 | 3 | # 我々はなぜここにいるのか 4 | 5 | * 都民の生命と健康を守るため 6 | * 正しいデータをオープンに国内/海外の人に伝える 7 | * 正しいものを正しく、ともに作るプロセスの効果を具体的に示す 8 | 9 | # サイト構築にあたっての行動原則 10 | 11 | ## User perspective 12 | 13 | * 情報は人に届けてこそ意味がある。UX(ユーザエクスペリエンス)を大切にする。 14 | * アクセス解析や検索語の分析、SNS分析などの数値分析を行い、数字で対応を判断する 15 | 16 | ## No one left behind 17 | 18 | * 国籍や年齢、障害の有無にかかわらず、誰もが快適に利用できるサイトを目指す 19 | * ユニバーサルデザインに関するガイドラインに準拠する 20 | 21 | ## International 22 | 23 | * 海外の人にも直感的にわかるような表現をする。 24 | * 多言語で展開する 25 | 26 | ## Be open 27 | 28 | * オープンソース:ソースコードやサイト構築に関するノウハウは可能な限り公開し、他の自治体でも利用できるようにする 29 | * オープンデータ:わかりやすいデータ形式で、誰でも使えるような形でデータを公開する。 30 | 31 | ## Build with people 32 | 33 | * 都庁の人だけではなく、様々な人々とともに作る 34 | * 市民エンジニアの貢献を歓迎する 35 | * 情報を求める人達とともに、サイトを育てていく 36 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "lib": [ 7 | "esnext", 8 | "esnext.asynciterable", 9 | "dom" 10 | ], 11 | "esModuleInterop": true, 12 | "allowJs": true, 13 | "sourceMap": true, 14 | "strict": true, 15 | "noEmit": true, 16 | "noImplicitThis": true, 17 | "experimentalDecorators": true, 18 | "baseUrl": ".", 19 | "paths": { 20 | "~/*": [ 21 | "./*" 22 | ], 23 | "@/*": [ 24 | "./*" 25 | ] 26 | }, 27 | "types": [ 28 | "@types/node", 29 | "@nuxt/types", 30 | "nuxt-i18n" 31 | ] 32 | }, 33 | "exclude": [ 34 | "node_modules" 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /bin/cp_data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copy all json files that the scripts generate into the `data` dir. 4 | # FROM covid19_nagano_csv_to_json 5 | curl -o data/data.json https://raw.githubusercontent.com/wataruoguchi/covid19_nagano_csv_to_json/master/src/.json/data.json 6 | curl -o data/patients.json https://raw.githubusercontent.com/wataruoguchi/covid19_nagano_csv_to_json/master/src/.json/patients.json 7 | curl -o data/test_count.json https://raw.githubusercontent.com/wataruoguchi/covid19_nagano_csv_to_json/master/src/.json/test_count.json 8 | curl -o data/call_center.json https://raw.githubusercontent.com/wataruoguchi/covid19_nagano_csv_to_json/master/src/.json/call_center.json 9 | 10 | # FROM covid19_nagano_scraper 11 | curl -o data/news.json https://raw.githubusercontent.com/wataruoguchi/covid19_nagano_scraper/master/src/.json/news.json -------------------------------------------------------------------------------- /static/printer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT_KO.md: -------------------------------------------------------------------------------- 1 | version 1.0, 2020/3/3 2 | 3 | # 왜 우리는 여기에 있는가(우리의 미션) 4 | 5 | * 도쿄도민의 생명과 건강을 지키기 위해 6 | * 정확한 데이터를 오픈하여 국내/해외의 모든 사람들에게 알리기 위해 7 | * 정직하게, 바르게, 함께만드를 프로세스의 효과를 구체적으로 나타내기 위해 8 | 9 | # 사이트 구축 행동강령 10 | 11 | ## User perspective 12 | 13 | * 정보는 전달되어져야 의미가있다. UX (사용자경험)을 중요시할것. 14 | * 사이트 유입 분석, 검색어 분석, SNS 분석등의 수치분석을하여 수치를 기반으로 대응법을 판단할 것. 15 | 16 | ## No one left behind 17 | 18 | * 국적, 연령, 장애등의 유무에 관계없이, 누구나 쾌적히 이용가능한 사이트를 목표로함. 19 | * 유니버설디자인의 가이드라인을 준수. 20 | 21 | ## International 22 | 23 | * 해외의 유저들에게도 직감적으로 전달되는 표현을 사용 24 | * 다언어를 지원 25 | 26 | ## Be open 27 | 28 | * 오픈소스 : 소스코드나 사이트구축에 관한 노하우는 가능한 공개하고, 다른 지자체에서도 이용가능하도록 함. 29 | * 오픈데이터 : 알기쉬운 데이터형식으로 누구라도 사용가능한 형태의 데이터를 공개함. 30 | 31 | ## Build with people 32 | 33 | * 도쿄도청의 관계자뿐만아니라, 다양한 사람들과 함께 만들겠습니다. 34 | * 시민엔지니어의 기여를 환영합니다. 35 | * 정보를 원하는 분들과 함께, 사이트를 발전시켜가겠슴니다. 36 | -------------------------------------------------------------------------------- /utils/formatTestedCases.ts: -------------------------------------------------------------------------------- 1 | type DataType = { 2 | attr: '累計人数' 3 | value: number 4 | children: [ 5 | { 6 | attr: '合計件数' 7 | value: number 8 | children: [ 9 | { 10 | attr: '健康安全研究センター実施分' 11 | value: number 12 | }, 13 | { 14 | attr: '医療機関等実施分' 15 | value: number 16 | } 17 | ] 18 | } 19 | ] 20 | } 21 | 22 | type TestedCasesType = { 23 | 累計人数: number 24 | 合計件数: number 25 | 健康安全研究センター実施分: number 26 | 医療機関等実施分: number 27 | } 28 | 29 | /** 30 | * Format for *Chart component 31 | * 32 | * @param data - Raw data 33 | */ 34 | export default (data: DataType) => { 35 | return { 36 | 累計人数: data.value, 37 | 合計件数: data.children[0].value, 38 | 健康安全研究センター実施分: data.children[0].children[0].value, 39 | 医療機関等実施分: data.children[0].children[1].value 40 | } as TestedCasesType 41 | } 42 | -------------------------------------------------------------------------------- /utils/formatGraph.ts: -------------------------------------------------------------------------------- 1 | import { convertDateToISO8601Format } from '@/utils/formatDate' 2 | 3 | type DataType = { 4 | 日付: string 5 | 小計: number 6 | } 7 | 8 | export type GraphDataType = { 9 | label: string 10 | transition: number 11 | cumulative: number 12 | } 13 | 14 | /** 15 | * Format for *Chart component 16 | * 17 | * @param data - Raw data 18 | */ 19 | export default (data: DataType[]) => { 20 | const graphData: GraphDataType[] = [] 21 | const today = new Date() 22 | let patSum = 0 23 | data 24 | .filter(d => new Date(d['日付']) < today) 25 | .forEach(d => { 26 | const subTotal = d['小計'] 27 | if (!isNaN(subTotal)) { 28 | patSum += subTotal 29 | graphData.push({ 30 | label: convertDateToISO8601Format(d['日付']), 31 | transition: subTotal, 32 | cumulative: patSum 33 | }) 34 | } 35 | }) 36 | return graphData 37 | } 38 | -------------------------------------------------------------------------------- /forkedSites.md: -------------------------------------------------------------------------------- 1 | # このサイトから派生したサイト 2 | 3 | 下表に列挙するサイトは、このサイトから派生(Fork)したサイトです。 4 | 5 | 都道府県名 | 公開サイト | プロジェクト 6 | ------------ | ------------- | ------------- 7 | 東京都(このサイト)|https://stopcovid19.metro.tokyo.lg.jp|[tokyo-metropolitan-gov/covid19](/tokyo-metropolitan-gov/covid19)| 8 | 北海道|https://stopcovid19.hokkaido.dev/|[codeforsapporo/covid19](/codeforsapporo/covid19)| 9 | 神奈川県|https://www.pref.kanagawa.jp/osirase/1369/| | 10 | 愛知県|https://stopcovid19.code4.nagoya/|[code4nagoya/covid19](/code4nagoya/covid19)| 11 | 12 | ## 都道府県追加時のルール 13 | 14 | 1. 東京都: 先頭で固定とする。 15 | 1. 東京都以外: 厚生労働省発行のPDF([都道府県番号 - tp0727-1d.pdf](https://www.mhlw.go.jp/topics/2007/07/dl/tp0727-1d.pdf))に従って、表に以下の情報を追加する。 16 | - 公開しているサイト: URLを記載する。 17 | - プロジェクト 18 | - Private Repository: 未記入とする。 19 | - Public Repository 20 | - GitHub: `[organization/repository](/organization/repository)`形式で記載する。 21 | - GitHub以外: URLを記載する。 22 | -------------------------------------------------------------------------------- /components/SvgCard.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 25 | 26 | 47 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build check 2 | 3 | on: 4 | repository_dispatch: 5 | types: [build_application] 6 | pull_request: 7 | branches: 8 | - staging 9 | jobs: 10 | build: 11 | runs-on: ubuntu-18.04 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Setup Node 16 | uses: actions/setup-node@v1 17 | with: 18 | node-version: '14.x' 19 | 20 | - name: Cache dependencies 21 | uses: actions/cache@v1 22 | with: 23 | path: ~/.cache/yarn 24 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 25 | restore-keys: | 26 | ${{ runner.os }}-yarn- 27 | 28 | - run: yarn install --frozen-lockfile 29 | - run: yarn run test 30 | - run: yarn run generate:deploy --fail-on-page-error 31 | 32 | - name: archive dist 33 | uses: actions/upload-artifact@v1 34 | with: 35 | name: dist 36 | path: dist 37 | -------------------------------------------------------------------------------- /components/flow/FlowSpHospitalized.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 20 | 21 | 41 | -------------------------------------------------------------------------------- /components/cards/ConfirmedCasesNumberCard.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 38 | -------------------------------------------------------------------------------- /components/cards/ConfirmedCasesDetailsCard.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 39 | -------------------------------------------------------------------------------- /components/cards/TelephoneAdvisoryReportsNumberCard.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 37 | -------------------------------------------------------------------------------- /components/PrinterButton.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 32 | 33 | 49 | -------------------------------------------------------------------------------- /ui-test/ogp_screenshot.py: -------------------------------------------------------------------------------- 1 | from selenium import webdriver 2 | import os 3 | 4 | os.mkdir('ogp') 5 | 6 | 7 | PATHS = { 8 | '/?dummy': [959,500], 9 | '/cards/details-of-confirmed-cases': [959,480], 10 | '/cards/number-of-confirmed-cases': [959,500], 11 | '/cards/attributes-of-confirmed-cases': [959,480], 12 | '/cards/number-of-tested': [959,510], 13 | '/cards/number-of-reports-to-covid19-telephone-advisory-center': [959,500], 14 | '/cards/number-of-reports-to-covid19-consultation-desk': [959,500], 15 | '/cards/predicted-number-of-toei-subway-passengers': [959,720], 16 | '/cards/agency': [959,710], 17 | } 18 | 19 | options = webdriver.ChromeOptions() 20 | options.add_argument('--headless') 21 | options.add_argument("--hide-scrollbars") 22 | 23 | driver = webdriver.Chrome(options=options) 24 | for path, size in PATHS.items(): 25 | driver.set_window_size(size[0], size[1]) 26 | driver.get("http://localhost:8000"+path+"?embed=true") 27 | driver.save_screenshot('ogp/ogp-'+path.replace('/cards/', '').replace('/', '_')+'.png') 28 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: production deploy 2 | 3 | on: 4 | repository_dispatch: 5 | types: [build_application] 6 | push: 7 | branches: 8 | - master 9 | 10 | jobs: 11 | deploy: 12 | runs-on: ubuntu-18.04 13 | steps: 14 | - uses: actions/checkout@v2 15 | 16 | - name: Setup Node 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: '14.x' 20 | 21 | - name: Cache dependencies 22 | uses: actions/cache@v1 23 | with: 24 | path: ~/.cache/yarn 25 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 26 | restore-keys: | 27 | ${{ runner.os }}-yarn- 28 | 29 | - run: yarn install --frozen-lockfile 30 | - run: yarn run test 31 | - run: yarn run generate:deploy --fail-on-page-error 32 | 33 | - name: deploy 34 | uses: peaceiris/actions-gh-pages@v3 35 | with: 36 | github_token: ${{ secrets.GITHUB_TOKEN }} 37 | publish_dir: ./dist 38 | publish_branch: production 39 | -------------------------------------------------------------------------------- /components/NumberDisplay.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 38 | 39 | 47 | -------------------------------------------------------------------------------- /components/flow/FlowPcHospitalized.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 44 | -------------------------------------------------------------------------------- /components/cards/ConsultationDeskReportsNumberCard.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 39 | -------------------------------------------------------------------------------- /.github/workflows/staging.yml: -------------------------------------------------------------------------------- 1 | name: staging deploy 2 | 3 | on: 4 | repository_dispatch: 5 | types: [build_application] 6 | push: 7 | branches: 8 | - staging 9 | 10 | jobs: 11 | deploy: 12 | runs-on: ubuntu-18.04 13 | steps: 14 | - uses: actions/checkout@v2 15 | 16 | - name: Setup Node 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: '14.x' 20 | 21 | - name: Cache dependencies 22 | uses: actions/cache@v1 23 | with: 24 | path: ~/.cache/yarn 25 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 26 | restore-keys: | 27 | ${{ runner.os }}-yarn- 28 | 29 | - run: yarn install --frozen-lockfile 30 | - run: yarn run test 31 | - run: yarn run generate:deploy --fail-on-page-error 32 | - run: "echo \"User-agent: *\nDisallow: /\" > ./dist/robots.txt" 33 | 34 | - name: deploy 35 | uses: peaceiris/actions-gh-pages@v3 36 | with: 37 | github_token: ${{ secrets.GITHUB_TOKEN }} 38 | publish_dir: ./dist 39 | -------------------------------------------------------------------------------- /.github/workflows/screenshot.yml: -------------------------------------------------------------------------------- 1 | name: screenshot 2 | 3 | # on: pull_request 4 | on: 5 | push: 6 | branches: 7 | - dummy 8 | 9 | jobs: 10 | screenshot: 11 | runs-on: windows-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - run: cp ui-test\dummy.json dist\data/\data.json 15 | - name: Setup Node 16 | uses: actions/setup-node@v1 17 | with: 18 | node-version: '14.x' 19 | - name: Cache dependencies 20 | uses: actions/cache@v1 21 | with: 22 | path: ~/.cache/yarn 23 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 24 | restore-keys: | 25 | ${{ runner.os }}-yarn- 26 | 27 | - run: yarn install --frozen-lockfile 28 | - run: yarn run test 29 | - run: yarn run generate:deploy 30 | - run: pip install selenium 31 | - run: (python -m http.server --directory ./dist 8000 &) ; python ./ui-test/screenshot.py 32 | - name: Upload screenshot 33 | uses: actions/upload-artifact@v1 34 | with: 35 | name: screenshots 36 | path: screenshots 37 | -------------------------------------------------------------------------------- /.github/workflows/develop.yml: -------------------------------------------------------------------------------- 1 | name: development deploy 2 | 3 | on: 4 | repository_dispatch: 5 | types: [build_application] 6 | push: 7 | branches: 8 | - development 9 | 10 | jobs: 11 | deploy: 12 | runs-on: ubuntu-18.04 13 | steps: 14 | - uses: actions/checkout@v2 15 | 16 | - name: Setup Node 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: '14.x' 20 | 21 | - name: Cache dependencies 22 | uses: actions/cache@v1 23 | with: 24 | path: ~/.cache/yarn 25 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 26 | restore-keys: | 27 | ${{ runner.os }}-yarn- 28 | 29 | - run: yarn install --frozen-lockfile 30 | - run: yarn run test 31 | - run: yarn run generate:deploy --fail-on-page-error 32 | - run: "echo \"User-agent: *\nDisallow: /\" > ./dist/robots.txt" 33 | 34 | - name: deploy 35 | uses: peaceiris/actions-gh-pages@v3 36 | with: 37 | github_token: ${{ secrets.GITHUB_TOKEN }} 38 | publish_dir: ./dist 39 | publish_branch: dev-pages 40 | -------------------------------------------------------------------------------- /static/covid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tokyo Metropolitan Government 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /data/metro.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2020\/3\/12 21:00", 3 | "datasets": [ 4 | { 5 | "label": "2月10日~14日", 6 | "data": [ 7 | -0.96, 8 | -2.94, 9 | -7.48 10 | ] 11 | }, 12 | { 13 | "label": "2月17日~21日", 14 | "data": [ 15 | -0.36, 16 | -4.11, 17 | -6.95 18 | ] 19 | }, 20 | { 21 | "label": "2月25日~28日", 22 | "data": [ 23 | 3.06, 24 | -9.47, 25 | -7.31 26 | ] 27 | }, 28 | { 29 | "label": "3月02日~05日", 30 | "data": [ 31 | 1.08, 32 | -21.64, 33 | -9.92 34 | ] 35 | }, 36 | { 37 | "label": "3月09日~12日", 38 | "data": [ 39 | -0.78, 40 | -24.51, 41 | -12.13 42 | ] 43 | } 44 | ], 45 | "labels": [ 46 | "6:30~7:30", 47 | "7:30~9:30", 48 | "9:30~10:30" 49 | ], 50 | "base_period": "1月20日~1月24日" 51 | } -------------------------------------------------------------------------------- /types/chart.d.ts: -------------------------------------------------------------------------------- 1 | import { ConfigType, Dayjs, OpUnitType, QUnitType } from 'dayjs' 2 | 3 | declare module 'chart.js' { 4 | export class _adapters { 5 | static _date: DayjsDateAdapter 6 | } 7 | 8 | interface DayjsDateAdapter { 9 | override: (options: Options) => void 10 | } 11 | 12 | interface Options { 13 | _id: string 14 | formats: () => DateAdapterFormats 15 | parse: (time: ConfigType, format: string | undefined) => number | null 16 | format: (time: ConfigType, format: string) => string 17 | add: (time: ConfigType, amount: number, unit: OpUnitType) => Dayjs 18 | diff: ( 19 | max: ConfigType, 20 | min: ConfigType, 21 | unit: QUnitType | OpUnitType 22 | ) => number 23 | startOf: ( 24 | time: ConfigType, 25 | unit: OpUnitType, 26 | weekday: null | undefined 27 | ) => Dayjs 28 | endOf: (time: ConfigType, unit: OpUnitType) => Dayjs 29 | } 30 | 31 | export type DateAdapterFormats = { 32 | datetime: string 33 | millisecond: string 34 | second: string 35 | minute: string 36 | hour: string 37 | day: string 38 | week: string 39 | month: string 40 | quarter: string 41 | year: string 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /components/DataViewBasicInfoPanel.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 39 | 40 | 50 | -------------------------------------------------------------------------------- /components/DataSelector.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 41 | 42 | 54 | -------------------------------------------------------------------------------- /static/data/130001_tokyo_covid19_combined_telephone_advice_center.csv: -------------------------------------------------------------------------------- 1 | 全国地方公共団体コード,都道府県名,市区町村名,受付_年月日,曜日,相談件数 2 | 130001,東京都,,2020-02-07,金,17 3 | 130001,東京都,,2020-02-08,土,34 4 | 130001,東京都,,2020-02-09,日,35 5 | 130001,東京都,,2020-02-10,月,137 6 | 130001,東京都,,2020-02-11,火,32 7 | 130001,東京都,,2020-02-12,水,147 8 | 130001,東京都,,2020-02-13,木,156 9 | 130001,東京都,,2020-02-14,金,351 10 | 130001,東京都,,2020-02-15,土,156 11 | 130001,東京都,,2020-02-16,日,186 12 | 130001,東京都,,2020-02-17,月,970 13 | 130001,東京都,,2020-02-18,火,1208 14 | 130001,東京都,,2020-02-19,水,1209 15 | 130001,東京都,,2020-02-20,木,871 16 | 130001,東京都,,2020-02-21,金,856 17 | 130001,東京都,,2020-02-22,土,251 18 | 130001,東京都,,2020-02-23,日,249 19 | 130001,東京都,,2020-02-24,月,303 20 | 130001,東京都,,2020-02-25,火,1710 21 | 130001,東京都,,2020-02-26,水,1679 22 | 130001,東京都,,2020-02-27,木,1720 23 | 130001,東京都,,2020-02-28,金,1460 24 | 130001,東京都,,2020-02-29,土,237 25 | 130001,東京都,,2020-03-01,日,398 26 | 130001,東京都,,2020-03-02,月,2303 27 | 130001,東京都,,2020-03-03,火,1699 28 | 130001,東京都,,2020-03-04,水,1727 29 | 130001,東京都,,2020-03-05,木,1523 30 | 130001,東京都,,2020-03-06,金,1926 31 | 130001,東京都,,2020-03-07,土,271 32 | 130001,東京都,,2020-03-08,日,302 33 | 130001,東京都,,2020-03-09,月,2544 34 | 130001,東京都,,2020-03-10,火,1818 35 | 130001,東京都,,2020-03-11,水,1715 36 | 130001,東京都,,2020-03-12,木,1514 37 | -------------------------------------------------------------------------------- /utils/monitoringStatusValueFormatters.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable tsdoc/syntax */ 2 | /** 3 | * 引数で受け取った桁数で小数部を桁揃えする関数を返却します。 4 | * 引数のデフォルト値は0です。 5 | * Number.prototype.toFixed() は引数に 0-20 の値しかとれないため、 6 | * 0を下回る場合は0に、20を超える場合は20にfixします。 7 | * https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed 8 | * 9 | * @param digit - 桁揃えする桁数 10 | */ 11 | export function getNumberToFixedFunction(digit = 0) { 12 | if (digit < 0) { 13 | return (d: number): string | undefined => d?.toFixed(0) 14 | } 15 | if (digit > 20) { 16 | return (d: number): string | undefined => d?.toFixed(20) 17 | } 18 | return (d: number): string | undefined => d?.toFixed(digit) 19 | } 20 | 21 | export function getNumberToLocaleStringFunction() { 22 | return (d: number): string | undefined => d?.toLocaleString() 23 | } 24 | 25 | /** 26 | * 引数で受け取った桁数で小数部を桁揃えし、整数部を3桁ごとにカンマ区切りにする関数を返します。 27 | * 小数部桁揃えには getNumberToFixedFunction を使用しているため、 28 | * 詳しい仕様は getNumberToFixedFunction の JSDoc を参照してください 29 | * @param digit - 桁揃えする桁数 30 | * @see getNumberToFixedFunction 31 | * @see {@link https://stackoverflow.com/a/38462832} 32 | */ 33 | export function getCommaSeparatedNumberToFixedFunction(digit = 0) { 34 | return (d: number): string => 35 | Number(getNumberToFixedFunction(digit)(d)).toLocaleString('en', { 36 | minimumFractionDigits: digit 37 | }) 38 | } 39 | -------------------------------------------------------------------------------- /utils/i18nUtils.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line prettier/prettier 2 | import type { NuxtVueI18n } from 'nuxt-i18n' 3 | import { LinkPropertyHref } from 'vue-meta' 4 | 5 | export const getLinksLanguageAlternative = ( 6 | routeBaseName: string, 7 | locales?: Array, 8 | defaultLocale?: string 9 | ) => { 10 | const links: LinkPropertyHref[] = [] 11 | const getFullPathWihLocale = (locale: string) => { 12 | const pathLocale = locale === 'ja' ? '' : `/${locale}` 13 | if (routeBaseName === 'index') { 14 | return `https://stopcovid19.metro.tokyo.lg.jp${pathLocale}` 15 | } else { 16 | return `https://stopcovid19.metro.tokyo.lg.jp${pathLocale}/${routeBaseName}` 17 | } 18 | } 19 | 20 | if (locales) { 21 | for (const locale of locales) { 22 | if (typeof locale === 'string') continue 23 | if (locale.code === 'ja-basic') continue 24 | 25 | links.push({ 26 | hid: `alternate-hreflang-${locale.iso}`, 27 | rel: 'alternate', 28 | href: getFullPathWihLocale(locale.code), 29 | hreflang: locale.iso, 30 | }) 31 | } 32 | } 33 | if (defaultLocale) { 34 | links.push({ 35 | hid: 'alternate-hreflang-x-default', 36 | rel: 'alternate', 37 | href: getFullPathWihLocale(defaultLocale), 38 | hreflang: 'x-default', 39 | }) 40 | } 41 | 42 | return links 43 | } 44 | -------------------------------------------------------------------------------- /utils/formatTable.ts: -------------------------------------------------------------------------------- 1 | import { convertDateToSimpleFormat } from '@/utils/formatDate' 2 | 3 | const headers = [ 4 | { text: '確定日', value: '確定日' }, 5 | { text: '居住地', value: '居住地' }, 6 | { text: '年代', value: '年代' }, 7 | { text: '性別', value: '性別' }, 8 | { text: '退院※', value: '退院', align: 'center' } 9 | ] 10 | 11 | type DataType = { 12 | リリース日: Date 13 | 居住地: string | null 14 | 年代: string | null 15 | 性別: '男性' | '女性' 16 | 退院: '◯' | null 17 | [key: string]: any 18 | } 19 | 20 | type TableDataType = { 21 | 確定日: string 22 | 居住地: DataType['居住地'] 23 | 年代: DataType['年代'] 24 | 性別: DataType['性別'] | '不明' 25 | 退院: DataType['退院'] 26 | } 27 | 28 | type TableDateType = { 29 | headers: typeof headers 30 | datasets: TableDataType[] 31 | } 32 | 33 | /** 34 | * Format for DataTable component 35 | * 36 | * @param data - Raw data 37 | */ 38 | export default (data: DataType[]) => { 39 | const tableDate: TableDateType = { 40 | headers, 41 | datasets: [] 42 | } 43 | data.forEach(d => { 44 | const TableRow: TableDataType = { 45 | 確定日: 46 | convertDateToSimpleFormat(d['リリース日'].toLocaleString()) ?? '不明', 47 | 居住地: d['居住地'] ?? '不明', 48 | 年代: d['年代'] ?? '不明', 49 | 性別: d['性別'] ?? '不明', 50 | 退院: d['退院'] 51 | } 52 | tableDate.datasets.push(TableRow) 53 | }) 54 | tableDate.datasets.sort((a, b) => (a === b ? 0 : a < b ? 1 : -1)) 55 | return tableDate 56 | } 57 | -------------------------------------------------------------------------------- /README_ZH_CN.md: -------------------------------------------------------------------------------- 1 | # 东京都 新型冠状病毒对策网 2 | 3 | ![](https://github.com/tokyo-metropolitan-gov/covid19/workflows/production%20deploy/badge.svg) 4 | 5 | [![东京都 新型冠状病毒对策网](https://user-images.githubusercontent.com/1301149/75629392-1d19d900-5c25-11ea-843d-2d4376e3a560.png)](https://stopcovid19.metro.tokyo.lg.jp/) 6 | 7 | ### [日本語](./README.md) | [English](./README_EN.md) | [Spanish](./README_ES.md) | [Korean](./README_KO.md) | [Chinese (Taiwan)](./README_ZH_TW.md) | Chinese (Simplified) | [Vietnamese](./README_VI.md) 8 | 9 | ## 如何贡献 10 | 如果您能对 Issus 中做出各式各样的修改协助,我们将不胜感激。 11 | 12 | 详细请参照[如何贡献](./.github/CONTRIBUTING_ZH_CN.md)。 13 | 14 | 15 | ## 行动准则 16 | 详细请参照[建站行动原则](./.github/CODE_OF_CONDUCT_ZH_CN.md)。 17 | 18 | ## 授权 19 | 本软件采用[MIT授权条款](./LICENSE.txt)。 20 | 21 | ## 面向开发者信息 22 | 23 | ### 开发环境搭建 24 | 25 | - Node.js 版本最低需求: 14.16.0以上 26 | 27 | **使用 yarn 时** 28 | ```bash 29 | # install dependencies 30 | $ yarn install 31 | 32 | # serve with hot reload at localhost:3000 33 | $ yarn dev 34 | ``` 35 | 36 | **使用 docker compose 时** 37 | ```bash 38 | # serve with hot reload at localhost:3000 39 | $ docker-compose up --build 40 | ``` 41 | 42 | ### 发布到 Staging环境以及正式环境的方法 43 | 44 | `master` 分支更新時,自动将 `production` 分支中的HTML类(build)后发布到正式版 https://stopcovid19.metro.tokyo.lg.jp/ 45 | 46 | `staging` 分支更新時,自动将 `gh-pages` 分支中的HTML类(build)后发布到Staging版 https://stg-covid19-tokyo.netlify.com/ 47 | 48 | `development` 分支更新時,自动将 `dev-pages` 分支中的HTML类(build)后发布到开发版 https://dev-covid19-tokyo.netlify.com/ 49 | -------------------------------------------------------------------------------- /data/agency.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "2020\/3\/6 21:00", 3 | "labels": [ 4 | "1\/1~1\/5", 5 | "1\/6~1\/12", 6 | "1\/13~1\/19", 7 | "1\/20~1\/26", 8 | "1\/27~2\/2", 9 | "2\/3~2\/9", 10 | "2\/10~2\/16", 11 | "2\/17~2\/23", 12 | "2\/24~3\/1", 13 | "3\/2~3\/8" 14 | ], 15 | "datasets": [ 16 | { 17 | "label": "第一庁舎計", 18 | "data": [ 19 | 0, 20 | 12572, 21 | 10267, 22 | 12387, 23 | 12248, 24 | 12924, 25 | 10221, 26 | 12690, 27 | 8841, 28 | 9468 29 | ] 30 | }, 31 | { 32 | "label": "第二庁舎計", 33 | "data": [ 34 | 0, 35 | 14656, 36 | 11548, 37 | 13963, 38 | 13611, 39 | 13711, 40 | 10997, 41 | 14374, 42 | 10734, 43 | 12271 44 | ] 45 | }, 46 | { 47 | "label": "議事堂計", 48 | "data": [ 49 | 0, 50 | 422, 51 | 316, 52 | 321, 53 | 632, 54 | 492, 55 | 464, 56 | 553, 57 | 492, 58 | 381 59 | ] 60 | } 61 | ] 62 | } -------------------------------------------------------------------------------- /README_ZH_TW.md: -------------------------------------------------------------------------------- 1 | # 東京都 新型冠狀病毒疫情中心 2 | 3 | ![](https://github.com/tokyo-metropolitan-gov/covid19/workflows/production%20deploy/badge.svg) 4 | 5 | [![東京都 新型冠狀病毒疫情中心](https://user-images.githubusercontent.com/1301149/75629392-1d19d900-5c25-11ea-843d-2d4376e3a560.png)](https://stopcovid19.metro.tokyo.lg.jp/) 6 | 7 | ### [日本語](./README.md) | [English](./README_EN.md) | [Spanish](./README_ES.md) | [Korean](./README_KO.md) | Chinese (Taiwan) | [Chinese (Simplified)](./README_ZH_CN.md) | [Vietnamese](./README_VI.md) 8 | 9 | ## 如何貢獻 10 | 如果您能對 Issues 中做出各式各樣的修正協助,我們將不勝感激。 11 | 12 | 詳情請洽[如何貢獻](./.github/CONTRIBUTING_ZH_TW.md)。 13 | 14 | 15 | ## 行動原則 16 | 詳情請洽[建立網站的行動原則](./.github/CODE_OF_CONDUCT_ZH_TW.md)。 17 | 18 | ## 授權 19 | 本軟體採 [MIT 授權條款](./LICENSE.txt)釋出。 20 | 21 | ## 給開發者的資訊 22 | 23 | ### 開發環境建置 24 | 25 | - Node.js 版本最低需求:14.16.0 以上 26 | 27 | **使用 yarn 的做法** 28 | ```bash 29 | # install dependencies 30 | $ yarn install 31 | 32 | # serve with hot reload at localhost:3000 33 | $ yarn dev 34 | ``` 35 | 36 | **使用 docker compose 的做法** 37 | ```bash 38 | # serve with hot reload at localhost:3000 39 | $ docker-compose up --build 40 | ``` 41 | 42 | ### Deploy 到 Staging 環境以及正式環境的方法 43 | 44 | 當 `master` 分支被更新時,HTML 檔案將會在 `production` 分支中被 build 起來,然後正式版網站 https://stopcovid19.metro.tokyo.lg.jp/ 會被更新。 45 | 46 | 當 `staging` 分支被更新時,HTML 檔案將會在 `gh-pages` 分支中被 build 起來,然後 Staging 版網站 https://stg-covid19-tokyo.netlify.com/ 會被更新。 47 | 48 | 當 `development` 分支被更新時,HTML 檔案將會在 `dev-pages` 分支中被 build 起來,然後開發版網站 https://dev-covid19-tokyo.netlify.com/ 會被更新。 49 | -------------------------------------------------------------------------------- /components/NoScript.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 61 | -------------------------------------------------------------------------------- /static/data/130001_tokyo_covid19_call_center.csv: -------------------------------------------------------------------------------- 1 | 全国地方公共団体コード,都道府県名,市区町村名,受付_年月日,曜日,相談件数 2 | 130001,東京都,,2020-01-29,水,23 3 | 130001,東京都,,2020-01-30,木,324 4 | 130001,東京都,,2020-01-31,金,402 5 | 130001,東京都,,2020-02-01,土,276 6 | 130001,東京都,,2020-02-02,日,193 7 | 130001,東京都,,2020-02-03,月,339 8 | 130001,東京都,,2020-02-04,火,227 9 | 130001,東京都,,2020-02-05,水,246 10 | 130001,東京都,,2020-02-06,木,170 11 | 130001,東京都,,2020-02-07,金,176 12 | 130001,東京都,,2020-02-08,土,125 13 | 130001,東京都,,2020-02-09,日,79 14 | 130001,東京都,,2020-02-10,月,156 15 | 130001,東京都,,2020-02-11,火,78 16 | 130001,東京都,,2020-02-12,水,149 17 | 130001,東京都,,2020-02-13,木,153 18 | 130001,東京都,,2020-02-14,金,300 19 | 130001,東京都,,2020-02-15,土,294 20 | 130001,東京都,,2020-02-16,日,313 21 | 130001,東京都,,2020-02-17,月,402 22 | 130001,東京都,,2020-02-18,火,375 23 | 130001,東京都,,2020-02-19,水,403 24 | 130001,東京都,,2020-02-20,木,334 25 | 130001,東京都,,2020-02-21,金,481 26 | 130001,東京都,,2020-02-22,土,487 27 | 130001,東京都,,2020-02-23,日,466 28 | 130001,東京都,,2020-02-24,月,439 29 | 130001,東京都,,2020-02-25,火,460 30 | 130001,東京都,,2020-02-26,水,428 31 | 130001,東京都,,2020-02-27,木,414 32 | 130001,東京都,,2020-02-28,金,508 33 | 130001,東京都,,2020-02-29,土,457 34 | 130001,東京都,,2020-03-01,日,474 35 | 130001,東京都,,2020-03-02,月,399 36 | 130001,東京都,,2020-03-03,火,592 37 | 130001,東京都,,2020-03-04,水,516 38 | 130001,東京都,,2020-03-05,木,536 39 | 130001,東京都,,2020-03-06,金,571 40 | 130001,東京都,,2020-03-07,土,588 41 | 130001,東京都,,2020-03-08,日,575 42 | 130001,東京都,,2020-03-09,月,666 43 | 130001,東京都,,2020-03-10,火,683 44 | 130001,東京都,,2020-03-11,水,638 45 | 130001,東京都,,2020-03-12,木,567 46 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT_EN.md: -------------------------------------------------------------------------------- 1 | version 1.0, 2020/3/3 2 | # Our mission 3 | 4 | * We will work to protect the life and well-being of the citizens of Tokyo. 5 | * We will work to provide the facts to everyone, both domestic and abroad. 6 | * We will demonstrate our integrity and visualise the outcomes of our work. 7 | 8 | # Code of conduct for developers 9 | 10 | ## User perspective 11 | 12 | * We will treat UX (User Experience) as a vital component, in order to make information easy to understand. 13 | * We will make decisions using evidence based on statistical sources such as access analytics, search keyword analytics, and analytics of social media. 14 | 15 | ## No one left behind 16 | 17 | * We will develop this site for everyone, regardless of nationality, age, gender, etc. 18 | * We will follow universal design guidelines to build this website. 19 | 20 | ## International 21 | 22 | * We will design this website be intuitive to use and understand. 23 | * We will provide the information in multiple languages. 24 | 25 | ## Be open 26 | 27 | * Open source: We will release most of our source codes and knowledge used to develop this website for free, to encourage other local authorities to utilise them. 28 | * Open data: We will release the data for free in reusable data form, which is available for everyone. 29 | 30 | ## Build with people 31 | 32 | * We will work together not only with Tokyo Metropolitan Government, but also with anyone who wants to contribute. 33 | * We will welcome any citizens' contributions. 34 | * We will continue improving this website with someone who needs information. 35 | -------------------------------------------------------------------------------- /README_KO.md: -------------------------------------------------------------------------------- 1 | # 도쿄도 코로나19 대책 사이트 2 | 3 | ![](https://github.com/tokyo-metropolitan-gov/covid19/workflows/production%20deploy/badge.svg) 4 | 5 | [![도쿄도 코로나19 대책 사이트](https://user-images.githubusercontent.com/1301149/75629392-1d19d900-5c25-11ea-843d-2d4376e3a560.png)](https://stopcovid19.metro.tokyo.lg.jp/) 6 | 7 | ### [日本語](./README.md) | [English](./README_EN.md) | [Spanish](./README_ES.md) | Korean | [Chinese (Taiwan)](./README_ZH_TW.md) | [Chinese (Simplified)](./README_ZH_CN.md) | [Vietnamese](./README_VI.md) 8 | 9 | ## 기여방법 10 | 오픈상태의 Issue에 여러 가지 내용 추가 및 수정등으로 기여해주시면, 매우 감사하겠습니다. 11 | 12 | 자세한 내용은 다음의 [기여방법](./.github/CONTRIBUTING_KO.md) 링크를 참고해주세요. 13 | 14 | 15 | ## 행동강령 16 | 자세한 내용은 [사이트 구축 행동강령](./.github/CODE_OF_CONDUCT_KO.md)를 참고해주세요. 17 | 18 | 19 | ## 라이선스 20 | 이 소프트웨어는 [MIT 라이선스](./LICENSE.txt)를 따르고 있습니다. 21 | 22 | ## 개발자를 위한 개발 정보 23 | 24 | ### 개발환경을 구축하는 방법 25 | 26 | - 필요한 Node.js 버젼: 14.16.0이상 27 | 28 | **yarn을 사용할 경우** 29 | ```bash 30 | # install dependencies 31 | $ yarn install 32 | 33 | # serve with hot reload at localhost:3000 34 | $ yarn dev 35 | ``` 36 | 37 | **docker compose를 사용할 경우** 38 | ```bash 39 | # serve with hot reload at localhost:3000 40 | $ docker-compose up --build 41 | ``` 42 | 43 | ### 스테이징 환경 및 운영 환경으로 반영 방법 44 | 45 | `master` 브랜치가 업데이트되면, 자동적으로 `production` 브랜치의 HTML 파일이 빌드됩니다. 이후, 운영 환경 사이트 https://stopcovid19.metro.tokyo.lg.jp/ 가 갱신됩니다. 46 | 47 | `staging` 브랜치가 업데이트되면, 자동적으로 `gh-pages` 브랜치의 HTML 파일이 빌드됩니다. 이후, 스테이징 환경 사이트 https://stg-covid19-tokyo.netlify.com/ 가 갱신됩니다. 48 | 49 | `development` 브랜치가 업데이트되면, 자동적으로 `dev-pages` 브랜치의 HTML 파일이 빌드됩니다. 이후, 개발용 사이트 https://dev-covid19-tokyo.netlify.com/ 가 갱신됩니다. 50 | -------------------------------------------------------------------------------- /utils/colors.ts: -------------------------------------------------------------------------------- 1 | export type SurfaceStyle = { 2 | strokeColor: string 3 | fillColor: string 4 | } 5 | 6 | type Series = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' 7 | 8 | const surfaceStyleA: SurfaceStyle = { 9 | strokeColor: '#5a8055', 10 | fillColor: '#1b4d30' 11 | } 12 | 13 | const surfaceStyleB: SurfaceStyle = { 14 | strokeColor: '#5a8055', 15 | fillColor: '#00a040' 16 | } 17 | 18 | const surfaceStyleC: SurfaceStyle = { 19 | strokeColor: '#5a8055', 20 | fillColor: '#c5e2c6' 21 | } 22 | 23 | const surfaceStyleD: SurfaceStyle = { 24 | strokeColor: '#1b4d30', 25 | fillColor: '#cbe1c8' 26 | } 27 | 28 | const surfaceStyleE: SurfaceStyle = { 29 | strokeColor: '#cc7004', 30 | fillColor: '#cc7004' 31 | } 32 | 33 | const surfaceStyleF: SurfaceStyle = { 34 | strokeColor: '#1b4d30', 35 | fillColor: '#1b4d30' 36 | } 37 | 38 | const surfaceStyleG: SurfaceStyle = { 39 | strokeColor: '#5a8055', 40 | fillColor: '#e2eee2' 41 | } 42 | 43 | export function getGraphSeriesStyle(seriesLength: number) { 44 | switch (seriesLength) { 45 | case 1: 46 | return [surfaceStyleB] 47 | case 2: 48 | return [surfaceStyleA, surfaceStyleC] 49 | case 4: 50 | return [surfaceStyleA, surfaceStyleB, surfaceStyleC, surfaceStyleG] 51 | default: 52 | return [surfaceStyleA, surfaceStyleB, surfaceStyleC] 53 | } 54 | } 55 | 56 | export function getGraphSeriesColor(series: Series) { 57 | const styles: { [key in Series]: SurfaceStyle } = { 58 | A: surfaceStyleA, 59 | B: surfaceStyleB, 60 | C: surfaceStyleC, 61 | D: surfaceStyleD, 62 | E: surfaceStyleE, 63 | F: surfaceStyleF, 64 | G: surfaceStyleG 65 | } 66 | return styles[series] 67 | } 68 | -------------------------------------------------------------------------------- /components/TextCard.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 43 | 44 | 76 | -------------------------------------------------------------------------------- /static/earth.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /components/PageHeader.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 46 | 47 | 78 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT_VI.md: -------------------------------------------------------------------------------- 1 | version 1.0, 2020/3/3 2 | # Nhiệm vụ của chúng tôi 3 | 4 | * Chúng tôi sẽ làm việc để bảo vệ cuộc sống và hạnh phúc của công dân Tokyo. 5 | * Chúng tôi sẽ làm việc để cung cấp sự thật cho tất cả mọi người, cả trong và ngoài nước. 6 | * Chúng tôi sẽ chứng minh tính toàn vẹn của chúng tôi và hình dung kết quả công việc của chúng tôi. 7 | 8 | # Quy tắc ứng xử dành cho nhà phát triển 9 | 10 | ## Quan điểm người dùng 11 | 12 | * Chúng tôi sẽ coi UX (Trải nghiệm người dùng) là một thành phần quan trọng, để làm cho thông tin dễ hiểu. 13 | * Chúng tôi sẽ đưa ra quyết định sử dụng bằng chứng dựa trên các nguồn thống kê như phân tích truy cập, phân tích từ khóa tìm kiếm và phân tích phương tiện truyền thông xã hội. 14 | 15 | ## Không ai bị bỏ lại phía sau 16 | 17 | * Chúng tôi sẽ phát triển trang web này cho tất cả mọi người, bất kể quốc tịch, tuổi tác, giới tính, v.v. 18 | * Chúng tôi sẽ làm theo hướng dẫn thiết kế phổ quát để xây dựng trang web này. 19 | 20 | ## Tính quốc tế 21 | 22 | * Chúng tôi sẽ thiết kế trang web này trực quan để sử dụng và hiểu. 23 | * Chúng tôi sẽ cung cấp thông tin bằng nhiều ngôn ngữ. 24 | 25 | ## Hãy cởi mở 26 | 27 | * Nguồn mở: Chúng tôi sẽ phát hành hầu hết các mã nguồn và kiến ​​thức được sử dụng để phát triển trang web này miễn phí, để khuyến khích các chính quyền địa phương khác sử dụng chúng. 28 | * Mở dữ liệu: Chúng tôi sẽ phát hành dữ liệu miễn phí dưới dạng dữ liệu có thể sử dụng lại, có sẵn cho tất cả mọi người. 29 | 30 | ## Xây dựng với mọi người 31 | 32 | * Chúng tôi sẽ làm việc cùng nhau không chỉ với Chính quyền thành phố Tokyo, mà còn với bất kỳ ai muốn đóng góp. 33 | * Chúng tôi sẽ hoan nghênh mọi đóng góp của công dân. 34 | * Chúng tôi sẽ tiếp tục cải thiện trang web này với người cần thông tin. 35 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT_ES.md: -------------------------------------------------------------------------------- 1 | version 1.0, 2020/3/3 2 | # Nuestra misión 3 | 4 | * Trabajaremos para proteger la vida y la salud de los ciudadanos. 5 | * Trabajaremos para comunicar abiertamente los datos correctos a personas nacionales y extranjeras.. 6 | * Demostraremos nuestra integridad y visualizaremos los resultados de nuestro trabajo. 7 | 8 | # Código de conducta para desarrolladores 9 | 10 | ## Perspectiva del usuario 11 | 12 | * Le daremos importancia al UX (Experiencia del usuario) para que la información sea fácil de entender. 13 | * Tomaremos decisiones basadas en la evidencia usando análisis numéricos tales como análisis de acceso, análisis de búsqueda de palabras clave y análisis SNS. 14 | 15 | ## Nadie se queda atrás 16 | 17 | * Desarrollaremos este sitio para todos, independientemente de su nacionalidad, edad, género y otros atributos. 18 | * Seguiremos las pautas de diseño universal para construir este sitio web. 19 | 20 | ## Internacional 21 | 22 | * Diseñaremos este sitio web para que sea intuitivo de usar y comprender. 23 | * Proporcionaremos la información en varios idiomas. 24 | 25 | ## Estar abierto 26 | 27 | * Código abierto: publicaremos la mayoría de nuestros códigos fuente y conocimientos utilizados para desarrollar este sitio web de forma gratuita, para alentar a otras autoridades locales a utilizarlos. 28 | * Datos abiertos: publicaremos los datos de forma gratuita en forma de datos reutilizables, que está disponible para todos. 29 | 30 | ## Construir con personas 31 | 32 | * Trabajaremos juntos no solo con el Gobierno Metropolitano de Tokio sino también con cualquier otra persona que quiera contribuir. 33 | * Daremos la bienvenida a las contribuciones de cualquier ciudadano. 34 | * Continuaremos mejorando este sitio web con alguien que necesite información. 35 | -------------------------------------------------------------------------------- /layouts/error.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "ja": { 3 | "このページはご利用いただけません": "このページはご利用いただけません", 4 | "現在ご利用できません": "現在ご利用できません", 5 | "アクセスしようとしたページが見つかりませんでした。": "アクセスしようとしたページが見つかりませんでした。", 6 | "ページが移動または削除されたか、URLの入力間違いの可能性があります。": "ページが移動または削除されたか、URLの入力間違いの可能性があります。", 7 | "トップページへ戻る": "トップページへ戻る" 8 | }, 9 | "en": { 10 | "このページはご利用いただけません": "This page is unavailable.", 11 | "現在ご利用できません": "It's currently unavailable.", 12 | "アクセスしようとしたページが見つかりませんでした。": "The page you tried to access could not be found.", 13 | "ページが移動または削除されたか、URLの入力間違いの可能性があります。": "The page may have been moved or deleted, or you might have typed the wrong URL.", 14 | "トップページへ戻る": "Back to top page." 15 | }, 16 | "zh-cn": { 17 | "このページはご利用いただけません": "您访问的页面无法使用。", 18 | "現在ご利用できません": "目前暂时无法使用。", 19 | "アクセスしようとしたページが見つかりませんでした。": "您访问的页面不存在。", 20 | "ページが移動または削除されたか、URLの入力間違いの可能性があります。": "您访问的页面可能已经被删除或者更名,请检查您输入的网址是否正确。", 21 | "トップページへ戻る": "回到首页" 22 | }, 23 | "zh-tw": { 24 | "このページはご利用いただけません": "這個網頁無法使用。", 25 | "現在ご利用できません": "現在無法使用。", 26 | "アクセスしようとしたページが見つかりませんでした。": "您找的網頁目前沒有找到。", 27 | "ページが移動または削除されたか、URLの入力間違いの可能性があります。": "該網頁可能被移動或是刪除了,或是您有可能輸入了錯誤的網址。", 28 | "トップページへ戻る": "回到首頁" 29 | }, 30 | "ko": { 31 | "このページはご利用いただけません": "이 페이지는 이용할 수 없습니다.", 32 | "現在ご利用できません": "현재 이용할 수 없습니다.", 33 | "アクセスしようとしたページが見つかりませんでした。": "접속하려고 한 페이지를 찾을 수 없습니다.", 34 | "ページが移動または削除されたか、URLの入力間違いの可能性があります。": "페이지가 이동되거나, 삭제되었거나, URL의 입력이 잘못되었을 가능성이 있습니다.", 35 | "トップページへ戻る": "위로 돌아가기" 36 | }, 37 | "ja-basic": { 38 | "このページはご利用いただけません": "このページはつかえません", 39 | "現在ご利用できません": "いま このページはつかえません", 40 | "アクセスしようとしたページが見つかりませんでした。": "このページはありませんでした", 41 | "ページが移動または削除されたか、URLの入力間違いの可能性があります。": "ページがなくなったか いれたものがちがっています", 42 | "トップページへ戻る": "はじめのページにもどる" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /utils/formatConfirmedCases.ts: -------------------------------------------------------------------------------- 1 | type DataType = { 2 | attr: '検査実施人数' 3 | value: number 4 | children: [ 5 | { 6 | attr: '陽性患者数' 7 | value: number 8 | children: [ 9 | { 10 | attr: '入院中' 11 | value: number 12 | }, 13 | { 14 | attr: '退院' 15 | value: number 16 | }, 17 | { 18 | attr: '死亡' 19 | value: number 20 | } 21 | ] 22 | } 23 | ] 24 | } 25 | 26 | type ConfirmedCasesType = { 27 | 検査実施人数: number 28 | 陽性物数: number 29 | 入院中: number 30 | 死亡: number 31 | 退院: number 32 | } 33 | 34 | interface ChildData { 35 | attr: string 36 | value: number 37 | } 38 | 39 | type ChildDataType = { 40 | attr?: string 41 | value?: number 42 | children?: ChildData[] 43 | } 44 | 45 | function getSelectedItem(data: DataType, key: string) { 46 | let result: number | undefined 47 | const recursiveSearch = (data: ChildDataType) => { 48 | if (result) { 49 | return 50 | } 51 | if (data.attr === key) { 52 | result = data.value 53 | } else if (data.children) { 54 | data.children.forEach((child: ChildDataType) => { 55 | if (result) { 56 | return 57 | } 58 | recursiveSearch(child) 59 | }) 60 | } 61 | } 62 | recursiveSearch(data) 63 | 64 | return result || 0 65 | } 66 | 67 | /** 68 | * Format for *Chart component 69 | * 70 | * @param data - Raw data 71 | */ 72 | export default (data: DataType) => { 73 | const formattedData: ConfirmedCasesType = { 74 | 検査実施人数: getSelectedItem(data, '検査実施人数'), 75 | 陽性物数: getSelectedItem(data, '陽性患者数'), 76 | 入院中: getSelectedItem(data, '入院中'), 77 | 死亡: getSelectedItem(data, '死亡'), 78 | 退院: getSelectedItem(data, '退院') 79 | } 80 | return formattedData 81 | } 82 | -------------------------------------------------------------------------------- /components/cards/TestedNumberCard.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 56 | -------------------------------------------------------------------------------- /components/StaticInfo.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 45 | 46 | 76 | -------------------------------------------------------------------------------- /utils/formatDayBeforeRatio.ts: -------------------------------------------------------------------------------- 1 | import { DisplayData } from '@/plugins/vue-chart' 2 | import { getDayjsObject } from '@/utils/formatDate' 3 | import { getCommaSeparatedNumberToFixedFunction } from '@/utils/monitoringStatusValueFormatters' 4 | 5 | interface DayBeforeRatioParameters { 6 | displayData: DisplayData 7 | dataIndex?: number 8 | digit?: number 9 | } 10 | interface DayBeforeRatioData { 11 | lastDay: Date 12 | lastDayData: string 13 | dayBeforeRatio: string 14 | } 15 | /** 16 | * Get day before ratio values 17 | * 18 | * @param displayData - Chart displayData 19 | * @param dataIndex - Target data index in `displayData.datasets` 20 | * @param digit - The number of digits to appear after the decimal point 21 | */ 22 | export const calcDayBeforeRatio = function({ 23 | displayData, 24 | dataIndex = 0, 25 | digit = 0 26 | }: DayBeforeRatioParameters): DayBeforeRatioData { 27 | const lastDay = displayData.labels!.slice(-1)[0] 28 | const data = displayData.datasets[dataIndex].data 29 | const lastDayData = data.slice(-1)[0] 30 | const lastBeforeData = data.slice(-2)[0] 31 | const dayBeforeRatio = lastDayData - lastBeforeData 32 | const formatter = getCommaSeparatedNumberToFixedFunction(digit) 33 | 34 | return { 35 | lastDay: getDayjsObject(lastDay).toDate(), 36 | lastDayData: formatter(lastDayData), 37 | dayBeforeRatio: formatDayBeforeRatio(dayBeforeRatio, formatter) 38 | } 39 | } 40 | 41 | function formatDayBeforeRatio( 42 | dayBeforeRatio: number, 43 | formatter: Function 44 | ): string { 45 | const formattedDayBeforeRatio = formatter(dayBeforeRatio) 46 | switch (Math.sign(dayBeforeRatio)) { 47 | case 1: 48 | return `+${formattedDayBeforeRatio}` 49 | case -1: 50 | return `${formattedDayBeforeRatio}` 51 | default: 52 | return `${formattedDayBeforeRatio}` 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /components/flow/FlowSp.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 51 | 52 | 70 | -------------------------------------------------------------------------------- /README_VI.md: -------------------------------------------------------------------------------- 1 | # Cổng thông tin chống dịch CoVid-19 của TP Tokyo 2 | 3 | ![](https://github.com/tokyo-metropolitan-gov/covid19/workflows/production%20deploy/badge.svg) 4 | 5 | [![Cổng thông tin chống dịch CoVid-19 của TP Tokyo](https://user-images.githubusercontent.com/1301149/75629392-1d19d900-5c25-11ea-843d-2d4376e3a560.png)](https://stopcovid19.metro.tokyo.lg.jp/) 6 | 7 | ### [日本語](./README.md) | [English](./README_EN.md) | [Spanish](./README_ES.md) | [Korean](./README_KO.md) | [Chinese (Taiwan)](./README_ZH_TW.md) | [Chinese (Simplified)](./README_ZH_CN.md) | Vietnamese 8 | 9 | ## Làm thế nào để đóng góp 10 | Mọi đóng góp của các bạn đều được chào đón. 11 | Xin vui lòng đọc [tại đây](./.github/CONTRIBUTING_VI.md) để biết thêm chi tiết. 12 | 13 | 14 | ## Quy tắc ứng xử 15 | Chi tiết vui lòng xem [tại đây](./.github/CODE_OF_CONDUCT_VI.md) 16 | 17 | ## Giấy phép 18 | Phần mềm này được phân phối dưới giấy phép [MIT](./LICENSE.txt) 19 | 20 | ## Thông tin cho nhà phát triển 21 | 22 | ### Xây dựng môi trường 23 | 24 | - Node.js phiên bản: 14.16.0 hoặc cao hơn 25 | 26 | **Nếu dùng yarn** 27 | ```bash 28 | # install dependencies 29 | $ yarn install 30 | 31 | # serve with hot reload at localhost:3000 32 | $ yarn dev 33 | ``` 34 | 35 | **Nếu dùng docker compose** 36 | ```bash 37 | # serve with hot reload at localhost:3000 38 | $ docker-compose up --build 39 | ``` 40 | 41 | ### Triển khai lên môi trường staging và production 42 | 43 | Khi nhánh `master` được cập nhật, file HTML sẽ tự động được build dựa trên nhánh `production`. Sau đó https://stopcovid19.metro.tokyo.lg.jp/ sẽ được cập nhật. 44 | 45 | Khi nhánh `staging` được cập nhật, file HTML sẽ tự động được build dựa trên nhánh `gh-pages`. Sau đó https://stg-covid19-tokyo.netlify.com/ sẽ được cập nhật. 46 | 47 | Khi nhánh `development` được cập nhật, file HTML sẽ tự động được build dựa trên nhánh `dev-pages`. Sau đó https://dev-covid19-tokyo.netlify.com/ sẽ được cập nhật. 48 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING_ZH_TW.md: -------------------------------------------------------------------------------- 1 | # 如何貢獻 2 | 3 | 貢獻者: 4 | 十分感謝您參與本計畫。 5 | 6 | 我是開發經理関(Seki)。如果您有任何問題,請隨時透過 Slack 進行諮詢。 7 | 8 | 這個頁面將會告訴您應該如何貢獻以及參與這個網站的開發: 9 | 10 | ## 對 Issue 的評論以及 Pull Request 的請求 11 | * 請自由的對 Issue 發表評論,我們也接受新的問題回報以及建議。 12 | * 新增新的 Issue 之前,請務必搜尋同樣的 Issue 不存在才開立新的 Issue。 13 | * Pull Request 發送時,請務必註記對應的 Issue 編號。我們不會接受沒有 Issue 編號的 Pull Request。 14 | * 請注意改善建議的 Issue(標籤為 `improve` 的)可能不會每次都被接受。(特別是針對 UI) 15 | * 如果能夠優先處理 `good first issue` / `help wanted` / `bug` 的話將會很有幫助。 16 | 17 | ## 如何參與交流 18 | * 如果你沒有 Code for Japan 的 Slack 帳號的話、請[點這邊註冊](https://cfjslackin.herokuapp.com/)。 19 | * 請參加 `#covid19` 頻道。 20 | 21 | ## 給參加者 22 | * 進行參與開發之前、請先閱讀 [Principle/行動規範](CODE_OF_CONDUCT_ZH_TW.md) 。 23 | * 交流時也請先確認 Code for Japan 的[行動規範(日文網頁)](https://github.com/codeforjapan/codeofconduct) 。 24 | * 如果有自己可以做而且沒有被指派(assign)的 Issue 的話、請在 Issue 下回應「やります!(我來做)」後再開始開發。 25 | * [關於 good first issue 標籤](https://github.com/tokyo-metropolitan-gov/covid19/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) 是推薦給新手的。 26 | * 如果您可能要離開作業半天以上的話,請確保其他人可以接續您的工作。(如果長時間佔住 Issue,那麼這個 Issue 會被卡住。) 27 | * 對於一天以上沒有更新的 Issue,我們可能會拔掉 Assignment。在工作中善用 [Draft Pull Request (日文網頁)](https://qiita.com/tatane616/items/13da1b6797a7b871ad58) 的話可以讓大家更輕易地瞭解您目前的進度。 28 | * Issue 相關的問題請在 Issue 內回應欄討論(而不是 Slack)。 29 | * 我們也接受建議!請積極的開新的 Issue 吧。 30 | 31 | ## 補充 CONTRIBUTORS.md 的相關資訊 32 | 對於提供貢獻的大家、在 [CONTRIBUTORS.md](https://github.com/tokyo-metropolitan-gov/covid19/blob/development/CONTRIBUTORS.md) 這份文件中記載了名字(暱稱)以及角色。 33 | 如果您有任何貢獻,請在此留下您的大名。 34 | 請在[#654](https://github.com/tokyo-metropolitan-gov/covid19/issues/654) 這個 Issue 留下您要公開的名字、連結(如果有的話)、角色。 35 | 36 | ## 開發相關的資訊 37 | * 開發環境(Dev.)https://dev-covid19-tokyo.netlify.com/ 38 | * Stage 站 https://stg-covid19-tokyo.netlify.com/ 39 | * 正式環境 https://stopcovid19.metro.tokyo.lg.jp/ 40 | * [設計稿](https://www.figma.com/file/V7vt80p2gauhdgTZeVNbgj/UI%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=121%3A156) 41 | 42 | 也很歡迎更新此文件! 43 | 44 | * 譯註:如果需要中文翻譯可以在 CoJ 找到 Pichu Chen 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Node template 3 | # Logs 4 | /logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # Bower dependency directory (https://bower.io/) 29 | bower_components 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (https://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directories 38 | node_modules/ 39 | jspm_packages/ 40 | 41 | # TypeScript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # Yarn Integrity file 57 | .yarn-integrity 58 | 59 | # dotenv environment variables file 60 | .env 61 | 62 | # parcel-bundler cache (https://parceljs.org/) 63 | .cache 64 | 65 | # next.js build output 66 | .next 67 | 68 | # nuxt.js build output 69 | .nuxt 70 | 71 | # Nuxt generate 72 | dist/* 73 | # data 74 | !dist/data 75 | data/data.json 76 | data/news.json 77 | data/call_center.json 78 | data/test_count.json 79 | data/patients.json 80 | 81 | # vuepress build output 82 | .vuepress/dist 83 | 84 | # Serverless directories 85 | .serverless 86 | 87 | # IDE / Editor 88 | .idea 89 | 90 | # Service worker 91 | sw.* 92 | 93 | # macOS 94 | .DS_Store 95 | 96 | # Vim swap files 97 | *.swp 98 | 99 | # Netlify 100 | .netlify 101 | 102 | # OGP images 103 | ogp/* 104 | 105 | dist/ 106 | -------------------------------------------------------------------------------- /components/flow/FlowPcPcr.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 86 | -------------------------------------------------------------------------------- /pages/parent.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 59 | 60 | 70 | -------------------------------------------------------------------------------- /plugins/chartjs-adapter-dayjs.ts: -------------------------------------------------------------------------------- 1 | import 'dayjs/locale/en' 2 | import 'dayjs/locale/ja' 3 | import 'dayjs/locale/ko' 4 | import 'dayjs/locale/pt-br' 5 | import 'dayjs/locale/th' 6 | import 'dayjs/locale/vi' 7 | import 'dayjs/locale/zh-cn' 8 | import 'dayjs/locale/zh-tw' 9 | 10 | import { NuxtAppOptions } from '@nuxt/types/app' 11 | import { _adapters } from 'chart.js' 12 | import dayjs from 'dayjs' 13 | import customParseFormat from 'dayjs/plugin/customParseFormat' 14 | 15 | const DEFAULT_FORMATS = { 16 | datetime: 'MMM D, YYYY, h:mm:ss a', 17 | millisecond: 'h:mm:ss.SSS a', 18 | second: 'h:mm:ss a', 19 | minute: 'h:mm a', 20 | hour: 'hA', 21 | day: 'MMM D', 22 | week: 'll', 23 | month: 'MMM YYYY', 24 | quarter: '[Q]Q - YYYY', 25 | year: 'YYYY' 26 | } 27 | 28 | export function useDayjsAdapter(nuxtI18n: NuxtAppOptions['i18n']) { 29 | dayjs.extend(customParseFormat) 30 | 31 | // set locale when page onload 32 | setLocale(nuxtI18n.locale) 33 | nuxtI18n.onLanguageSwitched = (_: string, newLocale: string) => { 34 | setLocale(newLocale) 35 | } 36 | 37 | _adapters._date.override({ 38 | _id: 'dayjs', // for debug 39 | 40 | formats() { 41 | return DEFAULT_FORMATS 42 | }, 43 | 44 | parse(time, format) { 45 | const value = format ? dayjs(time, format) : dayjs(time) 46 | 47 | return value.isValid() ? value.valueOf() : null 48 | }, 49 | 50 | format(time, format) { 51 | return dayjs(time).format(format) 52 | }, 53 | 54 | add(time, amount, unit) { 55 | return dayjs(time).add(amount, unit) 56 | }, 57 | 58 | diff(max, min, unit) { 59 | return dayjs(max).diff(dayjs(min), unit) 60 | }, 61 | 62 | startOf(time, unit, _) { 63 | return dayjs(time).startOf(unit) 64 | }, 65 | 66 | endOf(time, unit) { 67 | return dayjs(time).endOf(unit) 68 | } 69 | }) 70 | } 71 | 72 | function setLocale(newLocale: string) { 73 | let locale = newLocale 74 | 75 | if (locale.includes('ja')) { 76 | locale = 'ja' 77 | } 78 | 79 | dayjs.locale(locale) 80 | } 81 | -------------------------------------------------------------------------------- /README_ES.md: -------------------------------------------------------------------------------- 1 | # Sitio web del Grupo de trabajo COVID-19 de Tokio 2 | 3 | ![](https://github.com/tokyo-metropolitan-gov/covid19/workflows/production%20deploy/badge.svg) 4 | 5 | [![Tokyo COVID-19 Task Force website](https://user-images.githubusercontent.com/1301149/75629392-1d19d900-5c25-11ea-843d-2d4376e3a560.png)](https://stopcovid19.metro.tokyo.lg.jp/) 6 | 7 | ### [日本語](./README.md) | [English](./README_EN.md) | Spanish | [Korean](./README_KO.md) | [Chinese (Taiwan)](./README_ZH_TW.md) | [Chinese (Simplified)](./README_ZH_CN.md) | [Vietnamese](./README_VI.md) 8 | 9 | ## Cómo Contribuir 10 | 11 | Todas las contribuciones son bienvenidas.! 12 | Por favor, consulte [Cómo contribuir](./.github/CONTRIBUTING_ES.md) para obtener más detalles. 13 | 14 | ## Código de Conducta 15 | 16 | Por favor, consulte el [Código de conducta para desarrolladores](./.github/CODE_OF_CONDUCT_ES.md) para más detalles. 17 | 18 | ## Licencia 19 | Este software se publica bajo la [licencia MIT](./LICENSE.txt). 20 | 21 | ## Para Desarrolladoras 22 | 23 | ### Cómo Configurar Entornos 24 | 25 | - Versión requerida de Node.js: 14.16.0 o superior 26 | 27 | **Use yarn** 28 | ```bash 29 | # install dependencies 30 | $ yarn install 31 | 32 | # serve with hot reload at localhost:3000 33 | $ yarn dev 34 | ``` 35 | 36 | **Use docker** 37 | ```bash 38 | # serve with hot reload at localhost:3000 39 | $ docker-compose up --build 40 | ``` 41 | 42 | ### Implementación en entornos de preparación y producción 43 | 44 | Cuando se actualiza la rama `master`, los archivos HTML se construirán automáticamente en la rama de `production`, 45 | y luego el sitio de producción (https://stopcovid19.metro.tokyo.lg.jp/) también se actualizará. 46 | 47 | Cuando se actualiza la rama `staging`, los archivos HTML se construirán automáticamente en la rama `gh-pages`, 48 | y luego el sitio de preparación (https://stg-covid19-tokyo.netlify.com/) también se actualizará. 49 | 50 | Cuando se actualiza la rama `development`, los archivos HTML se construirán automáticamente en la rama` dev-pages`, 51 | y luego el sitio de desarrollo (https://dev-covid19-tokyo.netlify.com/) también se actualizará. 52 | -------------------------------------------------------------------------------- /components/MetroBarChart.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 33 | 34 | 89 | -------------------------------------------------------------------------------- /components/cards/ConfirmedCasesAttributesCard.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 76 | -------------------------------------------------------------------------------- /components/AppLink.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 90 | 91 | 99 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | # Tokyo COVID-19 Task Force website 2 | 3 | ![](https://github.com/tokyo-metropolitan-gov/covid19/workflows/production%20deploy/badge.svg) 4 | 5 | [![Tokyo COVID-19 Task Force website](https://user-images.githubusercontent.com/1301149/75629392-1d19d900-5c25-11ea-843d-2d4376e3a560.png)](https://stopcovid19.metro.tokyo.lg.jp/) 6 | 7 | ### [日本語](./README.md) | English | [Spanish](./README_ES.md) | [Korean](./README_KO.md) | [Chinese (Taiwan)](./README_ZH_TW.md) | [Chinese (Simplified)](./README_ZH_CN.md) | [Vietnamese](./README_VI.md) 8 | 9 | ## How to Contribute 10 | 11 | All contributions are welcome! 12 | Please check [How to contribute](./.github/CONTRIBUTING_EN.md) for details. 13 | 14 | ## Code of Conduct 15 | 16 | Please check [Code of conduct for developers](./.github/CODE_OF_CONDUCT_EN.md) for details. 17 | 18 | ## License 19 | This software is released under [the MIT License](./LICENSE.txt). 20 | 21 | ## For Developers 22 | 23 | ### How to Set Up Environments 24 | 25 | - Required Node.js version: 14.16.0 or higher 26 | 27 | **Use yarn** 28 | ```bash 29 | # install dependencies 30 | $ yarn install 31 | 32 | # serve with hot reload at localhost:3000 33 | $ yarn dev 34 | ``` 35 | 36 | **Use docker** 37 | ```bash 38 | # serve with hot reload at localhost:3000 39 | $ docker-compose up --build 40 | ``` 41 | 42 | ### How to resolve `Cannot find module ****` error 43 | 44 | **Use yarn** 45 | ```bash 46 | $ yarn install 47 | ``` 48 | 49 | **Use docker** 50 | ```bash 51 | $ docker-compose run --rm app yarn install 52 | ``` 53 | 54 | ### Deployment to Staging & Production Environments 55 | 56 | When `master` branch is updated, the HTML files will be automatically built onto `production` branch, 57 | and then the production site (https://stopcovid19.metro.tokyo.lg.jp/) will be also updated. 58 | 59 | When `staging` branch is updated, the HTML files will be automatically built onto `gh-pages` branch, 60 | and then the staging site (https://stg-covid19-tokyo.netlify.com/) will be also updated. 61 | 62 | When `development` branch is updated, the HTML files will be automatically built onto `dev-pages` branch, 63 | and then the development site (https://dev-covid19-tokyo.netlify.com/) will be also updated. 64 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING_KO.md: -------------------------------------------------------------------------------- 1 | # 기여방법 2 | 모든 기여하시는 분들께, 이 프로젝트에 참가해주셔서 대단히 감사합니다!! 3 | 4 | 개발 책임을 맡은 Seki입니다. 무엇이든 질문이 있다면 Slack(슬랙) 등으로 부담없이 질문해 주세요! 5 | 6 | 이 사이트 개발에 참여를 원하시는 분들을 위해, 참여 방법을 알려드립니다. 7 | 8 | ## Issue에 대한 의견과 Pull Request에 대해 9 | * Issue에서 의견을 자유롭게 올려주세요! 새로운 질문이나 제안도 받습니다. 10 | * Issue를 추가하는 경우, 반드시 이미 등록되어 있는 Issue가 있는지 검색한 후에 작성해주세요. 11 | * Pull Request를 보내는 경우, 반드시 그 Pull Request에 대응하는 Issue 번호를 추가해주세요. 단독 Pull Request는 받지 않습니다. 12 | * improve(개선제안) 라벨이 붙은 Issue에 대해서는 반드시 반영할 수 있다고 할 수 없으므로 양해해 주시기 바랍니다. (특히, UI쪽에 대해선) 13 | * good first issue / help wanted / bug 를 우선으로 대응해주시면 감사하겠습니다. 14 | 15 | ## 커뮤니케이션 참가방법 16 | * Code for Japan의 Slack계정이 없는 경우에는, [여기로 등록](https://cfjslackin.herokuapp.com/)해주세요. 17 | * `#covid19` 채널에 많은 참여 부탁드립니다. 18 | 19 | ## 참여하기에 앞서 20 | * 개발에 참가하기 전에, [Principle/행동강령](CODE_OF_CONDUCT_KO.md) 를 읽어주시기 바랍니다. 21 | * 커뮤니케이션에 대해서는, Code for Japan의 [행동강령](https://github.com/codeforjapan/codeofconduct) 을 확인해주세요. 22 | * 내가 참여할수 있는 Issue에 누구도 배정되지 않은 경우, Issue에 "제가 하겠습니다!"등의 댓글을 달아 주신 후 개발을 시작해주세요. 23 | * [good first issue 라벨이 붙은 이슈](https://github.com/tokyo-metropolitan-gov/covid19/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)는 초보자에게 추천합니다. 24 | * 반나절이상 작업을 멈춰야 하는 경우, 다른분이 작업을 계속 진행할 수 있도록 해주세요.(Issue를 배정받은 상태로 장시간 중지 상태가 되면 그 Issue로 때문에 다른 이슈가 블록이 됩니다.) 25 | * 1일 이상 갱신이 없는 Issue에 관해서는, 배정을 취소하는 경우가 있습니다. 작업도중이라도, [Draft Pull Request](https://qiita.com/tatane616/items/13da1b6797a7b871ad58)를 보내주시면 진행상황을 파악할 수 있습니다. 26 | * Issue에 대한 질문은, Slack보다는 Issue의 댓글을 활용해주세요. 27 | * 제안도 받고 있습니다. 적극적으로 새로운 Issue를 등록해주세요. 28 | 29 | ## CONTRIBUTORS.md 의 추가 게제에 대해서 30 | 도와주신 모든 분들께, 이름(닉네임)과 역할을 넣은 [CONTRIBUTORS.md](https://github.com/tokyo-metropolitan-gov/covid19/blob/development/CONTRIBUTORS.md)라는 파일이 있습니다. 31 | 무엇이든 기여를 하신 분께서는 이름을 올려주세요. 32 | [#654](https://github.com/tokyo-metropolitan-gov/covid19/issues/654) 의 Issue에 게제할 이름, 링크(원하는 경우), 역할을 댓글로 작성하세요. 33 | 34 | ## 개발에 관한 정보 35 | * 개발 사이트 https://dev-covid19-tokyo.netlify.com/ 36 | * 스테이징 배포 사이트 https://stg-covid19-tokyo.netlify.com/ 37 | * 운영 배포 사이트 https://stopcovid19.metro.tokyo.lg.jp/ 38 | * [디자인](https://www.figma.com/file/V7vt80p2gauhdgTZeVNbgj/UI%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=121%3A156) 39 | 40 | 이 문서의 수정 및 변경을 환영합니다! 41 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # 貢献の仕方 2 | 3 | コントリビューターの皆様、本プロジェクトにご参加いただきありがとうございます!! 4 | 5 | 開発責任者をしています、関です。何か質問があれば、Slack 等でお気軽に質問してください! 6 | 7 | 本サイトの開発に参加してくださる方に対して、参加方法をお伝えします。 8 | 9 | ## Issue へのコメントや Pull Request について 10 | * Issue へのコメントはご自由にどうぞ!新しい質問や提案なども受け付けます。 11 | * Issue を追加する場合、必ず既に同様の Issue が無いか検索をしてから作成してください。 12 | * Pull Request を送る場合、必ず対応する Issue 番号を追記してください。単独の Pull Request は受け付けません。 13 | * improve(改善提案)がついたIssueについては必ず反映できると限りませんのでご了承ください(特にUI系について) 14 | * good first issue / help wanted / bug を優先して対応いただけると助かります 15 | 16 | ## コミュニケーションへの参加方法 17 | * Code for Japan の Slack アカウントを持っていない場合、[こちらから登録](https://cfjslackin.herokuapp.com/)してください 18 | * `#covid19` チャンネルにご参加ください。 19 | 20 | ## 参加にあたって 21 | * 開発に参加する前に、[Principle/行動規範](CODE_OF_CONDUCT.md) をご一読ください。 22 | * コミュニケーションにあたっては、Code for Japan の [行動規範](https://github.com/codeforjapan/codeofconduct) もご確認ください。 23 | * 自分ができそうな Issue に誰もアサインされていない場合、Issueに「やります!」等とコメントしてから開発をはじめてください。 24 | * [good first issue ラベルのついたもの](https://github.com/tokyo-metropolitan-gov/covid19/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)は初心者におすすめです 25 | * 半日以上作業から離れそうな場合は、他の人が作業を引き継げるようにしておいてください。(Issue を抱えたまま長時間オフになると、そのIssueがブロックされてしまいます。) 26 | * 1日以上更新されない Issue については、当方で assign を外させていただくことがあります。作業途中でも、[Draft Pull Request](https://qiita.com/tatane616/items/13da1b6797a7b871ad58) を送ってもらえると、動きが把握しやすくなります。 27 | * Issue に関連した質問等は、Slack より Issue 内のコメントを活用しましょう 28 | * 提案なども受け付けます!積極的に新しく Issue を作ってください。 29 | 30 | ## 参考情報 31 | * [東京都 新型コロナウイルス対策サイトへの貢献方法を解説(Qiita)](https://qiita.com/FPC_COMMUNITY/items/b9cc072813dc2231b2b2) 32 | 33 | ## CONTRIBUTORS.md への追加について 34 | ご協力いただいた皆様のお名前(ハンドルネーム)や役割を記す、[CONTRIBUTORS.md](https://github.com/tokyo-metropolitan-gov/covid19/blob/development/CONTRIBUTORS.md) というファイルがあります。 35 | 何かしらの貢献を行った方は、ぜひこちらにもお名前をお載せください。 36 | [#654](https://github.com/tokyo-metropolitan-gov/covid19/issues/654) の Issue に、掲載名、リンク先(あれば)、役割をコメントください。 37 | 38 | ## 開発に関する情報 39 | * 開発サイト https://dev-covid19-tokyo.netlify.com/ 40 | * ステージングサイト https://stg-covid19-tokyo.netlify.com/ 41 | * 本番サイト https://stopcovid19.metro.tokyo.lg.jp/ 42 | * [デザイン](https://www.figma.com/file/V7vt80p2gauhdgTZeVNbgj/UI%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=121%3A156) 43 | 44 | 本 ドキュメント の更新も大歓迎です! 45 | -------------------------------------------------------------------------------- /utils/formatDate.ts: -------------------------------------------------------------------------------- 1 | import dayjs from 'dayjs' 2 | 3 | /** 4 | * Get datetime string formatted ISO8601(YYYY-MM-DDTHH:mm:ss) 5 | * 6 | * @param dateString - Parsable string by dayjs 7 | */ 8 | export const convertDatetimeToISO8601Format = (dateString: string): string => { 9 | return dayjs(dateString).format('YYYY-MM-DDTHH:mm:ss[+09:00]') 10 | } 11 | 12 | /** 13 | * Get date string formatted ISO8601(YYYY-MM-DD) 14 | * 15 | * @param dateString- Parsable string by dayjs 16 | */ 17 | export const convertDateToISO8601Format = (dateString: string): string => { 18 | return dayjs(dateString).format('YYYY-MM-DD') 19 | } 20 | 21 | /** 22 | * Get date string formatted follow each country's format(YYYY-MM-DD) 23 | * China, Japan, Korea, Taiwan - YYYY-MM-DD 24 | * US - MM/DD/YYYY 25 | * 26 | * @param dateString- Parsable string by dayjs 27 | * @param locale- User's language 28 | */ 29 | export const convertDateByCountryPreferTimeFormat = ( 30 | dateString: string, 31 | locale: string 32 | ): string => { 33 | if (locale === 'en') { 34 | return dayjs(dateString).format('MMM DD, YYYY') 35 | } 36 | return dayjs(dateString).format('YYYY-MM-DD') 37 | } 38 | 39 | /** 40 | * Get date string formatted Simple(YYYY/MM/DD) 41 | * 42 | * @param dateString- Parsable string by dayjs 43 | */ 44 | export const convertDateToSimpleFormat = (dateString: string): string => { 45 | return dayjs(dateString).format('YYYY/MM/DD') 46 | } 47 | 48 | /** 49 | * Get date string complemented year 50 | * 51 | * @param dateString- Parsable string by dayjs 52 | */ 53 | export const getComplementedDate = (dateString: string): Date => { 54 | const dates = dateString.split('/') 55 | if (dates.length !== 2) { 56 | return new Date(dateString) 57 | } 58 | const month = Number(dates[0]) 59 | const date = Number(dates[1]) 60 | const today = new Date() 61 | const currentMonth = today.getMonth() + 1 62 | const currentDate = today.getDate() 63 | let targetYear = today.getFullYear() 64 | 65 | if (currentMonth < month || (currentMonth === month && currentDate < date)) { 66 | targetYear -= 1 67 | } 68 | 69 | return new Date(targetYear, month - 1, date) 70 | } 71 | 72 | /** 73 | * Get dayjs object from date string 74 | * 75 | * @param dateString- Parsable string by dayjs 76 | */ 77 | export const getDayjsObject = (dateString: string): dayjs.Dayjs => { 78 | return dayjs(getComplementedDate(dateString)) 79 | } 80 | -------------------------------------------------------------------------------- /.github/workflows/ogp_builder.yml: -------------------------------------------------------------------------------- 1 | name: OGP Builder 2 | 3 | on: 4 | repository_dispatch: 5 | types: [build_application] 6 | push: 7 | branches: 8 | - master 9 | 10 | jobs: 11 | build: 12 | runs-on: macos-latest 13 | steps: 14 | - name: Extract branch name 15 | shell: bash 16 | run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" 17 | id: extract_branch 18 | - uses: actions/checkout@v2 19 | with: 20 | ref: ${{ steps.extract_branch.outputs.branch }} 21 | - name: Setup Node 22 | uses: actions/setup-node@v1 23 | with: 24 | node-version: '14.16.0' 25 | - name: Get yarn cache directory path 26 | id: yarn-cache-dir-path 27 | run: echo "::set-output name=dir::$(yarn cache dir)" 28 | - name: Cache dependencies 29 | uses: actions/cache@v2 30 | with: 31 | path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 32 | key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} 33 | restore-keys: | 34 | ${{ runner.os }}-yarn- 35 | - run: yarn install --frozen-lockfile 36 | - run: yarn run test 37 | - run: yarn run generate:deploy 38 | - run: pip3 install selenium 39 | - run: (python3 -m http.server --directory ./dist 8000 &) ; python3 ./ui-test/ogp_screenshot.py 40 | - name: Upload screenshot 41 | uses: actions/upload-artifact@v1 42 | with: 43 | name: ogp 44 | path: ogp 45 | upload: 46 | needs: build 47 | runs-on: ubuntu-latest 48 | steps: 49 | - name: Extract branch name 50 | shell: bash 51 | run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" 52 | id: extract_branch 53 | - uses: actions/checkout@v2 54 | with: 55 | ref: production 56 | - name: Download ogp images 57 | uses: actions/download-artifact@v1 58 | with: 59 | name: ogp 60 | - name: Commit files 61 | run: | 62 | git config --local user.email "action@github.com" 63 | git config --local user.name "GitHub Action" 64 | git add . 65 | git commit -m "OGP update" 66 | - name: Push changes 67 | uses: ad-m/github-push-action@master 68 | with: 69 | github_token: ${{ secrets.GITHUB_TOKEN }} 70 | branch: production 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 長野県 非公式 新型コロナウイルス感染症対策サイト 2 | 3 | ![](https://github.com/Stop-COVID19-Nagano/covid19/workflows/production%20deploy/badge.svg) 4 | 5 | [長野県 非公式 新型コロナウイルス感染症対策サイト](https://nagano.stopcovid19.jp/) 6 | [![長野県 非公式 新型コロナウイルス感染症対策サイト](https://user-images.githubusercontent.com/941125/76682913-4e41d280-6643-11ea-91a4-c2e2b53650fc.png)](https://nagano.stopcovid19.jp/) 7 | 8 | 9 | ### 日本語 | [English](./README_EN.md) | [Spanish](./README_ES.md) | [Korean](./README_KO.md) | [Chinese (Taiwan)](./README_ZH_TW.md) | [Chinese (Simplified)](./README_ZH_CN.md) | [Vietnamese](./README_VI.md) 10 | 11 | ## コミュニケーションへの参加方法 12 | 13 | ### 長野県版 14 | 15 | 本プロジェクトのメインのコミュニケーションの場 16 | 17 | * Facebook グループの[長野県版 COVID-19 対策サイト をつくろう](https://www.facebook.com/groups/155315052273089/)にご参加ください 18 | * Facebook のアカウントを持っていない場合、`新規アカウントを作成 `から登録もしくは、[Facebookに登録](https://ja-jp.facebook.com/r.php)から登録してください 19 | 20 | ### 地域版 21 | 22 | 東京都以外の全国地域のプロジェクトについてのコミュニケーションの場 23 | * Code for Japan の Slack アカウントを持っていない場合、[こちらから登録](https://cfjslackin.herokuapp.com/)してください 24 | * `#stopcovid19jp` チャンネルにご参加ください。 25 | 26 | ## 貢献の仕方 27 | Issues にあるいろいろな修正にご協力いただけると嬉しいです。 28 | 29 | 詳しくは[貢献の仕方](./.github/CONTRIBUTING.md)を御覧ください。 30 | 31 | 32 | ## 行動原則 33 | 詳しくは[サイト構築にあたっての行動原則](./.github/CODE_OF_CONDUCT.md)を御覧ください。 34 | 35 | ## ライセンス 36 | 本ソフトウェアは、[MITライセンス](./LICENSE.txt)の元提供されています。 37 | 38 | ## このサイトから派生したサイト 39 | 40 | [Link先](./forkedSites.md)を御覧ください。 41 | 42 | ## 開発者向け情報 43 | 44 | ### 環境構築の手順 45 | 46 | - 必要となるNode.jsのバージョン: 14.16.0以上 47 | 48 | **yarn を使う場合** 49 | ```bash 50 | # install dependencies 51 | $ yarn install 52 | 53 | # serve with hot reload at localhost:3000 54 | $ yarn dev 55 | ``` 56 | 57 | **docker compose を使う場合** 58 | ```bash 59 | # serve with hot reload at localhost:3000 60 | $ docker-compose up --build 61 | ``` 62 | 63 | ### `Cannot find module ****` と怒られた時 64 | 65 | **yarn を使う場合** 66 | ```bash 67 | $ yarn install 68 | ``` 69 | 70 | **docker compose を使う場合** 71 | ```bash 72 | $ docker-compose run --rm app yarn install 73 | ``` 74 | 75 | ### ステージング・本番環境への反映 76 | 77 | `master` ブランチがアップデートされると、自動的に `production` ブランチにHTML類がbuildされます。そして、本番サイト https://nagano.stopcovid19.jp/ が更新されます。 78 | 79 | ~~ `staging` ブランチがアップデートされると、自動的に `gh-pages` ブランチにHTML類がbuildされます。そして、ステージングサイト https://stg-covid19-nagano.netlify.com/ が更新されます。 ~~ 80 | 81 | `development` ブランチがアップデートされると、自動的に `dev-pages` ブランチにHTML類がbuildされます。そして、開発用サイト https://dev-covid19-nagano.netlify.com/ が更新されます。 82 | -------------------------------------------------------------------------------- /components/flow/FlowPcNotRequired.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 95 | -------------------------------------------------------------------------------- /components/LanguageSelector.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 49 | 50 | 100 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING_ES.md: -------------------------------------------------------------------------------- 1 | # Cómo Contribuir 2 | 3 | Colaboradores, ¡gracias por participar en este proyecto! 4 | 5 | Soy Seki, el gerente de desarrollo. Si tiene alguna pregunta, no dude en preguntarme en Slack, etc. 6 | 7 | Esta página muestra cómo puede contribuir al desarrollo de este sitio. 8 | 9 | ## Comentarios sobre Issues and Pull Requests 10 | * ¡Siéntase libre de comentar sobre el problema! Preguntas y sugerencias también son bienvenidas. 11 | * Puede solucionar algunos problemas usando Pull Request. 12 | * Tenga en cuenta que los problemas de sugerencias de mejora (etiquetados con `improve`) 13 | puede no ser siempre aceptado (especialmente los de la interfaz de usuario o UI) 14 | * Nos alegra que le dé prioridad a los problemas de [good first issue / help wanted / bug] 15 | 16 | ## Cómo participar en comunicaciones 17 | * Si no tiene una cuenta de Slack de "Código para Japón", regístrese [aquí](https://cfjslackin.herokuapp.com/) 18 | * Únete al canal `#covid19` 19 | 20 | ## Para participar 21 | * Por favor lea [Principio / Código de conducta](CODE_OF_CONDUCT_ES.md) antes de participar en desarrollos. 22 | * Para comunicaciones, verifique también el Código de Japón [Código de Conducta](https://github.com/codeforjapan/codeofconduct). 23 | * Si encuentra algunos problemas que puede hacer, ¡por favor, asigne usted mismo! 24 | * [good first issue label](https://github.com/tokyo-metropolitan-gov/covid19/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) se recomienda para principiantes 25 | * Si no puede progresar durante más de medio día, asegúrese de que otros puedan hacerse cargo de su trabajo. 26 | * En caso de que los problemas no se actualicen durante más de un día, podemos eliminar la asignación.[Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests) Se recomienda para que todos conozcan la situación. 27 | * Para cualquier pregunta relacionada con el problema, debemos analizar en los comentarios del problema en Slack. 28 | * También aceptamos sugerencias! Por favor, siéntase libre de crear nuevos problemas. 29 | 30 | ## Información de desarrollo 31 | * Sitio en desarrollo https://dev-covid19-tokyo.netlify.com/ 32 | * Sitio de prueba https://stg-covid19-tokyo.netlify.com/ 33 | * Sitio en producción https://stopcovid19.metro.tokyo.lg.jp/ 34 | * [Design](https://www.figma.com/file/V7vt80p2gauhdgTZeVNbgj/UI%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=121%3A156) 35 | 36 | ¡Las actualizaciones de este documento también son bienvenidas! 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "covid19", 3 | "version": "1.0.0", 4 | "description": "長野県 非公式 新型コロナウイルス感染症対策サイト", 5 | "author": "有志一同", 6 | "private": true, 7 | "engines": { 8 | "node": ">=14.16.0 " 9 | }, 10 | "scripts": { 11 | "cp:data": "./bin/cp_data.sh", 12 | "dev:orig": "cross-env NODE_ENV=development nuxt-ts", 13 | "dev": "yarn cp:data && yarn dev:orig", 14 | "build": "nuxt-ts build", 15 | "export": "nuxt-ts export", 16 | "start": "cross-env NODE_ENV=production nuxt-ts start", 17 | "generate:deploy": "yarn cp:data && yarn generate:deploy:orig", 18 | "generate:deploy:orig": "nuxt-ts generate", 19 | "generate": "eslint './**/*.{js,ts,vue}' && nuxt-ts generate", 20 | "lint-and-generate": "eslint './**/*.{js,ts,vue}' && nuxt-ts generate", 21 | "test": "echo 'skip tests (there is no test)'", 22 | "lint": "eslint './**/*.{js,ts,vue}'", 23 | "lint:fix": "eslint './**/*.{js,ts,vue}' --fix", 24 | "clean-hardsource": "rimraf ./node_modules/.cache/hard-source" 25 | }, 26 | "lint-staged": { 27 | "*.{js,ts,css,vue}": [ 28 | "eslint --fix" 29 | ] 30 | }, 31 | "husky": { 32 | "hooks": { 33 | "pre-commit": "lint-staged" 34 | } 35 | }, 36 | "dependencies": { 37 | "@nuxt/typescript-runtime": "^0.4.0", 38 | "@nuxtjs/axios": "^5.3.6", 39 | "@nuxtjs/dotenv": "^1.4.0", 40 | "@nuxtjs/pwa": "^3.0.0-0", 41 | "chart.js": "2.9.4", 42 | "cross-env": "^5.2.0", 43 | "dayjs": "1.9.6", 44 | "express": "^4.17.3", 45 | "nuxt": "2.15.3", 46 | "nuxt-i18n": "6.22.3", 47 | "vue-chartjs": "3.5.1", 48 | "vue-property-decorator": "^8.4.0", 49 | "vue-scrollto": "^2.17.1", 50 | "vue-spinner": "^1.0.3" 51 | }, 52 | "devDependencies": { 53 | "@fullhuman/postcss-purgecss": "^2.1.0", 54 | "@mdi/font": "^5.0.45", 55 | "@nuxt/typescript-build": "^0.6.0", 56 | "@nuxtjs/eslint-config-typescript": "^1.0.2", 57 | "@nuxtjs/google-analytics": "^2.2.3", 58 | "@nuxtjs/vuetify": "^1.0.0", 59 | "@types/chart.js": "^2.9.14", 60 | "@vue/test-utils": "^1.0.0-beta.27", 61 | "babel-jest": "^24.1.0", 62 | "eslint": "^6.8.0", 63 | "eslint-config-prettier": "^6.10.0", 64 | "eslint-plugin-prettier": "^3.1.2", 65 | "eslint-plugin-tsdoc": "^0.2.3", 66 | "husky": "^4.2.3", 67 | "jest": "^24.1.0", 68 | "lint-staged": "^10.0.8", 69 | "nodemon": "^1.18.9", 70 | "nuxt-purgecss": "^0.2.1", 71 | "nuxt-svg-loader": "^1.2.0", 72 | "prettier": "^1.19.1", 73 | "vue-jest": "^4.0.0-0" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING_EN.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | Contributors, thank you for participating in this project! 4 | 5 | I'm Seki, the development manager. If you have any questions, feel free to ask me on Slack etc. 6 | 7 | This page shows how you can contribute to the development of this site. 8 | 9 | ## Comments on Issues and Pull Requests 10 | * Feel free to comment on any Issues! Questions and suggestions are also welcome. 11 | * Please search existing issues to make sure there is no similar issues before making a new issue. 12 | * Note that Issues for improvement suggestions (labeled with `improve`) may not be always accepted (especially ones for UI) 13 | * When you send a new Pull Request, please specify a related issue ID. We don't accept Pull Requests which has no issue ID. 14 | * We appreciate if you give priority to the issues labelled [good first issue / help wanted / bug] 15 | 16 | ## How to participate in communications 17 | * If you do not have a "Code for Japan" Slack account, please register [here](https://cfjslackin.herokuapp.com/) 18 | * Join `#covid19` Channel 19 | 20 | ## For participation 21 | * Please read [Principle / Code of Conduct](CODE_OF_CONDUCT_EN.md) before participating in development. 22 | * For communication, please also check Code for Japan's [Code of Conduct](https://github.com/codeforjapan/codeofconduct). 23 | * If you plan to work on an issue, please leave a comment behind to give a heads-up. 24 | * [good first issue label](https://github.com/tokyo-metropolitan-gov/covid19/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) is recommended for beginners. 25 | * If you can't make any progress for more than half a day, make sure that others can take over your work. 26 | * If an issue is not updated for more than one day, we may remove the assignment. 27 | * A [Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests) is recommended for any work in progress, so that everyone understands the situation. 28 | * Please discuss questions related to an Issue in the Issue comments instead of on Slack. 29 | * We also accept suggestions! Please feel free to create new issues. 30 | 31 | ## Development information 32 | * Development site https://dev-covid19-tokyo.netlify.com/ 33 | * Staging site https://stg-covid19-tokyo.netlify.com/ 34 | * Production site https://stopcovid19.metro.tokyo.lg.jp/ 35 | * [Design](https://www.figma.com/file/V7vt80p2gauhdgTZeVNbgj/UI%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=121%3A156) 36 | 37 | Updates to this document are also welcome! 38 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING_VI.md: -------------------------------------------------------------------------------- 1 | # Cách đóng góp 2 | 3 | Cộng tác viên, cảm ơn bạn đã tham gia dự án này! 4 | 5 | Tôi là Seki, người quản lý phát triển. Nếu bạn có bất kỳ câu hỏi nào, vui lòng hỏi tôi về Slack, v.v. 6 | 7 | Trang này cho bạn biết cách có thể đóng góp cho sự phát triển của trang web này. 8 | 9 | ## Comment về Issues và PullRequest 10 | * Hãy comment về bất kỳ issues nào! Câu hỏi và đề xuất cũng được chào đón. 11 | * Vui lòng tìm kiếm issues hiện có để đảm bảo không có issue tương tự trước khi thực hiện một issue mới. 12 | * Lưu ý rằng các issue về đề xuất cải tiến (được gắn nhãn `cải thiện`) có thể không luôn được chấp nhận (đặc biệt là các vấn đề đối với UI) 13 | * Khi bạn gửi PR mới, vui lòng chỉ định ID issue liên quan. Chúng tôi không chấp nhận PR không có ID vấn đề. 14 | * Chúng tôi đánh giá cao nếu bạn ưu tiên cho các issue được dán nhãn [good first issue / help wanted / bug] 15 | 16 | ## Cách liên lạc 17 | * Nếu bạn không có tài khoản Slack "Code for Japan", vui lòng đăng ký [tại đây](https://cfjslackin.herokuapp.com/) 18 | * Tham gia kênh `#covid19` 19 | 20 | ## Để tham gia 21 | * Vui lòng đọc [Nguyên tắc / Quy tắc ứng xử](CODE_OF_CONDUCT_VI.md) trước khi tham gia phát triển. 22 | * Để liên lạc, vui lòng kiểm tra code cho [Quy tắc ứng xử] của Nhật Bản (https://github.com/codeforjapan/codeofconduct). 23 | * Nếu bạn có kế hoạch xử lý một issue, vui lòng để lại bình luận phía sau để đưa ra ý kiến. 24 | * [good first issue label](https://github.com/tokyo-metropolitan-gov/covid19/issues?q=is%3Asu+is%3Aopen+label%3A%22good+first+su%22) được khuyến nghị cho người mới bắt đầu. 25 | * Nếu bạn không thể đạt được tiến bộ nào trong hơn nửa ngày, hãy đảm bảo rằng những người khác có thể đảm nhận công việc của bạn. 26 | * Nếu một issue không được cập nhật trong hơn một ngày, chúng tôi có thể xóa. 27 | * [Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests) được khuyến nghị cho mọi công việc đang tiến triển, để mọi người hiểu tình hình. 28 | * Vui lòng thảo luận các câu hỏi liên quan đến issue trong các bình luận issue thay vì trên Slack. 29 | * Chúng tôi cũng chấp nhận đề xuất! Xin vui lòng tạo ra issues. 30 | 31 | ## Thông tin phát triển 32 | * Trang web phát triển https://dev-covid19-tokyo.netlify.com/ 33 | * Trang web dàn dựng https://stg-covid19-tokyo.netlify.com/ 34 | * Trang web sản xuất https://stopcovid19.metro.tokyo.lg.jp/ 35 | * [Thiết kế](https://www.figma.com/file/V7vt80p2gauhdgTZeVNbgj/UI%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=121 % 3A156) 36 | 37 | Cập nhật cho tài liệu này cũng được chào đón! 38 | -------------------------------------------------------------------------------- /pages/worker.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 76 | 77 | 87 | -------------------------------------------------------------------------------- /nuxt-i18n.config.ts: -------------------------------------------------------------------------------- 1 | const dateTimeFormatsCommon = { 2 | dateTime: { 3 | year: 'numeric', 4 | month: 'short', 5 | day: 'numeric', 6 | hour: 'numeric', 7 | minute: 'numeric', 8 | hour12: false 9 | }, 10 | date: { 11 | year: 'numeric', 12 | month: 'short', 13 | day: 'numeric' 14 | }, 15 | dateWithoutYear: { 16 | month: 'long', 17 | day: 'numeric' 18 | }, 19 | dateWithDayOfWeek: { 20 | weekday: 'short', 21 | month: 'short', 22 | day: 'numeric' 23 | } 24 | } 25 | 26 | export default { 27 | strategy: 'prefix_except_default', 28 | detectBrowserLanguage: { 29 | useCookie: true, 30 | cookieKey: 'i18n_redirected' 31 | }, 32 | defaultLocale: 'ja', 33 | vueI18n: { 34 | fallbackLocale: 'ja', 35 | dateTimeFormats: { 36 | ja: dateTimeFormatsCommon, 37 | en: dateTimeFormatsCommon, 38 | 'zh-cn': dateTimeFormatsCommon, 39 | 'zh-tw': dateTimeFormatsCommon, 40 | ko: dateTimeFormatsCommon, 41 | 'ja-basic': dateTimeFormatsCommon 42 | }, 43 | formatFallbackMessages: true 44 | }, 45 | // vueI18nLoader: true, 46 | lazy: true, 47 | langDir: 'assets/locales/', 48 | locales: [ 49 | { 50 | code: 'ja', 51 | name: '日本語', 52 | iso: 'ja-JP', 53 | file: 'ja.json', 54 | description: 'Japanese' 55 | }, 56 | { 57 | code: 'en', 58 | name: 'English', 59 | iso: 'en-US', 60 | file: 'en.json', 61 | description: 'English' 62 | } 63 | // { 64 | // code: 'zh-cn', 65 | // name: '简体中文', 66 | // iso: 'zh-CN', 67 | // file: 'zh_CN.json', 68 | // description: 'Simplified Chinese' 69 | // }, 70 | // { 71 | // code: 'zh-tw', 72 | // name: '繁體中文', 73 | // iso: 'zh-TW', 74 | // file: 'zh_TW.json', 75 | // description: 'Traditional Chinese' 76 | // }, 77 | // { 78 | // code: 'ko', 79 | // name: '한국어', 80 | // iso: 'ko-KR', 81 | // file: 'ko.json', 82 | // description: 'Korean' 83 | // }, 84 | // #1126, #872 (comment) 85 | // ポルトガル語は訳が揃っていないため非表示 86 | // { 87 | // code: 'pt-BR', 88 | // name: 'Portuguese', 89 | // iso: 'pt-BR', 90 | // file: 'pt_BR.json', 91 | // description: 'Portuguese' 92 | // }, 93 | // { 94 | // code: 'ja-basic', 95 | // name: 'やさしい にほんご', 96 | // iso: 'ja-JP', 97 | // file: 'ja-Hira.json', 98 | // description: 'Easy Japanese' 99 | // } 100 | ] 101 | } 102 | -------------------------------------------------------------------------------- /static/vaccine.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 16 | 18 | 19 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /components/DataViewTable.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 100 | 101 | 109 | -------------------------------------------------------------------------------- /pages/flow.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 54 | 55 | 115 | -------------------------------------------------------------------------------- /static/youtube.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | YouTube icon 27 | 28 | 29 | 30 | 32 | 56 | YouTube icon 58 | 65 | 70 | 71 | -------------------------------------------------------------------------------- /assets/variables.scss: -------------------------------------------------------------------------------- 1 | // ================== 2 | // color 3 | $green-1: #18834f; // #00A040; 4 | $green-2: #189b58; // #00B849; 5 | $green-3: #18ae63; // #00D154; 6 | $green-4: #18c36d; // #00EB5E; 7 | $gray-1: #333333; 8 | $gray-2: #4D4D4D; 9 | $gray-3: #808080; 10 | $gray-4: #D9D9D9; 11 | $gray-5: #F8F9FA; 12 | $white: #FFFFFF; 13 | $link: #006CA8; 14 | 15 | // ================== 16 | // shadow 17 | $shadow: 0px 0px 2px rgba(0, 0, 0, 0.15); 18 | 19 | // ================== 20 | // break-points 21 | $huge: 1440; 22 | $large: 1170; 23 | $medium: 768; 24 | $small: 600; 25 | $tiny: 320; 26 | 27 | // ================== 28 | // z-index 29 | $z-index-map: ( 30 | opened-side-navigation: 101, 31 | sp-navigation: 100, 32 | ); 33 | @function z-index-of($key) { 34 | @return map-get($z-index-map, $key); 35 | } 36 | 37 | // ================== 38 | // media-query 39 | @mixin largerThan($width) { 40 | @media screen and (min-width: $width + 1 + px) { 41 | @content; 42 | } 43 | } 44 | 45 | @mixin lessThan($width) { 46 | @media screen and (max-width: $width + px) { 47 | @content; 48 | } 49 | } 50 | 51 | 52 | // ================== 53 | // font-size 54 | @mixin font-size($size, $base: 16) { 55 | font-size: $size + px; 56 | font-size: ($size / $base) + rem; 57 | } 58 | @mixin card-h1 { 59 | @include font-size(24); 60 | color: $gray-2; 61 | font-weight: bold; 62 | } 63 | @mixin card-h2 { 64 | @include font-size(19); 65 | color: $gray-2; 66 | font-weight: bold; 67 | } 68 | @mixin body-text { 69 | @include font-size(16); 70 | color: $gray-1; 71 | line-height: 160%; 72 | font-weight: normal; 73 | } 74 | 75 | // =================== 76 | // button 77 | @mixin text-link { 78 | @include font-size(14); 79 | color: $link !important; 80 | text-decoration: none; 81 | &:hover { 82 | text-decoration: underline; 83 | } 84 | } 85 | 86 | @mixin button-text($size: 'md') { 87 | @if ($size == 'sm') { 88 | padding: 4px 8px; 89 | } @else { 90 | padding: 24px 36px; 91 | } 92 | @include font-size(14); 93 | display: inline-flex; 94 | align-items: center; 95 | border-radius: 4px; 96 | background-color: $white; 97 | border: 1px solid $green-1; 98 | color:$green-1; 99 | cursor: pointer; 100 | &:hover { 101 | background-color: $green-1; 102 | color: $white; 103 | > i { 104 | color: $white !important; 105 | } 106 | } 107 | } 108 | 109 | // =================== 110 | // card 111 | @mixin card-container($withDivider: false) { 112 | background-color: $white; 113 | box-shadow: $shadow; 114 | border: 0.5px solid $gray-4 !important; 115 | border-radius: 4px; 116 | @if ($withDivider) { 117 | &::before { 118 | content: ''; 119 | position: absolute; 120 | left: 50%; 121 | top: 0; 122 | width: 1px; 123 | height: 100%; 124 | background-color: $gray-4; 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /components/flow/FlowPcRequired.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 118 | -------------------------------------------------------------------------------- /pages/link.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 63 | 64 | 120 | -------------------------------------------------------------------------------- /components/DataTable.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 88 | 89 | 125 | -------------------------------------------------------------------------------- /components/cards/MetroCard.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 107 | -------------------------------------------------------------------------------- /components/ScrollableChart.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 116 | 117 | 135 | -------------------------------------------------------------------------------- /layouts/print.vue: -------------------------------------------------------------------------------- 1 | 45 | 87 | 105 | 106 | 148 | -------------------------------------------------------------------------------- /components/flow/FlowPcSuspect.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 163 | -------------------------------------------------------------------------------- /components/flow/FlowSpAdvisory.vue: -------------------------------------------------------------------------------- 1 | 49 | 50 | 57 | 58 | 146 | -------------------------------------------------------------------------------- /assets/url_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "title": "長野県 公式", 4 | "items": [ 5 | { 6 | "url": "https://www.pref.nagano.lg.jp/", 7 | "text": "長野県 公式ホームページ トップ" 8 | }, 9 | { 10 | "url": "https://www.pref.nagano.lg.jp/hoken-shippei/kenko/kenko/kansensho/joho/corona.html", 11 | "text": "新型コロナウイルス感染症対策について" 12 | }, 13 | { 14 | "url": "https://www.pref.nagano.lg.jp/hoken-shippei/kenko/kenko/kansensho/joho/corona-doko.html", 15 | "text": "新型コロナウイルスの動向" 16 | }, 17 | { 18 | "url": "https://www.pref.nagano.lg.jp/hoken-shippei/kenko/kenko/kansensho/joho/corona-onegai.html", 19 | "text": "感染拡大防止のためのお願い" 20 | }, 21 | { 22 | "url": "https://www.pref.nagano.lg.jp/hoken-shippei/kenko/kenko/kansensho/joho/corona-soudan.html", 23 | "text": "長野県の相談窓口" 24 | }, 25 | { 26 | "url": "https://www.pref.nagano.lg.jp/hoken-shippei/kenko/kenko/kansensho/joho/corona-naganoken-taiou.html", 27 | "text": "長野県の対応状況" 28 | }, 29 | { 30 | "url": "https://www.pref.nagano.lg.jp/hoken-shippei/kenko/kenko/kansensho/joho/corona-kisotisiki.html", 31 | "text": "新型コロナウイルスの基礎知識", 32 | "divider": true 33 | }, 34 | { 35 | "url": "https://www.pref.nagano.lg.jp/hoken-shippei/kenko/kenko/kansensho/influ/mask.html", 36 | "text": "正しいマスクの着用方法" 37 | }, 38 | { 39 | "url": "https://www.pref.nagano.lg.jp/kyoiku/kyoiku/corona.html", 40 | "text": "新型コロナウイルス感染症対策について(教育委員会)" 41 | } 42 | ] 43 | }, 44 | { 45 | "title": "政府/官公庁", 46 | "items": [ 47 | { 48 | "url": "https://www.kantei.go.jp/", 49 | "text": "首相官邸" 50 | }, 51 | { 52 | "url": "https://www.kantei.go.jp/jp/headline/kansensho/coronavirus.html", 53 | "text": "首相官邸 新型コロナウイルスへの備え", 54 | "divider": true 55 | }, 56 | { 57 | "url": "https://www.mhlw.go.jp/index.html", 58 | "text": "厚生労働省" 59 | }, 60 | { 61 | "url": "https://www.mhlw.go.jp/stf/seisakunitsuite/bunya/0000164708_00001.html", 62 | "text": "厚生労働省 新型コロナウイルス感染症について" 63 | }, 64 | { 65 | "url": "https://www.meti.go.jp/", 66 | "text": "経済産業省" 67 | }, 68 | { 69 | "url": "https://www.meti.go.jp/covid-19/index.html", 70 | "text": "経済産業省 新型コロナウイルス感染症関連" 71 | } 72 | ] 73 | }, 74 | { 75 | "title": "COVID-19 関連サイト", 76 | "items": [ 77 | { 78 | "url": "https://vdata.nikkei.com/newsgraphics/coronavirus-world-map/", 79 | "text": "新型コロナウイルス感染 世界マップ(日経新聞)" 80 | }, 81 | { 82 | "url": "https://toyokeizai.net/sp/visual/tko/covid19/", 83 | "text": "新型コロナウイルス 国内感染の状況(東洋経済オンライン)" 84 | }, 85 | { 86 | "url": "https://stopcovid19.metro.tokyo.lg.jp/", 87 | "text": "東京都 新型コロナウイルス感染症 対策サイト(東京都 公式)" 88 | }, 89 | { 90 | "url": "https://github.com/tokyo-metropolitan-gov/covid19/blob/development/FORKED_SITES.md", 91 | "text": "各都道府県 新型コロナウイルス感染症 対策サイト一覧(東京都 公式)" 92 | }, 93 | { 94 | "url": "https://www.stopcovid19.jp/", 95 | "text": "新型コロナウイルス対策ダッシュボード" 96 | }, 97 | { 98 | "url": "https://vscovid19.code4japan.org/", 99 | "text": "民間支援情報ナビ" 100 | }, 101 | { 102 | "url": "https://note.stopcovid19.jp/", 103 | "text": "新型コロナウイルス感染症に関する専門家有志の会" 104 | } 105 | ] 106 | }, 107 | { 108 | "title": "COVID-19 長野県非公式 運営グループ", 109 | "items": [ 110 | { 111 | "url": "https://github.com/Stop-COVID19-Nagano/covid19", 112 | "text": "長野県 非公式 新型コロナウイルス対策サイト(開発者向け)" 113 | }, 114 | { 115 | "url": "https://www.facebook.com/groups/155315052273089", 116 | "text": "長野県版 COVID-19 対策サイト をつくろう(Facebook Group)" 117 | } 118 | ] 119 | } 120 | ] 121 | -------------------------------------------------------------------------------- /static/data/130001_tokyo_covid19_patients.csv: -------------------------------------------------------------------------------- 1 | No,全国地方公共団体コード,都道府県名,市区町村名,公表_年月日,曜日,発症_年月日,居住地,年代,性別,患者_属性,患者_状態,患者_症状,患者_渡航歴の有無フラグ,備考,退院済フラグ 2 | 1,130001,東京都,,2020-01-24,金,,湖北省武漢市,40代,男性,,,,,,1 3 | 2,130001,東京都,,2020-01-25,土,,湖北省武漢市,30代,女性,,,,,,1 4 | 3,130001,東京都,,2020-01-30,木,,湖南省長沙市,30代,女性,,,,,,1 5 | 4,130001,東京都,,2020-02-13,木,,都内,70代,男性,,,,,,"" 6 | 5,130001,東京都,,2020-02-14,金,,都内,50代,女性,,,,,,1 7 | 6,130001,東京都,,2020-02-14,金,,都内,70代,男性,,,,,,1 8 | 7,130001,東京都,,2020-02-15,土,,都内,80代,男性,,,,,,1 9 | 8,130001,東京都,,2020-02-15,土,,都内,50代,女性,,,,,,1 10 | 9,130001,東京都,,2020-02-15,土,,都内,50代,男性,,,,,,1 11 | 10,130001,東京都,,2020-02-15,土,,都内,70代,男性,,,,,,1 12 | 11,130001,東京都,,2020-02-15,土,,都内,70代,男性,,,,,,1 13 | 12,130001,東京都,,2020-02-15,土,,都内,40代,男性,,,,,,1 14 | 13,130001,東京都,,2020-02-15,土,,都内,60代,女性,,,,,,1 15 | 14,130001,東京都,,2020-02-15,土,,都内,40代,男性,,,,,,1 16 | 15,130001,東京都,,2020-02-16,日,,都内,60代,男性,,,,,,"" 17 | 16,130001,東京都,,2020-02-16,日,,都内,30代,男性,,,,,,1 18 | 17,130001,東京都,,2020-02-16,日,,都内,60代,男性,,,,,,1 19 | 18,130001,東京都,,2020-02-16,日,,埼玉県,60代,男性,,,,,,1 20 | 19,130001,東京都,,2020-02-16,日,,都内,30代,男性,,,,,,1 21 | 20,130001,東京都,,2020-02-18,火,,都内,80代,男性,,,,,,1 22 | 21,130001,東京都,,2020-02-18,火,,都内,20代,男性,,,,,,1 23 | 22,130001,東京都,,2020-02-18,火,,都内,50代,男性,,,,,,"" 24 | 23,130001,東京都,,2020-02-19,水,,都内,70代,男性,,,,,,"" 25 | 24,130001,東京都,,2020-02-19,水,,都内,70代,女性,,,,,,1 26 | 25,130001,東京都,,2020-02-19,水,,都内,70代,女性,,,,,,"" 27 | 26,130001,東京都,,2020-02-21,金,,都内,50代,女性,,,,,,"" 28 | 27,130001,東京都,,2020-02-21,金,,都内,70代,女性,,,,,,1 29 | 28,130001,東京都,,2020-02-21,金,,都内,50代,女性,,,,,,1 30 | 29,130001,東京都,,2020-02-22,土,,都内,60代,男性,,,,,,"" 31 | 30,130001,東京都,,2020-02-24,月,,都内,40代,男性,,,,,,"" 32 | 31,130001,東京都,,2020-02-24,月,,都内,50代,男性,,,,,,"" 33 | 32,130001,東京都,,2020-02-24,月,,都内,30代,男性,,,,,,"" 34 | 33,130001,東京都,,2020-02-26,水,,都内,80代,男性,,,,,,"" 35 | 34,130001,東京都,,2020-02-26,水,,都内,70代,男性,,,,,,"" 36 | 35,130001,東京都,,2020-02-26,水,,都内,70代,男性,,,,,,"" 37 | 36,130001,東京都,,2020-02-27,木,,都外,60代,女性,,,,,,"" 38 | 37,130001,東京都,,2020-02-29,土,,都内,20代,女性,,,,,,"" 39 | 38,130001,東京都,,2020-03-01,日,,都内,50代,女性,,,,,,1 40 | 39,130001,東京都,,2020-03-01,日,,都内,70代,男性,,,,,,"" 41 | 40,130001,東京都,,2020-03-03,火,,都内,50代,女性,,,,,,"" 42 | 41,130001,東京都,,2020-03-04,水,,都内,80代,女性,,,,,,"" 43 | 42,130001,東京都,,2020-03-04,水,,都内,30代,女性,,,,,,"" 44 | 43,130001,東京都,,2020-03-04,水,,都内,50代,男性,,,,,,"" 45 | 44,130001,東京都,,2020-03-04,水,,都内,40代,女性,,,,,,"" 46 | 45,130001,東京都,,2020-03-05,木,,都内,10歳未満,女性,,,,,,"" 47 | 46,130001,東京都,,2020-03-05,木,,都内,10歳未満,男性,,,,,,"" 48 | 47,130001,東京都,,2020-03-05,木,,都内,30代,女性,,,,,,"" 49 | 48,130001,東京都,,2020-03-05,木,,都内,20代,女性,,,,,,"" 50 | 49,130001,東京都,,2020-03-05,木,,都内,70代,女性,,,,,,"" 51 | 50,130001,東京都,,2020-03-05,木,,都内,90代,男性,,,,,,"" 52 | 51,130001,東京都,,2020-03-05,木,,都内,70代,男性,,,,,,"" 53 | 52,130001,東京都,,2020-03-05,木,,都内,80代,男性,,,,,,"" 54 | 53,130001,東京都,,2020-03-06,金,,都内,70代,男性,,,,,,"" 55 | 54,130001,東京都,,2020-03-06,金,,都内,30代,女性,,,,,,"" 56 | 55,130001,東京都,,2020-03-06,金,,都内,40代,男性,,,,,,"" 57 | 56,130001,東京都,,2020-03-06,金,,都内,90代,男性,,,,,,1 58 | 57,130001,東京都,,2020-03-06,金,,都内,30代,女性,,,,,,"" 59 | 58,130001,東京都,,2020-03-06,金,,都内,50代,女性,,,,,,"" 60 | 59,130001,東京都,,2020-03-07,土,,都内,50代,女性,,,,,,"" 61 | 60,130001,東京都,,2020-03-07,土,,都内,70代,女性,,,,,,"" 62 | 61,130001,東京都,,2020-03-07,土,,都内,40代,女性,,,,,,"" 63 | 62,130001,東京都,,2020-03-07,土,,都内,50代,男性,,,,,,"" 64 | 63,130001,東京都,,2020-03-07,土,,都内,50代,女性,,,,,,"" 65 | 64,130001,東京都,,2020-03-07,土,,都内,70代,男性,,,,,,"" 66 | 65,130001,東京都,,2020-03-10,火,,都内,50代,男性,,,,,,"" 67 | 66,130001,東京都,,2020-03-10,火,,都内,70代,男性,,,,,,"" 68 | 67,130001,東京都,,2020-03-10,火,,都内,40代,女性,,,,,,"" 69 | 68,130001,東京都,,2020-03-11,水,,都内,30代,女性,,,,,,"" 70 | 69,130001,東京都,,2020-03-11,水,,都内,80代,女性,,,,,,"" 71 | 70,130001,東京都,,2020-03-11,水,,都内,40代,男性,,,,,,"" 72 | 71,130001,東京都,,2020-03-11,水,,都内,50代,男性,,,,,,"" 73 | 72,130001,東京都,,2020-03-11,水,,都内,50代,女性,,,,,,"" 74 | 73,130001,東京都,,2020-03-11,水,,都内,60代,男性,,,,,,"" 75 | 74,130001,東京都,,2020-03-12,木,,都内,60代,女性,,,,,,"" 76 | 75,130001,東京都,,2020-03-12,木,,都内,70代,女性,,,,,,"" 77 | 76,130001,東京都,,2020-03-13,金,,都内,50代,男性,,,,,,"" 78 | 77,130001,東京都,,2020-03-13,金,,都内,70代,女性,,,,,,"" 79 | -------------------------------------------------------------------------------- /components/flow/FlowPcAdvisory.vue: -------------------------------------------------------------------------------- 1 | 74 | 75 | 152 | --------------------------------------------------------------------------------