liveblog 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/liveblog.css +92 -5
- data/lib/liveblog.rb +12 -2
- data/lib/liveblog.xsl +39 -10
- metadata +4 -4
- 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: 5b133828166d745da0a359b1460a83237fe6a7c1
|
4
|
+
data.tar.gz: 3a430a375412bd5ff52bd1d66b599b843179433b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba310329a870d91014432c2b438e15f73a01c71bd8ee3e0f914ed66853ac04d904d8b8f0812a3af5ff677202828ddc3566d39db94940dc8de459a68f2787888
|
7
|
+
data.tar.gz: 1a721c5e0ac215a13a61e09c5726ccfc143de87ca9914661baebe9e599bebe72a56879c6027fc01bc270a92a05ae7efc67957cb52390a661f0de42d5809f305e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/liveblog.css
CHANGED
@@ -6,7 +6,7 @@ body { background-color: #c48f33;}
|
|
6
6
|
border-top: 1px solid rgba(100,150,100,0.4);
|
7
7
|
border-bottom: 1px solid rgba(100,150,100,0.4);
|
8
8
|
overflow: hidden
|
9
|
-
margin: 0.3em;
|
9
|
+
margin: 0.3em; padding: 0.3em 0.1em;
|
10
10
|
}
|
11
11
|
|
12
12
|
header>nav:first-child>ul{
|
@@ -30,15 +30,58 @@ body { background-color: #c48f33;}
|
|
30
30
|
header>nav>ul>li>a:hover {background-color: transparent; color: #272;}
|
31
31
|
header>nav>ul>li>a:focus {background-color: #161; color: #fff;}
|
32
32
|
header>nav>ul>li>a:active {background-color: rgba(200,200,200,0.4); color: #5a5;}
|
33
|
+
|
34
|
+
#summary {
|
35
|
+
background-color: transparent;
|
36
|
+
color: #AFC332;
|
37
|
+
float: left;
|
38
|
+
margin: 1em 2em;
|
39
|
+
max-width: 620px;
|
40
|
+
}
|
41
|
+
|
42
|
+
#summary ul {
|
43
|
+
background-color: #D5A95D;
|
44
|
+
list-style-type: square;
|
45
|
+
margin: 1.4em; padding: 1.8em;
|
46
|
+
}
|
47
|
+
|
48
|
+
#summary ul li {
|
49
|
+
background-color: #D5A95D;
|
50
|
+
font-family: arial, verdana;
|
51
|
+
font-size: 1.4em;
|
52
|
+
margin: 0.2em 2em; padding: 0.8em;
|
53
|
+
}
|
54
|
+
|
55
|
+
#summary ul li a {
|
56
|
+
background-color: transparent;
|
57
|
+
color: #8E32C3;
|
58
|
+
text-decoration: none;
|
59
|
+
padding: 0.4em;
|
60
|
+
}
|
61
|
+
#summary ul li a:link {
|
62
|
+
background-color: transparent;
|
63
|
+
}
|
64
|
+
|
65
|
+
#summary ul li a:visited {
|
66
|
+
background-color: rgba(100,100,100,0.1);
|
67
|
+
}
|
68
|
+
|
69
|
+
#summary ul li a:hover {
|
70
|
+
background-color: transparent;
|
71
|
+
color: #C332AF;
|
72
|
+
}
|
73
|
+
|
33
74
|
article {
|
34
75
|
background-color: #AFC332;
|
35
|
-
|
36
|
-
|
76
|
+
}
|
77
|
+
details ol li {
|
78
|
+
background-color: #AFC332;
|
79
|
+
background-color: transparent;
|
80
|
+
margin: 0.3em; padding: 0.6em;
|
37
81
|
}
|
38
82
|
section {
|
39
83
|
background-color: #E2C38D;
|
40
84
|
color: #4532C3;
|
41
|
-
float: left;
|
42
85
|
font-size: 1.2em;
|
43
86
|
margin: 1.7em 0.7em 1.7em 1.7em; padding: 2.0em 4.6em;
|
44
87
|
max-width: 500px
|
@@ -79,7 +122,8 @@ section a:active {
|
|
79
122
|
|
80
123
|
|
81
124
|
|
82
|
-
|
125
|
+
aside {
|
126
|
+
background-color: #eee;
|
83
127
|
background-color: transparent;
|
84
128
|
color: #c48f33;
|
85
129
|
float: right;
|
@@ -115,3 +159,46 @@ aside ul li a:hover {
|
|
115
159
|
color: #eee;
|
116
160
|
text-decoration: none;
|
117
161
|
}
|
162
|
+
|
163
|
+
article>footer{
|
164
|
+
background-color: rgba(255,255,255,0.2);
|
165
|
+
}
|
166
|
+
|
167
|
+
article>footer>dl#info{
|
168
|
+
background-color: transparent;
|
169
|
+
|
170
|
+
margin: 1.9em 0 0 0; padding: 2em;
|
171
|
+
width: 33em;
|
172
|
+
overflow: hidden;
|
173
|
+
}
|
174
|
+
|
175
|
+
article>footer>dl#info{
|
176
|
+
background-color: transparent;
|
177
|
+
margin: 4.1em 0 0.1em 0;
|
178
|
+
}
|
179
|
+
article>footer>dl#info dt{
|
180
|
+
background-color: transparent;
|
181
|
+
float: left;
|
182
|
+
font:15px arial,sans-serif;
|
183
|
+
padding: 0.2em 0;
|
184
|
+
margin: 0.1em 0 0.1em 0;
|
185
|
+
text-align: left;
|
186
|
+
width: 4.8em;
|
187
|
+
}
|
188
|
+
article>footer>dl#info dd{
|
189
|
+
background-color: transparent;
|
190
|
+
float: left;
|
191
|
+
margin: 0.1em 0; padding: 0.2em 0.2em;
|
192
|
+
width: 27em;
|
193
|
+
}
|
194
|
+
article>footer>dl#info ul{
|
195
|
+
background-color: transparent;
|
196
|
+
list-style-type: none;
|
197
|
+
margin: 0 0em; padding: 0 0em;
|
198
|
+
}
|
199
|
+
dl#info ul li {
|
200
|
+
background-color: transparent;
|
201
|
+
float: left;
|
202
|
+
padding: 0em 0.5em 0 0;
|
203
|
+
margin: 0em;
|
204
|
+
}
|
data/lib/liveblog.rb
CHANGED
@@ -45,7 +45,7 @@ class LiveBlog
|
|
45
45
|
def new_file(s=nil)
|
46
46
|
|
47
47
|
s ||= <<EOF
|
48
|
-
<?dynarex schema="sections[title, edit_url, date, css_url]/section(x)"?>
|
48
|
+
<?dynarex schema="sections[title, edit_url, date, css_url]/section(x)" order='descending'?>
|
49
49
|
title: LiveBlog #{ordinalize(@t.day) + @t.strftime(" %B %Y")}
|
50
50
|
edit_url: #{@edit_url}
|
51
51
|
date: #{Date.today}
|
@@ -110,10 +110,20 @@ EOF
|
|
110
110
|
summary.element('edit_url').text += "%s/%s/index.txt" % [@url_edit, path()]
|
111
111
|
date = summary.element('date')
|
112
112
|
date.text = Date.parse(date.text).strftime("%d-%b-%Y").upcase
|
113
|
+
summary.add Rexle::Element.new('published').add_text Time.now.strftime("%d-%m-%Y %H:%M")
|
114
|
+
|
115
|
+
tags = Rexle::Element.new('tags')
|
116
|
+
|
117
|
+
doc.root.xpath('records/section/x/text()').each do |x|
|
118
|
+
tags.add Rexle::Element.new('tag').add_text x.lines.first[/#(\w+)$/,1]
|
119
|
+
end
|
120
|
+
|
121
|
+
summary.add tags
|
122
|
+
|
113
123
|
|
114
124
|
doc.root.xpath('records/section/x') do |x|
|
115
125
|
|
116
|
-
s = "=%s\n%s\n=" % [x.text.lines.first[/#\w+$/], x.text]
|
126
|
+
s = "=%s\n%s\n=" % [x.text.lines.first[/#\w+$/], x.text.unescape]
|
117
127
|
html = Martile.new(s).to_html
|
118
128
|
|
119
129
|
e = x.parent
|
data/lib/liveblog.xsl
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
<html>
|
8
8
|
<head>
|
9
9
|
<title><xsl:value-of select='summary/title'/></title>
|
10
|
+
<link rel='stylesheet' type='text/css' href='{summary/css_url}' media='screen, projection, tv, print'/>
|
10
11
|
</head>
|
11
12
|
<body>
|
12
13
|
|
@@ -22,21 +23,49 @@
|
|
22
23
|
</ul>
|
23
24
|
</nav>
|
24
25
|
</header>
|
25
|
-
<div>
|
26
|
-
<ul>
|
27
|
-
<li>
|
28
|
-
<a href="{summary/edit_url}">edit</a>
|
29
|
-
</li>
|
30
|
-
</ul>
|
31
|
-
</div>
|
32
26
|
|
33
|
-
<h1><xsl:value-of select='summary/date'/></h1>
|
34
27
|
|
28
|
+
<div id='summary'>
|
29
|
+
<ul>
|
35
30
|
<xsl:for-each select="records/section/section">
|
36
|
-
|
37
|
-
<xsl:
|
31
|
+
<!--<xsl:sort select='../@id' order='descending'/>-->
|
32
|
+
<li><a href='#{@id}'><xsl:value-of select='details/summary/h1'/></a></li>
|
33
|
+
</xsl:for-each>
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
<aside>
|
37
|
+
<ul>
|
38
|
+
<li><xsl:value-of select='summary/date'/></li>
|
39
|
+
<li>
|
40
|
+
<a href="{summary/edit_url}" rel="nofollow">edit</a>
|
41
|
+
</li>
|
42
|
+
</ul>
|
43
|
+
</aside>
|
44
|
+
<article>
|
45
|
+
<div style='clear:both'/>
|
46
|
+
<xsl:for-each select="records/section">
|
47
|
+
<!--<xsl:sort select='@id' order='descending'/>-->
|
48
|
+
<xsl:copy-of select='section'/>
|
38
49
|
|
39
50
|
</xsl:for-each>
|
51
|
+
|
52
|
+
<footer>
|
53
|
+
<dl id="info">
|
54
|
+
<dt>Tags:</dt>
|
55
|
+
<dd>
|
56
|
+
<ul>
|
57
|
+
<xsl:for-each select="summary/tags/*">
|
58
|
+
<li><xsl:value-of select="."/></li>
|
59
|
+
</xsl:for-each>
|
60
|
+
</ul>
|
61
|
+
</dd>
|
62
|
+
<dt>Source:</dt>
|
63
|
+
<dd><a href="index.txt">index.txt</a></dd>
|
64
|
+
<dt>Published:</dt><dd><xsl:value-of select="summary/published"/></dd>
|
65
|
+
</dl>
|
66
|
+
</footer>
|
67
|
+
</article>
|
68
|
+
|
40
69
|
</body>
|
41
70
|
</html>
|
42
71
|
</xsl:template>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liveblog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
WoOSxvsTN7qoA8F0W4mkDpf+HhHxBOLTPykcHMIlx2gILLnNraaZ1rJlZAqWABGj
|
32
32
|
v8lGgeeqqjd5QA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-03-
|
34
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
version: '1.5'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.5.
|
45
|
+
version: 1.5.7
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
version: '1.5'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.5.
|
55
|
+
version: 1.5.7
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: martile
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|