You've already forked Ghost-Theme-Casper
Pull jquery script local. Add Ko-fi button.
Add integrity values to CSS and JS files.
This commit is contained in:
2
assets/js/lib/jquery-3.5.1.min.js
vendored
Normal file
2
assets/js/lib/jquery-3.5.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/lib/ko-fi-widget_v2.js
Normal file
1
assets/js/lib/ko-fi-widget_v2.js
Normal file
@@ -0,0 +1 @@
|
||||
var kofiwidget2=kofiwidget2||(function(){var style="";var html="";var color="";var text="";var id="";return{init:function(pText,pColor,pId){color=pColor;text=pText;id=pId;style="img.kofiimg{display: initial!important;vertical-align:middle;height:13px!important;width:20px!important;padding-top:0!important;padding-bottom:0!important;border:none;margin-top:0;margin-right:5px!important;margin-left:0!important;margin-bottom:3px!important;content:url('https://storage.ko-fi.com/cdn/cup-border.png')}.kofiimg:after{vertical-align:middle;height:25px;padding-top:0;padding-bottom:0;border:none;margin-top:0;margin-right:6px;margin-left:0;margin-bottom:4px!important;content:url('https://storage.ko-fi.com/cdn/whitelogo.svg')}.btn-container{display:inline-block!important;white-space:nowrap;min-width:160px}span.kofitext{color:#fff !important;letter-spacing: -0.15px!important;text-wrap:none;vertical-align:middle;line-height:33px !important;padding:0;text-align:center;text-decoration:none!important; text-shadow: 0 1px 1px rgba(34, 34, 34, 0.05);}.kofitext a{color:#fff !important;text-decoration:none:important;}.kofitext a:hover{color:#fff !important;text-decoration:none}a.kofi-button{box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);line-height:36px!important;min-width:150px;display:inline-block!important;background-color:#29abe0;padding:2px 12px !important;text-align:center !important;border-radius:7px;color:#fff;cursor:pointer;overflow-wrap:break-word;vertical-align:middle;border:0 none #fff !important;font-family:'Quicksand',Helvetica,Century Gothic,sans-serif !important;text-decoration:none;text-shadow:none;font-weight:700!important;font-size:14px !important}a.kofi-button:visited{color:#fff !important;text-decoration:none !important}a.kofi-button:hover{opacity:.85;color:#f5f5f5 !important;text-decoration:none !important}a.kofi-button:active{color:#f5f5f5 !important;text-decoration:none !important}.kofitext img.kofiimg {height:15px!important;width:22px!important;display: initial;animation: kofi-wiggle 3s infinite;}";style=style+"@keyframes kofi-wiggle{0%{transform:rotate(0) scale(1)}60%{transform:rotate(0) scale(1)}75%{transform:rotate(0) scale(1.12)}80%{transform:rotate(0) scale(1.1)}84%{transform:rotate(-10deg) scale(1.1)}88%{transform:rotate(10deg) scale(1.1)}92%{transform:rotate(-10deg) scale(1.1)}96%{transform:rotate(10deg) scale(1.1)}100%{transform:rotate(0) scale(1)}}";style="<style>"+style+"</style>";html="<link href='https://fonts.googleapis.com/css?family=Quicksand:400,700' rel='stylesheet' type='text/css'>";html+='<div class=btn-container><a title="Support me on ko-fi.com" class="kofi-button" style="background-color:[color];" href="https://ko-fi.com/[id]" target="_blank"> <span class="kofitext"><img src="https://storage.ko-fi.com/cdn/cup-border.png" alt="Ko-fi donations" class="kofiimg"/>[text]</span></a></div>';},getHTML:function(){var rtn=style+html.replace("[color]",color).replace("[text]",text).replace("[id]",id);return rtn;},draw:function(){document.writeln(style+html.replace("[color]",color).replace("[text]",text).replace("[id]",id));}};}());
|
||||
25
default.hbs
25
default.hbs
@@ -11,7 +11,18 @@
|
||||
|
||||
{{!-- Theme assets - use the {asset} helper to reference styles & scripts,
|
||||
this will take care of caching and cache-busting automatically --}}
|
||||
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{asset "built/screen.css"}}"
|
||||
integrity="sha256-2l5cwMuCBQRU/srZKHttk1BMLTWpxpmy38/KvszGjRQ=" />
|
||||
|
||||
{{!-- Ko-fi Widget script --}}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{asset "js/lib/ko-fi-widget_v2.js"}}"
|
||||
integrity="sha256-vIzHU2v5TQMAT6IcQFoigYePsSlqYanf61XMJ6U8bKE="
|
||||
></script>
|
||||
|
||||
{{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings,
|
||||
it should always be the last tag before the closing head tag --}}
|
||||
@@ -53,6 +64,7 @@
|
||||
{{#if @site.twitter}}
|
||||
<a class="gh-social-link gh-social-twitter" href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="me noopener">{{> "icons/twitter"}}</a>
|
||||
{{/if}}
|
||||
<script type='text/javascript'>kofiwidget2.init('Buy me a coffee', '#0a0b0c', 'K3K0G2FVA');kofiwidget2.draw();</script>
|
||||
</div>
|
||||
{{#if @site.members_enabled}}
|
||||
{{#unless @member}}
|
||||
@@ -87,11 +99,14 @@
|
||||
|
||||
{{!-- Scripts - handle member signups, responsive videos, infinite scroll, floating headers, and galleries --}}
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.5.1.min.js"
|
||||
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
|
||||
crossorigin="anonymous">
|
||||
src="{{asset "js/lib/jquery-3.5.1.min.js"}}"
|
||||
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=">
|
||||
</script>
|
||||
<script src="{{asset "built/casper.js"}}"></script>
|
||||
<script
|
||||
src="{{asset "built/casper.js"}}"
|
||||
integrity="sha256-fYSmAq1sXUPZ7kf709oLgEa58NkM60ut+VNQJpnb10g=">
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// Mobile Menu Trigger
|
||||
|
||||
Reference in New Issue
Block a user