akitaonrails-utility_belt 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Manifest.txt +7 -0
- data/README +348 -0
- data/bin/amazon +16 -0
- data/bin/google +7 -0
- data/bin/pastie +7 -0
- data/html/andreas00.css +449 -0
- data/html/authorship.html +86 -0
- data/html/bg.gif +0 -0
- data/html/front.jpg +0 -0
- data/html/index.html +81 -0
- data/html/menubg.gif +0 -0
- data/html/menubg2.gif +0 -0
- data/html/test.jpg +0 -0
- data/html/usage.html +298 -0
- data/lib/utility_belt.rb +22 -0
- data/lib/utility_belt/amazon_upload_shortcut.rb +25 -0
- data/lib/utility_belt/clipboard.rb +68 -0
- data/lib/utility_belt/command_history.rb +129 -0
- data/lib/utility_belt/convertable_to_file.rb +34 -0
- data/lib/utility_belt/equipper.rb +71 -0
- data/lib/utility_belt/google.rb +26 -0
- data/lib/utility_belt/hash_math.rb +13 -0
- data/lib/utility_belt/interactive_editor.rb +81 -0
- data/lib/utility_belt/irb_options.rb +3 -0
- data/lib/utility_belt/irb_verbosity_control.rb +30 -0
- data/lib/utility_belt/is_an.rb +4 -0
- data/lib/utility_belt/language_greps.rb +28 -0
- data/lib/utility_belt/not.rb +15 -0
- data/lib/utility_belt/pastie.rb +29 -0
- data/lib/utility_belt/pipe.rb +24 -0
- data/lib/utility_belt/print_methods.rb +72 -0
- data/lib/utility_belt/rails_finder_shortcut.rb +18 -0
- data/lib/utility_belt/rails_verbosity_control.rb +8 -0
- data/lib/utility_belt/string_to_proc.rb +72 -0
- data/lib/utility_belt/symbol_to_proc.rb +30 -0
- data/lib/utility_belt/webbrowser.rb +37 -0
- data/lib/utility_belt/wirble.rb +83 -0
- data/lib/utility_belt/with.rb +21 -0
- data/spec/convertable_to_file_spec.rb +31 -0
- data/spec/equipper_spec.rb +70 -0
- data/spec/hash_math_spec.rb +17 -0
- data/spec/interactive_editor_spec.rb +146 -0
- data/spec/language_greps_spec.rb +9 -0
- data/spec/pastie_spec.rb +92 -0
- data/spec/pipe_spec.rb +30 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/string_to_proc_spec.rb +41 -0
- data/spec/utility_belt_spec.rb +4 -0
- data/utility_belt.gemspec +22 -0
- metadata +136 -0
data/History.txt
ADDED
data/Manifest.txt
ADDED
data/README
ADDED
@@ -0,0 +1,348 @@
|
|
1
|
+
== Utility Belt
|
2
|
+
|
3
|
+
by Giles Bowkett (and many others)
|
4
|
+
|
5
|
+
http://utilitybelt.rubyforge.org
|
6
|
+
|
7
|
+
== DESCRIPTION
|
8
|
+
|
9
|
+
Utility Belt is a grab-bag of tricks, tools, techniques, trifles, and toys for IRB, including convenience methods, language patches, and useful extensions. It also includes a couple command-line widgets. Its primary inspirations were an awesome gem called Wirble and a blog post by Amy Hoy called "Secrets Of The Rails Console Ninjas".
|
10
|
+
|
11
|
+
(http://slash7.com/articles/2006/12/21/secrets-of-the-rails-console-ninjas)
|
12
|
+
|
13
|
+
== INSTALL
|
14
|
+
|
15
|
+
sudo gem install utility_belt
|
16
|
+
|
17
|
+
== FEATURES
|
18
|
+
|
19
|
+
* Interactively edit IRB code in your preferred text editor
|
20
|
+
* Read from and write to OS X clipboard
|
21
|
+
* Post your code to Pastie with one command (OS X only)
|
22
|
+
* Kick-ass Unix-style history buffer
|
23
|
+
* Write command history to file or vi
|
24
|
+
* Grep classes and methods for strings
|
25
|
+
* Verbosity controls for regular IRB and Rails console
|
26
|
+
* Finder shortcuts for Rails console
|
27
|
+
* Upload shortcut for Amazon S3
|
28
|
+
* Command-line Amazon S3 upload script
|
29
|
+
* Command-line Google shortcut (OS X only)
|
30
|
+
* Auto-indentation
|
31
|
+
* _ special variable (like Unix shell var !!)
|
32
|
+
* Extremely basic themes for Wirble syntax coloring
|
33
|
+
* Pascal/JavaScript-style "with" statement
|
34
|
+
* String#to_proc
|
35
|
+
* Add and subtract Hashes with + and -
|
36
|
+
* Grammatically-correct is_an? method - no more "is_a? Array" statements
|
37
|
+
* One-character exit command
|
38
|
+
|
39
|
+
== COMMUNITY EFFORT
|
40
|
+
|
41
|
+
The majority of this code was written by other people and compiled, nicked, nabbed, herded, gathered, copied, or pilfered by me (Giles Bowkett). See copyright notice for the credits. A lot of this code comes from blogs. Check out the source code for numerous links to the original posts the code came from. Thanks also to Bob Hutchison, Avdi Grimm, Marcus Derencius, Markus Prinz, Ben Bleything, Reginald Braithwaite-Lee, and Robert Berger for bug fixes, new features, documentation, and bug reports.
|
42
|
+
|
43
|
+
== SYNOPSIS
|
44
|
+
|
45
|
+
Utility Belt gives you a ton of new options and techniques in IRB. (You may find yourself putting its language patches in actual projects as well.) The way to use Utility Belt is to edit, or create, your .irbrc file. This is analogous to a Unix .bashrc, .tcshrc, .profile, or similar file.
|
46
|
+
|
47
|
+
Windows users have a couple options. The easiest is to define an environment variable called IRBRC and set it to the full path of your irbrc (e.g. "C:\Documents and Settings\<username>\_irbrc"). Presto, .irbrc for Windows. You could also set your HOME-Variable to any directory you want and put your ".irbrc" in there. (It needs to be called ".irbrc", "_irbrc" won't work). Since Windows Explorer won't let you create a file with a dot in the beginning, use any text editor (Notepad will do just fine) and "Save As" to save it as ".irbrc". (The quotation marks make the magic happen.) We don't recommend this if you're also using MSYS or Cygwin, as they use the same variable for their own purposes.
|
48
|
+
|
49
|
+
Adding Utility Belt to your .irbrc is easy:
|
50
|
+
|
51
|
+
require 'rubygems'
|
52
|
+
require 'utility_belt'
|
53
|
+
|
54
|
+
To use the Amazon shortcuts, you also need to set some environment variables. See the section on S3 under "Usage" for more. Also, if your terminal has a light background, you'll need to enable the light-background syntax coloring theme - see the section on themes under "Usage" for more.
|
55
|
+
|
56
|
+
== USAGE
|
57
|
+
|
58
|
+
Using each of Utility Belt's tools is different:
|
59
|
+
|
60
|
+
== Interactively edit IRB code in your preferred text editor
|
61
|
+
|
62
|
+
If your preferred text editor is vi(m), emacs, or TextMate, there are built-in commands: vi, emacs, and mate, respectively. To use another editor, use this command:
|
63
|
+
|
64
|
+
edit_interactively(:the_name_of_my_editor)
|
65
|
+
|
66
|
+
or
|
67
|
+
|
68
|
+
edit_interactively("the name of my editor")
|
69
|
+
|
70
|
+
or
|
71
|
+
|
72
|
+
edit_interactively("/the/path/to/my/editor")
|
73
|
+
|
74
|
+
If you're wondering why the method name is so ridiculously long, there's a story there:
|
75
|
+
|
76
|
+
http://gilesbowkett.blogspot.com/2007/12/utility-belt-vs-rails.html
|
77
|
+
|
78
|
+
== Read from and write to OS X clipboard
|
79
|
+
|
80
|
+
To read:
|
81
|
+
|
82
|
+
MacClipboard.read
|
83
|
+
|
84
|
+
To write:
|
85
|
+
|
86
|
+
MacClipboard.write("something")
|
87
|
+
|
88
|
+
== Post your code to Pastie with one command (OS X only)
|
89
|
+
|
90
|
+
First copy some code into your clipboard, or put it there with the MacClipboard.write() class method. Then use the command:
|
91
|
+
|
92
|
+
pastie
|
93
|
+
|
94
|
+
or the shortcut version:
|
95
|
+
|
96
|
+
pst
|
97
|
+
|
98
|
+
Note that this method currently auto-formats all code as Ruby. Support for other languages is possible but not implemented yet. Also, this code is OS X only because it uses the MacClipboard. (A platform-agnostic version without the clipboard aspect is certainly possible.)
|
99
|
+
|
100
|
+
== Unix-style history buffer
|
101
|
+
|
102
|
+
Use "h" or "history" to view your command history, and "h! 123" to re-invoke command #123 in your buffer. "h!" with no args will run the last command.
|
103
|
+
|
104
|
+
== Write command history to file or vi
|
105
|
+
|
106
|
+
To write your history to a file, use "history_write('/path/to/file')". To edit your history in vi, use "history_to_vi" or its shortcut alias "hvi".
|
107
|
+
|
108
|
+
== Grep classes and methods for strings
|
109
|
+
|
110
|
+
Classes:
|
111
|
+
|
112
|
+
>> grep_classes("ixnum")
|
113
|
+
#=> ["Fixnum"]
|
114
|
+
|
115
|
+
>> grep_classes("num")
|
116
|
+
#=> ["Bignum", "Fixnum", "Numeric", "REXML::SyncEnumerator"]
|
117
|
+
|
118
|
+
Methods:
|
119
|
+
|
120
|
+
>> "any arbitrary string".grep_methods("pretty")
|
121
|
+
#=> ["pretty_inspect", "pretty_print_instance_variables", "pretty_print_inspect", "pretty_print", "pretty_print_cycle"]
|
122
|
+
|
123
|
+
>> 32.grep_methods("*")
|
124
|
+
#=> ["*", "**"]
|
125
|
+
|
126
|
+
At some point it'll probably be a good idea to add regex support for these methods.
|
127
|
+
|
128
|
+
== Verbosity controls for regular IRB and Rails console
|
129
|
+
|
130
|
+
regular IRB: "verbose" or "v" / "quiet" or "q"
|
131
|
+
|
132
|
+
Rails: "log" method turns verbosity on, there isn't actually any method for turning it off. (Might add one at some point.)
|
133
|
+
|
134
|
+
== Finder shortcuts for Rails console
|
135
|
+
|
136
|
+
user(:all) / user(1)
|
137
|
+
|
138
|
+
instead of
|
139
|
+
|
140
|
+
User.find(:all) / User.find(1)
|
141
|
+
|
142
|
+
Supports arbitrarily complex finds.
|
143
|
+
|
144
|
+
== Upload shortcut for Amazon S3
|
145
|
+
|
146
|
+
First, define your secret keys in your environment variables:
|
147
|
+
|
148
|
+
export AMAZON_ACCESS_KEY_ID='foofoofoofoofoo'
|
149
|
+
export AMAZON_SECRET_ACCESS_KEY='barbarbarbarbar'
|
150
|
+
|
151
|
+
(Obviously, replace those with actual values.)
|
152
|
+
|
153
|
+
Then, you can use
|
154
|
+
|
155
|
+
aws_upload("bucket_name","filename")
|
156
|
+
|
157
|
+
To easily upload public-access files. This method will automatically connect to Amazon S3 for you, if your keys are defined in your environment variables. It also writes the resulting Amazon URL to your clipboard, if you're on OS X, so you can easily share the file with others. Note that you have to create the initial buckets manually - see amazon.rubyforge.org for details on that.
|
158
|
+
|
159
|
+
A good way to use this is actually to have a default bucket, and create a further method in your .irbrc file:
|
160
|
+
|
161
|
+
def my_bucket_name(filename)
|
162
|
+
aws_upload("my_default_bucket",filename)
|
163
|
+
end
|
164
|
+
|
165
|
+
== Command-line Amazon S3 upload script
|
166
|
+
|
167
|
+
Utility Belt also includes amazon, a simple command-line uploader for S3. It requires that you set your Amazon environment variables (see above). The usage is:
|
168
|
+
|
169
|
+
amazon -b my_bucket_name filename other_filename
|
170
|
+
|
171
|
+
(For any arbitrary number of filenames.)
|
172
|
+
|
173
|
+
Anytime you want to upload a file to your default bucket on S3, for example, the "images" bucket for your blog - or the "mp3" bucket if you're running a blog like Projectionist - all you have to do is
|
174
|
+
|
175
|
+
amazon -b blog_files some_file.name
|
176
|
+
|
177
|
+
Or
|
178
|
+
|
179
|
+
amazon --bucket blog_files some_file.name
|
180
|
+
|
181
|
+
And you're good to go. Of course, if that were too many characters to type, you could always take it one step further with a shell script. For instance, in bash:
|
182
|
+
|
183
|
+
alias b1="amazon --bucket my_main_bucket $1"
|
184
|
+
alias b2="amazon --bucket my_other_bucket $1"
|
185
|
+
|
186
|
+
And then you would only have to type:
|
187
|
+
|
188
|
+
b1 file.name
|
189
|
+
|
190
|
+
And of course tab completion will handle all the typing of the file name, assuming you choose your file names deliberately ahead of time to make tab completion effective, in which case all you have to type is "b1 f[tab]" and bam.
|
191
|
+
|
192
|
+
== Command-line Google shortcut (OS X only)
|
193
|
+
|
194
|
+
To pop open a new window in your default browser with Google search results for a given search term, do:
|
195
|
+
|
196
|
+
google "any given term"
|
197
|
+
|
198
|
+
For one-word terms, you can omit the quotes:
|
199
|
+
|
200
|
+
google term
|
201
|
+
|
202
|
+
If you already have the search term in your clipboard, you can just type:
|
203
|
+
|
204
|
+
google
|
205
|
+
|
206
|
+
(The last approach is useful for unusual command-line error messages.)
|
207
|
+
|
208
|
+
== Auto-indentation and tab completion
|
209
|
+
|
210
|
+
Just type as normally. This just enables built-in but underused functionality in IRB. (The IRB default auto-indentation isn't perfect, but it clobbers the living hell out of no indentation at all.)
|
211
|
+
|
212
|
+
== _ special variable (like Unix shell var !!)
|
213
|
+
|
214
|
+
More activation of built-in but underused functionality in IRB. _ functions like !! in Unix, with one subtle difference. Instead of re-issuing the previous command in your history, it gives you the last result of evaluating a command. This means when you start a new IRB session, _ won't go to your history, it'll just give you nil, and it means that some commands can't be repeated exactly. Nine out of ten times, however, it's pretty much the same thing.
|
215
|
+
|
216
|
+
Note that when combined with the h! in the command history code, you basically have two synonyms for !! here. Neither one is an exact replica, but between the two of them, you should have what you need.
|
217
|
+
|
218
|
+
== Extremely basic themes for Wirble syntax coloring
|
219
|
+
|
220
|
+
Utility Belt incorporates Wirble as a dependency. Wirble provides syntax coloring. Utility Belt allows you to choose between two syntax coloring themes: Wirble's default, and an alternate color set for terminals with light backgrounds. The default theme is enabled by default (duh), but if you have a terminal with a light background, you can enable the light-background theme just by putting the following line of code in your .irbrc:
|
221
|
+
|
222
|
+
UtilityBelt::Themes.background(:light)
|
223
|
+
|
224
|
+
To revert back to the default, just use this:
|
225
|
+
|
226
|
+
UtilityBelt::Themes.background(:dark)
|
227
|
+
|
228
|
+
To specify an entirely new syntax color scheme, see the source code for this gem or for Wirble.
|
229
|
+
|
230
|
+
== Pascal/JavaScript-style "with" statement
|
231
|
+
|
232
|
+
I use this with RSpec's spec_helper. Instead of:
|
233
|
+
|
234
|
+
Spec::Runner.configure do |config|
|
235
|
+
config.use_transactional_fixtures = true
|
236
|
+
config.use_instantiated_fixtures = false
|
237
|
+
config.fixture_path = RAILS_ROOT + '/spec/fixtures'
|
238
|
+
config.mock_with :flexmock
|
239
|
+
end
|
240
|
+
|
241
|
+
I do this:
|
242
|
+
|
243
|
+
Spec::Runner.configure do |config|
|
244
|
+
with(config) do
|
245
|
+
use_transactional_fixtures = true
|
246
|
+
use_instantiated_fixtures = false
|
247
|
+
fixture_path = RAILS_ROOT + '/spec/fixtures'
|
248
|
+
mock_with :flexmock
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
Note however that this blew up once and I have no idea why. Caveat emptor, et cetera.
|
253
|
+
|
254
|
+
== String#to_proc
|
255
|
+
|
256
|
+
Syntactic sugar for functional programming.
|
257
|
+
|
258
|
+
(1..3).map(&'*2') => [2, 4, 6]
|
259
|
+
(1..3).map(&'[-1, _, 0]') => [[-1, 1, 0], [-1, 2, 0], [-1, 3, 0]]
|
260
|
+
(1..3).map(&'x -> y -> x * y').map(&'[2]') => [2, 4, 6]
|
261
|
+
(1..5).select(&'>2') => [3, 4, 5]
|
262
|
+
(1..3).map(&'x -> y -> x * y').map(&'.call(2)') => [2, 4, 6]
|
263
|
+
[5].map(&"(1.._).inject(&'*')") => [120]
|
264
|
+
|
265
|
+
For more detail see: http://weblog.raganwald.com/2007/10/stringtoproc.html
|
266
|
+
|
267
|
+
== Add and subtract Hashes with + and -
|
268
|
+
|
269
|
+
{:a => :b} + {:c => :d} = {:a => :b, :c => :d}
|
270
|
+
{:a => :b, :c => :d} - {:c => :d} = {:a => :b}
|
271
|
+
{:a => :b, :c => :d} - :c = {:a => :b}
|
272
|
+
|
273
|
+
You could already do this with Arrays; now you can do it with Hashes as well. (I was kinda surprised the first time I tried to do this and realized I'd have to write it myself.)
|
274
|
+
|
275
|
+
== Grammatically-correct is_an? method - no more "is_a? Array" statements
|
276
|
+
|
277
|
+
>> [].is_an? Array
|
278
|
+
#=> true
|
279
|
+
|
280
|
+
Most people don't care, but personally, "is_a? Array" drives me completely insane.
|
281
|
+
|
282
|
+
== Object#not
|
283
|
+
|
284
|
+
Replace this:
|
285
|
+
|
286
|
+
if !response.incomplete? && !response.invalid? && response.total > 0
|
287
|
+
|
288
|
+
With this:
|
289
|
+
|
290
|
+
if response.not.incomplete? && response.not.invalid? && response.total > 0
|
291
|
+
|
292
|
+
Syntactic sugar for boolean conditions.
|
293
|
+
|
294
|
+
More detail here:
|
295
|
+
|
296
|
+
http://blog.jayfields.com/2007/08/ruby-adding-not-method-for-readability.html
|
297
|
+
|
298
|
+
== One-character exit command
|
299
|
+
|
300
|
+
x
|
301
|
+
|
302
|
+
Because life is too short to type whole words.
|
303
|
+
|
304
|
+
== REQUIREMENTS
|
305
|
+
|
306
|
+
* ReadLine
|
307
|
+
* Wirble
|
308
|
+
* Amazon S3
|
309
|
+
* Platform
|
310
|
+
* Some features require OS X
|
311
|
+
|
312
|
+
== LICENSE
|
313
|
+
|
314
|
+
(The MIT License)
|
315
|
+
|
316
|
+
Copyright (c) 2006-2007 Giles Bowkett
|
317
|
+
Portions Copyright (c) 2006-2007 Ben Bleything
|
318
|
+
Portions Copyright (c) 2006-2007 Reginald Braithwaite
|
319
|
+
Portions Copyright (c) 2006-2007 Gregory Brown
|
320
|
+
Portions Copyright (c) 2006-2007 Jamis Buck
|
321
|
+
Portions Copyright (c) 2006-2007 Mike Clark
|
322
|
+
Portions Copyright (c) 2006-2007 Jay Fields
|
323
|
+
Portions Copyright (c) 2005 David Heinemeier Hansson
|
324
|
+
Portions Copyright (c) 2006-2007 Ara T. Howard
|
325
|
+
Portions Copyright (c) 2006-2007 Pat Maddox
|
326
|
+
Portions Copyright (c) 2006-2007 Marcel Molina, Jr.
|
327
|
+
Portions Copyright (c) 2006-2007 Rick DeNatale
|
328
|
+
Portions Copyright (c) 2006-2007 Projectionist (Marcel Molina? Chad Fowler?)
|
329
|
+
Portions Copyright (c) 2006-2007 Dan Yoder
|
330
|
+
|
331
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
332
|
+
a copy of this software and associated documentation files (the
|
333
|
+
'Software'), to deal in the Software without restriction, including
|
334
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
335
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
336
|
+
permit persons to whom the Software is furnished to do so, subject to
|
337
|
+
the following conditions:
|
338
|
+
|
339
|
+
The above copyright notice and this permission notice shall be
|
340
|
+
included in all copies or substantial portions of the Software.
|
341
|
+
|
342
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
343
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
344
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
345
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
346
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
347
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
348
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bin/amazon
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
%w{rubygems platform optparse}.each {|library| require library}
|
3
|
+
|
4
|
+
# command-line args
|
5
|
+
option_parser = OptionParser.new
|
6
|
+
option_parser.on("-b", "--bucket NAME", String) {|bucket| @bucket = bucket unless bucket.empty?}
|
7
|
+
filenames = option_parser.parse(ARGV)
|
8
|
+
abort "Usage: amazon -b bucket_name file_name" unless @bucket && filenames
|
9
|
+
|
10
|
+
# require files, populate hash
|
11
|
+
require 'utility_belt'
|
12
|
+
UtilityBelt.equip(:amazon_upload_shortcut)
|
13
|
+
include UtilityBelt::AmazonUploadShortcut
|
14
|
+
|
15
|
+
# baddabing, baddaboom
|
16
|
+
filenames.each {|filename| puts aws_upload(@bucket, filename)}
|
data/bin/google
ADDED
data/bin/pastie
ADDED
data/html/andreas00.css
ADDED
@@ -0,0 +1,449 @@
|
|
1
|
+
/* andreas00 - an open source xhtml/css website layout by Andreas Viklund - http://andreasviklund.com . Free to use for any purpose as long as the proper credits are given to the original author.
|
2
|
+
Version: 1.1 (Apr 20, 2006) */
|
3
|
+
|
4
|
+
/***** Body and main container *****/
|
5
|
+
|
6
|
+
body {
|
7
|
+
margin:0 auto;
|
8
|
+
padding:0;
|
9
|
+
font:76% Verdana,Tahoma,Arial,sans-serif;
|
10
|
+
background:#eaeaea url(bg.gif) top center repeat-y;
|
11
|
+
color:#3a3a3a;
|
12
|
+
}
|
13
|
+
|
14
|
+
#wrap {
|
15
|
+
background-color:#ffffff;
|
16
|
+
color:#303030;
|
17
|
+
margin:0 auto;
|
18
|
+
padding:1px 5px;
|
19
|
+
width:760px;
|
20
|
+
}
|
21
|
+
|
22
|
+
/***** Header *****/
|
23
|
+
|
24
|
+
#header {
|
25
|
+
color:#505050;
|
26
|
+
background:#ffffff url(http://s3.amazonaws.com/giles/the_tao_of_bondage_vigilantes.jpg) bottom left no-repeat;
|
27
|
+
height:250px;
|
28
|
+
margin:0 0 10px 0;
|
29
|
+
padding:0;
|
30
|
+
}
|
31
|
+
|
32
|
+
#header h1 {
|
33
|
+
font-size:2.5em;
|
34
|
+
font-weight:normal;
|
35
|
+
letter-spacing:-2px;
|
36
|
+
margin:0 0 4px 15px;
|
37
|
+
padding:15px 0 0 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
#header h1 a,#header h1 a:hover {
|
41
|
+
padding:0;
|
42
|
+
}
|
43
|
+
|
44
|
+
#header p {
|
45
|
+
font-size:1.1em;
|
46
|
+
letter-spacing:-1px;
|
47
|
+
margin:0 0 20px 15px;
|
48
|
+
padding:0 0 0 3px;
|
49
|
+
}
|
50
|
+
|
51
|
+
/***** Left sidebar *****/
|
52
|
+
|
53
|
+
#avmenu {
|
54
|
+
clear:left;
|
55
|
+
float:left;
|
56
|
+
width:150px;
|
57
|
+
margin:0 0 10px 0;
|
58
|
+
padding:0;
|
59
|
+
}
|
60
|
+
|
61
|
+
#avmenu ul {
|
62
|
+
list-style:none;
|
63
|
+
width:150px;
|
64
|
+
margin:0 0 20px 0;
|
65
|
+
padding:0;
|
66
|
+
}
|
67
|
+
|
68
|
+
#avmenu li {
|
69
|
+
margin-bottom:5px;
|
70
|
+
}
|
71
|
+
|
72
|
+
#avmenu li a {
|
73
|
+
font-weight:bold;
|
74
|
+
height:20px;
|
75
|
+
text-decoration:none;
|
76
|
+
color:#505050;
|
77
|
+
display:block;
|
78
|
+
padding:6px 0 0 10px;
|
79
|
+
background:#f4f4f4 url(menubg.gif) bottom left repeat-x;
|
80
|
+
border-top:1px solid #d8d8d8;
|
81
|
+
border-right:1px solid #d8d8d8;
|
82
|
+
border-bottom:1px solid #d8d8d8;
|
83
|
+
border-left:4px solid #cccccc;
|
84
|
+
}
|
85
|
+
|
86
|
+
#avmenu li a:hover, #avmenu li a.current {
|
87
|
+
background:#eaeaea url(menubg2.gif) bottom left repeat-x;
|
88
|
+
color:#505050;
|
89
|
+
border-top:1px solid #b0b0b0;
|
90
|
+
border-right:1px solid #b0b0b0;
|
91
|
+
border-bottom:1px solid #b0b0b0;
|
92
|
+
border-left:4px solid #505050;
|
93
|
+
}
|
94
|
+
|
95
|
+
#avmenu ul ul {
|
96
|
+
margin:5px 0 5px 15px;
|
97
|
+
font-size:0.9em;
|
98
|
+
width:135px;
|
99
|
+
}
|
100
|
+
|
101
|
+
#avmenu ul ul a {
|
102
|
+
height:16px;
|
103
|
+
margin:0;
|
104
|
+
padding:4px 0 0 8px;
|
105
|
+
}
|
106
|
+
|
107
|
+
#avmenu h2 {
|
108
|
+
font-size:1.5em;
|
109
|
+
font-weight:normal;
|
110
|
+
line-height:1.8em;
|
111
|
+
}
|
112
|
+
|
113
|
+
/***** Right sidebar *****/
|
114
|
+
|
115
|
+
#extras {
|
116
|
+
float:right;
|
117
|
+
width:130px;
|
118
|
+
margin:0 0 10px 0;
|
119
|
+
padding:0;
|
120
|
+
font-size:0.9em;
|
121
|
+
}
|
122
|
+
|
123
|
+
#extras p, #extras ul {
|
124
|
+
margin:0 0 1.5em 0;
|
125
|
+
line-height:1.3em;
|
126
|
+
padding:0;
|
127
|
+
}
|
128
|
+
|
129
|
+
#extras a {
|
130
|
+
font-weight:bold;
|
131
|
+
}
|
132
|
+
|
133
|
+
#extras li {
|
134
|
+
list-style:none;
|
135
|
+
margin:0 0 6px 0;
|
136
|
+
padding:0;
|
137
|
+
}
|
138
|
+
|
139
|
+
#extras h2 {
|
140
|
+
font-size:1.6em;
|
141
|
+
font-weight:normal;
|
142
|
+
margin:0 0 6px 0;
|
143
|
+
;
|
144
|
+
letter-spacing:-1px;
|
145
|
+
}
|
146
|
+
|
147
|
+
/***** Main content *****/
|
148
|
+
|
149
|
+
#content {
|
150
|
+
margin:10px 140px 10px 160px;
|
151
|
+
padding:0;
|
152
|
+
line-height:1.5em;
|
153
|
+
text-align:left;
|
154
|
+
}
|
155
|
+
|
156
|
+
#contentwide {
|
157
|
+
margin:10px 0 10px 160px;
|
158
|
+
padding:0;
|
159
|
+
line-height:1.5em;
|
160
|
+
text-align:left;
|
161
|
+
}
|
162
|
+
|
163
|
+
#contentfull {
|
164
|
+
margin:10px 10px 10px 10px;
|
165
|
+
padding:2px 0 0 0;
|
166
|
+
line-height:1.5em;
|
167
|
+
text-align:left;
|
168
|
+
}
|
169
|
+
|
170
|
+
#content h2, #contentwide h2, #contentfull h2 {
|
171
|
+
font-size:1.8em;
|
172
|
+
font-weight:normal;
|
173
|
+
margin:8px 0 10px 0px;
|
174
|
+
padding:0;
|
175
|
+
padding-left: 10px;
|
176
|
+
line-height:1.8em;
|
177
|
+
background-color: #440055;
|
178
|
+
color: white;
|
179
|
+
}
|
180
|
+
|
181
|
+
#content h3, #contentwide h3, #contentfull h3 {
|
182
|
+
line-height:1.8em;
|
183
|
+
background-color: black;
|
184
|
+
color: white;
|
185
|
+
font-size:1.5em;
|
186
|
+
font-weight:normal;
|
187
|
+
margin:6px 0 6px 0;
|
188
|
+
padding:0;
|
189
|
+
padding-left: 10px;
|
190
|
+
}
|
191
|
+
|
192
|
+
#content img, #contentwide img, #contentfull img {
|
193
|
+
padding:1px;
|
194
|
+
display:inline;
|
195
|
+
background:#cccccc;
|
196
|
+
color:#303030;
|
197
|
+
border:4px solid #f0f0f0;
|
198
|
+
}
|
199
|
+
|
200
|
+
#content a, #contentwide a, #contentfull a {
|
201
|
+
}
|
202
|
+
|
203
|
+
#content ul, #content ol,
|
204
|
+
#contentwide ul, #contentwide ol,
|
205
|
+
#contentfull ul, #contentfull ol {
|
206
|
+
margin:0 0 16px 20px;
|
207
|
+
padding:0;
|
208
|
+
}
|
209
|
+
|
210
|
+
#content ul ul, #content ol ol,
|
211
|
+
#contentwide ul ul, #contentwide ol ol,
|
212
|
+
#contentfull ul ul, #contentfull ol ol {
|
213
|
+
margin:2px 0 2px 20px;
|
214
|
+
}
|
215
|
+
|
216
|
+
#content li, #contentwide li, #contentfull li {
|
217
|
+
margin:0 0 2px 10px;
|
218
|
+
padding:0 0 0 4px;
|
219
|
+
}
|
220
|
+
|
221
|
+
/***** Footer *****/
|
222
|
+
|
223
|
+
#footer {
|
224
|
+
clear:both;
|
225
|
+
margin:0 auto;
|
226
|
+
padding:8px 0;
|
227
|
+
border-top:2px solid #dadada;
|
228
|
+
width:760px;
|
229
|
+
text-align:center;
|
230
|
+
color:#808080;
|
231
|
+
background-color:#ffffff;
|
232
|
+
font-size:0.9em;
|
233
|
+
}
|
234
|
+
|
235
|
+
#footer p {
|
236
|
+
padding:0;
|
237
|
+
margin:0;
|
238
|
+
}
|
239
|
+
|
240
|
+
#footer a {
|
241
|
+
color:#808080;
|
242
|
+
background-color:inherit;
|
243
|
+
text-decoration:none;
|
244
|
+
}
|
245
|
+
|
246
|
+
#footer a:hover {
|
247
|
+
text-decoration:underline;
|
248
|
+
}
|
249
|
+
|
250
|
+
/***** Various tags *****/
|
251
|
+
|
252
|
+
a {
|
253
|
+
text-decoration:none;
|
254
|
+
color:#505050;
|
255
|
+
background-color:inherit;
|
256
|
+
}
|
257
|
+
|
258
|
+
a:hover {
|
259
|
+
text-decoration:underline;
|
260
|
+
color:#286ea0;
|
261
|
+
background-color:inherit;
|
262
|
+
}
|
263
|
+
|
264
|
+
a img {
|
265
|
+
border:0;
|
266
|
+
}
|
267
|
+
|
268
|
+
p {
|
269
|
+
margin:0 0 16px 0;
|
270
|
+
}
|
271
|
+
|
272
|
+
blockquote {
|
273
|
+
border-top:1px solid #d8d8d8;
|
274
|
+
border-right:1px solid #d8d8d8;
|
275
|
+
border-bottom:1px solid #d8d8d8;
|
276
|
+
border-left:4px solid #cccccc;
|
277
|
+
margin:16px;
|
278
|
+
padding:7px 7px 7px 11px;
|
279
|
+
background:#f4f4f4 url(menubg.gif) bottom left repeat-x;
|
280
|
+
color:#505050;
|
281
|
+
}
|
282
|
+
|
283
|
+
blockquote p {
|
284
|
+
font-size:1.1em;
|
285
|
+
line-height:1.3em;
|
286
|
+
margin:0;
|
287
|
+
}
|
288
|
+
|
289
|
+
/***** Table styles *****/
|
290
|
+
|
291
|
+
table {
|
292
|
+
margin:0 0 16px 0;
|
293
|
+
padding:0;
|
294
|
+
line-height:1.3em;
|
295
|
+
border-collapse:collapse;
|
296
|
+
border:1px solid #d8d8d8;
|
297
|
+
}
|
298
|
+
|
299
|
+
caption {
|
300
|
+
text-align:left;
|
301
|
+
font-size:1.5em;
|
302
|
+
font-weight:normal;
|
303
|
+
margin:0;
|
304
|
+
padding:6px 0 8px 0;
|
305
|
+
}
|
306
|
+
|
307
|
+
th {
|
308
|
+
padding:7px;
|
309
|
+
text-align:left;
|
310
|
+
background:#eaeaea url(menubg2.gif) bottom left repeat-x;
|
311
|
+
color:#505050;
|
312
|
+
}
|
313
|
+
|
314
|
+
td {
|
315
|
+
padding:7px;
|
316
|
+
font-size:0.9em;
|
317
|
+
text-align:left;
|
318
|
+
background:#f4f4f4 url(menubg.gif) bottom left repeat-x;
|
319
|
+
color:#303030;
|
320
|
+
}
|
321
|
+
|
322
|
+
/***** Form styles *****/
|
323
|
+
|
324
|
+
.button {
|
325
|
+
border-top:1px solid #d8d8d8;
|
326
|
+
border-right:1px solid #d8d8d8;
|
327
|
+
border-bottom:1px solid #d8d8d8;
|
328
|
+
border-left:4px solid #cccccc;
|
329
|
+
margin:0 0 15px 0;
|
330
|
+
padding:7px 7px 7px 11px;
|
331
|
+
background:#f4f4f4 url(menubg.gif) bottom left repeat-x;
|
332
|
+
color:#505050;
|
333
|
+
font-weight:bold;
|
334
|
+
width:120px;
|
335
|
+
}
|
336
|
+
|
337
|
+
input, textarea {
|
338
|
+
border:1px solid #cccccc;
|
339
|
+
font-family:Verdana,Tahoma,Arial,Sans-Serif;
|
340
|
+
font-size:1em;
|
341
|
+
margin:0;
|
342
|
+
padding:4px;
|
343
|
+
}
|
344
|
+
|
345
|
+
label {
|
346
|
+
margin:2px;
|
347
|
+
}
|
348
|
+
|
349
|
+
input {
|
350
|
+
width:200px;
|
351
|
+
}
|
352
|
+
|
353
|
+
textarea {
|
354
|
+
width:400px;
|
355
|
+
}
|
356
|
+
|
357
|
+
/***** Search box *****/
|
358
|
+
|
359
|
+
#searchbox {
|
360
|
+
padding:0;
|
361
|
+
margin:6px 0 16px 0;
|
362
|
+
}
|
363
|
+
|
364
|
+
#searchform {
|
365
|
+
background:#ffffff;
|
366
|
+
border:1px solid #cccccc;
|
367
|
+
color:#505050;
|
368
|
+
font-size:0.9em;
|
369
|
+
padding:4px;
|
370
|
+
width:116px;
|
371
|
+
}
|
372
|
+
|
373
|
+
#searchbox label {
|
374
|
+
display:none;
|
375
|
+
}
|
376
|
+
|
377
|
+
/***** Various classes *****/
|
378
|
+
|
379
|
+
.left {
|
380
|
+
margin:10px 10px 5px 0;
|
381
|
+
float:left;
|
382
|
+
}
|
383
|
+
|
384
|
+
.right {
|
385
|
+
margin:10px 0 5px 10px;
|
386
|
+
float:right;
|
387
|
+
}
|
388
|
+
|
389
|
+
.announce {
|
390
|
+
margin:10px 0 10px 0;
|
391
|
+
padding:10px 10px 5px 10px;
|
392
|
+
width:105px;
|
393
|
+
color:#505050;
|
394
|
+
background:#f4f4f4 url(menubg.gif) bottom left repeat-x;
|
395
|
+
border-top:1px solid #d8d8d8;
|
396
|
+
border-right:1px solid #d8d8d8;
|
397
|
+
border-bottom:1px solid #d8d8d8;
|
398
|
+
border-left:4px solid #cccccc;
|
399
|
+
line-height:1.3em;
|
400
|
+
}
|
401
|
+
|
402
|
+
.announce a {
|
403
|
+
font-weight:bold;
|
404
|
+
}
|
405
|
+
|
406
|
+
.announce p {
|
407
|
+
font-size:0.9em;
|
408
|
+
}
|
409
|
+
|
410
|
+
.announce h2 {
|
411
|
+
margin:0 0 10px 0;
|
412
|
+
padding:0;
|
413
|
+
}
|
414
|
+
|
415
|
+
#avmenu .announce {
|
416
|
+
width:125px;
|
417
|
+
}
|
418
|
+
|
419
|
+
.textright {
|
420
|
+
text-align:right;
|
421
|
+
margin:-10px 0 4px 0;
|
422
|
+
}
|
423
|
+
|
424
|
+
.center {
|
425
|
+
text-align:center;
|
426
|
+
}
|
427
|
+
|
428
|
+
.small {
|
429
|
+
font-size:0.8em;
|
430
|
+
}
|
431
|
+
|
432
|
+
.large {
|
433
|
+
font-size:1.3em;
|
434
|
+
}
|
435
|
+
|
436
|
+
.bold {
|
437
|
+
font-weight:bold;
|
438
|
+
}
|
439
|
+
|
440
|
+
.highlighted {
|
441
|
+
padding:3px;
|
442
|
+
background-color:#f0f0f0;
|
443
|
+
color:#303030;
|
444
|
+
border:1px solid #b0b0b0;
|
445
|
+
}
|
446
|
+
|
447
|
+
.hide {
|
448
|
+
display:none;
|
449
|
+
}
|