Use default background image when option leaved empty
This commit is contained in:
parent
96633db340
commit
bc7679fd0d
@ -9,7 +9,8 @@ class HomeController extends Controller
|
||||
{
|
||||
public function index(UserRepository $users, Request $request)
|
||||
{
|
||||
return view('index')->with('user', $users->getCurrentUser());
|
||||
return view('index')->with('user', $users->getCurrentUser())
|
||||
->with('home_pic_url', option('home_pic_url') ?: config('options.home_pic_url'));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ homepage:
|
||||
|
||||
home_pic_url:
|
||||
title: Picture URL at Homepage
|
||||
hint: Path relative to homepage or full URL.
|
||||
hint: Path relative to homepage or full URL, leave empty to use default image
|
||||
favicon_url:
|
||||
title: Website Icon
|
||||
hint: Path relative to resources/assets/ or full URL.
|
||||
|
@ -5,7 +5,7 @@ homepage:
|
||||
|
||||
home_pic_url:
|
||||
title: 首页图片地址
|
||||
hint: 相对于首页的路径或者完整的 URL
|
||||
hint: 相对于首页的路径或者完整的 URL,留空以使用默认背景
|
||||
favicon_url:
|
||||
title: 网站图标
|
||||
hint: 相对 resources/assets/ 的路径或者完整的 URL
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<body class="hold-transition {{ option('color_scheme') }} layout-top-nav">
|
||||
|
||||
<div class="wrapper" style="background-image: url('{{ option('home_pic_url') }}');">
|
||||
<div class="wrapper" style="background-image: url('{{ $home_pic_url }}');">
|
||||
<!-- Navigation -->
|
||||
<header class="main-header transparent">
|
||||
<nav class="navbar navbar-fixed-top">
|
||||
|
Loading…
Reference in New Issue
Block a user