Skip to content

Commit

Permalink
merge with remote
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus committed May 7, 2015
2 parents 78e1106 + 08eaa1a commit 5dad35d
Show file tree
Hide file tree
Showing 19 changed files with 799 additions and 785 deletions.
3 changes: 3 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
((nil . ((indent-tabs-mode . nill)
(tab-width . 4)
(fill-column . 80)))
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

There is no good and vacant names, so: calendar -> Gregorian calendar -> Gregory.

## [Examples](https://github.com/fiskus/gregory/blob/master/examples/basic/main.js)
## [Examples](examples/basic/main.js)

```js
var React = require('react');
Expand Down Expand Up @@ -63,7 +63,7 @@ $ gulp dev # build code with examples
$ gulp tdd # tests watcher
```

* Tabs for indentation
* 4 spaces for indentation
* No classes or prototypes, just functions
* If function should use this.props, pass it as first argument
* Priority: simplicity > consistency > performance
Expand Down
122 changes: 61 additions & 61 deletions examples/basic/calendar.css
Original file line number Diff line number Diff line change
@@ -1,137 +1,137 @@
// vim: set softtabstop=4 shiftwidth=4 noexpandtab:

.calendar {
width: 692px;
padding: 4px;
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
width: 692px;
padding: 4px;
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.calendar-weekday,
.calendar-day {
border: 0;
font-weight: 400;
color: #555;
width: 24px;
float: left;
font: 400 12px/14px Arial, sans-serif;
text-align: right;
padding: 4px;
cursor: pointer;
border: 0;
font-weight: 400;
color: #555;
width: 24px;
float: left;
font: 400 12px/14px Arial, sans-serif;
text-align: right;
padding: 4px;
cursor: pointer;
}

.calendar-day-unselectable {
color: #ccc;
cursor: default;
color: #ccc;
cursor: default;
}

.calendar-day-holiday.calendar-day-unselectable {
color: #a96666;
color: #a96666;
}

.calendar-day:hover {
color: #212121;
background: #def0ff;
color: #212121;
background: #def0ff;
}

.calendar-grid {
width: 231px;
display: inline-block;
vertical-align: top;
margin: 0 -1px 0 0;
width: 231px;
display: inline-block;
vertical-align: top;
margin: 0 -1px 0 0;
}

.calendar-weekday {
color: #222;
font-weight: 700;
text-transform: lowercase;
cursor: default;
color: #222;
font-weight: 700;
text-transform: lowercase;
cursor: default;
}

.calendar-day-unselectable:hover {
color: #ccc;
background: transparent;
color: #ccc;
background: transparent;
}

.calendar-day-holiday.calendar-day-unselectable:hover {
color: #a96666;
color: #a96666;
}

.calendar-headers,
.calendar-days {
overflow: hidden;
overflow: hidden;
}

.calendar-current-date {
text-align: center;
color: #222;
border: 1px solid #aaa;
font: 700 14px/28px Arial, sans-serif;
text-align: center;
color: #222;
border: 1px solid #aaa;
font: 700 14px/28px Arial, sans-serif;
}

.calendar-controls {
position: relative;
position: relative;
}

.calendar-prev,
.calendar-next {
position: absolute;
width: 16px;
height: 16px;
background: #222;
top: 8px;
border-radius: 8px;
position: absolute;
width: 16px;
height: 16px;
background: #222;
top: 8px;
border-radius: 8px;
}

.calendar-prev {
left: 8px;
left: 8px;
}

.calendar-prev:before,
.calendar-next:after {
content: '';
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 5px;
transform: scale(0.999);
top: 3px;
content: '';
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 5px;
transform: scale(0.999);
top: 3px;
}

.calendar-prev:before {
border-color: transparent #fff transparent transparent;
left: -1px;
border-color: transparent #fff transparent transparent;
left: -1px;
}

.calendar-next:after {
border-color: transparent transparent transparent #fff;
left: 6px;
border-color: transparent transparent transparent #fff;
left: 6px;
}

.calendar-next {
right: 8px;
right: 8px;
}

.calendar-weekday-holiday,
.calendar-day-holiday {
color: #a90000;
color: #a90000;
}

.calendar-day-current {
padding: 3px;
border: 1px solid #aaa;
padding: 3px;
border: 1px solid #aaa;
}

.calendar-day-checkin,
.calendar-day-checkout {
padding: 3px;
border: 1px solid #009;
padding: 3px;
border: 1px solid #009;
}

.calendar-day-checkout {
border: 1px solid #090;
border: 1px solid #090;
}

.calendar-day-range {
background: #0ffdef;
background: #0ffdef;
}
64 changes: 32 additions & 32 deletions examples/basic/clndr.css
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
// vim: set softtabstop=4 shiftwidth=4 noexpandtab:

.clndr-controls {
overflow: hidden;
overflow: hidden;
}

.clndr-next {
float: right;
float: right;
}

.clndr-prev {
float: left;
float: left;
}

.clndr-next,
.clndr-prev {
background: #999;
padding:5px 30px;
text-align: center;
cursor: pointer;
background: #999;
padding:5px 30px;
text-align: center;
cursor: pointer;
}

.clndr-current-date {
background: #999;
padding:5px;
text-align: center;
cursor: pointer;
background: #999;
padding:5px;
text-align: center;
cursor: pointer;
}

.clndr-current-month {
width: 40%;
background: #333;
color: #fff;
width: 40%;
background: #333;
color: #fff;
}

.clndr {
width: 700px;
margin: 0 auto;
width: 700px;
margin: 0 auto;
}

.clndr-grid {
text-align: center;
text-align: center;
}

.clndr-day {
float: left;
width: 98px;
height: 50px;
line-height: 50px;
background: #eee;
border: 1px solid #ddd;
float: left;
width: 98px;
height: 50px;
line-height: 50px;
background: #eee;
border: 1px solid #ddd;
}

.clndr-weekday {
float: left;
width: 100px;
height: 40px;
line-height: 40px;
background: #eee;
float: left;
width: 100px;
height: 40px;
line-height: 40px;
background: #eee;
}

.clndr-day-prev-month,
.clndr-day-next-month {
color: #ccc;
color: #ccc;
}

.clndr-day-disabled {
background: transparent;
border-color: transparent;
background: transparent;
border-color: transparent;
}

.clndr-clearfix {
clear: both;
clear: both;
}
36 changes: 18 additions & 18 deletions examples/basic/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>react-calendar-component</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="clndr.css">
<link rel="stylesheet" href="calendar.css">
<script src="bundle.js" async></script>
</head>
<body>
<div id="clndr"></div>
<div id="calendar"></div>
<head>
<meta charset="UTF-8">
<title>react-calendar-component</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="clndr.css">
<link rel="stylesheet" href="calendar.css">
<script src="bundle.js" async></script>
</head>
<body>
<div id="clndr"></div>
<div id="calendar"></div>

<div id="inputs">
<input type="text" id="checkin" placeholder="Start date (click me)"/>
<input type="text" id="checkout" placeholder="End date (click me)"/>
<div id="checkin-calendar"></div>
<div id="checkout-calendar"></div>
</div>
</body>
<div id="inputs">
<input type="text" id="checkin" placeholder="Start date (click me)"/>
<input type="text" id="checkout" placeholder="End date (click me)"/>
<div id="checkin-calendar"></div>
<div id="checkout-calendar"></div>
</div>
</body>
</html>
Loading

0 comments on commit 5dad35d

Please sign in to comment.