summaryrefslogtreecommitdiff
path: root/color/preview.js
diff options
context:
space:
mode:
authorPrashant S2019-07-26 11:21:31 +0530
committerGitHub2019-07-26 11:21:31 +0530
commitbfb41f58674f7c24bd41e6e6891f0773c3706ddc (patch)
treea407e9cac3242db67394711596835982160b0eaa /color/preview.js
parente5a79b1f0f70eb0bc413c5b85139617dbe84b07d (diff)
parent17bc989bd924aa4682807cf7920abb8558da0006 (diff)
downloadfossee_istos-bfb41f58674f7c24bd41e6e6891f0773c3706ddc.tar.gz
fossee_istos-bfb41f58674f7c24bd41e6e6891f0773c3706ddc.tar.bz2
fossee_istos-bfb41f58674f7c24bd41e6e6891f0773c3706ddc.zip
Merge pull request #1 from sanjeevi01/masterHEADmaster
internship work for new theme for drupal-8.x
Diffstat (limited to 'color/preview.js')
-rwxr-xr-xcolor/preview.js31
1 files changed, 31 insertions, 0 deletions
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