Skip to content

Commit

Permalink
Fixed resolution scaling above 1080p
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianPrieber committed Oct 15, 2023
1 parent 75c4ce8 commit d06f6af
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
// Disable individual files (only applies if above is 'true').
'enable_custom_head' => 'true',
'enable_custom_body' => 'false',
'enable_custom_body_end' => 'false',
'enable_custom_body_end' => 'true',


/*
Expand Down
42 changes: 42 additions & 0 deletions extra/custom-body-end.blade.php
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>
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Find more themes: https://github.com/linkstackorg/linkstack-themes

* Theme Name: Galaxy
* Theme Version: 1.9
* Theme Version: 2.0
* Theme Date: 2022-06-09
* Theme Author: JulianPrieber & LinkStack Team
* Theme Author URI: https://github.com/JulianPrieber
Expand Down

0 comments on commit d06f6af

Please sign in to comment.