Skip to content

Commit

Permalink
Add readme (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandronanez committed Mar 26, 2017
1 parent 6fc79d6 commit 8d2e112
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 7 deletions.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
# Datepicker
# Datepicker powered by Typescript and RxJS
This project was built using _mainly_
- Mobile first approach
- RxJS 5.2
- Typescript 2.2.1
- Jest

## What was my motivation?
TL;DR -> I want to learn RxJS

I found RxJS *SUPER CHALLENGING* and I think the best way to learn is to build something, that's how this mini project was born.

### Why Typescript?
I wanted to learn to use Typescript outside the Angular world.

## TODO
- [] Clean up styles
- [] Cleanup date and dom methods
- [] Improve/Cleanup types
- [] Add Travis/Circle
- [] Add a demo page

## Contribute
PRs welcome!

## License
MIT
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ <h1 class="title">Scheduler</h1>
</form>
</div>
<div id="overlay"></div>
<a href="#" id="close-overlay" title="close overlay">X</a>
<a href="#" class="close-overlay" title="close overlay">X</a>
</body>
</html>
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
const calendarInputElement: any | null = document.getElementById('calendar');
const calendarContainer: HTMLElement | null = document.getElementById('calendar-container');
const bodyElement: HTMLBodyElement | null = document.querySelector('body');
const closeButton: HTMLElement | null = document.getElementById('close-overlay');
const closeButton: any | null = document.querySelector('.close-overlay');

const closeButton$ = Observable.fromEvent(closeButton, 'click');

Expand Down
52 changes: 48 additions & 4 deletions src/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ a {
}
}

h2 {
margin-top: 0;
margin-bottom: 0;
}

input[type='text'] {
border: 1px solid $lightBlue;
color: $inactive;
font-size: 1em;
height: 2em;
width: 100%;
width: 99%;
}

input[type='radio'] {
Expand Down Expand Up @@ -77,13 +82,15 @@ input[type='radio'] {
transition: .2s ease-in all;
}

#close-overlay {
.close-overlay {
display: none;
}

.navigator {
display: flex;
align-items: center;
margin-bottom: 1em;
margin-top: 1em;

h2 {
margin-left: 10px;
Expand Down Expand Up @@ -127,7 +134,7 @@ input[type='radio'] {
z-index: 2;
}

#close-overlay {
.close-overlay {
display: inline-block;
position: absolute;
top: 20px;
Expand All @@ -143,7 +150,44 @@ input[type='radio'] {

// Desktop only
@media screen and (min-width: 1024px) {
.is-open #close-overlay {
body {
height: initial;
}

#app {
margin: 0 auto;
width: 350px;
}

.is-open {
.close-overlay {
display: none;
}

input[type='text'] {
display: inline-block;
}

#calendar-container {
border: 1px solid $lightBlue;
height: initial;
}
}

#overlay {
display: none;
}

form {
position: relative;
}

#calendar-container {
margin-top: 5px;
border-radius: 5px;
}

table {
padding-bottom: 1em;
}
}

0 comments on commit 8d2e112

Please sign in to comment.