forked from LinkStackOrg/linkstack-default-theme
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed resolution scaling above 1080p
- Loading branch information
1 parent
75c4ce8
commit d06f6af
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{-- Crude fix for the stars on higher resolutions --}} | ||
<script> | ||
const object1 = [] | ||
const object2 = [] | ||
const object3 = [] | ||
const numberOfobject1 = '1000' | ||
const numberOfobject2 = '600' | ||
const numberOfobject3 = '100' | ||
for (let i = 0; i < numberOfobject1; i++) { | ||
const pos1 = (Math.floor(Math.random() * 5200)) | ||
const pos2 = (Math.floor(Math.random() * 5200)) | ||
object1.push(`${pos1}px ${pos2}px #fff`) | ||
} | ||
for (let i = 0; i < numberOfobject2; i++) { | ||
const pos1 = (Math.floor(Math.random() * 5200)) | ||
const pos2 = (Math.floor(Math.random() * 5200)) | ||
object2.push(`${pos1}px ${pos2}px #fff`) | ||
} | ||
for (let i = 0; i < numberOfobject3; i++) { | ||
const pos1 = (Math.floor(Math.random() * 5200)) | ||
const pos2 = (Math.floor(Math.random() * 5200)) | ||
object3.push(`${pos1}px ${pos2}px #fff`) | ||
} | ||
const addCSS = css => document.head.appendChild(document.createElement("style")).innerHTML = css; | ||
addCSS(`#object1{ box-shadow:${object1}}`) | ||
addCSS(`#object1:after{ box-shadow:${object1}}`) | ||
addCSS(`#object2{ box-shadow:${object2}}`) | ||
addCSS(`#object2:after{ box-shadow:${object2}}`) | ||
addCSS(`#object3{ box-shadow:${object3}}`) | ||
addCSS(`#object3:after{ box-shadow:${object3}}`) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters