Skip to content

Commit

Permalink
fixes shortcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed Oct 8, 2023
1 parent b70cf90 commit 7ffa175
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 90 deletions.
36 changes: 18 additions & 18 deletions page/themes/color-your-world/layouts/shortcodes/contact-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,42 @@
{{ end }}


<form .Site.Params.Contact.formspreeFormId accept-charset="utf-8" end id="contact" method="post"with {{ {{ }} }}action="https://formspree.io/{{ . }}">
<form id="contact" {{ with .Site.Params.Contact.formspreeFormId }}action="https://formspree.io/{{ . }}"{{ end }} method="post" accept-charset="utf-8">
<label class="label-form">{{ T "name" }}
<input aria-label="{{ T "name" }}" class="input-text" type="text" name="name" minlength="3" {{ with .Site.Params.Contact.Placeholder.name }}placeholder="{{ . }}"{{ end }} autocomplete="{{ $autoComplete }}" required>
</label>
<label class="label-form">Email<input .Site.Params.Contact.Placeholder.email aria-label="Email" autocomplete="{{ $autoComplete }}" class="input-text" end name="_replyto" required type="email"with {{ {{ }} }}placeholder="{{ . }}"></label>

<label class="label-form">Email<input aria-label="Email" class="input-text" type="email" name="_replyto" {{ with .Site.Params.Contact.Placeholder.email }}placeholder="{{ . }}"{{ end }} autocomplete="{{ $autoComplete }}" required></label>

{{ with .Site.Params.Contact.subject }}
{{ if gt (len .) 1 }}
<label class="label-form">{{ T "subject" }}
<select aria-label="{{ T "subject" }}" class="input-text" name="_subject">

{{ range . }}
<option>{{ . }}</option>
{{ end }}

</select>
</label>
{{ else }}
<input name="_subject" type="hidden" value="{{ index . 0 }}" />
<input type="hidden" name="_subject" value="{{ index . 0 }}" />
{{ end }}
{{ else }}

{{ with .Site.Params.Contact.Placeholder.subject }}
<label class="label-form">{{ T "subject" }}
<input aria-label="{{ T "subject" }}" class="input-text" type="text" name="_subject" minlength="6" placeholder="{{ . }}" autocomplete="{{ $autoComplete }}" required>
</label>
{{ end }}

{{ end }}
<label class="label-form">{{ T "message" }}<textarea aria-label="{{ T " id="message"message" }}" class="input-text" rows="6" name="message" {{ with .Site.Params.Contact.messageMinLength | default 140 }}minlength="{{ . }}"{{ end }} {{ with .Site.Params.Contact.Placeholder.message }}placeholder="{{ . }}"{{ end }} required></textarea></label>
<input name="_gotcha" type="text">
<input class="outline-dashed" submit type="submit"value="{{ T "" }}">

</form>


<label class="label-form">{{ T "message" }}<textarea id="message" aria-label="{{ T "message" }}" class="input-text" rows="6" name="message" {{ with .Site.Params.Contact.messageMinLength | default 140 }}minlength="{{ . }}"{{ end }} {{ with .Site.Params.Contact.Placeholder.message }}placeholder="{{ . }}"{{ end }} required></textarea></label>

<input type="text" name="_gotcha">

<input class="outline-dashed" type="submit" value="{{ T "submit" }}">

</form>
52 changes: 26 additions & 26 deletions page/themes/color-your-world/layouts/shortcodes/figure.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,35 @@
>

<img
$altText $class .default endend end height="{{ .Height }}"
{{ with $class }}class="{{ . }}"{{ end }}
loading="lazy"
src="{{ .RelPermalink }}" width="{{ .Width }}" with with
with
{{
{{
{{ {{ {{
{{ }} }} }}}} }}alt="{{ . }}" }}class="{{ . }}"
{{ with .default }}
src="{{ .RelPermalink }}"
width="{{ .Width }}"
height="{{ .Height }}"
{{ end }}
{{ with $altText }}alt="{{ . }}"{{ end }}
>

</picture>

{{ with $caption }}
<figcaption>{{ . }}</figcaption>
{{ end }}
</figure>

{{ else }}

<!-- Avoid trying to get width and height from SVG files -->
{{ if .input }}

<figure>
<img
$class .MediaType.SubType .input endif loading="lazy" ne
src="{{ .RelPermalink }}"
with with {{ {{
{{
{{ }} }} }}class="{{ . }}" "svg" }}
{{ with $class }}class="{{ . }}"{{ end }}
loading="lazy"
{{ with .input }}
src="{{ .RelPermalink }}"
{{ if ne .MediaType.SubType "svg" }}
width="{{ .Width }}"
height="{{ .Height }}"
{{ end }}
Expand All @@ -93,20 +93,20 @@
<figcaption>{{ . }}</figcaption>
{{ end }}
</figure>

{{ else }}

<!-- If local file isn't found, assume it's a remote file -->
{{ with ($destination | safeURL) }}

<figure>
<img
$altText $class end endloading="lazy" src="{{ . }}" with
with
{{
{{ {{ {{ }}}} }}alt="{{ . }}" }}class="{{ . }}"
{{ with $class }}class="{{ . }}"{{ end }}
loading="lazy"
src="{{ . }}"
{{ with $altText }}alt="{{ . }}"{{ end }}
>

{{ with $caption }}
<figcaption>{{ . }}</figcaption>
{{ end }}
Expand All @@ -115,5 +115,5 @@
{{ end }}

