mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
Moves Livewire into App JS
Makes it easier to bundle for prod.
This commit is contained in:
parent
169777f957
commit
5aafbe94d1
@ -1,12 +1,9 @@
|
||||
{
|
||||
"name": "laravel/laravel",
|
||||
"name": "sp-tarkov/forge",
|
||||
"type": "project",
|
||||
"description": "The skeleton application for the Laravel framework.",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"framework"
|
||||
],
|
||||
"license": "MIT",
|
||||
"description": "A Laravel-based web application that provides a platform for the Single Player Tarkov community to share and discover user-generated content, such as mods, guides, and other tools.",
|
||||
"keywords": [],
|
||||
"license": "MPL-2.0",
|
||||
"require": {
|
||||
"php": "^8.3",
|
||||
"ext-curl": "*",
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "html",
|
||||
"name": "forge",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
@ -5,9 +5,15 @@ import.meta.glob(["../video/**"]);
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const themeToggleIcon = {
|
||||
dark: document.getElementById("theme-toggle-dark-icon"),
|
||||
light: document.getElementById("theme-toggle-light-icon"),
|
||||
light: document.getElementById("theme-toggle-light-icon")
|
||||
};
|
||||
|
||||
// Make sure the theme toggle icons are available.
|
||||
if (themeToggleIcon.dark === null || themeToggleIcon.light === null) {
|
||||
console.log("Theme toggle icons not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Function to update the visibility of the theme icons based on the theme
|
||||
function updateIconVisibility(theme) {
|
||||
if (theme === "dark") {
|
||||
|
3
resources/js/bootstrap.js
vendored
3
resources/js/bootstrap.js
vendored
@ -1,4 +1,7 @@
|
||||
import { Livewire } from "../../vendor/livewire/livewire/dist/livewire.esm";
|
||||
import axios from "axios";
|
||||
|
||||
Livewire.start();
|
||||
|
||||
window.axios = axios;
|
||||
window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
|
||||
|
@ -56,6 +56,6 @@
|
||||
@livewire('global-search')
|
||||
@stack('modals')
|
||||
|
||||
@livewireScripts
|
||||
@livewireScriptConfig
|
||||
</body>
|
||||
</html>
|
||||
|
@ -11,6 +11,8 @@
|
||||
<link href="//fonts.bunny.net" rel="preconnect">
|
||||
<link href="//fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet">
|
||||
|
||||
<link href="{{ config('app.asset_url') }}" rel="dns-prefetch">
|
||||
|
||||
<script>
|
||||
// Immediately set the theme to prevent a flash of the default theme when another is set.
|
||||
// Must be located inline, in the head, and before any CSS is loaded.
|
||||
@ -33,7 +35,6 @@
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
@livewireScripts
|
||||
|
||||
@livewireScriptConfig
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user