jobless 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/document.rb +10 -1
- data/lib/template/style.css +46 -0
- data/lib/{template.html.erb → template/template.html.erb} +4 -48
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fe2f3ebfc878a9ce9292271d592ab22ce0d45c9
|
4
|
+
data.tar.gz: 706d6b89d8308537beaf610672dc3abd4116bc5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b548af9b09eb958de0c597d1690cff5ed51e3ea703813e973f7831ef236cabd8f5eb5a3459fba79cfff20988d4848d80d899bb2572afdbb17ba59f2e64743f06
|
7
|
+
data.tar.gz: 9e0c03482a1b3c80fedb22afac5b8a53cbd39bd4821d7de66ead118aa8521622c375d46b61b090f782f2757f1f956babd33d10a550422a0b62ffe4e3128da1f1
|
data/lib/document.rb
CHANGED
@@ -7,7 +7,8 @@ module Jobless
|
|
7
7
|
def initialize
|
8
8
|
@data = {}
|
9
9
|
@groups = []
|
10
|
-
@template = File.expand_path("../template.html.erb", __FILE__)
|
10
|
+
@template = File.expand_path("../template/template.html.erb", __FILE__)
|
11
|
+
@stylesheet = File.expand_path("../template/style.css", __FILE__)
|
11
12
|
end
|
12
13
|
|
13
14
|
# Define methods for setting personal data
|
@@ -47,6 +48,14 @@ module Jobless
|
|
47
48
|
@template = template
|
48
49
|
end
|
49
50
|
|
51
|
+
def stylesheet(file_path)
|
52
|
+
@stylesheet = file_path
|
53
|
+
end
|
54
|
+
|
55
|
+
def css
|
56
|
+
File.read(@stylesheet)
|
57
|
+
end
|
58
|
+
|
50
59
|
def write_to_file(filename)
|
51
60
|
renderer = ERB.new(File.read(@template))
|
52
61
|
generated_html = renderer.result(binding)
|
@@ -0,0 +1,46 @@
|
|
1
|
+
@media screen {
|
2
|
+
body {
|
3
|
+
padding: 0 10% 5em;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
body {
|
7
|
+
color: #333;
|
8
|
+
font-family: helvetica;
|
9
|
+
}
|
10
|
+
h1, h2, h3, .title {
|
11
|
+
color: #000;
|
12
|
+
font-family: helvetica;
|
13
|
+
}
|
14
|
+
h1 {
|
15
|
+
float: left;
|
16
|
+
font-size: 50px;
|
17
|
+
margin-top: 20px;
|
18
|
+
}
|
19
|
+
h3 {
|
20
|
+
border-bottom: 3px solid #bbb;
|
21
|
+
font-size: 26px;
|
22
|
+
margin-top: 3em 0 0.25em 0;
|
23
|
+
}
|
24
|
+
.technologies {
|
25
|
+
font-size: 14px;
|
26
|
+
font-style: italic;
|
27
|
+
margin-top: 0;
|
28
|
+
}
|
29
|
+
.time-span {
|
30
|
+
position: absolute;
|
31
|
+
right: 0;
|
32
|
+
top: 0;
|
33
|
+
}
|
34
|
+
.item {
|
35
|
+
border-bottom: 1px solid #ddd;
|
36
|
+
margin-bottom: 1em;
|
37
|
+
position: relative;
|
38
|
+
}
|
39
|
+
.homepage {
|
40
|
+
font-size: 14px;
|
41
|
+
}
|
42
|
+
.personal-info {
|
43
|
+
float: right;
|
44
|
+
margin-top: 20px;
|
45
|
+
text-align: right;
|
46
|
+
}
|
@@ -1,53 +1,9 @@
|
|
1
1
|
<html>
|
2
2
|
<head>
|
3
3
|
<title>CV</title>
|
4
|
+
<meta charset="utf-8">
|
4
5
|
<style>
|
5
|
-
|
6
|
-
body {
|
7
|
-
padding: 0 10% 5em;
|
8
|
-
}
|
9
|
-
}
|
10
|
-
body {
|
11
|
-
color: #333;
|
12
|
-
font-family: helvetica;
|
13
|
-
}
|
14
|
-
h1, h2, h3, .title {
|
15
|
-
color: #000;
|
16
|
-
font-family: helvetica;
|
17
|
-
}
|
18
|
-
h1 {
|
19
|
-
float: left;
|
20
|
-
font-size: 50px;
|
21
|
-
margin-top: 20px;
|
22
|
-
}
|
23
|
-
h3 {
|
24
|
-
border-bottom: 3px solid #bbb;
|
25
|
-
font-size: 26px;
|
26
|
-
margin-top: 3em 0 0.25em 0;
|
27
|
-
}
|
28
|
-
.technologies {
|
29
|
-
font-size: 14px;
|
30
|
-
font-style: italic;
|
31
|
-
margin-top: 0;
|
32
|
-
}
|
33
|
-
.time-span {
|
34
|
-
position: absolute;
|
35
|
-
right: 0;
|
36
|
-
top: 0;
|
37
|
-
}
|
38
|
-
.item {
|
39
|
-
border-bottom: 1px solid #ddd;
|
40
|
-
margin-bottom: 1em;
|
41
|
-
position: relative;
|
42
|
-
}
|
43
|
-
.homepage {
|
44
|
-
font-size: 14px;
|
45
|
-
}
|
46
|
-
.personal-info {
|
47
|
-
float: right;
|
48
|
-
margin-top: 20px;
|
49
|
-
text-align: right;
|
50
|
-
}
|
6
|
+
<%= css %>
|
51
7
|
</style>
|
52
8
|
</head>
|
53
9
|
<body>
|
@@ -61,11 +17,11 @@
|
|
61
17
|
<div style="clear:both;"></div>
|
62
18
|
|
63
19
|
<% groups.each do |group| %>
|
64
|
-
<div class="group">
|
20
|
+
<div class="group <%= group.type %>">
|
65
21
|
<h3> <%= group.name %> </h3>
|
66
22
|
<% group.items.each do |item| %>
|
67
23
|
<div class="item">
|
68
|
-
<b class="title"><%= item.title %></b>
|
24
|
+
<b class="title"><%= item.title %></b>
|
69
25
|
<% if item.company %> - <%= item.company %> <% end %>
|
70
26
|
<% if item.homepage %>
|
71
27
|
<span class="homepage">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jobless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Filip Defar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Jobless is a simple DSL for creating a CV in HTML format.
|
14
14
|
email: filip.defar@gmail.com
|
@@ -20,7 +20,8 @@ files:
|
|
20
20
|
- lib/group.rb
|
21
21
|
- lib/item.rb
|
22
22
|
- lib/jobless.rb
|
23
|
-
- lib/template.
|
23
|
+
- lib/template/style.css
|
24
|
+
- lib/template/template.html.erb
|
24
25
|
homepage: https://github.com/dabrorius/jobless
|
25
26
|
licenses:
|
26
27
|
- MIT
|