Module: Rack::Markdown::CSS

Included in:
Rack::Markdown
Defined in:
lib/rack/markdown/css.rb

Instance Method Summary collapse

Instance Method Details

#externalObject



44
45
46
47
48
# File 'lib/rack/markdown/css.rb', line 44

def external
  hrefs = %w(3331384/github.css 3331486/syntax.css).map { |g| "https://raw.github.com/gist/#{g}" }
  links = hrefs.map { |h| "<link rel='stylesheet' type='text/css' href='#{h}' />" }
  links.join
end

#internalObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rack/markdown/css.rb', line 2

def internal
  "    #outer {\n      width: 912px;\n      background: #eee;\n      padding: 3px;\n      border-radius: 3px;\n      margin: 0 auto;\n    }\n\n    #inner {\n      width: 850px;\n      background: white;\n      padding: 30px;\n      border: 1px solid #cacaca;\n    }\n\n    #title {\n      background-image: -webkit-linear-gradient(top, #FAFAFA, #EAEAEA);\n      border: 1px solid #cacaca;\n      border-bottom: none;\n      color: #555;\n      font-size: 16px;\n      font-weight: bold;\n      height: 20px;\n      line-height: 20px;\n      margin: 0;\n      padding: 10px;\n      text-shadow: white 0px 1px 0px;\n    }\n\n    #filename {\n      padding-left: 16px;\n    }\n\n    #version {\n      float: right;\n      padding-right: 16px;\n    }\n  CSS\nend\n"