Thimblr 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/thimblr +8 -0
- data/config/demo.yml +204 -0
- data/config/settings.default.yaml +18 -0
- data/config/settings.yaml +18 -0
- data/lib/thimblr.rb +181 -0
- data/lib/thimblr/parser.rb +389 -0
- data/themes/101.html +431 -0
- data/themes/Redux.html +1002 -0
- data/themes/Stationary.html +221 -0
- data/views/help.erb +165 -0
- data/views/index.erb +49 -0
- metadata +83 -0
@@ -0,0 +1,221 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
{block:IndexPage}
|
5
|
+
<title>{Title}</title>
|
6
|
+
<meta name="description" content="{MetaDescription}">
|
7
|
+
{/block:IndexPage}
|
8
|
+
{block:PostSummary}<title>{PostSummary}</title>{/block:PostSummary}
|
9
|
+
<meta name="viewport" content="width=848">
|
10
|
+
<meta name="if:Elsewhere" content="0">
|
11
|
+
<meta name="text:Elsewhere 1 Name" content="">
|
12
|
+
<meta name="text:Elsewhere 1 URL" content="">
|
13
|
+
<meta name="text:Elsewhere 2 Name" content="">
|
14
|
+
<meta name="text:Elsewhere 2 URL" content="">
|
15
|
+
<meta name="text:Elsewhere 3 Name" content="">
|
16
|
+
<meta name="text:Elsewhere 3 URL" content="">
|
17
|
+
<meta name="text:Tagline" content="Your awesome tagline">
|
18
|
+
<meta name="text:Disqus Shortname" content="">
|
19
|
+
<link rel="shortcut icon" href="{Favicon}">
|
20
|
+
<link rel="alternate" href="{RSS}" type="application/rss+xml">
|
21
|
+
<link rel="stylesheet" href="http://static.tumblr.com/j8lh0bq/A1Ukkwf8p/reset.css" type="text/css">
|
22
|
+
<link rel="stylesheet" href="http://static.tumblr.com/j8lh0bq/Nunksbfhp/oldie.css" type="text/css">
|
23
|
+
<style type="text/css" media="screen">
|
24
|
+
#disqus_thread {
|
25
|
+
margin: 0 0 30px 0 !important;
|
26
|
+
}
|
27
|
+
{CustomCSS}
|
28
|
+
</style>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="main">
|
32
|
+
|
33
|
+
<div id="inner">
|
34
|
+
|
35
|
+
<div id="header">
|
36
|
+
<h1><a href="/">{Title}</a></h1>
|
37
|
+
{block:IfTagline}<div class="tagline">{text:Tagline}</div>{/block:IfTagline}
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div id="sidebar">
|
41
|
+
<div id="inner-sidebar">
|
42
|
+
<div id="authorbox">
|
43
|
+
<h3>About the author</h3>
|
44
|
+
<img src="{PortraitURL-48}" class="profilepic" alt="{Title}">
|
45
|
+
{Description}
|
46
|
+
<div class="clear"></div>
|
47
|
+
{block:HasPages}
|
48
|
+
{block:Pages}<h3><a href="{URL}">{Label}</a></h3>{/block:Pages}
|
49
|
+
{/block:HasPages}
|
50
|
+
</div>
|
51
|
+
{block:IfElsewhere}
|
52
|
+
<div class="more">
|
53
|
+
<h3>Elsewhere</h3>
|
54
|
+
<p>
|
55
|
+
{block:IfElsewhere1Name}<a href="{text:Elsewhere 1 URL}">{text:Elsewhere 1 Name}</a> {/block:IfElsewhere1Name}
|
56
|
+
{block:IfElsewhere2Name}<a href="{text:Elsewhere 2 URL}">{text:Elsewhere 2 Name}</a> {/block:IfElsewhere2Name}
|
57
|
+
{block:IfElsewhere3Name}<a href="{text:Elsewhere 3 URL}">{text:Elsewhere 3 Name}</a> {/block:IfElsewhere3Name}
|
58
|
+
</p>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
{/block:IfElsewhere}
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div id="entries">
|
66
|
+
|
67
|
+
{block:SearchPage}
|
68
|
+
<div id="fake-post" class="entry">
|
69
|
+
<div class="content">{block:NoSearchResults}Terribly sorry, a total of {/block:NoSearchResults}<strong>{SearchResultCount}</strong> result(s) for <strong>{SearchQuery}</strong></div>
|
70
|
+
</div>
|
71
|
+
{/block:SearchPage}
|
72
|
+
|
73
|
+
{block:TagPage}
|
74
|
+
<div id="fake-post" class="entry">
|
75
|
+
<div class="content">Posts tagged <strong>{Tag}</strong></div>
|
76
|
+
</div>
|
77
|
+
{/block:TagPage}
|
78
|
+
|
79
|
+
{block:Posts}
|
80
|
+
|
81
|
+
{block:Text}
|
82
|
+
<div id="post-{PostID}" class="entry text">
|
83
|
+
{block:Title}<h2><a href="{Permalink}" rel="permalink">{Title}</a></h2>{/block:Title}
|
84
|
+
<div class="content">{Body}</div>
|
85
|
+
<div class="meta">{block:Date}{DayOfWeek}, {Month} {DayOfMonth}, {Year}{/block:Date}{block:NoteCount} — <a href="{Permalink}#notes">{NoteCountWithLabel}</a>{/block:NoteCount}{block:Date}{block:IfDisqusShortname} (<a href="{Permalink}#disqus_thread"></a>){/block:IfDisqusShortname}{/block:Date}{block:More} <a href="{Permalink}">Read more …</a>{/block:More}</div>
|
86
|
+
</div>
|
87
|
+
{/block:Text}
|
88
|
+
|
89
|
+
{block:Photo}
|
90
|
+
<div id="post-{PostID}" class="entry media">
|
91
|
+
<div class="minimeta"><a href="{Permalink}" rel="permalink"><img src="http://static.tumblr.com/j8lh0bq/I27krymjj/pointer.png" alt=""></a></div>
|
92
|
+
<div class="container">{LinkOpenTag}<img src="{PhotoURL-500}" alt="{PhotoAlt}">{LinkCloseTag}</div>
|
93
|
+
{block:Caption}<div class="content">{Caption}</div>{/block:Caption}
|
94
|
+
{block:Date}{block:IfDisqusShortname}<div class="meta">(<a href="{Permalink}#disqus_thread"></a>)</div>{/block:IfDisqusShortname}{/block:Date}
|
95
|
+
</div>
|
96
|
+
{/block:Photo}
|
97
|
+
|
98
|
+
{block:Photoset}
|
99
|
+
<div id="post-{PostID}" class="entry media">
|
100
|
+
<div class="minimeta"><a href="{Permalink}" rel="permalink"><img src="http://static.tumblr.com/j8lh0bq/I27krymjj/pointer.png" alt=""></a></div>
|
101
|
+
<div class="container">{Photoset-500}</div>
|
102
|
+
{block:Caption}<div class="content">{Caption}</div>{/block:Caption}
|
103
|
+
{block:Date}{block:IfDisqusShortname}<div class="meta">(<a href="{Permalink}#disqus_thread"></a>)</div>{/block:IfDisqusShortname}{/block:Date}
|
104
|
+
</div>
|
105
|
+
{/block:Photoset}
|
106
|
+
|
107
|
+
{block:Quote}
|
108
|
+
<div id="post-{PostID}" class="entry quote">
|
109
|
+
<div class="minimeta"><a href="{Permalink}" rel="permalink"><img src="http://static.tumblr.com/j8lh0bq/I27krymjj/pointer.png" alt=""></a></div>
|
110
|
+
<h2>{Quote}</h2>
|
111
|
+
{block:Source}<div class="content">{Source}</div>{/block:Source}
|
112
|
+
{block:Date}{block:IfDisqusShortname}<div class="meta">(<a href="{Permalink}#disqus_thread"></a>)</div>{/block:IfDisqusShortname}{/block:Date}
|
113
|
+
</div>
|
114
|
+
{/block:Quote}
|
115
|
+
|
116
|
+
{block:Link}
|
117
|
+
<div id="post-{PostID}" class="entry link">
|
118
|
+
<div class="minimeta"><a href="{Permalink}" rel="permalink"><img src="http://static.tumblr.com/j8lh0bq/I27krymjj/pointer.png" alt=""></a></div>
|
119
|
+
<h2><a href="{URL}" {Target}>{Name}</a></h2>
|
120
|
+
{block:Description}<div class="content">{Description}</div>{/block:Description}
|
121
|
+
{block:Date}{block:IfDisqusShortname}<div class="meta">(<a href="{Permalink}#disqus_thread"></a>)</div>{/block:IfDisqusShortname}{/block:Date}
|
122
|
+
</div>
|
123
|
+
{/block:Link}
|
124
|
+
|
125
|
+
{block:Chat}
|
126
|
+
<div id="post-{PostID}" class="entry chat">
|
127
|
+
<div class="minimeta"><a href="{Permalink}" rel="permalink"><img src="http://static.tumblr.com/j8lh0bq/I27krymjj/pointer.png" alt=""></a></div>
|
128
|
+
{block:Title}<h2>{Title}</h2>{/block:Title}
|
129
|
+
<div class="content">
|
130
|
+
<ul>
|
131
|
+
{block:Lines}<li class="{Alt}">{block:Label}<span class="label">{Label}</span> {/block:Label}{Line}</li>{/block:Lines}
|
132
|
+
</ul>
|
133
|
+
</div>
|
134
|
+
{block:Date}{block:IfDisqusShortname}<div class="meta">(<a href="{Permalink}#disqus_thread"></a>)</div>{/block:IfDisqusShortname}{/block:Date}
|
135
|
+
</div>
|
136
|
+
{/block:Chat}
|
137
|
+
|
138
|
+
{block:Audio}
|
139
|
+
<div id="post-{PostID}" class="entry audio">
|
140
|
+
<div class="minimeta"><a href="{Permalink}" rel="permalink"><img src="http://static.tumblr.com/j8lh0bq/I27krymjj/pointer.png" alt=""></a></div>
|
141
|
+
<div class="container">{AudioPlayerWhite}</div>
|
142
|
+
{block:Caption}<div class="content">{Caption}</div>{/block:Caption}
|
143
|
+
{block:Date}{block:IfDisqusShortname}<div class="meta">(<a href="{Permalink}#disqus_thread"></a>)</div>{/block:IfDisqusShortname}{/block:Date}
|
144
|
+
</div>
|
145
|
+
{/block:Audio}
|
146
|
+
|
147
|
+
{block:Video}
|
148
|
+
<div id="post-{PostID}" class="entry media">
|
149
|
+
<div class="minimeta"><a href="{Permalink}" rel="permalink"><img src="http://static.tumblr.com/j8lh0bq/I27krymjj/pointer.png" alt=""></a></div>
|
150
|
+
<div class="container">{Video-500}</div>
|
151
|
+
{block:Caption}<div class="content">{Caption}</div>{/block:Caption}
|
152
|
+
{block:Date}{block:IfDisqusShortname}<div class="meta">(<a href="{Permalink}#disqus_thread"></a>)</div>{/block:IfDisqusShortname}{/block:Date}
|
153
|
+
</div>
|
154
|
+
{/block:Video}
|
155
|
+
|
156
|
+
{/block:Posts}
|
157
|
+
|
158
|
+
{block:Permalink}
|
159
|
+
{block:IfDisqusShortname}
|
160
|
+
<div id="disqus_thread"></div>
|
161
|
+
<script type="text/javascript" src="http://disqus.com/forums/{text:Disqus Shortname}/embed.js"></script>
|
162
|
+
<noscript><a href="http://{text:Disqus Shortname}.disqus.com/?url=ref">View the discussion thread.</a></noscript>
|
163
|
+
{/block:IfDisqusShortname}
|
164
|
+
{/block:Permalink}
|
165
|
+
|
166
|
+
{block:PostNotes}
|
167
|
+
<div id="notes">
|
168
|
+
{PostNotes}
|
169
|
+
</div>
|
170
|
+
{/block:PostNotes}
|
171
|
+
|
172
|
+
{block:Pagination}
|
173
|
+
<div class="page-navigation">
|
174
|
+
{block:PreviousPage}<div class="left"><a href="{PreviousPage}">← Previous page</a></div>{/block:PreviousPage}
|
175
|
+
{block:NextPage}<div class="right"><a href="{NextPage}">Next page →</a></div>{/block:NextPage}
|
176
|
+
<div class="clear"></div>
|
177
|
+
</div>
|
178
|
+
{/block:Pagination}
|
179
|
+
{block:PermalinkPagination}
|
180
|
+
<div class="page-navigation">
|
181
|
+
{block:PreviousPost}<div class="left"><a href="{PreviousPost}">← Previous post</a></div>{/block:PreviousPost}
|
182
|
+
{block:NextPost}<div class="right"><a href="{NextPost}">Next post →</a></div>{/block:NextPost}
|
183
|
+
<div class="clear"></div>
|
184
|
+
</div>
|
185
|
+
{/block:PermalinkPagination}
|
186
|
+
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<div class="clear"></div>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div id="footer">
|
193
|
+
<form class="search-footer" action="/search" method="get">
|
194
|
+
<input class="search-query" type="text" name="q" value="{SearchQuery}"><input class="button" type="submit" value="Search">
|
195
|
+
</form>
|
196
|
+
<div class="actual-footer">
|
197
|
+
<p><a href="{RSS}">RSS</a>, <a href="/archive">Archive</a>. We love <a href="http://www.tumblr.com/">Tumblr</a>. Theme (<a href="http://www.tumblr.com/theme/3292">Stationery</a>) by <a href="http://thijsjacobs.com/">Thijs</a></p>
|
198
|
+
</div>
|
199
|
+
<div class="clear"></div>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
{block:IfDisqusShortname}
|
205
|
+
<script type="text/javascript">
|
206
|
+
//<![CDATA[
|
207
|
+
(function() {
|
208
|
+
var links = document.getElementsByTagName('a');
|
209
|
+
var query = '?';
|
210
|
+
for(var i = 0; i < links.length; i++) {
|
211
|
+
if(links[i].href.indexOf('#disqus_thread') >= 0) {
|
212
|
+
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
|
213
|
+
}
|
214
|
+
}
|
215
|
+
document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/{text:Disqus Shortname}/get_num_replies.js' + query + '"></' + 'script>');
|
216
|
+
})();
|
217
|
+
//]]>
|
218
|
+
</script>
|
219
|
+
{/block:IfDisqusShortname}
|
220
|
+
</body>
|
221
|
+
</html>
|
data/views/help.erb
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
<html lang="en-GB" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
|
2
|
+
<!-- This layout is shamelessly ripped from:
|
3
|
+
. .o8 oooo
|
4
|
+
.o8 "888 `888
|
5
|
+
.o888oo oooo oooo ooo. .oo. .oo. 888oooo. 888 oooo d8b
|
6
|
+
888 `888 `888 `888P"Y88bP"Y88b d88' `88b 888 `888""8P
|
7
|
+
888 888 888 888 888 888 888 888 888 888
|
8
|
+
888 . 888 888 888 888 888 888 888 888 888 .o.
|
9
|
+
"888" `V88V"V8P' o888o o888o o888o `Y8bod8P' o888o d888b Y8P
|
10
|
+
Hope you guys don't mind… -->
|
11
|
+
|
12
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
13
|
+
<link href="/stylesheets/tumblr.css" type="text/css" rel="stylesheet">
|
14
|
+
<link href="/stylesheets/help.css" type="text/css" rel="stylesheet">
|
15
|
+
|
16
|
+
<title>Thimblr Help</title>
|
17
|
+
<script src="assets/jquery.js" type="text/javascript" charset="utf-8"></script>
|
18
|
+
<script src="assets/help.js" type="text/javascript" charset="utf-8"></script>
|
19
|
+
<script src="assets/jquery-ui.js" type="text/javascript" charset="utf-8"></script>
|
20
|
+
<script src="assets/iphone-style-checkboxes.js" type="text/javascript" charset="utf-8"></script>
|
21
|
+
<style>table.settings .explain div.presets a.<%=Thimblr::Application::Platform%> {display:inline;}</style>
|
22
|
+
</head>
|
23
|
+
<body id="dashboard_goodies">
|
24
|
+
<div id="container">
|
25
|
+
<img id="content_top" alt="" src="/images/content_top.png"><div id="content">
|
26
|
+
<div id="left_column">
|
27
|
+
<div class="goody_container">
|
28
|
+
<h1>Welcome to Thimblr!</h2>
|
29
|
+
|
30
|
+
<p>Hello! Thimblr is a program that will help you design templates for <a href="http://tumblr.com">tumblr</a>. Drawing strong influence from Mark Wunch's <a href="http://github.com/mwunsch/thimble/">Thimble</a>, Thimblr is a complete rewrite in Ruby providing an in-built server and some extra helpers that will hopefully make editing your themes as easy as planning for internet explorer can be…</p>
|
31
|
+
<p>If this page looks weird to you, you're probably using Internet Explorer. I'm sorry, this project is a bit of fun for me and I'm just not up for the hours of work required for IE compatibility. Feel free to install another browser or submit a patch!</p>
|
32
|
+
<p>You can find the latest version of thimblr <a href="http://github.com/jphastings/Thimblr/" taget="github">on github</a> but you can upgrade your copy with <code>gem update Thimblr</code>, as with any other gem.</p>
|
33
|
+
</div>
|
34
|
+
<div class="goody_container">
|
35
|
+
<a name="Instructions"></a>
|
36
|
+
<h2>Instructions</h2>
|
37
|
+
<p><strong>Don't Panic!</strong> Thimblr is very easy to use. Just choose a theme from the drop down box at the top of the page and you're away. <%=(settings.allowediting) ? "Y" : "If you <a href=\"#AllowEditing\">enable editing</a>, y" %>ou can use the notepad icon to it's right to edit the current template in your text editor.</p>
|
38
|
+
<p>If you're feeling adventurous you can <%=(settings.data.nil?) ? "specify a <a href=\"#DataLocation\">data directory</a> and " : "" %> create a new data file with your own tumblr test data in it, or <a href="#ImportData">import post data</a> from Tumblr. If there is more than one data file to choose from, you will be able to choose it next to the theme drop-down.</p>
|
39
|
+
</div>
|
40
|
+
<div class="goody_container">
|
41
|
+
<a name="Settings"></a>
|
42
|
+
<h2>Thimblr Settings</h2>
|
43
|
+
<p>Have a play around with the internals of Thimblr! If you roll over the arrows to the right of each option you'll see some presets for that setting.</p>
|
44
|
+
<form action="/settings.set" id="settings">
|
45
|
+
<table class="settings">
|
46
|
+
<tr>
|
47
|
+
<th width="120px"></th>
|
48
|
+
<th width="350px"></th>
|
49
|
+
<th></th>
|
50
|
+
</tr>
|
51
|
+
|
52
|
+
<a name="AllowEditing"></a>
|
53
|
+
<tr id="opt-AllowEditing">
|
54
|
+
<td><label for="AllowEditing">Allow Editing</label></td>
|
55
|
+
<td colspan="2"><span style="float:right;width:400px" class="explain">Only needs to be off if you're paranoid</span><input id="AllowEditing" type="checkbox" name="AllowEditing" <%=settings.allowediting ? "checked=\"checked\"" : "" %>/></td>
|
56
|
+
</tr>
|
57
|
+
|
58
|
+
<a name="Editor"></a>
|
59
|
+
<tr id="opt-Editor" <%=settings.allowediting ? "" : "style=\"display:none\""%>>
|
60
|
+
<td><label for="Editor">Text Editor</label></td>
|
61
|
+
<td><input id="Editor" type="text" name="Editor" value="<%=settings.editor%>"></input></td>
|
62
|
+
<td class="explain">
|
63
|
+
<div class="contain">
|
64
|
+
<img src="/images/preset.png" class="presetIcon"/>
|
65
|
+
<div class="presetbox">
|
66
|
+
<div class="presets" rel="Editor">
|
67
|
+
<% Thimblr::Application::Editors.each do |ref,editor| %>
|
68
|
+
<a href="#" rel="<%=editor['command']%>" title="<%=editor['name']%>" class="preset <%=editor['platform']%>"><img src="/images/editors/<%=ref%>.png" /></a>
|
69
|
+
<% end %>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
|
76
|
+
<a name="ThemesLocation"></a>
|
77
|
+
<tr id="opt-ThemesLocation">
|
78
|
+
<td><label for="ThemesLocation">Location of Themes</label></td>
|
79
|
+
<td><input id="ThemesLocation" type="text" name="ThemesLocation" value="<%=get_relative(settings.themes)%>/" /></td>
|
80
|
+
<td class="explain">
|
81
|
+
<div class="contain">
|
82
|
+
<img src="/images/preset.png" class="presetIcon"/>
|
83
|
+
<div class="presetbox">
|
84
|
+
<div class="presets" rel="ThemesLocation">
|
85
|
+
<% Thimblr::Application::Locations.each do |loc| %>
|
86
|
+
<a href="#" rel="<%=loc['dir']%>themes/" title="<%=loc['name']%>" class="preset <%=loc['platform']%>"><img src="/images/os/<%=loc['platform']%>.png"/></a>
|
87
|
+
<% end %>
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
</td>
|
92
|
+
</tr>
|
93
|
+
|
94
|
+
<a name="DataLocation"></a>
|
95
|
+
<tr id="opt-DataLocation">
|
96
|
+
<td><label for="DataLocation">Location of Data</label></td>
|
97
|
+
<td><input id="DataLocation" type="text" name="DataLocation" value="<%=get_relative(settings.data)%>/" /></td>
|
98
|
+
<td class="explain">
|
99
|
+
<div class="contain">
|
100
|
+
<img src="/images/preset.png" class="presetIcon"/>
|
101
|
+
<div class="presetbox">
|
102
|
+
<div class="presets" rel="DataLocation">
|
103
|
+
<% Thimblr::Application::Locations.each do |loc| %>
|
104
|
+
<a href="#" rel="<%=loc['dir']%>data/" title="<%=loc['name']%>" class="preset <%=loc['platform']%>"><img src="/images/os/<%=loc['platform']%>.png"/></a>
|
105
|
+
<% end %>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
</td>
|
110
|
+
</tr>
|
111
|
+
|
112
|
+
<a name="Port"></a>
|
113
|
+
<tr id="opt-Port">
|
114
|
+
<td><label for="Port">Thimblr Port</label></td>
|
115
|
+
<td><input id="Port" type="text" name="Port" value="<%=settings.port%>" /></td>
|
116
|
+
<td class="explain" rel="Port">
|
117
|
+
<a href="#" rel="4567" class="preset"><img src="/images/preset.png"/></a>
|
118
|
+
</td>
|
119
|
+
</tr>
|
120
|
+
</table>
|
121
|
+
</form>
|
122
|
+
<p><em>Changes are saved automatically</em></p>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
<div style="background-color: rgb(192, 205, 129);" id="right_column">
|
126
|
+
<div style="background-color: rgb(201, 213, 141); border-width: 0px; -moz-border-radius-topright: 10px;" class="goody_container">
|
127
|
+
<h2>Tumblr Settings</h2>
|
128
|
+
<p>At some point I'll allow you to edit the (few) options that the tumblr emulator requires in this box. At the moment that includes the Posts per Page, which is set to 10.</p>
|
129
|
+
<p>Go and have a poke around the <code>settings.yaml</code> if you really want to change this value</p>
|
130
|
+
<!--
|
131
|
+
<p>Some templates are different depending on your tumblr settings. The following options will affect all the templates and data sets you use. They only affect Thimblr's emulation of Tumblr, not your real Tumblr account!</p>
|
132
|
+
<form action="/tumblrsettings.set" id="tumblr">
|
133
|
+
<label for="PostsPerPage">Posts Per Page</label>
|
134
|
+
<div style="margin-bottom: 5px;" class="goody_data">
|
135
|
+
<input type="text" value="10" name="PostsPerPage" id="PostsPerPage" />
|
136
|
+
</div>
|
137
|
+
</form>
|
138
|
+
-->
|
139
|
+
</div>
|
140
|
+
<div class="goody_container">
|
141
|
+
<h2>Import Data</h2>
|
142
|
+
<p>Once I've gone outside for a while I'll write a script here that will download a tumblr user's posts here. Not ready yet tho, sorry :(</p>
|
143
|
+
<form action="/import" id="import">
|
144
|
+
<label for="TumblrUser">Tumblr Username</label>
|
145
|
+
<div style="margin-bottom: 5px;" class="goody_data">
|
146
|
+
<input type="text" value="" name="TumblrUser" id="TumblrUser" />
|
147
|
+
</div>
|
148
|
+
</form>
|
149
|
+
</div>
|
150
|
+
<div style="background-color: rgb(201, 213, 141); border-bottom:1px solid #869445;" class="goody_container">
|
151
|
+
<h2>Hackity Hack</h2>
|
152
|
+
<p>All Thimblr's settings can be edited on this page, or in the <code>settings.yaml</code> file in the gem source.</p>
|
153
|
+
<p>Thimblr runs on Ruby, so it should be fairly easy to see how it works if you look at the source code. Feel free to <a href="http://github.com/jphastings/Thimblr/fork" target="github">fork the project on github</a> and play around. If you make any modifications you're proud off, send me a message! I'll fold useful things into my repo.</p>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
</form>
|
158
|
+
<img id="content_bottom" alt="" src="/images/content_bottom.png">
|
159
|
+
<ul id="footer">
|
160
|
+
<li><strong>Thimblr <a href="http://code.byJP.me" target="_new">by JP</a></strong></li>
|
161
|
+
<li><strong>layout © <a href="http://tumblr.com" target="_new">Tumblr, Inc.</strong></li>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
</body>
|
165
|
+
</html>
|
data/views/index.erb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html dir="ltr" lang="en-GB" id="thimblr">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title>Thimblr</title>
|
6
|
+
<meta name="Copyright" content="Copyright (c) 2010 Mark Wunsch and JP Hastings-Spital" />
|
7
|
+
<script type="text/javascript" src="assets/jquery.js"></script>
|
8
|
+
<script type="text/javascript" src="assets/main.js"></script>
|
9
|
+
<style type="text/css">
|
10
|
+
html { overflow-x: hidden; overflow-y: hidden; background: #2C4762; }
|
11
|
+
body { margin:0; }
|
12
|
+
#thimblr { font-size: 13px; line-height: 1.4; font-family: Trebuchet, Arial,sans-serif; line-height: 30px; }
|
13
|
+
#thimblr h1 { font-family: 'Bookman Old Style', Georgia, serif; font-weight: bold; font-size: 18px; vertical-align: middle; padding: 0 0 0 15px; display:inline; color:#fff;}
|
14
|
+
#thimblr h1 a { text-decoration:none; color:#fff;}
|
15
|
+
#thimblr form { display:inline; height: 30px; padding: 0 15px; color: #fff; -moz-opacity:.30; filter:alpha(opacity=30); opacity:.30; }
|
16
|
+
#thimblr form:hover { -moz-opacity:1.00; filter:alpha(opacity=100); opacity:1.00; }
|
17
|
+
#thimblr form img { vertical-align:middle; border:0; -moz-opacity:.50; filter:alpha(opacity=50); opacity:.50;}
|
18
|
+
#thimblr form img:hover { -moz-opacity:1.00; filter:alpha(opacity=100); opacity:1.00;}
|
19
|
+
#thimblr select { width: 150px; }
|
20
|
+
#thimblr #docs { float: right; color: #fff; margin-right:15px; }
|
21
|
+
#theme-container {position:absolute; left:0px; right:0px; top:30px; bottom:0px;}
|
22
|
+
#theme-preview {width:100%; height:100%;}
|
23
|
+
form option.altered {font-style:italic;}
|
24
|
+
form option.altered:after {content:"*";}
|
25
|
+
#data-select {visibility:hidden;}
|
26
|
+
</style>
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<div id="thimblr">
|
30
|
+
<h1><a href="http://github.com/jphastings/thimblr" target="github">thimblr</a></h1>
|
31
|
+
<form method="get" action="theme.set" id="theme-select">
|
32
|
+
<label for="theme-selector">theme</label>
|
33
|
+
<select name="theme" id="theme-selector">
|
34
|
+
<option id="nothemes" disabled="disable">No Themes Available</option>
|
35
|
+
</select>
|
36
|
+
<% if settings.allowediting %><a href="/edit/theme" class="action"><img src="/images/edit.png" /></a><% end %>
|
37
|
+
</form>
|
38
|
+
<form method="get" action="data.set" id="data-select">
|
39
|
+
<label for="data-selector">data</label>
|
40
|
+
<select name="data" id="data-selector"></select>
|
41
|
+
<% if settings.allowediting %><a href="/edit/data" class="action"><img src="/images/edit.png" /></a><% end %>
|
42
|
+
</form>
|
43
|
+
<a id="docs" href="/help#Instructions" target="tumblr">Help</a>
|
44
|
+
</div>
|
45
|
+
<div id="theme-container">
|
46
|
+
<iframe id="theme-preview" src="/help" border="0" frameborder="0" name="tumblr"></iframe>
|
47
|
+
</div>
|
48
|
+
</body>
|
49
|
+
</html>
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: Thimblr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.7
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- JP Hastings-Spital
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-04-07 00:00:00 +01:00
|
13
|
+
default_executable: thimblr
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: sinatra
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: launchy
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
35
|
+
description: A webserver built to help you test tumblr themes as you edit them
|
36
|
+
email: jphastings@gmail.com
|
37
|
+
executables:
|
38
|
+
- thimblr
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files: []
|
42
|
+
|
43
|
+
files:
|
44
|
+
- config/demo.yml
|
45
|
+
- config/settings.default.yaml
|
46
|
+
- config/settings.yaml
|
47
|
+
- lib/thimblr.rb
|
48
|
+
- lib/thimblr/parser.rb
|
49
|
+
- themes/101.html
|
50
|
+
- themes/Redux.html
|
51
|
+
- themes/Stationary.html
|
52
|
+
- views/help.erb
|
53
|
+
- views/index.erb
|
54
|
+
has_rdoc: true
|
55
|
+
homepage: http://github.com/jphastings/Thimblr
|
56
|
+
licenses: []
|
57
|
+
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options:
|
60
|
+
- --charset=UTF-8
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
version:
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
74
|
+
version:
|
75
|
+
requirements: []
|
76
|
+
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 1.3.5
|
79
|
+
signing_key:
|
80
|
+
specification_version: 3
|
81
|
+
summary: Helper for Tumblr theme editors
|
82
|
+
test_files: []
|
83
|
+
|