mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-27 17:30:32 +08:00
Revert FontAwesome in reports to CDN
This commit is contained in:
parent
8dd478ad61
commit
39b5651283
4 changed files with 9 additions and 10 deletions
|
@ -115,13 +115,12 @@ module ReportsHelper
|
|||
media: 'all')
|
||||
end
|
||||
|
||||
def font_awesome_report_pack_tag
|
||||
if running_in_development?
|
||||
wds = Webpacker.dev_server
|
||||
stylesheet_pack_tag('fontawesome', media: 'all', host: "#{wds.host}:#{wds.port}")
|
||||
else
|
||||
wicked_pdf_stylesheet_pack_tag 'fontawesome'
|
||||
end
|
||||
def font_awesome_cdn_link_tag
|
||||
stylesheet_link_tag(
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/fontawesome.min.css',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/regular.min.css',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/solid.min.css'
|
||||
)
|
||||
end
|
||||
|
||||
def assigned_repository_or_snapshot(my_module, element_id, snapshot, repository)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= wicked_pdf_stylesheet_link_tag "application" %>
|
||||
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
|
||||
<%= bootstrap_cdn_link_tag %>
|
||||
<%= font_awesome_report_pack_tag %>
|
||||
<%= font_awesome_cdn_link_tag %>
|
||||
</head>
|
||||
<body class="print-footer-body" style="height: 50px">
|
||||
<div class="print-footer">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= wicked_pdf_stylesheet_link_tag "application" %>
|
||||
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
|
||||
<%= bootstrap_cdn_link_tag %>
|
||||
<%= font_awesome_report_pack_tag %>
|
||||
<%= font_awesome_cdn_link_tag %>
|
||||
|
||||
<script>
|
||||
function number_pages() {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= wicked_pdf_stylesheet_link_tag "application" %>
|
||||
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
|
||||
<%= bootstrap_cdn_link_tag %>
|
||||
<%= font_awesome_report_pack_tag %>
|
||||
<%= font_awesome_cdn_link_tag %>
|
||||
</head>
|
||||
<body class="print-report-body">
|
||||
<div class="print-report">
|
||||
|
|
Loading…
Reference in a new issue