Add option for hiding introduction of home page
This commit is contained in:
parent
788a2d5c6e
commit
a082bec096
@ -111,6 +111,8 @@ class AdminController extends Controller
|
||||
|
||||
$form->checkbox('transparent_navbar')->label();
|
||||
|
||||
$form->checkbox('hide_intro')->label();
|
||||
|
||||
$form->select('copyright_prefer')
|
||||
->option('0', 'Powered with ❤ by Blessing Skin Server.')
|
||||
->option('1', 'Powered by Blessing Skin Server.')
|
||||
|
@ -194,9 +194,3 @@ Wrap Sections
|
||||
.col-lg-6:last-child
|
||||
text-align right
|
||||
padding-top 20px
|
||||
|
||||
/* Copyright Wrap */
|
||||
#copyright
|
||||
background #222222
|
||||
padding 16px 0 20px
|
||||
color white
|
||||
|
@ -13,6 +13,9 @@ homepage:
|
||||
transparent_navbar:
|
||||
title: Transparent Navigation Bar
|
||||
label: This will enable transparent navigation bar of home page, but it will turn to be normal if page is scrolled to bottom.
|
||||
hide_intro:
|
||||
title: Hide Introduction at Bottom
|
||||
label: Scroll bar will be disabled if this option is enabled, as version 2.x.
|
||||
copyright_prefer:
|
||||
title: Program Copyright
|
||||
description: "You can specify a different style of program copyright for each language. To edit a specific language's corresponding program copyright style, please switch to that language and submit your edit. <br><b>Warning:</b> Any evil modification applied on the footer program copyright (including deleting, modifying author, changing link target) with out permission is <b>FORBIDDEN</b>. The author reserves the right to pursue relevant responsibilities."
|
||||
|
@ -13,6 +13,9 @@ homepage:
|
||||
transparent_navbar:
|
||||
title: 首页导航栏透明
|
||||
label: 开启后首页顶部的导航栏将透明化,但页面滚动到底部时会变为不透明。
|
||||
hide_intro:
|
||||
title: 隐藏底部的网站介绍
|
||||
label: 开启后页面将不再需要滚动条,就像 2.x 版本中的首页那样。
|
||||
copyright_prefer:
|
||||
title: 程序版权信息
|
||||
description: 每种支持的语言都可以对应不同的程序版权信息,如果想要编辑某种特定语言下的版权信息,请在右上角切换至该语言后再提交修改。<b>对于任何恶意修改页面右下角的版权信息(包括不限于删除、修改作者信息、修改链接指向)的用户,作者保留对其追究责任的权利。</b>
|
||||
|
@ -1,6 +1,7 @@
|
||||
## Added
|
||||
|
||||
- Added experimental Laradock (Docker) support.
|
||||
- Added option for hiding introduction of home page. (Like 2.x)
|
||||
|
||||
## Tweaked
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
## 新增
|
||||
|
||||
- 增加 Docker 支持。(实验性)
|
||||
- 增加「隐藏首页底部的网站介绍」的选项(即 2.x 时的样式)
|
||||
|
||||
## 调整
|
||||
|
||||
|
@ -11,11 +11,33 @@
|
||||
@include('common.seo-meta-tags')
|
||||
<!-- App Styles -->
|
||||
@include('common.dependencies.style')
|
||||
<style>
|
||||
.hp-wrapper {
|
||||
background-image: url('{{ $home_pic_url }}');
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
@if (option('hide_intro'))
|
||||
#copyright {
|
||||
color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 0 50px 16px 50px;
|
||||
}
|
||||
@else
|
||||
#copyright {
|
||||
background: #222;
|
||||
padding: 16px 0 20px;
|
||||
color: white;
|
||||
}
|
||||
@endif
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="hold-transition {{ option('color_scheme') }} layout-top-nav">
|
||||
|
||||
<div class="hp-wrapper" style="background-image: url('{{ $home_pic_url }}'); height: 100vh;">
|
||||
<div class="hp-wrapper">
|
||||
<!-- Navigation -->
|
||||
<header class="main-header {{ $transparent_navbar ? 'transparent' : ''}}">
|
||||
<nav class="navbar navbar-fixed-top">
|
||||
@ -69,8 +91,23 @@
|
||||
</p>
|
||||
</div>
|
||||
</div> <!--/ .container -->
|
||||
|
||||
@if (option('hide_intro'))
|
||||
<div id="copyright">
|
||||
<!-- Designed by Pratt -->
|
||||
<div class="container">
|
||||
<!-- YOU CAN NOT MODIFIY THE COPYRIGHT TEXT W/O PERMISSION -->
|
||||
<div id="copyright-text" class="pull-right hidden-xs">
|
||||
@include('common.copyright')
|
||||
</div>
|
||||
<!-- Default to the left -->
|
||||
@include('common.custom-copyright')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div><!--/ #headerwrap -->
|
||||
|
||||
@if (! option('hide_intro'))
|
||||
<!-- INTRO WRAP -->
|
||||
<div id="intro">
|
||||
<div class="container">
|
||||
@ -109,7 +146,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (! option('hide_intro'))
|
||||
<div id="copyright">
|
||||
<!-- Designed by Pratt -->
|
||||
<div class="container">
|
||||
@ -121,6 +160,7 @@
|
||||
@include('common.custom-copyright')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<script>
|
||||
blessing.extra = @json(['transparent_navbar' => (bool) $transparent_navbar])
|
||||
|
@ -31,12 +31,14 @@ class AdminConfigurationsTest extends BrowserKitTestCase
|
||||
->type('url', 'home_pic_url')
|
||||
->type('url', 'favicon_url')
|
||||
->check('transparent_navbar')
|
||||
->check('hide_intro')
|
||||
->select('1', 'copyright_prefer')
|
||||
->type('copyright', 'copyright_text')
|
||||
->press('submit_homepage');
|
||||
$this->assertEquals('url', option('home_pic_url'));
|
||||
$this->assertEquals('url', option('favicon_url'));
|
||||
$this->assertTrue(option('transparent_navbar'));
|
||||
$this->assertTrue(option('hide_intro'));
|
||||
$this->assertEquals('1', option('copyright_prefer'));
|
||||
$this->assertEquals('copyright', option('copyright_text'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user