Commits

Max Bronsema committed b38615f Merge

Merged in bronsem/cstpanel (pull request #53)

The homepage panel for CST

Comments (0)

Files changed (4)

layouts/clean-cst/clean-cst.inc

+<?php
+
+// Plugin definition
+$plugin = array(
+  'title' => t('Clean CST'),
+  'category' => t('Western'),
+  'icon' => 'clean-cst.png',
+  'theme' => 'clean-cst',
+  'css' => '../../css/panel-layouts/clean-cst.css',
+  'regions' => array(
+    'top' => t('Top'),
+    'middle_left' => t('Middle Left'),
+    'middle_center' => t('Middle Center'),
+    'middle_right' => t('Middle Right')
+  ),
+);

layouts/clean-cst/clean-cst.png

Added
New image

layouts/clean-cst/clean-cst.tpl.php

+<?php
+/**
+ * @file
+ * Template for a Clean CST panel layout.
+ *
+ * This template provides a single top row with three columns below that top row.
+ *
+ *
+ * Variables:
+ * - $id: An optional CSS id to use for the layout.
+ * - $content: An array of content, each item in the array is keyed to one
+ *   panel of the layout.
+ */
+?>
+
+<div class="clean-cst-top" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>>
+	<?php print $content['top']; ?>
+</div>
+
+<div class="clean-cst-middle-left" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>>
+  <?php print $content['middle_left']; ?>
+</div>
+
+<div class="clean-cst-middle-center" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>>
+  <?php print $content['middle_center']; ?>
+</div>
+
+<div class="clean-cst-middle-right" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>>
+  <?php print $content['middle_right']; ?>
+</div>

sass/panel-layouts/clean-cst.scss

+/**
+* These are the layout styles for the clean-cst panel.
+*/
+@import "base";
+@import "compass";
+@import "zen";
+
+$box-sizing-polyfill-path: "/sites/all/themes/wwuzen/js/boxsizing.htc";
+
+$zen-column-count:  12;
+$zen-gutter-width:  1.25em;
+$zen-auto-include-item-base: false;
+
+$gray: rgba(151,151,151,1);
+
+.front .page-title { display:none; }
+
+
+main p.callOut {
+  color:$wwuLtblue;
+  font-size:1.25em;
+}
+
+
+/* ****************************************************
+                Small-size -> 550px
+**************************************************** */
+
+@media all and (max-width:550px) {
+  $zen-column-count: 1;
+
+  .clean-cst-top,
+  .clean-cst-middle-left,
+  .clean-cst-middle-center,
+  .clean-cst-middle-right {
+    @include zen-grid-item(1,1);
+    @include zen-clear();
+    margin:0 auto;
+    display:block;
+  }
+
+  // Center aligns images until they are turned into straight CSS
+  .clean-cst-top,
+  .clean-cst-middle-left,
+  .clean-cst-middle-center,
+  .clean-cst-middle-right {
+      text-align:center;
+  }
+}
+
+
+/* ****************************************************
+            Medium-size 551px <-> 800px
+**************************************************** */
+
+@media all and (min-width: 551px) and (max-width: 800px) {
+  $zen-column-count: 3;
+
+  .clean-cst-top {
+    @include zen-grid-item(3,1);
+    @include zen-float(none);
+  }
+
+  .clean-cst-middle-left { // Dean's Lecture Series
+    @include zen-grid-item(.9,1);
+  }
+
+  .clean-cst-middle-center { // Slideshow
+    @include zen-grid-item(.9,2);
+  }
+  .clean-cst-middle-right { // About the college
+    @include zen-grid-item(.9,3);
+  }
+
+}
+
+/* ****************************************************
+                Screen 801px ->
+**************************************************** */
+
+@media all and (min-width:801px) {
+  $zen-column-count: 12;
+
+  .clean-cst-top { // Intro text
+    @include zen-grid-item(12,1);
+  }
+  .clean-cst-middle-left { // Dean's Lecture Series
+    @include zen-grid-item(3.8,1);
+    @include zen-clear(both);
+  }
+  .clean-cst-middle-center { // Slideshow
+    @include zen-grid-item(3.8,5);
+  }
+  .clean-cst-middle-right { // About the college
+    @include zen-grid-item(3.9,9);
+  }
+}
+
+// /////////////////////////////////////////////
+//        Styling for panel editor view
+
+#page-manager-edit {
+  .clean-cst-top,
+  .clean-cst-middle-left,
+  .clean-cst-middle-center,
+  .clean-cst-middle-right,
+  .clean-cst-bottom-left,
+  .clean-cst-bottom-right {
+    display:inline-block;
+  }
+  .clean-cst-top {
+    width:100%;
+  }
+
+  .clean-cst-middle-left {
+    margin:1% .5% 1% 0;
+    width:33%;
+  }
+
+  .clean-cst-middle-center {
+    margin:1% .5% 1% 0;
+    width:33%;
+  }
+
+  .clean-cst-middle-right {
+    margin:1% 0 1% 0;
+    width:33%;
+  }
+
+}
+#edit-buttons {
+  clear:both;
+  width:100%;
+}