Skip to content

Commit

Permalink
perf: Inline flag-icon.css
Browse files Browse the repository at this point in the history
  • Loading branch information
kumy committed Jul 20, 2024
1 parent 4c5dd9a commit ebbf87b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion website/app-templates/smarty/head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<meta property="twitter:title" content="GeoKrety"/>
<meta property="twitter:description" content="{t}Open source item tracking for all geocaching platforms{/t}"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
{\GeoKrety\Assets::instance()->addCss(GK_CDN_FLAG_ICON_CSS) && ''}
{\GeoKrety\Assets::instance()->addCss(GK_CDN_LIBRARIES_PARSLEY_CSS_URL) && ''}
{\GeoKrety\Assets::instance()->addCss(GK_CDN_MAGNIFIC_POPUP_CSS) && ''}
{\GeoKrety\Assets::instance()->addCss('css/app.scss') && ''}
Expand All @@ -33,5 +32,6 @@
<style>
{include file="inline-Bootstrap-v3.3.7.css"}
{include file="inline-Font-Awesome-v4.7.0.css"}
{include file="inline-flag-icons.css"}
</style>
</head>
4 changes: 4 additions & 0 deletions website/app-templates/smarty/inline-flag-icons.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions website/app/GeoKrety/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(?Template $template = null) {
header(
'Content-Security-Policy: '
.sprintf('script-src \'nonce-%s\' \'strict-dynamic\'; ', $nonce)
.sprintf('img-src \'self\' data: %s %s https://www.gstatic.com/recaptcha/ https://tile.openstreetmap.org https://cdn.crowdin.com/jipt/images/ https://seccdn.libravatar.org/avatar/ https://crowdin-static.downloads.crowdin.com/avatar/; ', GK_CDN_SERVER_URL, GK_MINIO_SERVER_URL_EXTERNAL)
.sprintf('img-src \'self\' data: %s %s https://www.gstatic.com/recaptcha/ https://tile.openstreetmap.org https://cdn.crowdin.com/jipt/images/ https://seccdn.libravatar.org/avatar/ https://crowdin-static.downloads.crowdin.com/avatar/ https://cdn.geokrety.org; ', GK_CDN_SERVER_URL, GK_MINIO_SERVER_URL_EXTERNAL)
.'frame-src https://www.google.com/ https://crowdin.com; '
.sprintf('style-src \'self\' \'nonce-%s\'; ', $nonce)
.sprintf('style-src-elem \'self\' \'unsafe-inline\' %s https://cdn.crowdin.com/jipt/jipt.css https://fonts.googleapis.com/css; ', GK_CDN_SERVER_URL)
Expand All @@ -30,7 +30,7 @@ public function __construct(?Template $template = null) {
header(
'Content-Security-Policy: '
.sprintf('script-src \'nonce-%s\' \'strict-dynamic\'; ', $nonce)
.sprintf('img-src \'self\' data: %s %s https://www.gstatic.com/recaptcha/ https://tile.openstreetmap.org https://seccdn.libravatar.org/avatar/; ', GK_CDN_SERVER_URL, GK_MINIO_SERVER_URL_EXTERNAL)
.sprintf('img-src \'self\' data: %s %s https://www.gstatic.com/recaptcha/ https://tile.openstreetmap.org https://seccdn.libravatar.org/avatar/ https://cdn.geokrety.org; ', GK_CDN_SERVER_URL, GK_MINIO_SERVER_URL_EXTERNAL)
.'frame-src https://www.google.com/; '
.sprintf('style-src \'self\' \'nonce-%s\'; ', $nonce)
.sprintf('style-src-elem \'self\' \'unsafe-inline\' %s; ', GK_CDN_SERVER_URL)
Expand Down

0 comments on commit ebbf87b

Please sign in to comment.