diff --git a/admin/client/dist/images/icons/TaglineComponent.png b/admin/client/dist/images/icons/TaglineComponent.png new file mode 100644 index 0000000..7ec902f Binary files /dev/null and b/admin/client/dist/images/icons/TaglineComponent.png differ diff --git a/admin/client/dist/styles/preview.css b/admin/client/dist/styles/preview.css index 6443a48..4309858 100644 --- a/admin/client/dist/styles/preview.css +++ b/admin/client/dist/styles/preview.css @@ -1 +1 @@ -.cms-preview-component{overflow:hidden}.cms-preview-component .cms-preview-wrapper{top:0;left:0;right:0;bottom:0;position:absolute}.cms-preview-component .cms-preview-wrapper>header{min-height:53px;padding-left:1.2308rem;white-space:nowrap;font-size:.846rem;background-repeat:repeat;background-position:0 100%;background-color:#f0f2f4;background-image:url(/resources/vendor/silverware/silverware/admin/client/dist/images/cms_content_header.png)}.cms-preview-component .cms-preview-wrapper>header>h1{margin:0;color:#4f5861;font-size:1.2em;font-weight:400;line-height:53px}.cms-preview-component .cms-preview-wrapper>header>h1 i,.cms-preview-component .cms-preview-wrapper>header>h1 span.class{color:#66727d}.cms-preview-component .cms-preview-wrapper>div.component{top:53px;bottom:0;width:100%;height:auto;padding:1.2308rem;overflow-x:hidden;overflow-y:auto;position:absolute;background-color:#f6f7f8}.cms-preview-component .cms-preview-wrapper>div.component>div.preview{background-color:#fff;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)} \ No newline at end of file +.cms-preview-component{overflow:hidden}.cms-preview-component .cms-preview-wrapper{top:0;left:0;right:0;bottom:0;position:absolute}.cms-preview-component .cms-preview-wrapper>header{min-height:53px;padding-left:1.2308rem;white-space:nowrap;font-size:.846rem;background-repeat:repeat;background-position:0 100%;background-color:#f1f3f6;background-image:url(/resources/vendor/silverware/silverware/admin/client/dist/images/cms_content_header.png)}.cms-preview-component .cms-preview-wrapper>header>h1{margin:0;color:#43536d;font-size:1.2em;font-weight:400;line-height:53px}.cms-preview-component .cms-preview-wrapper>header>h1 i,.cms-preview-component .cms-preview-wrapper>header>h1 span.class{color:#66727d}.cms-preview-component .cms-preview-wrapper>div.component{top:53px;bottom:0;width:100%;height:auto;padding:1.2308rem;overflow-x:hidden;overflow-y:auto;position:absolute;background-color:#f6f7f8}.cms-preview-component .cms-preview-wrapper>div.component>div.preview{background-color:#fff;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)} \ No newline at end of file diff --git a/admin/client/src/images/icons/TaglineComponent.png b/admin/client/src/images/icons/TaglineComponent.png new file mode 100644 index 0000000..7ec902f Binary files /dev/null and b/admin/client/src/images/icons/TaglineComponent.png differ diff --git a/admin/client/src/styles/_variables.scss b/admin/client/src/styles/_variables.scss index 38e2f92..d57c3f1 100644 --- a/admin/client/src/styles/_variables.scss +++ b/admin/client/src/styles/_variables.scss @@ -1,3 +1,9 @@ /* SilverWare Admin Variables ===================================================================================================================== */ +$color-darker-bg: #f1f3f6; + +$color-text: #66727d; +$color-text-default: #43536d; + +$tab-panel-texture-color: #f6f7f8; diff --git a/admin/client/src/styles/bundle.scss b/admin/client/src/styles/bundle.scss index 1bf754f..677fcbf 100644 --- a/admin/client/src/styles/bundle.scss +++ b/admin/client/src/styles/bundle.scss @@ -4,7 +4,7 @@ // Import SilverStripe Admin Styles: @import "~silverstripe-admin/styles/variables"; -@import "~silverstripe-admin/styles/legacy/themes/default"; +//@import "~silverstripe-admin/styles/legacy/themes/default"; // Import Local Variables: diff --git a/admin/client/src/styles/preview.scss b/admin/client/src/styles/preview.scss index 47b5c62..0d9d02f 100644 --- a/admin/client/src/styles/preview.scss +++ b/admin/client/src/styles/preview.scss @@ -4,7 +4,7 @@ // Import SilverStripe Admin Styles: @import "~silverstripe-admin/styles/variables"; -@import "~silverstripe-admin/styles/legacy/themes/default"; +//@import "~silverstripe-admin/styles/legacy/themes/default"; // Import Local Variables: diff --git a/src/Components/TaglineComponent.php b/src/Components/TaglineComponent.php new file mode 100644 index 0000000..6ad70f1 --- /dev/null +++ b/src/Components/TaglineComponent.php @@ -0,0 +1,158 @@ +=5.6.0 + * + * For full copyright and license information, please view the + * LICENSE.md file that was distributed with this source code. + * + * @package SilverWare\Components + * @author Colin Tucker + * @copyright 2018 Praxis Interactive + * @license https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause + * @link https://github.com/praxisnetau/silverware + */ + +namespace SilverWare\Components; + +/** + * An extension of the base component class for a tagline component. + * + * @package SilverWare\Components + * @author Colin Tucker + * @copyright 2018 Praxis Interactive + * @license https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause + * @link https://github.com/praxisnetau/silverware + */ +class TaglineComponent extends BaseComponent +{ + /** + * Human-readable singular name. + * + * @var string + * @config + */ + private static $singular_name = 'Tagline Component'; + + /** + * Human-readable plural name. + * + * @var string + * @config + */ + private static $plural_name = 'Tagline Components'; + + /** + * Description of this object. + * + * @var string + * @config + */ + private static $description = 'A component which shows the tagline of the site'; + + /** + * Icon file for this object. + * + * @var string + * @config + */ + private static $icon = 'silverware/silverware: admin/client/dist/images/icons/TaglineComponent.png'; + + /** + * Defines the table name to use for this object. + * + * @var string + * @config + */ + private static $table_name = 'SilverWare_TaglineComponent'; + + /** + * Defines an ancestor class to hide from the admin interface. + * + * @var string + * @config + */ + private static $hide_ancestor = BaseComponent::class; + + /** + * Defines the extension classes to apply to this object. + * + * @var array + * @config + */ + private static $extensions = [ + AlignmentStyle::class + ]; + + /** + * Defines the allowed children for this object. + * + * @var array|string + * @config + */ + private static $allowed_children = 'none'; + + /** + * Defines the default classes to use when rendering this object. + * + * @var array + * @config + */ + private static $default_classes = [ + 'typography' + ]; + + /** + * Defines the default title level to use. + * + * @var array + * @config + */ + private static $title_level_default = 'h2'; + + /** + * Answers a list of field objects for the CMS interface. + * + * @return FieldList + */ + public function getCMSFields() + { + // Obtain Field Objects (from parent): + + $fields = parent::getCMSFields(); + + // Remove Field Objects: + + $fields->removeFieldFromTab('Root.Options', 'TitleOptions'); + + // Answer Field Objects: + + return $fields; + } + + /** + * Overrides the parent method so style extensions can add classes to the component class names. + * + * @return array + */ + public function getClassNames() + { + $classes = parent::getClassNames(); + + $this->extend('updateContentClassNames', $classes); + + return $classes; + } + + /** + * Answers the title of the component for the template. + * + * @return string + */ + public function getTitleText() + { + return $this->getSiteConfig()->Tagline; + } +}