Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ input {
#sidebar .actions {
overflow: hidden;
}
#sidebar .actions #export {
#sidebar .actions .export {
margin-right: 4px;
}
#sidebar .actions #export:before {
#sidebar .actions .export:before {
content: "\f019";
font: 12px FontAwesome;
margin-top: 5px;
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<div id="panel">
<div class="inner">
<div class="actions">
<button id="export" class="button" data-placement="bottom" title="Download JSON"></button>
<button class="button export" data-format="json" data-placement="bottom" title="Download JSON"></button>
<button class="button export" data-format="html" data-placement="bottom" title="Download HTML"></button>
<button id="reset" class="button hidden">Reset</button>
<button id="clear" class="button">Clear</button>
</div>
Expand Down
14 changes: 10 additions & 4 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,17 @@ jQuery(document).ready(function($) {
enableTSEplugin();
enableCSStransitions();

$("#export").on("click", function() {
var data = form.data("resume");
download(JSON.stringify(data, null, " "), "resume.json", "text/plain");
$(".export").on("click", function() {
var data, format = $(this).attr("data-format");
if(format === "json") {
data = JSON.stringify(form.data("resume"), null, " ");
}
else if(format === "html") {
data = iframe.contents().find("html").html();
}
download(data, "resume." + format, "text/plain");
});
$("#export").tooltip({
$(".export").tooltip({
container: "body"
});

Expand Down