Permalink
Browse files

Fix unintended HTML in <head>

The load-photoswipe-theme partial was being incorrectly loaded in the <head>. Instead, we should load the CSS in the head, and the initialization HTML should go in the <body>
  • Loading branch information...
Michael Romero
Michael Romero committed Sep 18, 2018
1 parent c95cb46 commit 1a5d075d00d91d91f85d727c2b34b1a103e9bc74
Showing with 5 additions and 9 deletions.
  1. +3 −1 layouts/partials/head.html
  2. +2 −0 layouts/partials/header.html
  3. +0 −8 layouts/partials/load-photoswipe-theme.html
@@ -62,7 +62,9 @@
<script src='https://www.google.com/recaptcha/api.js'></script>
{{- end -}}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.css" integrity="sha384-h/L2W9KefUClHWaty3SLE5F/qvc4djlyR4qY3NUV5HGQBBW7stbcfff1+I/vmsHh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/default-skin/default-skin.min.css" integrity="sha384-iD0dNku6PYSIQLyfTOpB06F2KCZJAKLOThS5HRe8b3ibhdEQ6eKsFf/EeFxdOt5R" crossorigin="anonymous">
{{- partial "head_custom.html" . }}
{{- partial "load-photoswipe-theme.html" . }}
{{ template "_internal/google_analytics_async.html" . }}
</head>
@@ -1,3 +1,5 @@
{{- partial "load-photoswipe-theme.html" . }}
{{ if .IsHome }}
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }}
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
@@ -2,14 +2,6 @@
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
-->
<!-- Photoswipe css/js libraries -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.css" integrity="sha384-h/L2W9KefUClHWaty3SLE5F/qvc4djlyR4qY3NUV5HGQBBW7stbcfff1+I/vmsHh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/default-skin/default-skin.min.css" integrity="sha384-iD0dNku6PYSIQLyfTOpB06F2KCZJAKLOThS5HRe8b3ibhdEQ6eKsFf/EeFxdOt5R" crossorigin="anonymous">
<!-- these files are loaded in the theme footer
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.js" integrity="sha384-QELNnmcmU8IR9ZAykt67vGr9/rZJdHbiWi64V88fCPaOohUlHCqUD/unNN0BXSqy" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe-ui-default.min.js" integrity="sha384-m67o7SkQ1ALzKZIFh4CiTA8tmadaujiTa9Vu+nqPSwDOqHrDmxLezTdFln8077+q" crossorigin="anonymous"></script>
-->
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<!-- Background of PhotoSwipe.

0 comments on commit 1a5d075

Please sign in to comment.