-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from MathisBurger/feature/translations
Implemented some more stochastical and default features.
- Loading branch information
Showing
29 changed files
with
384 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<script lang="ts"> | ||
</script> | ||
|
||
<div class="footer"> | ||
<div class="footer-copyright">©{new Date().getFullYear()} Mathis Burger</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '../styles/footer.scss'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { faculty } from '$lib/custom-math'; | ||
import type { NCR } from '$src/typings/ncr'; | ||
|
||
/** | ||
* Calculates an nCr of a input. | ||
* | ||
* @param ncr Instance of the ncr value | ||
* @returns number The nCr value of the calculation | ||
*/ | ||
export function calculateNCr(ncr: NCR): number { | ||
const top = faculty(ncr.n); | ||
const bottom = faculty(ncr.k) * faculty(ncr.n - ncr.k); | ||
return top / bottom; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script lang="ts"> | ||
import type { NCR } from '$src/typings/ncr'; | ||
export let bindValue: NCR; | ||
</script> | ||
|
||
<div class="ncr-outer-wrapper"> | ||
<div class="ncr-input-symbols">(</div> | ||
<div class="ncr-input"> | ||
<input type="number" class="ncr-input-field" bind:value={bindValue.n} /> | ||
<input type="number" class="ncr-input-field" bind:value={bindValue.k} /> | ||
</div> | ||
<div class="ncr-input-symbols">)</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '../../styles/ncr.scss'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script> | ||
import { _ } from 'svelte-i18n'; | ||
</script> | ||
|
||
<div class="centered"> | ||
<div class="container"> | ||
<div class="error-heading">404 Not Found</div> | ||
<div class="error-container"> | ||
{$_('notFound')} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '../styles/general.scss'; | ||
@import '../styles/error.scss'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts"> | ||
import { faculty } from '$lib/custom-math'; | ||
let input = 0; | ||
</script> | ||
|
||
<div class="centered"> | ||
<div class="container"> | ||
<input class="larger-input" type="number" bind:value={input} /> | ||
<div class="result-form"> | ||
{faculty(input)} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '../../styles/general.scss'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script lang="ts"> | ||
let input = 0; | ||
</script> | ||
|
||
<div class="centered"> | ||
<div class="container"> | ||
<input class="larger-input" type="number" bind:value={input} /> | ||
<div class="result-form"> | ||
{Math.log(input)} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '../../styles/general.scss'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="centered"> | ||
<div class="container"> | ||
<h1 class="privacy-heading">Privacy</h1> | ||
<div class="privacy-text">Some privacy placeholder text</div> | ||
</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '../styles/general.scss'; | ||
@import '../styles/privacy.scss'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts"> | ||
import type { NCR } from './../../typings/ncr.d'; | ||
import { DefaultsProvider } from '$lib/defaults-provider'; | ||
import NcrInput from '$lib/stochastics/ncr-input.svelte'; | ||
import { calculateNCr } from '$lib/stochastics/ncr-calculator'; | ||
let input: NCR = new DefaultsProvider().getDefaultNCR(); | ||
</script> | ||
|
||
<div class="centered"> | ||
<div class="container"> | ||
<NcrInput bind:bindValue={input} /> | ||
|
||
<div class="result-form"> | ||
{calculateNCr(input)} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '../../styles/general.scss'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.error-heading { | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 3em; | ||
color: var(--text-color); | ||
width: 500px; | ||
text-align: center; | ||
font-weight: bold; | ||
} | ||
.error-container { | ||
width: 500px; | ||
height: 300px; | ||
text-align: center; | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 1.3em; | ||
color: var(--text-color); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.footer { | ||
width: 100vw; | ||
height: 75px; | ||
background: var(--footer-background); | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
display: grid; | ||
place-items: center; | ||
grid-template-columns: 20% 80%; | ||
} | ||
|
||
.footer-copyright { | ||
font-size: 1.3em; | ||
color: var(--footer-text-color); | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.ncr-input { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 5px; | ||
width: fit-content; | ||
height: fit-content; | ||
} | ||
|
||
.ncr-input-field { | ||
width: 50px; | ||
height: 50px; | ||
outline: none; | ||
border: none; | ||
} | ||
|
||
.ncr-input-symbols { | ||
color: var(--text-color); | ||
font-size: 135px; | ||
height: 100%; | ||
text-align: center; | ||
margin-top: -30px; | ||
} | ||
|
||
.ncr-outer-wrapper { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 3px; | ||
width: fit-content; | ||
height: fit-content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.privacy-heading { | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-weight: bold; | ||
font-size: 2.5em; | ||
} | ||
.privacy-text { | ||
width: 80vw; | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 1.2em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.