X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl-cms.git;a=blobdiff_plain;f=style.styl;h=c883c706c09ab288f161d41f80865160e6ac782d;hp=140571a91f759b0177ad5382a2fcc5c5cb6b46bd;hb=829a67d41aacdf529455c0f315665c407ad5d35b;hpb=6dd4794cb652ed15a8d3867f58f422bce1a313d3 diff --git a/style.styl b/style.styl index 140571a..c883c70 100644 --- a/style.styl +++ b/style.styl @@ -61,6 +61,8 @@ columns = wfpl_columns({ } }) +biggest_content_width = columns['widths']['.centerer.full > .main'] + hide_in_one_column_mode = { ".centerer.with_sidebar > .sidebar.plain": 1 ".centerer.with_sidebar > .sidebar.bordered": 1 @@ -205,31 +207,29 @@ body font: font_size_normal Arimo, Arial, sans-serif // call this for each ckeditor on each page -ckeditor(basename, element_name, width) +ckeditor_elements_already = {} +ckeditor(basename, element_name, body_id, width) // ckeditor ui, including border around wysiwyg area - #{basename}_body #cke_{element_name} - margin-left: -15px - if width < 650px - width: 680px - else - width: width + 30px + unless element_name in ckeditor_elements_already + ckeditor_elements_already[element_name] = 1 + #{basename}_body #cke_{element_name} + width: biggest_content_width + 30px + margin-right: -30px // body tag of the wysiwyg area - #{basename}_wysiwyg_{element_name} + #{basename}_wysiwyg_{body_id} background: content_bg width: width margin: 0 auto - if width <= 600px - min-width: 0 - width: width - margin: 0 auto - border-right: 20px solid #eee - border-left: 20px solid #eee - border-top: 1px solid #eee - border-bottom: 1px solid #eee - min-height: 250px + min-width: 0 + width: width + margin: 0 auto + border: 5px solid #eee + min-height: 50px -// FIXME fix this for layouts -ckeditor('admin_pages', 'content', columns.width) +ckeditor('admin_pages', 'content', 'content_full_main', columns['widths']['.centerer.full > .main']) +ckeditor('admin_pages', 'content', 'content_with_sidebar_main', columns['widths']['.centerer.with_sidebar > .main']) +ckeditor('admin_pages', 'sidebar_content', 'content_with_sidebar_sidebar_plain', columns['widths']['.centerer.with_sidebar > .sidebar.plain']) +ckeditor('admin_pages', 'sidebar_content', 'content_with_sidebar_sidebar_bordered', columns['widths']['.centerer.with_sidebar > .sidebar.bordered']) // outermost div for centering, shadow, etc #centerer @@ -412,7 +412,7 @@ for selector, css in columns.css for selector, css in columns.responsive_css body > {selector} {css} - + // as big as it can be body > .centerer width: auto