Skip to content

Commit

Permalink
Remove tar and use html dir
Browse files Browse the repository at this point in the history
  • Loading branch information
prat0318 committed Aug 3, 2014
1 parent ca09a4e commit ea67ccc
Show file tree
Hide file tree
Showing 13 changed files with 779 additions and 7 deletions.
11 changes: 5 additions & 6 deletions bin/json_resume
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ require 'i18n'
require 'thor'
require 'mustache'
require_relative '../lib/json_resume'
require 'archive/tar/minitar'
include Archive::Tar
require 'zlib'
require 'pdfkit'
require 'rest-client'
Expand Down Expand Up @@ -43,10 +41,11 @@ class JsonResumeCLI < Thor
end

def convert_to_html(json_input, template, dest=Dir.pwd, dir_name='resume')
tgz = Zlib::GzipReader.new(File.open("#{@@orig_locn}/../extras/resume_html.tar.gz", 'rb'))
Minitar.unpack(tgz, "#{dest}/#{dir_name}")
msg = generate_file(json_input, template, "html", "#{dest}/#{dir_name}/page.html")
msg += "\nPlace #{dest}/#{dir_name}/ in /var/www/ to host."
dest_dir = "#{dest}/#{dir_name}"
FileUtils.mkdir_p dest_dir
FileUtils.cp_r(Dir["#{@@orig_locn}/../extras/resume_html/*"], dest_dir)
msg = generate_file(json_input, template, "html", "#{dest_dir}/page.html")
msg += "\nPlace #{dest_dir}/ in /var/www/ to host."
end

def convert_to_html_pdf(json_input, template, dest=Dir.pwd)
Expand Down
Binary file removed extras/resume_html.tar.gz
Binary file not shown.
18 changes: 18 additions & 0 deletions extras/resume_html/core-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>Resume</title>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body id="">
<div id="site" style="margin: 0.0em auto 0.0em auto; max-width: 52em;">
<div id="page-container"></div>
</div>
</body>
</html>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$("#page-container").load("page.html")
</script>
33 changes: 33 additions & 0 deletions extras/resume_html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>Resume</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="public/images/resume.png" />
<style>
#page {
border: 1px solid #ccc;
box-shadow: 2px 2px 8px #aaa;
-webkit-box-shadow: 2px 2px 8px #aaa;
-moz-box-shadow: 2px 2px 8px #aaa; }
</style>
</head>
<body id="">
<div id="site">
<div id="header"></div>
<div id="page-container"></div>
<div id="footer">
<address>
<span class="engine">
Powered by <a href="http://prat0318.github.io/json_resume">JSON Resume</a>, CSS Template by <a href="http://mark.reid.name/">Mark Reid</a>
</span>
</address>
</div>
</div>
</body>
</html>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$("#page-container").load("page.html")
</script>
7 changes: 7 additions & 0 deletions extras/resume_html/public/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit ea67ccc

Please sign in to comment.