Minor improvements

This commit is contained in:
Tony Air 2020-12-28 11:13:27 +07:00
parent 1a20c9f1dd
commit 6116d29bf5
4 changed files with 88 additions and 33 deletions

View File

@ -44,10 +44,7 @@ SilverStripe\CMS\Model\SiteTree:
- Site\Elements\MapElement
#- Site\Elements\AccordionElement
- DNADesign\ElementalVirtual\Model\ElementVirtual
- Site\Elements\ColorBarElement
- Site\Elements\AccordionElement
- Site\Elements\VideoElement
- Site\Elements\GalleryElement
- Site\Elements\CustomSnippetElement
DNADesign\ElementalList\Model\ElementList:
@ -65,7 +62,6 @@ DNADesign\ElementalList\Model\ElementList:
- Site\Elements\SliderElement
- Site\Elements\BlockElement
- Site\Elements\MapElement
- Site\Elements\ColorBarElement
- Site\Elements\AccordionElement
styles:
whiteframe: 'White Frame'

60
app/_config/logs.yml Normal file
View File

@ -0,0 +1,60 @@
---
Name: webapp-dev-errors
Only:
environment: dev
---
SilverStripe\Core\Injector\Injector:
Psr\Log\LoggerInterface.errorhandler:
calls:
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
DisplayErrorHandler:
class: SilverStripe\Logging\HTTPOutputHandler
constructor:
- 'notice'
properties:
Formatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
CLIFormatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
---
Name: webapp-live-errors
Except:
environment: dev
---
SilverStripe\Core\Injector\Injector:
# Default logger implementation for general purpose use
Psr\Log\LoggerInterface:
calls:
# Save system logs to file
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
# Core error handler for system use
Psr\Log\LoggerInterface.errorhandler:
calls:
# Save errors to file
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
# Format and display errors in the browser/CLI
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
# Custom handler to log to a file
LogFileHandler:
class: Monolog\Handler\StreamHandler
constructor:
- '../silverstripe.log'
- 'notice'
properties:
Formatter: '%$Monolog\Formatter\HtmlFormatter'
ContentType: text/html
# Handler for displaying errors in the browser or CLI
DisplayErrorHandler:
class: SilverStripe\Logging\HTTPOutputHandler
constructor:
- 'error'
properties:
Formatter: '%$SilverStripe\Logging\DebugViewFriendlyErrorFormatter'
# Configuration for the "friendly" error formatter
SilverStripe\Logging\DebugViewFriendlyErrorFormatter:
class: SilverStripe\Logging\DebugViewFriendlyErrorFormatter
properties:
Title: 'There has been an error'
Body: 'The website server has not been able to respond to your request'

View File

@ -1 +1,29 @@
/* style elements here */
.element {
background-size: cover;
background-repeat: no-repeat;
&.site__elements__sliderelement {
.element-container {
width: 100%;
padding: 0;
max-width: none;
}
}
&.dynamic__elements__image__elements__elementimage {
text-align: center;
}
&.site__elements__accordion {
.card {
padding-left: 0;
padding-right: 0;
.card-header {
@extend .bg-dark;
}
}
}
}

View File

@ -78,35 +78,6 @@ body.shrink {
}
}
// site blocks (elements)
.element {
background-size: cover;
background-repeat: no-repeat;
&.site__elements__sliderelement {
.element-container {
width: 100%;
padding: 0;
max-width: none;
}
}
&.dynamic__elements__image__elements__elementimage {
text-align: center;
}
&.site__elements__accordion {
.card {
padding-left: 0;
padding-right: 0;
.card-header {
@extend .bg-dark;
}
}
}
}
.sidebar__col {
position: relative;
margin-bottom: $grid-gutter-element-height * 2;