Browse Source

Style fixes

Markus Ochel 12 years ago
parent
commit
9ca52be745

+ 12 - 1
admin/static/css/common.styl

@@ -95,6 +95,14 @@ img
   display: inline-block
   border: 0
 
+  &.left
+    float: left
+    margin: 0 1em 0.5em 0
+
+  &.right
+    float: right
+    margin: 0 0 0.5em 1em
+
 input[type='text'],
 input[type='password'],
 input[type='search'],
@@ -160,5 +168,8 @@ button, .button
 ::-webkit-input-placeholder
   color: #e3e3e3
 
+.clear:
+  clear: both
+
 .clearfix
-  clearfix()
+  clearfix()

+ 13 - 1
admin/static/css/theme.styl

@@ -483,7 +483,10 @@ span.label
             right: auto
             width: 48%
 
-        button.fullscreen-button,
+          textarea[name='intro']
+            display: none
+
+        button.fullscreen-button
         .markdown-help:first-of-type
           position: fixed
           top: 10px
@@ -638,6 +641,15 @@ ul.ui-multi-select
     padding: 20px
     overflow: auto
 
+    h3, h4
+      margin: 1em 0
+
+    ol, ul
+      margin: 0 0.8em
+      
+    a
+      font-weight: $boldFont
+
 .ui-help
   position: absolute
   top: 15%

+ 1 - 0
admin/templates/essays.html

@@ -9,6 +9,7 @@
     <li>
       <div class="actions">
         {{#unless published}}<div><strong>In Draft</strong></div>{{/unless}}
+        {{#unless collections}}<div>No Collections</div>{{/unless}}
       </div>
       <a href="#/essay/{{id}}">{{title}}</a>
       <div class="meta">

+ 5 - 1
site/lib/app.coffee

@@ -21,6 +21,7 @@ setupNavMenus = ->
   $mainNav = $('.main-nav')
   $mainNavIcon = $mainNav.find('> .icon')
   $mainNavList = $mainNav.find('> ul')
+  $mainNavSearchInput = $mainNav.find('.search-box input')
   
   $tocNav = $('.toc-nav')
   $tocNavIcon = $tocNav.find('> .icon')
@@ -46,12 +47,15 @@ setupNavMenus = ->
     hidePopups($mainNavList)
     $mainNavList.toggle()
 
+  $mainNavSearchInput.on 'click', (e) ->
+    e.stopPropagation()
+
   # Setup the TOC menu
   if $tocNav and $article
     $article.find('h3').each ->
       heading = $(@)
       text = heading.text()
-      headingId = 'TOC-' + text.replace(/[\ \.\?\#\'\"\:\,]/g, '-')
+      headingId = 'TOC-' + text.replace(/[\ \'\"]/g, '-').replace(/[\.\?\#\:\,]/g, '')
       heading.attr('id', headingId)
       $tocNavList.append "<li><a href=\"##{headingId}\">#{text}</a></li>"
 

+ 20 - 5
site/static/css/responsive.styl

@@ -29,8 +29,8 @@
   .site-tagline
     margin-bottom: 2em
 
-  .main-nav,
-  .toc-nav,
+  .main-nav
+  .toc-nav
   .collection-nav
     margin: 4px 4px 0 0
 
@@ -41,15 +41,30 @@
     > .home-block > .photo
       left: -14px
 
+    .body
+
+      img
+        display: block
+        margin: 1em auto
+
+        &.left, &.right
+          float: none
+          margin: 1em auto
+
 // Odd one
 @media (max-width: 650px)
 
-  .toc-nav,
+  .toc-nav
   .collection-nav
     display: none
   
   article
     
+    .body
+
+      img
+        max-width: 300px
+    
     .sponsor
       float: none
       width: 100%
@@ -89,8 +104,8 @@
   .site-tagline
     margin-bottom: 2.5em
 
-  .main-nav,
-  .toc-nav,
+  .main-nav
+  .toc-nav
   .collection-nav
     margin: 8px 8px 0 0
 

+ 2 - 2
site/static/css/setup-theme.styl

@@ -33,8 +33,8 @@ setupTheme($primaryColor = $blueColor, $secondaryColor = $lightGrey, $linkColor
   .site-promo
     color: $primaryColor
 
-  .main-nav,
-  .toc-nav,
+  .main-nav
+  .toc-nav
   .collection-nav
     .icon
       background: $primaryColor

+ 9 - 13
site/static/css/theme.styl

@@ -33,8 +33,8 @@
   font-size: 1.25em
   font-weight: $boldFont
 
-.main-nav,
-.toc-nav,
+.main-nav
+.toc-nav
 .collection-nav
   position: fixed
   top: 0
@@ -138,7 +138,7 @@
           color: $textColor
           background: #fff
 
-.toc-nav,
+.toc-nav
 .collection-nav
   // see above
   right: 70px
@@ -204,6 +204,12 @@
 
 
 article
+
+  h3, h4
+    margin: 1em 0
+
+  ol, ul
+    margin: 0 0.8em
   
   &.view
     a
@@ -221,9 +227,6 @@ article
       font-size: 0.5em
       margin-left: 0.5em
 
-  h3, h2
-    margin: 1em 0
-
   > .photo
   > .intro > .photo
   > .home-block > .photo
@@ -375,13 +378,6 @@ article.home
 
 article.essay
 
-  .body
-    
-    ol, ul
-      margin: 0 0.8em
-      li
-        // margin-bottom: 0.5em
-
   .meta
     font-size: 0.875em
     line-height: 1.5em