writeup 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/layout/template.html.erb +4 -2
- data/lib/writeup.rb +1 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 673361ac98dabd0c21c42a2d3763212b4f7bc076
|
4
|
+
data.tar.gz: 161c209ff4be75a1ee6bd573473ea66a71f06b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 227843451c2ee8a1095e73000ea8488373fa2987d401b073823b6b91e167f09065324cebbafb59bb594e0cc07c9700d5a1de6502ee35a6ada2fdb0db8674b275
|
7
|
+
data.tar.gz: 375cee02778b0d11121f683dcc42889751f7c398a44860b18a26d27f496e5c664e2df3efcc6afb678aa2c5a3f1c6864e327424f64d8dd38e84b7fb5b7a137643
|
data/layout/template.html.erb
CHANGED
@@ -3,8 +3,10 @@
|
|
3
3
|
<head>
|
4
4
|
<title><%= @document.title %></title>
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
6
|
-
<link href="
|
7
|
-
<
|
6
|
+
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Alegreya:400italic,700italic,400,700" rel="stylesheet">
|
7
|
+
<style>
|
8
|
+
<%= File.read("#{@writeup_dir}/../stylesheets/compiled/writeup.css") %>
|
9
|
+
</style>
|
8
10
|
</head>
|
9
11
|
|
10
12
|
<body class="no-literate">
|
data/lib/writeup.rb
CHANGED
@@ -8,12 +8,10 @@ module Writeup
|
|
8
8
|
raise "destination must end in .html" unless destination =~ /\.html$/
|
9
9
|
|
10
10
|
@document = Writeup::Document.new(markup)
|
11
|
+
@writeup_dir = File.dirname(__FILE__)
|
11
12
|
result = template.result(binding)
|
12
|
-
destination_dir = File.dirname(destination)
|
13
|
-
stylesheet_path = "#{File.dirname(__FILE__)}/../stylesheets/compiled/writeup.css"
|
14
13
|
|
15
14
|
File.open(destination, "w") { |f| f.puts(result) }
|
16
|
-
`cp "#{stylesheet_path}" "#{destination_dir}/writeup.css"`
|
17
15
|
end
|
18
16
|
|
19
17
|
def self.template
|