summaryrefslogtreecommitdiff
path: root/color
diff options
context:
space:
mode:
authorsanjeevi012019-07-05 15:30:52 +0530
committersanjeevi012019-07-05 15:33:36 +0530
commit85a9d81638d240f3fa9ed01cb139ef33243b379b (patch)
tree5de2a278bd0b3e8c979defa73b24470a56055a3c /color
parente5a79b1f0f70eb0bc413c5b85139617dbe84b07d (diff)
downloadfossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.tar.gz
fossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.tar.bz2
fossee_istos-85a9d81638d240f3fa9ed01cb139ef33243b379b.zip
Initial commit
Diffstat (limited to 'color')
-rwxr-xr-xcolor/color.inc78
-rwxr-xr-xcolor/preview.css230
-rwxr-xr-xcolor/preview.html59
-rwxr-xr-xcolor/preview.js31
4 files changed, 398 insertions, 0 deletions
diff --git a/color/color.inc b/color/color.inc
new file mode 100755
index 0000000..b67fd57
--- /dev/null
+++ b/color/color.inc
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * @file
+ * Lists available colors and color schemes for the Fossee theme.
+ */
+
+$info = [
+ // Available colors and color labels used in theme.
+ 'fields' => [
+ 'topnav' => t('Header and Footer Text color'),
+ 'footer' => t('Header and Footer background'),
+ 'top' => t('Navbar background'),
+ 'nav-text' => t('Navbar text'),
+ 'nav-hover' => t('Navbar hover'),
+ 'main' => t('Main background'),
+ 'bg' => t('Text background'),
+ 'sidebar' => t('Sidebar background'),
+ 'text' => t('Default Text color'),
+ 'link' => t('Link color'),
+
+ ],
+ // Pre-defined color schemes.
+ 'schemes' => [
+ 'default' => [
+ 'title' => t('Fossee (default)'),
+ 'colors' => [
+ 'topnav' => '#ffffff',
+ 'footer' => '#444444',
+ 'top' => '#3498db',
+ 'nav-text' => '#000000',
+ 'nav-hover' => '#ebe1ce',
+ 'main' => '#fffacd',
+ 'bg' => '#e0ffff',
+ 'sidebar' => '#f6f6f2',
+ 'text' => '#343536',
+ 'link' => '#337ab7',
+ ],
+ ],
+ ],
+
+
+ // CSS files (excluding @import) to rewrite with new color scheme.
+ 'css' => [
+ 'css/colors.css',
+ ],
+
+ // Files to copy.
+ 'copy' => [
+ 'logo.png',
+ ],
+
+ // Gradient definitions.
+ 'gradients' => [
+ [
+ // (x, y, width, height).
+ 'dimension' => [0, 0, 0, 0],
+ // Direction of gradient ('vertical' or 'horizontal').
+ 'direction' => 'vertical',
+ // Keys of colors to use for the gradient.
+ 'colors' => ['top', 'bottom'],
+ ],
+ ],
+
+ // Preview files.
+ 'preview_library' => 'fossee_istos/color.preview',
+ 'preview_html' => 'color/preview.html',
+
+ // Attachments.
+ '#attached' => [
+ 'drupalSettings' => [
+ 'color' => [
+ // Put the logo path into JavaScript for the live preview.
+ 'logo' => theme_get_setting('logo.url', 'fossee_istos'),
+ ],
+ ],
+ ],
+]; \ No newline at end of file
diff --git a/color/preview.css b/color/preview.css
new file mode 100755
index 0000000..996bd39
--- /dev/null
+++ b/color/preview.css
@@ -0,0 +1,230 @@
+/* ---------- Preview Styles ----------- */
+.js .color-preview {
+ clear: both;
+ float: none !important;
+}
+.color-preview {
+ background-color: #fff;
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-size: 14px;
+ line-height: 1.5;
+ overflow: hidden;
+ word-wrap: break-word;
+ margin-bottom: 10px;
+}
+.color-preview-top-head{
+ font-size: 16px;
+ position: relative;
+ padding: 5px;
+}
+
+.color-preview-top-head .brand{
+ font-family: 'Oswald', 'Lucida Sans Unicode','Lucida Grande',sans-serif;
+ font-weight: bold;
+ display: inline-block;
+}
+
+.color-preview-top-head{
+ display: flow-root;
+}
+.color-preview-top-head .social-media i{
+ line-height: 100%;
+ display: inline-block;
+ padding: 4px 8px;
+}
+
+.color-preview-header {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ position: relative;
+ background-color: #f8f8f8;
+ border-color: #e7e7e7;
+}
+
+.color-preview-logo {
+ float: left;
+ padding: 15px;
+}
+.color-preview-site-name {
+ font-weight: normal;
+ font-size: 1.821em;
+ line-height: 1;
+ margin-bottom: 30px;
+ margin-left: 15px; /* LTR */
+ padding-top: 34px;
+}
+[dir="rtl"] .color-preview-site-name {
+ margin-left: 0;
+ margin-right: 15px;
+}
+.color-preview-main-menu {
+ clear: both;
+ padding: 0 15px 15px;
+}
+.color-preview-main-menu-links a {
+ /*color: #d9d9d9;*/
+ padding: 0.6em 0.65em 0.4em;
+ font-weight: bold;
+}
+.color-preview-main-menu-links {
+ font-size: 0.929em;
+ margin: 0;
+ padding: 0;
+}
+/*.color-preview-main-menu-links a {
+ color: #333;
+ background: #ccc;
+ background: rgba(255, 255, 255, 0.7);
+ text-shadow: 0 1px #eee;
+ border-top-left-radius: 8px;
+ border-top-right-radius: 8px;
+}*/
+.color-preview-main-menu-links a:hover,
+.color-preview-main-menu-links a:focus {
+ text-decoration: none;
+ cursor: pointer;
+}
+.color-preview-main-menu-links li a.is-active {
+ /* background: #fff; */
+ border-bottom: none;
+}
+.color-preview-main-menu-links li {
+ display: inline;
+ list-style-type: none;
+ padding: 0.6em 0 0.4em;
+}
+.color-preview-sidebar,
+.color-preview-content {
+ display: inline;
+ float: left; /* LTR */
+ position: relative;
+}
+[dir="rtl"] .color-preview-sidebar,
+[dir="rtl"] .color-preview-content {
+ float: right;
+}
+.color-preview-sidebar {
+ margin-left: 15px; /* LTR */
+ width: 210px;
+}
+[dir="rtl"] .color-preview-sidebar {
+ margin-left: 0;
+ margin-right: 15px;
+}
+.color-preview-content {
+ margin-left: 30px; /* LTR */
+ width: 26.5em;
+}
+[dir="rtl"] .color-preview-content {
+ margin-left: 0;
+ margin-right: 30px;
+}
+.color-preview-sidebar .preview-block {
+ border: 1px solid;
+ margin: 20px 0;
+ padding: 15px 20px;
+}
+.color-preview-sidebar h2 {
+ border-bottom: 1px solid #d6d6d6;
+ font-weight: normal;
+ margin-top: 0;
+ margin-right: 0;
+ margin-left: 0;
+ padding-bottom: 5px;
+ text-shadow: 0 1px 0 #fff;
+}
+.color-preview .preview-block .preview-content {
+ margin-top: 1em;
+}
+.color-preview .preview-block-menu .preview-content,
+.color-preview .preview-block-menu .preview-content ul {
+ margin-top: 0;
+}
+.color-preview-main {
+ padding-bottom: 40px;
+ padding-top: 20px;
+}
+.color-preview-page-title {
+ font-size: 2em;
+ font-weight: normal;
+ line-height: 1;
+ margin: 1em 0 0.5em;
+}
+.color-preview-footer-wrapper {
+ color: #c0c0c0;
+ color: rgba(255, 255, 255, 0.65);
+ display: block !important;
+ font-size: 0.857em;
+ padding: 20px 20px 25px;
+}
+.color-preview-footer-wrapper a {
+ color: #fcfcfc;
+ color: rgba(255, 255, 255, 0.8);
+}
+.color-preview-footer-wrapper a:hover,
+.color-preview-footer-wrapper a:focus {
+ color: #fefefe;
+ color: rgba(255, 255, 255, 0.95);
+ text-decoration: underline;
+}
+.color-preview-footer-wrapper .preview-footer-column {
+ display: inline;
+ float: left; /* LTR */
+ padding: 0 10px;
+ position: relative;
+ width: 220px;
+}
+[dir="rtl"] .color-preview-footer-wrapper .preview-footer-column {
+ float: right;
+}
+.color-preview-footer-wrapper .preview-block {
+ border: 1px solid #444;
+ border-color: rgba(255, 255, 255, 0.1);
+ margin: 20px 0;
+ padding: 10px;
+}
+.color-preview-footer-columns .preview-block-menu {
+ border: none;
+ margin: 0;
+ padding: 0;
+}
+.color-preview-footer-columns h2 {
+ border-bottom: 1px solid #555;
+ border-color: rgba(255, 255, 255, 0.15);
+ padding-bottom: 3px;
+ text-transform: uppercase;
+}
+.color-preview-footer-columns .preview-content {
+ margin-top: 0;
+}
+.color-preview-footer-columns .preview-content ul {
+ margin-left: 0; /* LTR */
+ padding-left: 0; /* LTR */
+}
+[dir="rtl"] .color-preview-footer-columns .preview-content ul {
+ margin-right: 0;
+ padding-right: 0;
+}
+.color-preview-footer-columns .preview-content li {
+ list-style: none;
+ list-style-image: none;
+ margin: 0;
+ padding: 0;
+}
+.color-preview-footer-columns .preview-content li a {
+ border-bottom: 1px solid #555;
+ border-color: rgba(255, 255, 255, 0.15);
+ display: block;
+ line-height: 1.2;
+ padding: 0.8em 2px 0.8em 20px; /* LTR */
+ text-indent: -15px;
+}
+[dir="rtl"] .color-preview-footer-columns .preview-content li a {
+ padding-left: 2px;
+ padding-right: 20px;
+}
+.color-preview-footer-columns .preview-content li a:hover,
+.color-preview-footer-columns .preview-content li a:focus {
+ background-color: #1f1f21;
+ background-color: rgba(255, 255, 255, 0.05);
+ text-decoration: none;
+}
diff --git a/color/preview.html b/color/preview.html
new file mode 100755
index 0000000..92f6b02
--- /dev/null
+++ b/color/preview.html
@@ -0,0 +1,59 @@
+
+<div class="color-preview">
+
+ <div class="color-preview-top-head">
+ <div class="color-preview-logo"><img src="../../../core/themes/bartik/logo.svg" alt="Site Logo" /></div>
+ <div class="brand">fossee</div>
+ </div>
+
+ <div class="color-preview-main-menu">
+ <ul class="color-preview-main-menu-links">
+ <li><a>Home</a></li>
+ <li><a>menu-item-1</a></li>
+ <li><a>menu-item-2</a></li>
+ </ul>
+ </div>
+
+ <div class="color-preview-main clearfix">
+ <div class="color-preview-sidebar">
+ <div class="color-preview-block preview-block">
+ <h2>Sidebar</h2>
+ <div class="preview-content">
+ <ul>
+ <li><a href="#">List item 1</a></li>
+ <li><a href="#">List item 2</a></li>
+ <li><a href="#">List item 3</a></li>
+ <li><a href="#">List item 4</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="color-preview-content">
+ <h1 class="color-preview-page-title">Lorem ipsum dolor</h1>
+ <div class="color-preview-node">
+ <div class="preview-content">
+ Sit amet, <a>consectetur adipisicing elit</a>, sed do eiusmod tempor
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
+ nostrud <a>exercitation ullamco</a> laboris nisi ut aliquip ex ea
+ commodo consequat. Maecenas id porttitor Ut enim ad minim veniam, quis nostr udfelis.
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="color-preview-footer-wrapper">
+ <div class="color-preview-footer-columns clearfix">
+ <div class="preview-footer-column">
+ <div class="preview-block">
+ <h2>Footer</h2>
+ <div class="content">
+ Maecenas id porttitor Ut enim ad minim veniam, quis nostrudfelis.
+ Laboris nisi ut aliquip ex ea.
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+</div>
diff --git a/color/preview.js b/color/preview.js
new file mode 100755
index 0000000..c5b2aa9
--- /dev/null
+++ b/color/preview.js
@@ -0,0 +1,31 @@
+/**
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
+
+(function ($, Drupal, drupalSettings) {
+ Drupal.color = {
+ logoChanged: false,
+ bgChanged: false,
+ callback: function callback(context, settings, $form) {
+
+ var $colorPreview = $form.find('.color-preview');
+ var $colorPalette = $form.find('.js-color-palette');
+
+
+ $colorPreview.find('.color-preview-top-head *, .color-preview-footer-wrapper *').css('color', $colorPalette.find('input[name="palette[topnav]"]').val());
+ $colorPreview.find('.color-preview-footer-wrapper, .color-preview-top-head').css('background-color', $colorPalette.find('input[name="palette[footer]"]').val());
+ $colorPreview.find('.color-preview-main h2, .color-preview .preview-content, .color-preview-content h1, .preview-content ').css('color', $colorPalette.find('input[name="palette[text]"]').val());
+ $colorPreview.find('.color-preview-content a, .color-preview-main-menu-links a, .color-preview-main-menu-links a:hover').css('color', $colorPalette.find('input[name="palette[link]"]').val());
+ $colorPreview.find('.color-preview-site-name').css('color', $colorPalette.find('input[name="palette[footer]"]').val());
+ $colorPreview.find('.color-preview-main-menu').css('background-color', $colorPalette.find('input[name="palette[top]"]').val());
+ $colorPreview.find('.color-preview-main-menu-links li a').css('color', $colorPalette.find('input[name="palette[nav-text]"]').val());
+ $colorPreview.find('.color-preview-block ').css('background-color', $colorPalette.find('input[name="palette[sidebar]"]').val());
+ $colorPreview.find('.color-preview-main').css('background-color', $colorPalette.find('input[name="palette[bg]"]').val());
+ $colorPreview.find('.color-preview-main-menu-links li a:hover,.color-preview-main-menu-links li a:focus').css('background-color', $colorPalette.find('input[name="palette[nav-hover]"]').val());
+
+ }
+ };
+})(jQuery, Drupal, drupalSettings); \ No newline at end of file