carendar 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -5
- data/app/assets/stylesheets/_carendar.sass +13 -6
- data/lib/carendar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39151e66bc2007a34996b90ed561de6663e355e6
|
4
|
+
data.tar.gz: d9b530ee004c525015e4a197b22d29a714a5f8aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b4b7fb479b634b576a9633bb1c4ba121bc69514e30f92eac3447cd81ad529332f699fb95da81b60145eccf916dde9cf659e6d8a5e771599bc85024f368d4d9c
|
7
|
+
data.tar.gz: baa6bab8ac04b243910ea0f45eca208db292854483aeab3ff4d8b8a5cf41c9d38d32a9e6c8b77397c96fa8d7420241bc92656d7afae0a5135a866b0ddbc7204b
|
data/README.md
CHANGED
@@ -2,9 +2,14 @@
|
|
2
2
|
|
3
3
|
Pure CSS rendering for week calendars.
|
4
4
|
|
5
|
+
Limitations
|
6
|
+
|
7
|
+
* For positioning days have to rastered. The example shows a 5 minute grid. The times of the events have to be rounded to the grid. The grid resolution can be passed as parameter to the sass mixin
|
8
|
+
* No events across day borders
|
9
|
+
|
5
10
|
## Demo
|
6
11
|
|
7
|
-
Visit the [demo rails app](https://carendar-demo.herokuapp.com/)
|
12
|
+
Visit the [demo rails app](https://carendar-demo.herokuapp.com/) and the [source for the demo](https://github.com/axelerator/carendar-demo)
|
8
13
|
|
9
14
|
## Installation
|
10
15
|
|
@@ -30,17 +35,23 @@ First you have to create a `Calendar` object containing all calendar items.
|
|
30
35
|
Carendar::Calendar.new(first_day, last_day, array_of_item_hashes)
|
31
36
|
|
32
37
|
This can be constructed from a simple array of hashes, where each item is represented by hash with the keys
|
33
|
-
`starts_at
|
38
|
+
`starts_at, ends_at, options`.
|
34
39
|
|
35
40
|
Styling is provided via sass mixin. You have to at least include the `carendar` mixin to get
|
36
41
|
the layout.
|
37
|
-
Custom styling is easily done by selecting the child classes of your calendar class.
|
38
42
|
|
43
|
+
The mixin takes three parameters
|
44
|
+
|
45
|
+
* Height of a day for the week view
|
46
|
+
* Height of a day got the month vew
|
47
|
+
* resolution of the minutes grid for the week view (for positioning events relative to the top)
|
48
|
+
|
49
|
+
Custom styling is easily done by selecting the child classes of your calendar class.
|
39
50
|
|
40
51
|
@import 'carendar'
|
41
52
|
|
42
|
-
.
|
43
|
-
+carendar(500px, 5)
|
53
|
+
.my-calendar
|
54
|
+
+carendar(500px, 50px, 5)
|
44
55
|
.day
|
45
56
|
border-left: 1px solid #EEE
|
46
57
|
border-top: 1px solid #EEE
|
@@ -3,6 +3,17 @@
|
|
3
3
|
margin: 0
|
4
4
|
list-style-type: none
|
5
5
|
|
6
|
+
=carendar-flexbox
|
7
|
+
display: -webkit-box
|
8
|
+
display: -moz-box
|
9
|
+
display: -ms-flexbox
|
10
|
+
display: -webkit-flex
|
11
|
+
display: flex
|
12
|
+
-webkit-flex-direction: row
|
13
|
+
-webkit-flex-wrap: wrap
|
14
|
+
flex-direction: row
|
15
|
+
flex-wrap: wrap
|
16
|
+
|
6
17
|
=carendar($week-day-height: 500px, $month-day-height: 50px, $min-per-slot: 5)
|
7
18
|
$min-per-day: 60 * 24
|
8
19
|
$slots-per-day: $min-per-day / $min-per-slot
|
@@ -10,9 +21,7 @@
|
|
10
21
|
+unstyled-carender-list
|
11
22
|
width: 100%
|
12
23
|
&.week
|
13
|
-
|
14
|
-
flex-direction: row
|
15
|
-
flex-wrap: wrap
|
24
|
+
+carendar-flexbox
|
16
25
|
.day
|
17
26
|
width: (100.0% / 7.1)
|
18
27
|
.items
|
@@ -39,9 +48,7 @@
|
|
39
48
|
&[data-offset-right='#{$i}']
|
40
49
|
right: $i * 10%
|
41
50
|
&.month
|
42
|
-
|
43
|
-
flex-direction: row
|
44
|
-
flex-wrap: wrap
|
51
|
+
+carendar-flexbox
|
45
52
|
.day
|
46
53
|
width: (100.0% / 7)
|
47
54
|
.items
|
data/lib/carendar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Axel Tetzlaff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|