Minor improvements

This commit is contained in:
Tony Air 2020-05-27 09:15:52 +07:00
parent e8fe53cc9b
commit 3c50cd039d
6 changed files with 48 additions and 12 deletions

View File

@ -0,0 +1 @@
/* style elements here */

View File

@ -36,6 +36,17 @@ $grid-gutter-width: 2rem;
$grid-gutter-height: 2rem; $grid-gutter-height: 2rem;
$grid-gutter-element-height: $grid-gutter-height; $grid-gutter-element-height: $grid-gutter-height;
$border-radius: 0.25rem;
$border-radius-lg: 0.3rem;
$border-radius-sm: 0.2rem;
$font-size-base: 1rem;
$h1-font-size: $font-size-base * 2.25;
$h3-font-size: $font-size-base * 1.75;
$h4-font-size: $font-size-base * 1.5;
$h5-font-size: $font-size-base * 1.25;
$h6-font-size: $font-size-base;
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_variables'; @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_variables';
// Add your site-wide + content editor typography styling // Add your site-wide + content editor typography styling

View File

@ -4,27 +4,28 @@
//@import "~bootstrap-timepicker/css/bootstrap-timepicker.css"; //@import "~bootstrap-timepicker/css/bootstrap-timepicker.css";
// Your custom variables // Your custom variables
@import "_variables"; @import '_variables';
//@import "~bootstrap-select/dist/css/bootstrap-select.css"; //@import "~bootstrap-select/dist/css/bootstrap-select.css";
// conflicts to bootstrap-select // conflicts to bootstrap-select
//@import "~select2/dist/css/select2.css"; //@import "~select2/dist/css/select2.css";
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.bootstrap"; @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.bootstrap';
// By default we prefer font awesome CDN // By default we prefer font awesome CDN
//@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.fontawesome"; //@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.fontawesome";
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.lightbox"; @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.lightbox';
// Flyout UI // Flyout UI
//@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.flyout"; //@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.flyout";
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.main"; @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.main';
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.form.basics"; @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.form.basics';
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.elemental"; @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.elemental';
//@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.form.stepped"; //@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.form.stepped";
// Your custom styling // Your custom styling
@import "_typography"; @import '_typography';
@import "_layout"; @import '_layout';
@import '_elements';

View File

@ -4,19 +4,35 @@
// extends global Page class // extends global Page class
//namespace Site\Pages; //namespace Site\Pages;
use Sheadawson\Linkable\Forms\LinkField;
use SilverStripe\CMS\Model\SiteTree; use SilverStripe\CMS\Model\SiteTree;
use DNADesign\Elemental\Models\ElementContent; use DNADesign\Elemental\Models\ElementContent;
use SilverStripe\FontAwesome\FontAwesomeField;
class Page extends SiteTree class Page extends SiteTree
{ {
private static $default_container_class = 'container'; private static $default_container_class = 'container';
protected $_cached = []; protected $_cached = [];
private static $db = [
'BlockIcon' => 'Varchar(255)',
];
public static function DefaultContainer() public static function DefaultContainer()
{ {
return self::config()->get('default_container_class'); return self::config()->get('default_container_class');
} }
public function getSettingsFields()
{
$fields = parent::getSettingsFields();
$fields->addFieldsToTab('Root.Icon', [
FontAwesomeField::create('BlockIcon', 'Page link Icon'),
]);
return $fields;
}
/* /*
* Shows custom summary of the post, otherwise * Shows custom summary of the post, otherwise
* Displays summary of the first content element * Displays summary of the first content element

View File

@ -23,9 +23,6 @@
</li> </li>
<% else %> <% else %>
<li class="nav-item {$CSSClass} $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>"> <li class="nav-item {$CSSClass} $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>">
<a class="nav-link" href="{$Link}" title="$Title.XML"> <% include NavItem_link %>
$MenuTitle.XML
<% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %>
</a>
</li> </li>
<% end_if %> <% end_if %>

View File

@ -0,0 +1,10 @@
<a
class="nav-item-link <% if $LinkClass %>{$LinkClass}<% else %>nav-link<% end_if %>" href="{$Link}"
<% if $ExternalURL || $OpenInNewWindow %> target="_blank"<% end_if %>
>
<% if $BlockIcon %>
<i class="fa-icon $BlockIcon"></i>
<% end_if %>
$MenuTitle.XML
<% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %>
</a>