1. Juha Mustonen
  2. digrsser

Commits

Juha Mustonen  committed 84d806b

Increased base font and fixed some styling

  • Participants
  • Parent commits ae0edc8
  • Branches default

Comments (0)

Files changed (7)

File app/digrsser/less/alerts.less

View file
 // Adjust close link position
 .alert .close {
   position: relative;
-  top: -2px;
-  right: -21px;
+  top: -3px;
+  right: -28px;
   line-height: 18px;
 }
 
 
 .alert-success {
   background-color: @successBackground;
-  border-color: @successBorder;  
+  border-color: @successBorder;
   color: @successText;
 }
 .alert-danger,

File app/digrsser/less/digrsser.less

View file
   margin: auto;
 }
 
+form#sub-add div.control-group label {
+  //float: left;
+}
+
 // Subscription listing
 div.sub-list {
 
 div.sub {
   background-color: @grayLight;
   padding: 10px;
-}
+}

File app/digrsser/less/forms.less

View file
 
 .help-block,
 .help-inline {
-  color: @gray; // lighten the text some for contrast
+  color: @grayLight; // lighten the text some for contrast
+  font-size: @baseFontSize - 2;
 }
 
 .help-block {
   .control-label {
     float: left;
     width: 140px;
-    padding-top: 5px;
+    padding-top: @basePadding;
     text-align: right;
   }
   // Move over all input controls and content
     *padding-left: 20px;
     margin-left: 160px;
     *margin-left: 0;
+    padding-top: @basePadding;
     &:first-child {
       *padding-left: 160px;
     }
+
+    // Center icons next to inputfield
+    [class^="icon-"], [class*=" icon-"] {
+      margin-top: (@baseLineHeight / 2) - (16 / 2);
+    }
   }
+  //
   // Remove bottom margin on block level help text since that's accounted for on .control-group
   .help-block {
-    margin-top: @baseLineHeight / 2;
+    margin-top: @baseLineHeight / 10;
     margin-bottom: 0;
   }
   // Move over buttons in .form-actions to align with .controls

File app/digrsser/less/navbar.less

View file
   // Vertically center the text given @navbarHeight
   @elementHeight: 20px;
   padding: ((@navbarHeight - @elementHeight) / 2 - 1) 10px ((@navbarHeight - @elementHeight) / 2 + 1);
-  line-height: 19px;
+  line-height: @navbarHeight;
   color: @navbarLinkColor;
   text-decoration: none;
   text-shadow: 0 -1px 0 rgba(0,0,0,.25);
   // Vertically center the button given @navbarHeight
   @elementHeight: 28px;
   margin: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2);
-  line-height: @baseLineHeight;
+  line-height: @navbarHeight;
 }
 .navbar .btn-group {
   margin: 0;
   // Vertically center the button given @navbarHeight
   @elementHeight: 28px;
   padding: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2);
+
+  .btn .caret {
+    margin-top: 18px;
+    margin-left: 2px;
+  }
 }
+
+
 // Hover
 .navbar .nav > li > a:hover {
   background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
     left: auto;
     right: 13px;
   }
-}
+}

File app/digrsser/less/variables.less

View file
 @bodyBackground:        @white;
 @textColor:             @grayDark;
 
+// Spacing
+@basePadding:           5px;
 
 // Links
 // -------------------------
 @serifFontFamily:       Georgia, "Times New Roman", Times, serif;
 @monoFontFamily:        Menlo, Monaco, Consolas, "Courier New", monospace;
 
-@baseFontSize:          13px;
+@baseFontSize:          14px;
 @baseFontFamily:        @sansFontFamily;
-@baseLineHeight:        18px;
+@baseLineHeight:        25px;
 @altFontFamily:         @serifFontFamily;
 
 @headingsFontFamily:    inherit; // empty to use BS default, @baseFontFamily

File app/digrsser/templates/app.html

View file
         <form id="sub-add" class="form-horizontal" method="post" action="#">
           <fieldset>
               <div class="control-group">
-                <label for="title">Title</label>
+                <label class="control-label" for="url">Feed url</label>
                 <div class="controls">
-                  <input id="title" class="input-xlarge" type="text" name="title"/>
+                  <span class="add-on icon-globe"></span>
+                  <input id="url" class="input-xlarge" type="text" name="url" placeholder="http://service.com/rss.xml"/>
+                  <input class="btn btn-large btn-primary" value="Add"/>
                   <p class="help-block">Supporting help text</p>
                 </div>
               </div>
               <div class="control-group">
-                <label for="url">Feed url</label>
+                <label class="control-label" for="title">Title</label>
                 <div class="controls">
-                  <span class="add-on icon-globe"></span>
-                  <input id="url" class="input-xlarge" type="text" name="url" placeholder="http://service.com/rss.xml"/>
+                  <span class="add-on icon-font"></span>
+                  <input id="title" class="input-xlarge" type="text" name="title"/>
                   <p class="help-block">Supporting help text</p>
                 </div>
-                <div class="controls">
-                  <input class="btn btn-large btn-primary" value="Add"/>
-                </div>
               </div>
             </fieldset>
         </form>
     </div>
     <div class="span6 right">right</div>
   </div>
-{% endblock %}
+{% endblock %}

File app/main.py

View file
 
 # Append zip archives to path for zipimport
 for filename in os.listdir(package_dir):
-    if filename.endswith((".zip", ".egg")):
-        sys.path.insert(0, "%s/%s" % (package_dir, filename))
+  if filename.endswith((".zip", ".egg")):
+    sys.path.insert(0, "%s/%s" % (package_dir, filename))
 
 from wsgiref.handlers import CGIHandler
 from digrsser import app
 
 
 def main():
-    if app.config['DEBUG_MODE']:
-        # Run debugged app
-        from werkzeug_debugger_appengine import get_debugged_app
-        app.debug=True
-        debugged_app = get_debugged_app(app)
-        CGIHandler().run(debugged_app)
-    else:
-        # Run production app
-        from google.appengine.ext.webapp.util import run_wsgi_app
-        run_wsgi_app(app)
+  if app.config['DEBUG_MODE']:
+    # Run debugged app
+    from werkzeug_debugger_appengine import get_debugged_app
+    app.debug=True
+    debugged_app = get_debugged_app(app)
+    CGIHandler().run(debugged_app)
+  else:
+    # Run production app
+    from google.appengine.ext.webapp.util import run_wsgi_app
+    run_wsgi_app(app)
 
 
 # Use App Engine app caching
 if __name__ == "__main__":
-    main()
+  main()