{{ end }}
{{ end }}

{{ end }}
12 changes: 6 additions & 6 deletions page/themes/color-your-world/layouts/shortcodes/gifoid.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@


<video
$title
autoplay
class="gifoid {{ $class }}"
end
autoplay
loop
muted playsinline with {{{{ }} }}title="{{ . }}"
muted
playsinline
{{ with $title }}title="{{ . }}"{{ end }}
>

{{ range sort $filesData "size" }}
<source src="{{ .source }}" type="{{ .mediaType }}">
{{ end }}

<p class="error">{{ T "missingCodec" }}</p>
</video>
</video>
40 changes: 20 additions & 20 deletions page/themes/color-your-world/layouts/shortcodes/img.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,47 +53,47 @@
>

<img
$altText $class .default endend end height="{{ .Height }}"
{{ with $class }}class="{{ . }}"{{ end }}
loading="lazy"
src="{{ .RelPermalink }}" width="{{ .Width }}" with with
with
{{
{{
{{ {{ {{
{{ }} }} }}}} }}alt="{{ . }}" }}class="{{ . }}"
{{ with .default }}
src="{{ .RelPermalink }}"
width="{{ .Width }}"
height="{{ .Height }}"
{{ end }}
{{ with $altText }}alt="{{ . }}"{{ end }}
>

</picture>

{{ else }}

<!-- Avoid trying to get width and height from SVG files -->
{{ if .input }}
<img
$class .MediaType.SubType .input endif loading="lazy" ne
src="{{ .RelPermalink }}"
with with {{ {{
{{
{{ }} }} }}class="{{ . }}" "svg" }}
{{ with $class }}class="{{ . }}"{{ end }}
loading="lazy"
{{ with .input }}
src="{{ .RelPermalink }}"
{{ if ne .MediaType.SubType "svg" }}
width="{{ .Width }}"
height="{{ .Height }}"
{{ end }}
{{ end }}
{{ with $altText }}alt="{{ . }}"{{ end }}
>
{{ else }}

<!-- If local file isn't found, assume it's a remote file -->
{{ with ($destination | safeURL) }}
<img
$altText $class end endloading="lazy" src="{{ . }}" with
with
{{
{{ {{ {{ }}}} }}alt="{{ . }}" }}class="{{ . }}"
{{ with $class }}class="{{ . }}"{{ end }}
loading="lazy"
src="{{ . }}"
{{ with $altText }}alt="{{ . }}"{{ end }}
>
{{ end }}
{{ end }}

{{ end }}
{{ end }}

{{ end }}
6 changes: 3 additions & 3 deletions page/themes/color-your-world/layouts/shortcodes/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{ end }}

<a class="btn" href="{{ $url }}" rel="me nofollow" title="{{ $label }}">
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<use xlink:href="{{ $svgBundleLink }}#{{ $currentIcon }}"/>
</svg>

Expand All @@ -43,8 +43,8 @@
{{ if (index $decentralized $currentEntry) }}

{{ range (index $decentralized $currentEntry) }}
<a %s (%s) class="btn" href="{{ index . 0 }}"rel="me nofollow" title="{{ printf "" (index . 1) $currentLabel }}">
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
<a class="btn" href="{{ index . 0 }}" rel="me nofollow" title="{{ printf "%s (%s)" (index . 1) $currentLabel }}">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<use xlink:href="{{ $svgBundleLink }}#{{ $currentIcon }}"/>
</svg>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if not ($.Page.Scratch.Get "embed-pdf-count") -}}

<script src= '/bpe-symbolic-music/js/pdf-js/build/pdf.js' type="text/javascript"></script>
<script type="text/javascript" src= '/bpe-symbolic-music/js/pdf-js/build/pdf.js'></script>
<!-- <script type="text/javascript" src='{{"/js/pdf-js/build/pdf.js" | relURL}}'></script> -->

<style>
Expand All @@ -11,32 +11,32 @@
min-height: 20vh;
/* overflow-y:scroll; */
}

.pdf-canvas {
border: 1px solid black;
direction: ltr;
width: 100%;
height: auto;
display: none;
}

#the-canvas {
border: 1px solid black;
direction: ltr;
width: 100%;
height: auto;
display: none;
}


.pdf-loadingWrapper {
display: none;
justify-content: center;
align-items: center;
width: 100%;
height: 350px;
}

.pdf-loading {
display: inline-block;
width: 50px;
Expand All @@ -47,17 +47,17 @@
animation: spin 1s ease-in-out infinite;
-webkit-animation: spin 1s ease-in-out infinite;
}

{{/* Download link */}}



#overlayText {
word-wrap: break-word;
display: grid;
justify-content: end;
}

#overlayText a {
position: relative;
top: 10px;
Expand All @@ -71,14 +71,14 @@
border-color: #00000030;
text-decoration: none;
}

#overlayText svg {
height: clamp(1em, 2vw, 1.4em);
width: clamp(1em, 2vw, 1.4em);
}



@keyframes spin {
to { -webkit-transform: rotate(360deg); }
}
Expand All @@ -95,7 +95,7 @@
</div>
<div id="overlayText">
<a href="{{ .Get "url" }}" aria-label="Download" download>
<svg aria-hidden="true" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
<path d="M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z" />
</svg>
</a>
Expand Down Expand Up @@ -261,4 +261,4 @@
renderPage(pageNum);
});
})();
</script>
</script>

0 comments on commit 7ffa175

Please sign in to comment.