forked from MarseyWorld/MarseyWorld
try this
parent
7377683c7b
commit
7cc66c35f0
|
@ -190,31 +190,18 @@
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/assets/js/sparkle.min.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
{% if p.award_count("gold") %}
|
{% if p.award_count("gold") %}
|
||||||
{% set sparkles = 10*p.award_count("gold") if p.award_count("gold") <= 5 else 50 %}
|
|
||||||
<script>
|
<script>
|
||||||
document.querySelector("#post-text").sparkle({
|
{% set minstars = 10*p.award_count("gold") if p.award_count("gold") <= 5 else 50 %}
|
||||||
count: {{ sparkles }},
|
{% set maxstars = 20*p.award_count("gold") if p.award_count("gold") <= 5 else 100 %}
|
||||||
minAge: 500,
|
<script type="text/javascript">
|
||||||
maxAge: 1000,
|
new BugController({
|
||||||
starsource: `
|
imageSprite: "/assets/images/star.png",
|
||||||
<svg
|
canDie: false,
|
||||||
width="100%"
|
minBugs: {{minstars}},
|
||||||
height="100%"
|
maxBugs: {{maxstars}},
|
||||||
viewBox="0 0 15 15"
|
mouseOver: "multiply"
|
||||||
version="1.1"
|
});
|
||||||
xmlns="http://www.w3.org/2000/svg" x
|
|
||||||
mlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xml:space="preserve"
|
|
||||||
xmlns:serif="http://www.serif.com/"
|
|
||||||
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
|
||||||
<path d="M1.125,4.95l4.462,0l1.913,-3.825l0.637,3.825l5.738,0l-4.463,3.188l0.638,5.737l-3.187,-3.825l-4.463,3.825l1.913,-5.737l-3.188,-3.188Z"
|
|
||||||
style="fill:#aaad00;">
|
|
||||||
</path>
|
|
||||||
</svg>`,
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue