This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First shot at improving roman numeral IA. Added a new converter. Added new default settings. Added some tests. * Added un upper bound on arabic numbers. * Remove some typo… * Added some new triggers. Allowed uncorrect roman number to load the UI anyway. Fixed a test. * Added new triggers. Fixed regular expressions involved in the UI configuration. Added new tests. * Renamed file. * Variables defined outside the handle function. * Modified template. * Init logic now runs only once. * Added a prefix to ensure there are no collisions. * Fixed tests. * Added more agressive validation on user inputs. * Fixed a test case for aggressive validation. The ia doesn't trigger is the input is invalid with respect to roman numeral system. * Removed forEach operation (replaced with a for loop). Removed firstLetterUpperCase in favor of DDG util capitalize. * Fixed design on narrow screens. * Added a new test (roman man => undef). * Fixed regular expressions to avoid displaying if roman or arabic is used without numbers. * Added warnings when inputs are out of range. * Added a state variable for warnings. * Empty if removed. * Fixed regexps. * Fixed subtitle. * Css fixed. Both for mobile and desktop. * Fixed tests. * Use horizontal layout on desktop, vertical on mobile
- Loading branch information
Showing
5 changed files
with
480 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<form class="converter"> | ||
<div class="converter__input"> | ||
<label class="converter__input__label">Roman</label> | ||
<input type="text" class="converter__input__field" /> | ||
</div> | ||
<div class="converter__output"> | ||
<label class="converter__output__label">Arabic</label> | ||
<input type="text" class="converter__output__field" /> | ||
</div> | ||
</form> |
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,43 @@ | ||
.zci--roman .converter { | ||
width: 100%; | ||
} | ||
|
||
.zci--roman .converter__input, | ||
.zci--roman .converter__output { | ||
display: inline-block; | ||
margin-bottom: 1em; | ||
width: 45%; | ||
} | ||
|
||
.zci--roman .converter__input { | ||
margin-right: 1em; | ||
} | ||
|
||
.zci--roman .converter__input__label, | ||
.zci--roman .converter__output__label { | ||
display: block; | ||
text-align: left; | ||
font-size: 1.5em; | ||
} | ||
|
||
.zci--roman .converter__input__field, | ||
.zci--roman .converter__output__field { | ||
width: 100%; | ||
text-align: center; | ||
font-size: 2em; | ||
} | ||
|
||
.is-mobile .zci--roman .converter__input, | ||
.is-mobile .zci--roman .converter__output { | ||
display: block; | ||
width: 100%; | ||
} | ||
|
||
/* Mobile UI */ | ||
.is-mobile .zci--roman .converter__input { | ||
margin-right: 0em; | ||
} | ||
|
||
.is-mobile .zci--roman .converter__output { | ||
margin-top: 1em; | ||
} |
Oops, something went wrong.