From c16d1e0c98edd0370337eaa691e1f5e364b37b90 Mon Sep 17 00:00:00 2001 From: GOD BLX Date: Thu, 15 Jul 2021 17:01:25 +0700 Subject: [PATCH 1/2] refactor: adjust seo meta tags and record days selection --- index.html | 28 +++++++++++++++++++--------- src/App.svelte | 50 ++++++++++++++++++++++++++------------------------ 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/index.html b/index.html index 1449ac4..24f7c82 100755 --- a/index.html +++ b/index.html @@ -1,26 +1,36 @@ - + - - + + covidth - ข้อมูลโควิดแบบกูทำเองก็ได้ + + + + + +
diff --git a/src/App.svelte b/src/App.svelte index b32604d..ffb970b 100755 --- a/src/App.svelte +++ b/src/App.svelte @@ -4,11 +4,13 @@ import covtest from "./covtest.json" import Cards from "./Cards.svelte" - Chart.defaults.font.family = '"Anakotmai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif' + Chart.defaults.font.family = + '"Anakotmai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif' - let recordNumber = 30 let myChart let selectedList = [false, false, true] + let recordNumber = 30 + const options = [3, 7, 30] if (screen.width < 768) { recordNumber = 3 @@ -84,17 +86,16 @@ ) } - const onSelectChange = () => { - let value = document.getElementById("getShowDate").value + const onSelectChange = (e) => { + const value = e.target.value if (recordNumber != value) { recordNumber = value myChart.destroy() loadChart() - if(value === '30'){ - document.getElementById("chartInner").style.minWidth = '750px' - } - else if(value === '7'){ - document.getElementById("chartInner").style.minWidth = '500px' + if (value === "30") { + document.getElementById("chartInner").style.minWidth = "750px" + } else if (value === "7") { + document.getElementById("chartInner").style.minWidth = "500px" } } } @@ -119,10 +120,21 @@
- onSelectChange(e)} + on:blur={(e) => onSelectChange(e)} + > + {#each options as option} + + {/each}
@@ -147,7 +159,7 @@ /* height: 80vh; */ } - #chartInner{ + #chartInner { width: 100%; } @@ -206,20 +218,10 @@ /* max-width: 14rem; */ } - p { - /* max-width: 14rem; */ - margin: 1rem auto; - line-height: 1.35; - } - @media (min-width: 480px) { h1 { max-width: none; font-size: 6vh; } - - p { - max-width: none; - } } From 02560bbc8e502ea9efe997436f5755db8523a567 Mon Sep 17 00:00:00 2001 From: SwerBillionaire Date: Thu, 15 Jul 2021 19:09:26 +0700 Subject: [PATCH 2/2] docs: fix some text style and add project detail in README.md --- README.md | 29 +++++++++++++++++------------ src/App.svelte | 8 ++++++-- src/Cards.svelte | 33 +++++++++++++++++++-------------- 3 files changed, 42 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index e843001..5d1edee 100755 --- a/README.md +++ b/README.md @@ -53,23 +53,25 @@ - - + # About The Project -[![CovidTH][product-screenshot]](https://covidth.info/) +Thailand Covid-19 Daily Tests Dashboard -*** ฝากเติมหน่อยนะครับ ^ ^ +[![CovidTH][product-screenshot]](https://covidth.info/) + +\*\*\* ฝากเติมหน่อยนะครับ ^ ^ + ## Getting Started To get a local copy up and running follow these simple steps. ### Prerequisites -* Node.js +- Node.js ### Installation @@ -94,7 +96,9 @@ Use this space to show useful examples of how a project can be used. Additional _For more examples, please refer to the [Documentation](https://example.com)_ --> ## Built With + ### Svelte + Vite + This template should help get you started developing with Svelte in Vite. ### Recommended IDE Setup @@ -146,8 +150,8 @@ export default writable(0) See the [open issues](https://github.com/thananon/covidth/issues) for a list of proposed features (and known issues). - + ## Contributing Contributions are what make the Website Covid data, inspire, and create. Any contributions you make are **greatly appreciated**. @@ -164,21 +168,22 @@ Contributions are what make the Website Covid data, inspire, and create. Any con Distributed under the MIT License. See `LICENSE` for more information. --> - + ## CONTACT + Name - [@9ARM](https://www.youtube.com/channel/UCoiEtD4v1qMAqHV5MDI5Qpg) - Youtube Project Link: [https://github.com/thananon/covidth](https://github.com/thananon/covidth) -## Acknowledgements -* [Svelte](https://svelte.dev/) -* [vite](https://vitejs.dev/) -* [chart.js](https://www.chartjs.org/) -* [SvelteStrap](https://sveltestrap.js.org/) +## Acknowledgements +- [Svelte](https://svelte.dev/) +- [vite](https://vitejs.dev/) +- [chart.js](https://www.chartjs.org/) +- [SvelteStrap](https://sveltestrap.js.org/) [contributors-shield]: https://img.shields.io/github/contributors/thananon/covidth.svg?style=for-the-badge [contributors-url]: https://github.com/thananon/covidth/graphs/contributors diff --git a/src/App.svelte b/src/App.svelte index ffb970b..3ee47e7 100755 --- a/src/App.svelte +++ b/src/App.svelte @@ -111,7 +111,7 @@
-

เราตรวจโควิดกันวันละกี่เคส?

+

เราตรวจโควิดกันวันละกี่เคส ?

@@ -129,7 +129,7 @@ on:blur={(e) => onSelectChange(e)} > {#each options as option} -