Commits

Wilson Xu committed 8fba908

Split to two columns.

Comments (0)

Files changed (6)

fbone/static/css/style.css

     padding: 20px 20px 10px;
     margin: -20px -20px 20px;
 }
+
+.container {
+    width: 820px;
+}
+
+.content {
+    -webkit-box-shadow: rgba(0, 0, 0, 0.148438) 0px 1px 2px;
+    background-color: white;
+    border-bottom-left-radius: 6px 6px;
+    border-bottom-right-radius: 6px 6px;
+    border-top-left-radius: 0px 0px;
+    border-top-right-radius: 0px 0px;
+    margin: 0px -20px;
+    padding: 20px;
+}
+
+.content .span4 {
+    border-left: 1px solid #EEE;
+    margin-left: 0px;
+    padding-left: 19px;
+}
+
+.content .span10, .content .span4 {
+    min-height: 500px;
+}

fbone/templates/index.html

 {% extends 'layout.html' %}
 
 {% block body %}
-{{ render_user_table(pagination.items, 'zebra-striped') }}
-{{ render_pagination(pagination=pagination, endpoint='frontend.index') }}
+<div class="span10">
+    <h2>Main content</h2>
+</div>
+<div class="span4">
+    <form class='form-stacked' method="POST" action="{{ url_for('frontend.signup') }}">
+        {{ form.hidden_tag() }}
+        {{ form.next }}
+        <fieldset>
+            <legend>Already have account? <a href="{{ url_for('frontend.login') }}">Login</a> please.</legend>
+            {{ render_input(form.name, True) }}
+            {{ render_input(form.email) }}
+            {{ render_input(form.password) }}
+            {{ render_input(form.password_again) }}
+            {{ render_action(form.submit) }}
+        </fieldset>
+    </form>
+</div>
 {% endblock %}

fbone/templates/layout.html

     <meta name="viewport" content="width=device-width,initial-scale=1">
     <link rel="Shortcut Icon" href="{{ url_for('static', filename='favicon.ico')}}" type="image/x-icon">
     {% block css %}
+    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
     <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
-    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
     {% endblock %}
 </head>
 <body style='padding-top: 40px; background-color: #EEE;'>
     <div class="container">
         <div class="content">
             <div class="page-header">
-                {% block flash_message %}
-                    {% with messages = get_flashed_messages(with_categories=True) %}
-                        {% if messages %}
-                        <div id='flash_message_container'>
-                            {% for category, msg in messages %}
-                                <div class="alert-message {{ category }}" data-alert>
-                                  <a class="close" href="#">×</a>
-                                  <p>{{ msg }}</p>
-                                </div>
-                            {% endfor %}
-                        </div>
-                        {% endif %}
-                    {% endwith %}
-                {% endblock %}
+                {% from 'macros/_misc.html' import render_flash_message %}
+                {{ render_flash_message() }}
                 <h1>{{ page_title }}</h1>
             </div>
 
-            <div id="main" role="main">
+            <div class="row">
                 {% block body %}
                 {% endblock %}
             </div>

fbone/templates/macros/_misc.html

         </div>
     {% endif %}
 {% endmacro %}
+
+{% macro render_flash_message() %}
+    {% block flash_message %}
+        {% with messages = get_flashed_messages(with_categories=True) %}
+            {% if messages %}
+            <div id='flash_message_container'>
+                {% for category, msg in messages %}
+                    <div class="alert-message {{ category }}" data-alert>
+                      <a class="close" href="#">×</a>
+                      <p>{{ msg }}</p>
+                    </div>
+                {% endfor %}
+            </div>
+            {% endif %}
+        {% endwith %}
+    {% endblock %}
+{% endmacro %}

fbone/templates/search.html

 {% block body %}
     {% if pagination and pagination.pages > 0 %}
         <p>{% trans total=pagination.total, keywords=keywords %}<strong>{{ total }}</strong> found for your search "<strong>{{ keywords }}</strong>".{% endtrans %}</p>
-        {{ render_user_table(pagination.items) }}
+        {{ render_user_table(pagination.items, 'zebra-striped') }}
         {{ render_pagination(pagination, 'frontend.search') }}
     {% else %}
         <p>{% trans keywords=keywords %}Sorry, Nothing found for your search "<strong>{{ keywords }}</strong>".{% endtrans %}</p>

fbone/views/frontend.py

             current_app.logger.debug('reauth: %s' % session['_fresh'])
             flash(_('Reauthenticated.'), 'success')
             return redirect('/change_password')
-            #return redirect(form.next.data or url_for('frontend.index'))
 
         flash(_('Password is wrong.'), 'error')
     return render_template('reauth.html', form=form)