polyrex-calendar 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/month.css +6 -0
- data/lib/month_calendar.xsl +15 -0
- data/lib/month_layout.css +1 -1
- data/lib/polyrex-calendar.rb +8 -10
- data/lib/week.css +29 -8
- data/lib/week_calendar.xsl +9 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90f20b1075f113bcf8363ff4efc5de01854b818f
|
4
|
+
data.tar.gz: 005f8c40cbf79785e496f796b67f2a2fbd0ea8c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8e079cd66f3f2234beb7d363e5d208c33e8b28789f6045a7fa6440fdb0549c869a074356b96ed2ce770fdf61269d392a4ad24d1212b3dac9bae10aaf9f9a86
|
7
|
+
data.tar.gz: 2be208d8727b9097c6e3c6c8a04d8b3f6dabf5430ee86123af182e103a2185f1d3824e1c476657ff4bc5a560976a8f27617e2a75f5d6d50051a80a2b18b9ba3a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/month.css
CHANGED
@@ -6,9 +6,15 @@
|
|
6
6
|
background-color: transparent;
|
7
7
|
}
|
8
8
|
|
9
|
+
#wrap>header>nav {
|
10
|
+
background-color: #aba;
|
11
|
+
padding: 0.3em 0.8em;
|
12
|
+
}
|
13
|
+
|
9
14
|
#wrap>header>nav:first-child>ul{
|
10
15
|
background-color: transparent;
|
11
16
|
list-style-type: none;
|
17
|
+
padding: 0.2em;
|
12
18
|
}
|
13
19
|
#wrap>header>nav:first-child>ul>li {
|
14
20
|
background-color: transparent;
|
data/lib/month_calendar.xsl
CHANGED
@@ -14,6 +14,21 @@
|
|
14
14
|
|
15
15
|
<body>
|
16
16
|
<div id="wrap">
|
17
|
+
<header>
|
18
|
+
<nav>
|
19
|
+
<ul>
|
20
|
+
<li><a href='/'>home</a></li>
|
21
|
+
<li>calendar</li>
|
22
|
+
</ul>
|
23
|
+
</nav>
|
24
|
+
<nav>
|
25
|
+
<ul>
|
26
|
+
<li><a href="kplanner.html">kitchen monthly planner</a></li>
|
27
|
+
<li><a href="weekly_planner.html">weekly planner</a></li>
|
28
|
+
<li><a href="calendar.html">yearly planner</a></li>
|
29
|
+
</ul>
|
30
|
+
</nav>
|
31
|
+
</header>
|
17
32
|
<h1><xsl:value-of select="summary/title"/><xsl:text> </xsl:text><xsl:value-of select="summary/year"/></h1>
|
18
33
|
<table>
|
19
34
|
<tr><th>Sunday</th><th>Monday</th><th>Tuesday</th><th>Wednesday</th><th>Thursday</th><th>Friday</th><th>Saturday</th></tr>
|
data/lib/month_layout.css
CHANGED
data/lib/polyrex-calendar.rb
CHANGED
@@ -26,11 +26,8 @@ module LIBRARY
|
|
26
26
|
|
27
27
|
def fetch_file(filename)
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
lib = 'http://rorbuilder.info/r/ruby/polyrex-calendar'
|
32
|
-
open(File.join(lib, filename),
|
33
|
-
'UserAgent' => 'PolyrexCalendar'){|x| x.read }
|
29
|
+
lib = File.dirname(__FILE__)
|
30
|
+
File.read filename
|
34
31
|
end
|
35
32
|
|
36
33
|
def generate_webpage(xml, xsl)
|
@@ -421,11 +418,12 @@ class PolyrexCalendar
|
|
421
418
|
|
422
419
|
polyrex.records.each do |day|
|
423
420
|
|
424
|
-
|
425
|
-
|
421
|
+
dt = day.date
|
422
|
+
|
423
|
+
sd = dt.strftime("%Y-%b-%d ")
|
424
|
+
m, i = dt.month, dt.day
|
425
|
+
cal_day = @polyrex.records[m - 1].day[i-1]
|
426
426
|
|
427
|
-
cal_day = @polyrex.records[m].week[w].day[i]
|
428
|
-
|
429
427
|
cal_day.event = day.title
|
430
428
|
|
431
429
|
if day.records.length > 0 then
|
@@ -460,7 +458,7 @@ class PolyrexCalendar
|
|
460
458
|
|
461
459
|
seconds = entries.keys.map{|x| Time.parse(x) - Time.parse('08:00')}
|
462
460
|
|
463
|
-
unless
|
461
|
+
unless dt.saturday? or dt.sunday? then
|
464
462
|
rows = slotted_sort(seconds).map do |x|
|
465
463
|
(Time.parse('08:00') + x.to_i).strftime("%H:%M") if x
|
466
464
|
end
|
data/lib/week.css
CHANGED
@@ -1,27 +1,48 @@
|
|
1
1
|
/* week.css*/
|
2
2
|
|
3
|
-
#wrap
|
4
|
-
background-color: transparent;
|
5
|
-
font-size: 1.4em;
|
6
|
-
margin: 0.3em 0.3em;
|
7
|
-
padding: 0.4em 0.2em;
|
3
|
+
#wrap>header {
|
4
|
+
background-color: transparent;
|
8
5
|
}
|
9
6
|
|
7
|
+
#wrap>header>h1 {
|
8
|
+
background-color: transparent;
|
9
|
+
color: #987;
|
10
|
+
font-size: 1.4em;
|
11
|
+
margin: 0.3em 0.3em;
|
12
|
+
padding: 0.4em 0.2em;
|
13
|
+
}
|
14
|
+
|
15
|
+
|
16
|
+
#wrap>header>nav:first-child>ul{
|
17
|
+
background-color: transparent;
|
18
|
+
list-style-type: none;
|
19
|
+
}
|
20
|
+
#wrap>header>nav:first-child>ul>li {
|
21
|
+
background-color: transparent;
|
22
|
+
display: inline;
|
23
|
+
}
|
24
|
+
|
25
|
+
#wrap>header>nav:first-child>ul>li~li:before {
|
26
|
+
background-color: transparent;
|
27
|
+
content: "> ";
|
28
|
+
}
|
29
|
+
|
10
30
|
#wrap div ul {
|
11
|
-
background-color:
|
31
|
+
background-color: transparent;
|
12
32
|
list-style-type: none;
|
13
33
|
padding: 0.1em 1em;
|
14
34
|
margin: 0.3em 0.2em;
|
15
35
|
}
|
16
36
|
|
17
37
|
#wrap div ul li {
|
18
|
-
background-color:
|
38
|
+
background-color: transparent;
|
19
39
|
padding: 0.2em 0.2em;
|
20
40
|
margin: 0.2em 0.2em;
|
21
41
|
}
|
22
42
|
|
23
43
|
#wrap div ul li.selected {
|
24
|
-
background-color:
|
44
|
+
background-color: transparent;
|
45
|
+
border: 4px solid rgba(200,200,150,0.6);
|
25
46
|
}
|
26
47
|
|
27
48
|
|
data/lib/week_calendar.xsl
CHANGED
@@ -10,6 +10,14 @@
|
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
<div id="wrap">
|
13
|
+
<header>
|
14
|
+
<nav>
|
15
|
+
<ul>
|
16
|
+
<li><a href='/'>home</a></li>
|
17
|
+
<li><a href='/calendar/'>calendar</a></li>
|
18
|
+
<li>weekly planner</li>
|
19
|
+
</ul>
|
20
|
+
</nav>
|
13
21
|
<h1>
|
14
22
|
<xsl:choose>
|
15
23
|
<xsl:when test="summary/label=''">
|
@@ -21,6 +29,7 @@
|
|
21
29
|
</xsl:choose>
|
22
30
|
: Week <xsl:value-of select="summary/no"/>
|
23
31
|
</h1>
|
32
|
+
</header>
|
24
33
|
<xsl:apply-templates select='summary'/>
|
25
34
|
<xsl:apply-templates select='records'/>
|
26
35
|
</div>
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|