This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#myModal').append(function (event) { | |
$.ajax({ | |
url: '<%= user_resume_save_html_path(@resume) %>', | |
type: 'post', | |
data: { | |
content: $('#cv').html() | |
}, | |
success: function (result) { | |
$('#cv').html(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AssetDataBase64Helper | |
def asset_data_base64(path) | |
asset = Rails.application.assets.find_asset(path) | |
throw "Could not find asset '#{path}'" if asset.nil? | |
base64 = Base64.encode64(asset.to_s).gsub(/\s+/, "") | |
"data:#{asset.content_type};base64,#{Rack::Utils.escape(base64)}" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<meta charset='utf-8' /> | |
- <%= wicked_pdf_stylesheet_link_tag "application" -%> | |
+ <%= stylesheet_link_tag (asset_data_base64('application.css')) %> | |
<%= csrf_meta_tags %> | |
<%#= wicked_pdf_stylesheet_link_tag "pdf" -%> | |
<%#= wicked_pdf_javascript_include_tag "number_pages" %> | |
<%#= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> | |
- <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
font_dir = File.join(Dir.home, "fonts") | |
Dir.mkdir(font_dir) unless Dir.exists?(font_dir) | |
- Dir.glob(Rails.root.join("vendor", "fonts", "*")).each do |font| | |
+ Dir.glob(Rails.root.join("vendor","assets", "fonts", "*")).each do |font| | |
target = File.join(font_dir, File.basename(font)) | |
File.symlink(font, target) unless File.exists?(target) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#qr-code').click(function (event) { | |
event.preventDefault(); | |
$.ajax({ | |
type: "GET", | |
dataType: "json", | |
url: "<%= user_resume_preview_path(@resume) %>", | |
success: function(data){} | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
//图片1 | |
function readURL(input) { | |
if (input.files && input.files[0]) { | |
var reader = new FileReader(); | |
reader.onload = function (e) { | |
$('#img-1').attr('src', e.target.result); | |
} | |
reader.readAsDataURL(input.files[0]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update_user_first_resume_name_resume | |
if current_user.present? && current_user.resumes.last.present? | |
resume = current_user.resumes.last | |
a = resume.resume_user_first_name | |
b = resume.resume_user_last_name | |
params[:name] = a += b | |
resume.name_resume = params[:name] | |
resume.save! | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update_user_first_resume_name_resume | |
if current_user.present? && current_user.resumes.last.present? | |
resume = current_user.resumes.last | |
a = resume.resume_user_first_name | |
b = resume.resume_user_last_name | |
params[:name] = a += b | |
resume.name_resume = params[:name] | |
resume.save! | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update_user_first_resume_name_resume | |
if current_user.present? && current_user.resumes.last.present? | |
resume = current_user.resumes.last | |
a = resume.resume_user_first_name | |
b = resume.resume_user_last_name | |
params[:name] = a += b | |
resume.name_resume = params[:name] | |
resume.save! | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var element = $('#faq'), | |
originalY = element.offset().top; | |
// Space between element and top of screen (when scrolling) | |
var topMargin = 500; | |
// Should probably be set in CSS; but here just for emphasis | |
element.css('position', 'relative'); |
OlderNewer