Skip to content

Including particles.js? #71

Closed Answered by BCHarrell
BCHarrell asked this question in Q&A
Jul 17, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

No worries!

Part of it was my own issue - the particles.js I was using had an image for the nodes, instead of a built-in shape. The image file was getting referenced locally everywhere the script was loaded, I needed to update it to a hard-coded path to get that to display. So that fixed part of the display issue.

I ended up putting the div in the following section which gives me the desired effect of full-page on the home screen, and slowly fades off on long articles.

baseof.html

...
{{- if .Site.Params.googleTagManager -}}{{- partial "googleTagManager_body.html" . -}}{{- end -}}
<div class="particles-container" id="particles-js"></div>
<script src="/resources/scripts/particles.js"></script

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@1bl4z3r
Comment options

Comment options

You must be logged in to vote
1 reply
@1bl4z3r
Comment options

Answer selected by 1bl4z3r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants