Skip to content

Commit e4abf3e

Browse files
committed
Added option to apply theme to Home Page
1 parent 2bb8f57 commit e4abf3e

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed

resources/views/home.blade.php

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,30 @@
2222

2323
<!-- Custom icons font-awesome -->
2424
<script src="https://kit.fontawesome.com/c4a5e06183.js" crossorigin="anonymous"></script>
25-
<link rel="stylesheet" href="{{ asset('littlelink/css/animations.css') }}">
2625

2726
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,600,800&display=swap" rel="stylesheet">
2827
<link rel="stylesheet" href="{{ asset('littlelink/css/normalize.css') }}">
29-
<link rel="stylesheet" href="{{ asset('littlelink/css/brands.css') }}">
30-
<link rel="stylesheet" href="{{ asset('littlelink/css/hover-min.css') }}">
3128
<link rel="stylesheet" href="{{ asset('littlelink/css/animate.css') }}">
3229
@if(file_exists(base_path("littlelink/images/avatar.png" )))
3330
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}">
3431
@else
3532
<link rel="icon" type="image/svg+xml" href="{{ asset('littlelink/images/logo.svg') }}">
3633
@endif
3734

38-
{{-- custom font for logo text --}}
39-
<style>@font-face{font-family:'ll';src:url({{ asset('littlelink/fonts/littlelink-custom.otf') }}) format("opentype")}</style>
35+
@if(Config::get('meta.home_theme') != '' and Config::get('meta.home_theme') != 'default')
36+
37+
<!-- LittleLink Custom Theme: "{{Config::get('meta.home_theme')}}" -->
4038

39+
<link rel="stylesheet" href="themes/{{Config::get('meta.home_theme')}}/brands.css">
40+
<link rel="stylesheet" href="themes/{{Config::get('meta.home_theme')}}/skeleton-auto.css">
41+
@if(file_exists(base_path('themes/' . Config::get('meta.home_theme') . '/animations.css')))
42+
<link rel="stylesheet" href="<?php echo asset('themes/' . Config::get('meta.home_theme') . '/animations.css') ?>">
43+
@else
44+
<link rel="stylesheet" href="{{ asset('littlelink/css/animations.css') }}">
45+
@endif
46+
47+
@else
48+
<link rel="stylesheet" href="{{ asset('littlelink/css/brands.css') }}">
4149
<?php // override dark/light mode if override cookie is set
4250
$color_scheme_override = isset($_COOKIE["color_scheme_override"]) ? $_COOKIE["color_scheme_override"] : false; ?>
4351
@if ($color_scheme_override == 'dark')
@@ -51,9 +59,35 @@
5159
@else
5260
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-auto.css') }}">
5361
@endif
62+
@endif
63+
64+
{{-- custom font for logo text --}}
65+
<style>@font-face{font-family:'ll';src:url({{ asset('littlelink/fonts/littlelink-custom.otf') }}) format("opentype")}</style>
66+
5467
</head>
5568
<body>
5669

70+
@if(Config::get('meta.home_theme') != '' and Config::get('meta.home_theme') != 'default')
71+
<!-- Enables parallax background animations -->
72+
<div class="background-container">
73+
<section class="parallax-background">
74+
<div id="object1" class="object1"></div>
75+
<div id="object2" class="object2"></div>
76+
<div id="object3" class="object3"></div>
77+
<div id="object4" class="object4"></div>
78+
<div id="object5" class="object5"></div>
79+
<div id="object6" class="object6"></div>
80+
<div id="object7" class="object7"></div>
81+
<div id="object8" class="object8"></div>
82+
<div id="object9" class="object9"></div>
83+
<div id="object10" class="object10"></div>
84+
<div id="object11" class="object11"></div>
85+
<div id="object12" class="object12"></div>
86+
</section>
87+
</div>
88+
<!-- End of parallax background animations -->
89+
@endif
90+
5791
<?php
5892
$pages = DB::table('pages')->get();
5993
foreach($pages as $page)

storage/templates/meta.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,19 @@
121121
|
122122
*/
123123

124-
'home_footer' => 'default', // Either 'default', 'alt', 'custom' or 'false'
124+
'home_footer' => 'default', // Either 'default', 'alt', 'custom' or 'false'.
125125

126126
// You can enter plain text or HTML into this field.
127127
// You can use "{year}" as a placeholder for the current year.
128128
// So "©{year}" would output "©2033" (or whatever the current year is).
129129
'custom_home_footer_text' => '© Copyright {year} - All Rights Reserved',
130130

131+
132+
// Apply a theme to your Home Page.
133+
// Some themes are not compatible with the Home Page. Use at your own discretion.
134+
// Enter the name of a theme located in your "themes" folder (for example, 'galaxy').
135+
'home_theme' => 'default', // Leave empty or enter 'default' to use the default theme.
136+
131137
/*
132138
|--------------------------------------------------------------------------
133139
| Custom Buttons on Home Page

0 commit comments

Comments
 (0)