diff --git a/client/dist/styles/bundle.css b/client/dist/styles/bundle.css index 7cfe749..428f6bb 100644 --- a/client/dist/styles/bundle.css +++ b/client/dist/styles/bundle.css @@ -1 +1 @@ -.baselistcomponent .items>article.item{margin-bottom:2rem}.baselistcomponent .items>article.item>div.image{position:relative}.baselistcomponent .items>article.item>div.image a{display:block}.baselistcomponent .items>article.item>div.image div.image-overlay{top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:0;overflow:hidden;position:absolute;-webkit-transition:.5s ease;transition:.5s ease;background-color:rgba(33,37,41,.5)}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner{top:50%;left:0;width:100%;position:absolute;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner>div.icon{font-size:32px;text-align:center;color:#fff}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner>div.text{text-align:center;padding:0 1rem}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner>div.text>*{margin:0;padding:0;font-size:1.25rem;color:#fff}.baselistcomponent .items>article.item>div.image:hover div.image-overlay,.baselistcomponent .items>article.item>div.image a:focus div.image-overlay{opacity:1}.baselistcomponent .items>article.item>section.content{margin-top:1rem}.baselistcomponent .items>article.item>section.content header{margin-bottom:.5rem}.baselistcomponent .items>article.item>section.content header>*{margin-bottom:0}.baselistcomponent .items>article.item>section.content header a{color:inherit}.baselistcomponent .items>article.item>section.content div.details{color:#868e96}.baselistcomponent .items>article.item>section.content div.details>span{margin-right:.5rem}.baselistcomponent .items>article.item>section.content div.details a{color:inherit}.baselistcomponent .items>article.item>section.content footer{margin-top:1rem}.baselistcomponent .items>article.item>section.content>div{margin-bottom:.5rem}.featurecomponent article.feature>a.feature{display:block;text-decoration:none;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.featurecomponent article.feature>a.feature:focus,.featurecomponent article.feature>a.feature:hover{text-decoration:none}.featurecomponent article.feature div.icon{margin-bottom:.5rem}.featurecomponent article.feature div.summary>p:last-child{margin-bottom:0}.featurecomponent article.feature footer{margin-top:1rem}.imagecomponent figure{width:100%;margin-bottom:0}.imagecomponent figure>figcaption>p:last-child{margin-bottom:0}.imagecomponent a.image{display:block}@media (min-width:768px){.listcomponent .items>article.item{display:block}.listcomponent .items.image-align-left>article.item,.listcomponent .items.image-align-right>article.item,.listcomponent .items.image-align-stagger>article.item{display:-webkit-box;display:-ms-flexbox;display:flex}.listcomponent .items.image-align-left>article.item>div.image,.listcomponent .items.image-align-right>article.item>div.image,.listcomponent .items.image-align-stagger>article.item>div.image{margin-bottom:0}.listcomponent .items.image-align-left>article.item.has-image>div.image,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(odd)>div.image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.listcomponent .items.image-align-left>article.item.has-image>section.content,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(odd)>section.content{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;margin-left:1rem}.listcomponent .items.image-align-right>article.item.has-image>div.image,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(2n)>div.image,.listcomponent .items>div.image{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.listcomponent .items.image-align-right>article.item.has-image>section.content,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(2n)>section.content,.listcomponent .items>section.content{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;margin-right:1rem}}.mediacomponent figure{width:100%;margin-bottom:0}.mediacomponent figure>figcaption>p:last-child{margin-bottom:0}.mediacomponent a.text{display:block}.mediacomponent a.text:hover{text-decoration:none}.mediacomponent a.text:hover span{text-decoration:underline}.mediacomponent a.text>i.fa{color:#868e96}.mediacomponent a.image{display:block}.mediacomponent a.image+a.text{margin-top:.5rem}.mediacomponent .rich>iframe{margin:0!important}.mediacomponent .video{width:100%;height:0;display:block;position:relative}.mediacomponent .video.four-three{padding-bottom:75%}.mediacomponent .video.sixteen-nine{padding-bottom:56.25%}.mediacomponent .video>iframe{top:0;left:0;border:0;width:100%;height:100%;position:absolute}.pagecomponent.page-title-hidden .content-container>article>header{display:none}.pagecomponent .content-container>article>div{margin-bottom:1rem}.scrolltotopbutton{opacity:0;outline:0;right:1rem;bottom:1rem;width:4rem;height:4rem;z-index:1000;position:fixed;display:block;overflow:hidden;visibility:hidden;white-space:nowrap;text-align:center;font-size:16px;line-height:4rem;-webkit-box-shadow:0 0 20px rgba(0,0,0,.2);box-shadow:0 0 20px rgba(0,0,0,.2);-webkit-transition:opacity .3s 0s,visibility 0s .3s,color .15s ease-in-out 0s,background-color .15s ease-in-out 0s;transition:opacity .3s 0s,visibility 0s .3s,color .15s ease-in-out 0s,background-color .15s ease-in-out 0s}.scrolltotopbutton.is-visible{opacity:1;visibility:visible}.scrolltotopbutton.fade-out{opacity:.5}.scrolltotopbutton:hover{opacity:1}@media (min-width:768px){.scrolltotopbutton{width:5rem;height:5rem;right:2rem;bottom:2rem;line-height:5rem}}@media (min-width:992px){.scrolltotopbutton{width:6rem;height:6rem;font-size:20px;line-height:6rem}}.tilecomponent .items{-webkit-box-orient:horizontal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.tilecomponent .items,.tilecomponent .items>article.item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.tilecomponent .items>article.item{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1 100%;flex:1 100%;padding:2%}.tilecomponent .items>article.item>section.content{margin-top:auto}.tilecomponent .items>article.item>section.content div.details>span{display:block;margin-right:0;margin-bottom:.25rem}@media (min-width:576px){.tilecomponent .items>article.item{-webkit-box-flex:1;-ms-flex:1 50%;flex:1 50%}}@media (min-width:768px){.tilecomponent .items>article.item{-webkit-box-flex:1;-ms-flex:1 33.3%;flex:1 33.3%}}@media (min-width:992px){.tilecomponent .items>article.item{-webkit-box-flex:1;-ms-flex:1 25%;flex:1 25%}}div.detail-fields a{color:inherit}div.detail-fields>ul{margin:0;padding:0;list-style:none}div.detail-fields>ul>li>dl,div.detail-fields>ul>li>dl>dd{margin:0;padding:0}div.detail-fields.block>ul>li{margin-bottom:1rem}div.detail-fields.block>ul>li dl dt{font-size:1rem;font-weight:500}div.detail-fields.block>ul>li dl dd{font-size:.9rem}div.detail-fields.inline>ul>li{color:#868e96;display:inline-block;margin-right:.5rem}div.detail-fields.inline>ul>li dl dd,div.detail-fields.inline>ul>li dl dt{display:inline-block;font-size:1rem}div.detail-fields.hide-header>header,div.detail-fields.hide-icons>ul>li dl>dt>i,div.detail-fields.hide-names>ul>li dl>dt>span.name{display:none}.component.link{text-decoration:none}.component.link,.component.link>i.fa{display:inline-block}.component.link:active,.component.link:focus,.component.link:hover{text-decoration:none}.show-icons.hide-text .component.link{overflow:hidden;text-align:center;-webkit-transition:color .15s ease-in-out 0s,background-color .15s ease-in-out 0s,border-color .15s ease-in-out 0s;transition:color .15s ease-in-out 0s,background-color .15s ease-in-out 0s,border-color .15s ease-in-out 0s}.show-icons.hide-text .component.link>i.fa{display:block}.show-icons.hide-text .component.link.size-16{width:16px;height:16px;font-size:8px;line-height:16px}.show-icons.hide-text .component.link.size-16>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-24{width:24px;height:24px;font-size:12px;line-height:24px}.show-icons.hide-text .component.link.size-24>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-32{width:32px;height:32px;font-size:16px;line-height:32px}.show-icons.hide-text .component.link.size-32>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-48{width:48px;height:48px;font-size:24px;line-height:48px}.show-icons.hide-text .component.link.size-48>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-64{width:64px;height:64px;font-size:32px;line-height:64px}.show-icons.hide-text .component.link.size-64>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-96{width:96px;height:96px;font-size:48px;line-height:96px}.show-icons.hide-text .component.link.size-96>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-128{width:128px;height:128px;font-size:64px;line-height:128px}.show-icons.hide-text .component.link.size-128>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.hide-icons .component.link>i.fa,.hide-text .component.link>span.text{display:none} \ No newline at end of file +.baselistcomponent .items>article.item{margin-bottom:2rem}.baselistcomponent .items>article.item>div.image{position:relative}.baselistcomponent .items>article.item>div.image a{display:block}.baselistcomponent .items>article.item>div.image div.image-overlay{top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:0;overflow:hidden;position:absolute;-webkit-transition:.5s ease;transition:.5s ease;background-color:rgba(33,37,41,.5)}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner{top:50%;left:0;width:100%;position:absolute;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner>div.icon{font-size:32px;text-align:center;color:#fff}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner>div.text{text-align:center;padding:0 1rem}.baselistcomponent .items>article.item>div.image div.image-overlay>div.inner>div.text>*{margin:0;padding:0;font-size:1.25rem;color:#fff}.baselistcomponent .items>article.item>div.image:hover div.image-overlay,.baselistcomponent .items>article.item>div.image a:focus div.image-overlay{opacity:1}.baselistcomponent .items>article.item>section.content{margin-top:1rem}.baselistcomponent .items>article.item>section.content header{margin-bottom:.5rem}.baselistcomponent .items>article.item>section.content header>*{margin-bottom:0}.baselistcomponent .items>article.item>section.content header a{color:inherit}.baselistcomponent .items>article.item>section.content div.details{color:#868e96}.baselistcomponent .items>article.item>section.content div.details>span{margin-right:.5rem}.baselistcomponent .items>article.item>section.content div.details a{color:inherit}.baselistcomponent .items>article.item>section.content footer{margin-top:1rem}.baselistcomponent .items>article.item>section.content>div{margin-bottom:.5rem}.featurecomponent article.feature>a.feature{display:block;text-decoration:none;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.featurecomponent article.feature>a.feature:focus,.featurecomponent article.feature>a.feature:hover{text-decoration:none}.featurecomponent article.feature div.icon{margin-bottom:.5rem}.featurecomponent article.feature div.summary>p:last-child{margin-bottom:0}.featurecomponent article.feature footer{margin-top:1rem}.imagecomponent figure{width:100%;margin-bottom:0}.imagecomponent figure>figcaption>p:last-child{margin-bottom:0}.imagecomponent a.image{display:block}@media (min-width:768px){.listcomponent .items>article.item{display:block}.listcomponent .items.image-align-left>article.item,.listcomponent .items.image-align-right>article.item,.listcomponent .items.image-align-stagger>article.item{display:-webkit-box;display:-ms-flexbox;display:flex}.listcomponent .items.image-align-left>article.item>div.image,.listcomponent .items.image-align-right>article.item>div.image,.listcomponent .items.image-align-stagger>article.item>div.image{margin-bottom:0}.listcomponent .items.image-align-left>article.item.has-image>div.image,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(odd)>div.image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.listcomponent .items.image-align-left>article.item.has-image>section.content,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(odd)>section.content{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;margin-left:1rem}.listcomponent .items.image-align-right>article.item.has-image>div.image,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(2n)>div.image,.listcomponent .items>div.image{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.listcomponent .items.image-align-right>article.item.has-image>section.content,.listcomponent .items.image-align-stagger>article.item.has-image:nth-child(2n)>section.content,.listcomponent .items>section.content{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;margin-right:1rem}}.mediacomponent figure{width:100%;margin-bottom:0}.mediacomponent figure>figcaption>p:last-child{margin-bottom:0}.mediacomponent a.text{display:block}.mediacomponent a.text:hover{text-decoration:none}.mediacomponent a.text:hover span{text-decoration:underline}.mediacomponent a.text>i.fa{color:#868e96}.mediacomponent a.image{display:block}.mediacomponent a.image+a.text{margin-top:.5rem}.mediacomponent .rich>iframe{margin:0!important}.mediacomponent .video{width:100%;height:0;display:block;position:relative}.mediacomponent .video.four-three{padding-bottom:75%}.mediacomponent .video.sixteen-nine{padding-bottom:56.25%}.mediacomponent .video>iframe{top:0;left:0;border:0;width:100%;height:100%;position:absolute}.pagecomponent.page-title-hidden .content-container>article>header{display:none}.pagecomponent .content-container>article>div{margin-bottom:1rem}.scrolltotopbutton{opacity:0;outline:0;right:1rem;bottom:1rem;width:4rem;height:4rem;z-index:1000;position:fixed;display:block;overflow:hidden;visibility:hidden;white-space:nowrap;text-align:center;font-size:16px;line-height:4rem;-webkit-box-shadow:0 0 20px rgba(0,0,0,.2);box-shadow:0 0 20px rgba(0,0,0,.2);-webkit-transition:opacity .3s 0s,visibility 0s .3s,color .15s ease-in-out 0s,background-color .15s ease-in-out 0s;transition:opacity .3s 0s,visibility 0s .3s,color .15s ease-in-out 0s,background-color .15s ease-in-out 0s}.scrolltotopbutton.is-visible{opacity:1;visibility:visible}.scrolltotopbutton.fade-out{opacity:.5}.scrolltotopbutton:hover{opacity:1}@media (min-width:768px){.scrolltotopbutton{width:5rem;height:5rem;right:2rem;bottom:2rem;line-height:5rem}}@media (min-width:992px){.scrolltotopbutton{width:6rem;height:6rem;font-size:20px;line-height:6rem}}.tilecomponent .items{-webkit-box-orient:horizontal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.tilecomponent .items,.tilecomponent .items>article.item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.tilecomponent .items>article.item{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1 100%;flex:1 100%;padding:2%}.tilecomponent .items>article.item>section.content{margin-top:auto}.tilecomponent .items>article.item>section.content div.details>span{display:block;margin-right:0;margin-bottom:.25rem}@media (min-width:576px){.tilecomponent .items>article.item{-webkit-box-flex:1;-ms-flex:1 50%;flex:1 50%}}@media (min-width:768px){.tilecomponent .items>article.item{-webkit-box-flex:1;-ms-flex:1 33.3%;flex:1 33.3%}}@media (min-width:992px){.tilecomponent .items>article.item{-webkit-box-flex:1;-ms-flex:1 25%;flex:1 25%}}div.detail-fields a{color:inherit}div.detail-fields>ul{margin:0;padding:0;list-style:none}div.detail-fields>ul>li>dl,div.detail-fields>ul>li>dl>dd{margin:0;padding:0}div.detail-fields.block>ul>li{margin-bottom:1rem}div.detail-fields.block>ul>li dl dt{font-size:1rem;font-weight:500}div.detail-fields.block>ul>li dl dd{font-size:.9rem}div.detail-fields.inline>ul>li{color:#868e96;display:inline-block;margin-right:.5rem}div.detail-fields.inline>ul>li dl dd,div.detail-fields.inline>ul>li dl dt{display:inline-block;font-size:1rem}div.detail-fields.hide-header>header,div.detail-fields.hide-icons>ul>li dl>dt>i,div.detail-fields.hide-names>ul>li dl>dt>span.name{display:none}.component.link{text-decoration:none}.component.link,.component.link>i.fa{display:inline-block}.component.link:active,.component.link:focus,.component.link:hover{text-decoration:none}.show-icons.hide-text .component.link{overflow:hidden;text-align:center;-webkit-transition:color .15s ease-in-out 0s,background-color .15s ease-in-out 0s,border-color .15s ease-in-out 0s;transition:color .15s ease-in-out 0s,background-color .15s ease-in-out 0s,border-color .15s ease-in-out 0s}.show-icons.hide-text .component.link>i.fa{display:block}.show-icons.hide-text .component.link.size-16{width:16px;height:16px;font-size:8px;line-height:16px}.show-icons.hide-text .component.link.size-16>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-24{width:24px;height:24px;font-size:12px;line-height:24px}.show-icons.hide-text .component.link.size-24>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-32{width:32px;height:32px;font-size:16px;line-height:32px}.show-icons.hide-text .component.link.size-32>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-48{width:48px;height:48px;font-size:24px;line-height:48px}.show-icons.hide-text .component.link.size-48>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-64{width:64px;height:64px;font-size:32px;line-height:64px}.show-icons.hide-text .component.link.size-64>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-96{width:96px;height:96px;font-size:48px;line-height:96px}.show-icons.hide-text .component.link.size-96>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.show-icons.hide-text .component.link.size-128{width:128px;height:128px;font-size:64px;line-height:128px}.show-icons.hide-text .component.link.size-128>i.fa{top:50%;position:relative;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.hide-icons .component.link>i.fa,.hide-text .component.link>span.text{display:none}.component.slide .slide-caption.title-after>h1,.component.slide .slide-caption.title-after>h2,.component.slide .slide-caption.title-after>h3,.component.slide .slide-caption.title-after>h4,.component.slide .slide-caption.title-after>h5,.component.slide .slide-caption.title-after>h6{margin-bottom:0} \ No newline at end of file diff --git a/client/src/styles/bundle.scss b/client/src/styles/bundle.scss index 41909ca..f0033bb 100644 --- a/client/src/styles/bundle.scss +++ b/client/src/styles/bundle.scss @@ -35,3 +35,4 @@ // Import Model Styles: @import "model/Link"; +@import "model/Slide"; diff --git a/client/src/styles/model/Slide.scss b/client/src/styles/model/Slide.scss new file mode 100644 index 0000000..97f41e9 --- /dev/null +++ b/client/src/styles/model/Slide.scss @@ -0,0 +1,14 @@ +/* Slide Styles +===================================================================================================================== */ + +.component.slide { + + .slide-caption.title-after { + + > h1, > h2, > h3, > h4, > h5, > h6 { + margin-bottom: 0; + } + + } + +} diff --git a/src/Lists/ListSourceSlide.php b/src/Lists/ListSourceSlide.php index 92e5f4f..5cee3e7 100644 --- a/src/Lists/ListSourceSlide.php +++ b/src/Lists/ListSourceSlide.php @@ -161,7 +161,8 @@ protected function createSlide(ViewableData $item) 'ParentID' => $this->ParentID, 'HideImage' => $this->HideImage, 'HideTitle' => $this->HideTitle, - 'HideCaption' => $this->HideCaption + 'HideCaption' => $this->HideCaption, + 'TitleAfterCaption' => $this->TitleAfterCaption ]); // Define Slide Link: diff --git a/src/Model/Slide.php b/src/Model/Slide.php index aec1752..ab7334c 100644 --- a/src/Model/Slide.php +++ b/src/Model/Slide.php @@ -100,7 +100,8 @@ class Slide extends Component 'HideImage' => 'Boolean', 'HideTitle' => 'Boolean', 'HideCaption' => 'Boolean', - 'LinkDisabled' => 'Boolean' + 'LinkDisabled' => 'Boolean', + 'TitleAfterCaption' => 'Boolean' ]; /** @@ -143,7 +144,8 @@ class Slide extends Component 'HideImage' => 0, 'HideTitle' => 1, 'HideCaption' => 0, - 'LinkDisabled' => 0 + 'LinkDisabled' => 0, + 'TitleAfterCaption' => 0 ]; /** @@ -226,6 +228,10 @@ public function getCMSFields() CheckboxField::create( 'LinkDisabled', $this->fieldLabel('LinkDisabled') + ), + CheckboxField::create( + 'TitleAfterCaption', + $this->fieldLabel('TitleAfterCaption') ) ]); @@ -260,6 +266,7 @@ public function fieldLabels($includerelations = true) $labels['HideTitle'] = _t(__CLASS__ . '.HIDETITLE', 'Hide title'); $labels['HideCaption'] = _t(__CLASS__ . '.HIDECAPTION', 'Hide caption'); $labels['LinkDisabled'] = _t(__CLASS__ . '.LINKDISABLED', 'Link disabled'); + $labels['TitleAfterCaption'] = _t(__CLASS__ . '.SHOWTITLEAFTERCAPTION', 'Show title after caption'); // Define Relation Labels: @@ -371,7 +378,7 @@ public function getSlideClass($isFirst = false, $isMiddle = false, $isLast = fal */ public function getSlideClassNames($isFirst = false, $isMiddle = false, $isLast = false) { - $classes = ViewTools::singleton()->getAncestorClassNames($this, self::class); + $classes = parent::getClassNames(); $classes[] = $this->ImageShown ? 'has-image' : 'no-image'; @@ -425,6 +432,10 @@ public function getCaptionClassNames() $classes = array_merge($classes, $this->getParent()->getCaptionClassNames($this)); } + if ($this->TitleAfterCaption) { + $classes[] = 'title-after'; + } + $this->extend('updateCaptionClassNames', $classes); return $classes; @@ -562,6 +573,26 @@ public function getTitleShown() return ($this->Title && !$this->HideTitle); } + /** + * Answers true if the slide title is to be shown before the caption. + * + * @return boolean + */ + public function getTitleShownBeforeCaption() + { + return ($this->TitleShown && !$this->TitleAfterCaption); + } + + /** + * Answers true if the slide title is to be shown after the caption. + * + * @return boolean + */ + public function getTitleShownAfterCaption() + { + return ($this->TitleShown && $this->TitleAfterCaption); + } + /** * Answers true if the slide caption is to be shown. * diff --git a/templates/SilverWare/Model/Slide.ss b/templates/SilverWare/Model/Slide.ss index 6d134bf..8a3fb7a 100644 --- a/templates/SilverWare/Model/Slide.ss +++ b/templates/SilverWare/Model/Slide.ss @@ -5,12 +5,15 @@ <% end_if %> <% if $TitleOrCaptionShown %>
- <% if $TitleShown %> + <% if $TitleShownBeforeCaption %> <{$HeadingTag}>{$FontIconTag}{$Title} <% end_if %> <% if $CaptionShown %> $Caption <% end_if %> + <% if $TitleShownAfterCaption %> + <{$HeadingTag}>{$FontIconTag}{$Title} + <% end_if %>
<% end_if %> <% if $LinkShown %><% end_if %>