Added an additional theme - bootstrap3-light - that displays the default Bootstrap navbar (instead of the dark one)
This commit is contained in:
parent
8baa0b06e7
commit
c32dbb17ed
@ -37,16 +37,12 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
private function addThemeInfoToView()
|
private function addThemeInfoToView()
|
||||||
{
|
{
|
||||||
$themeInfo = Theme::info();
|
$themeInfo = Theme::info();
|
||||||
$themeInfoKeys = array('name', 'version');
|
|
||||||
|
|
||||||
// Add each valid theme info element to the view - prefixing with theme_
|
// Add each theme info element to the view - prefixing with theme_
|
||||||
// e.g. $themeInfo['name'] becomes $theme_name in the view
|
// e.g. $themeInfo['name'] becomes $theme_name in the view
|
||||||
foreach ($themeInfoKeys as $key)
|
foreach ($themeInfo as $key => $value)
|
||||||
{
|
{
|
||||||
if (isset($themeInfo[$key]))
|
View::share('theme_' . $key, $value);
|
||||||
{
|
|
||||||
View::share('theme_' . $key, $themeInfo[$key]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also add a theme_url key
|
// Also add a theme_url key
|
||||||
|
@ -10,9 +10,10 @@
|
|||||||
<base href="{{ url('/') }}">
|
<base href="{{ url('/') }}">
|
||||||
|
|
||||||
{{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}}
|
{{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}}
|
||||||
<link href="themes/base/bootstrap/css/bootstrap.min.css?v={{ urlencode($theme_version) }}" rel="stylesheet">
|
{{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}}
|
||||||
<link href="themes/base/font-awesome/css/font-awesome.min.css?v={{ urlencode($theme_version) }}" rel="stylesheet">
|
<link href="themes/base/bootstrap/css/bootstrap.min.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet">
|
||||||
<link href="themes/base/css/app.css?v={{ urlencode($theme_version) }}" rel="stylesheet">
|
<link href="themes/base/font-awesome/css/font-awesome.min.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet">
|
||||||
|
<link href="themes/base/css/app.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet">
|
||||||
@stack('styles')
|
@stack('styles')
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -23,9 +24,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}}
|
{{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}}
|
||||||
<script src="themes/base/js/jquery.min.js?v={{ urlencode($theme_version) }}"></script>
|
{{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}}
|
||||||
<script src="themes/base/bootstrap/js/bootstrap.min.js?v={{ urlencode($theme_version) }}"></script>
|
<script src="themes/base/js/jquery.min.js?v={{ urlencode(config('app.version')) }}"></script>
|
||||||
<script src="themes/base/js/app.js?v={{ urlencode($theme_version) }}"></script>
|
<script src="themes/base/bootstrap/js/bootstrap.min.js?v={{ urlencode(config('app.version')) }}"></script>
|
||||||
|
<script src="themes/base/js/app.js?v={{ urlencode(config('app.version')) }}"></script>
|
||||||
@stack('scripts')
|
@stack('scripts')
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<nav class="navbar navbar-inverse navbar-static-top">
|
<nav class="navbar {{ $theme_navbar_class }}">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
7
resources/views/themes/bootstrap3-light/theme.json
Normal file
7
resources/views/themes/bootstrap3-light/theme.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "Bootstrap 3 (Light)",
|
||||||
|
"version": "1.0",
|
||||||
|
"author": "Andy Heathershaw",
|
||||||
|
"author_email": "andy@andys.eu",
|
||||||
|
"navbar_class": "navbar-default navbar-static-top"
|
||||||
|
}
|
@ -2,5 +2,6 @@
|
|||||||
"name": "Bootstrap 3",
|
"name": "Bootstrap 3",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"author": "Andy Heathershaw",
|
"author": "Andy Heathershaw",
|
||||||
"author_email": "andy@andys.eu"
|
"author_email": "andy@andys.eu",
|
||||||
|
"navbar_class": "navbar-inverse navbar-static-top"
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user