From 95c147b237ffd8a4195c1998ecc693e71ad655f9 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Wed, 1 Jan 2025 18:37:38 +0530 Subject: Refactor, add link to source, add license --- LICENSE.txt | 21 +++++++++++++++++++++ src/routes/+page.svelte | 23 +++++++++++++++-------- src/routes/RubySquareYear.svelte | 7 +++++++ src/routes/Square.svelte | 1 + 4 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 LICENSE.txt create mode 100644 src/routes/RubySquareYear.svelte create mode 100644 src/routes/Square.svelte diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..ec7d6e6 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024-present Arjun Satarkar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 093347f..3bdd11d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,7 @@ -
+

Is the year a perfect square?

{#if isPerfectSquare}
Yes.
- {sqrt}2 = {year}. + {sqrt} = {year}. {:else}
No.
{/if} The last was - {last} ({lastSqrt}2), and - the next is - {next} ({nextSqrt}2), {nextRelative}! + and the next is + , {nextRelative}! +
+ + diff --git a/src/routes/RubySquareYear.svelte b/src/routes/RubySquareYear.svelte new file mode 100644 index 0000000..53500bf --- /dev/null +++ b/src/routes/RubySquareYear.svelte @@ -0,0 +1,7 @@ + + +{sqrt ** 2} ({sqrt}) diff --git a/src/routes/Square.svelte b/src/routes/Square.svelte new file mode 100644 index 0000000..bcd1286 --- /dev/null +++ b/src/routes/Square.svelte @@ -0,0 +1 @@ +2 -- cgit v1.2.3-57-g22cb