Messages on page headers, link colors, some nicer account pages
authorCharles Connell <charles@connells.org>
Thu, 10 Apr 2014 01:19:20 +0000 (21:19 -0400)
committerCharles Connell <charles@connells.org>
Thu, 10 Apr 2014 01:19:20 +0000 (21:19 -0400)
13 files changed:
karmaworld/assets/css/global.css
karmaworld/templates/404.html [deleted file]
karmaworld/templates/500.html [deleted file]
karmaworld/templates/account/base.html
karmaworld/templates/account/email.html
karmaworld/templates/account/login.html
karmaworld/templates/base.html
karmaworld/templates/footer.html
karmaworld/templates/header.html
karmaworld/templates/notes/note_detail.html
karmaworld/templates/notes/search_results.html
karmaworld/templates/socialaccount/connections.html
karmaworld/templates/user_profile.html

index bbe8c05e135d5c413fa870b1053df75805bf87cd..65468d21d6b1d6095b87637464336c74416cd042 100644 (file)
@@ -37,6 +37,7 @@ p {
 
 #header-login-nav {
   text-align: right;
+  color: #ffffff;
   background: #000000;
   padding: 3px 0 3px 0;
 }
@@ -77,7 +78,8 @@ label.inline-label
   display: inline;
 }
 
-button {
+button,
+.button {
   color: white;
   border: none;
   padding: 10px;
@@ -92,13 +94,17 @@ button.important {
 }
 
 button:hover,
-button:focus {
+button:focus,
+.button:hover,
+.button:focus {
   background: #f1592a;
 }
 
 button.disabled,
 button.disabled:hover,
-button.disabled:focus {
+button.disabled:focus
+.button.disable:hover,
+.button.disabled:focus, {
   background: #333333;
   color: #bcbdc0;
   cursor: default;
@@ -108,16 +114,37 @@ button.inline-button {
   display: inline;
 }
 
+.joyride-content-wrapper .button {
+  background-color: #008CBA;
+}
+
+a,
+a:hover,
+a:focus,
+a:visited {
+  color: #802e16;
+}
+
 a {
-  color: inherit;
   text-decoration: none;
 }
 
-a:hover {
-  color: #802e16;
+a:hover,
+a:focus {
   text-decoration: underline;
 }
 
+a.inherit-color {
+  color: inherit;
+}
+
+.inherit-color a {
+  color: inherit;
+}
+
+.underline a {
+  text-decoration: underline;
+}
 
 span.table-school {
   font-weight: bold;
@@ -154,6 +181,10 @@ table.dataTable div.data-table-entry {
   margin: 20px 0 20px 0;
 }
 
+table.dataTable a {
+  color: inherit;
+}
+
 .even {
   background: #fafafa;
   border-top: 1px solid #f0f0f0;
@@ -202,4 +233,17 @@ dl.tabs dd a {
 div.tabs-content {
   margin-top: -1px;
   border-top: 1px solid #dfdfdf;
+}
+
+div.message-container {
+  margin: 20px 0 0 0;
+}
+
+ul.socialaccount_providers {
+  list-style-type: none;
+}
+
+ul.socialaccount_providers li{
+  display: inline;
+  margin: 0 5px 0 5px;
 }
\ No newline at end of file
diff --git a/karmaworld/templates/404.html b/karmaworld/templates/404.html
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/karmaworld/templates/500.html b/karmaworld/templates/500.html
deleted file mode 100644 (file)
index e69de29..0000000
index fee687152682777af929ef0785b2c364bd17237a..fa9f975034df322502d52e00720ec33596785759 100644 (file)
@@ -9,4 +9,8 @@
       </div>
     </div>
   </section>
+  {% block extra_body %}
+  {% endblock %}
 {% endblock %}
+
+
index d25882eff7d8db386745e2066524fe09629d693d..d37dd3d0bec0ca285897b9733333c1d51789b708 100644 (file)
@@ -6,69 +6,65 @@
 {% block head_title %}{% trans "Account" %}{% endblock %}
 
 {% block content %}
-    <h1>{% trans "E-mail Addresses" %}</h1>
-{% if user.emailaddress_set.all %}
-<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
-
-<form action="{% url 'account_email' %}" class="email_list" method="post">
-{% csrf_token %}
-<fieldset class="blockLabels">
-
-  {% for emailaddress in user.emailaddress_set.all %}
-<div class="ctrlHolder">
-      <label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
-
-      <input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
-
-{{ emailaddress.email }}
-    {% if emailaddress.verified %}
-    <span class="verified">{% trans "Verified" %}</span>
-    {% else %}
-    <span class="unverified">{% trans "Unverified" %}</span>
-    {% endif %}
-      {% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %}
-</label>
-</div>
-  {% endfor %}
-
-<div class="buttonHolder">
-      <button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
-      <button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
-      <button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
-</div>
-
-</fieldset>
-</form>
+  <h1>{% trans "E-mail Addresses" %}</h1>
+  {% if user.emailaddress_set.all %}
+    <p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
+
+    <form action="{% url 'account_email' %}" class="email_list" method="post">
+      {% csrf_token %}
+      <fieldset class="blockLabels">
+
+      {% for emailaddress in user.emailaddress_set.all %}
+        <div class="ctrlHolder">
+          <label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
+          <input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
+          {{ emailaddress.email }}
+          {% if emailaddress.verified %}
+            &mdash; <span class="verified">{% trans "Verified" %}</span>
+          {% else %}
+            &mdash; <span class="unverified">{% trans "Unverified" %}</span>
+          {% endif %}
+          {% if emailaddress.primary %}&mdash; <span class="primary">{% trans "Primary" %}</span>{% endif %}
+          </label>
+        </div>
+      {% endfor %}
+
+      <div class="buttonHolder">
+        <button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
+        <button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
+        <button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
+      </div>
+
+      </fieldset>
+    </form>
 
-{% else %}
-<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
+  {% else %}
+    <p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
+  {% endif %}
 
-{% endif %}
 
+  <h2>{% trans "Add E-mail Address" %}</h2>
 
-    <h2>{% trans "Add E-mail Address" %}</h2>
-
-    <form method="post" action="{% url 'account_email' %}" class="add_email">
-        {% csrf_token %}
-        {{ form.as_p}}
-        <button name="action_add" type="submit">{% trans "Add E-mail" %}</button>
-    </form>
+  <form method="post" action="{% url 'account_email' %}" class="add_email">
+    {% csrf_token %}
+    {{ form.as_p}}
+    <button name="action_add" type="submit">{% trans "Add E-mail" %}</button>
+  </form>
 
 {% endblock %}
 
-
 {% block extra_body %}
-<script type="text/javascript">
-(function() {
-  var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}";
-  var actions = document.getElementsByName('action_remove');
-  if (actions.length) {
-    actions[0].addEventListener("click", function(e) {
-      if (! confirm(message)) {
-        e.preventDefault();
-      }
-    });
-  }
-})();
-</script>
+  <script type="text/javascript">
+  (function() {
+    var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}";
+    var actions = document.getElementsByName('action_remove');
+    if (actions.length) {
+      actions[0].addEventListener("click", function(e) {
+        if (! confirm(message)) {
+          e.preventDefault();
+        }
+      });
+    }
+  })();
+  </script>
 {% endblock %}
index 6857607d5409bf5865a5fdf24eae1845db0b2144..4897ff443d3e1c65b49210730d061c472e200f94 100644 (file)
@@ -8,35 +8,33 @@
 
 {% block content %}
 
-<h1>{% trans "Sign In" %}</h1>
+  <h1>{% trans "Sign In" %}</h1>
 
-{% if socialaccount.providers  %}
-<p>You can sign in to KarmaNotes with any of the existing accounts you might have below.
-Or, <a href="{{ signup_url }}">sign up</a> for a KarmaNotes account and sign in below.</p>
+  {% if socialaccount.providers  %}
+    <p>You can sign in to KarmaNotes with any of the existing accounts you might have below.
+    Or, <a href="{{ signup_url }}">sign up</a> for a KarmaNotes account and sign in below.</p>
 
-<div class="socialaccount_ballot">
+    <div class="socialaccount_ballot">
 
-  <ul class="socialaccount_providers">
-    {% include "socialaccount/snippets/provider_list.html" with process="login" %}
-  </ul>
+      <ul class="socialaccount_providers">
+        {% include "socialaccount/snippets/provider_list.html" with process="login" %}
+      </ul>
 
-  <div class="login-or">{% trans 'or' %}</div>
+    </div>
 
-</div>
-
-{% else %}
-<p>{% blocktrans %}If you have not created an account yet, then please
-<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
-{% endif %}
-
-<form class="login" method="POST" action="{% url 'account_login' %}">
-  {% csrf_token %}
-  {{ form.as_p }}
-  {% if redirect_field_value %}
-  <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
+  {% else %}
+    <p>{% blocktrans %}If you have not created an account yet, then please
+      <a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
   {% endif %}
-  <a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
-  <button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
-</form>
+
+  <form class="login" method="POST" action="{% url 'account_login' %}">
+    {% csrf_token %}
+    {{ form.as_p }}
+    {% if redirect_field_value %}
+      <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
+    {% endif %}
+      <a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
+    <button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
+  </form>
 
 {% endblock %}
index 52b25b9b5ebf3a78f533f78fe435b355a7cf6dae..109c495c33ac1ef86cf512f10bd50c50f5d2785a 100644 (file)
@@ -4,7 +4,7 @@
 <head>
   <meta charset="utf-8" />
   <meta name="viewport" content="width=device-width" />
-  <title>KarmaNotes -- {% block title %}{% endblock %}</title>
+  <title>KarmaNotes -- {% block title %}{% endblock %}{% block head_title %}{% endblock %}</title>
        
   <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico">
   <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/fontface/fontface.css">
index 331cbf37d23501fa221562d479926ff657810f23..f07d114e77061beb2acb99e5b7f63af37eba9a39 100644 (file)
@@ -1,6 +1,6 @@
 {% load url from future %}
 
-<footer id="global_footer">
+<footer id="global_footer" class="underline inherit-color">
   <div class="row">
     <div id="footer-links-container" class="small-12 columns">
       <a href="{% url 'about' %}">About</a>&nbsp;|&nbsp;<a href="{% url 'terms' %}">Terms</a>&nbsp;|&nbsp;<a href="https://github.com/FinalsClub/karmaworld">Code</a>&nbsp;|&nbsp;<a href="http://www.reddit.com/r/KarmaNotes/">Discussion</a>&nbsp;<!--|&nbsp;<a href="#">Donate</a>-->
index 76317395b009c8243c141186757dbe4508ae9811..d59f09470260091f05a3eeba9a71d37172a2d0d2 100644 (file)
@@ -8,8 +8,8 @@
       <div class="row nav-list">
         <div class="large-12 columns">
           <ul>
-            <li><a href="{% url 'accounts_profile' %}">{{ request.user.get_profile.get_points }} Karma Points</a></li>
-            <li><a href="{% url 'account_logout' %}">Log Out</a></li>
+            <li><a href="{% url 'accounts_profile' %}" class="inherit-color">{{ request.user.get_profile.get_points }} Karma Points</a></li>
+            <li><a href="{% url 'account_logout' %}" class="inherit-color">Log Out</a></li>
           </ul>
         </div>
       </div>
 
 </header><!--/global header-->
 
+{% if messages %}
+  {% for message in messages %}
+    <div class="row">
+      <div class="small-12 columns message-container">
+        <div data-alert class="alert-box radius {{ message.tags }}
+          {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}warning{% endif %}
+          {% if message.level == DEFAULT_MESSAGE_LEVELS.DEBUG %}info{% endif %}">
+          {{ message }}
+        </div>
+      </div>
+    </div>
+  {% endfor %}
+{% endif %}
index e30c27bcda01c3c96917ab7ca25b7f98db4e5d15..a0c77574c821f68de79ec6efeef4ab31ec1f3621 100644 (file)
@@ -47,7 +47,7 @@
     <div class="return-to-course show-for-large-up">
       <div class="row">
         <div class="small-12 columns">
-          <a href="{{ note.course.get_absolute_url }}">
+          <a href="{{ note.course.get_absolute_url }}" class="inherit-color">
             <i class="fa fa-angle-double-left"></i> See all notes for {{ note.course.name }}
           </a>
         </div>
index ff51b1a8297030308117cbd20a00958e05e7edb8..6c59cacdf30a12e183b87ac05ba5fd2e537ce7b4 100644 (file)
@@ -24,7 +24,7 @@
     <div class="return-to-course show-for-large-up">
       <div class="row">
         <div class="small-12 columns">
-          <a href="{{ course.get_absolute_url }}">
+          <a href="{{ course.get_absolute_url }}" class="inherit-color">
             <i class="fa fa-angle-double-left"></i> See all notes for {{ course.name }}
           </a>
         </div>
index d24cf00d7bacc8fb21fe69b423da8515dda772bf..204a37a21909df2c096f49b4f94d77c83ce0ded4 100644 (file)
@@ -6,48 +6,47 @@
 {% block head_title %}{% trans "Account Connections" %}{% endblock %}
 
 {% block content %}
-<h1>{% trans "Account Connections" %}</h1>
+  <h1>{% trans "Account Connections" %}</h1>
 
-{% if form.accounts %}
-<p>{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}</p>
+  {% if form.accounts %}
+    <p>{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}</p>
 
 
-<form method="post" action="{% url 'socialaccount_connections' %}">
-{% csrf_token %}
+    <form method="post" action="{% url 'socialaccount_connections' %}">
+      {% csrf_token %}
 
-<fieldset>
-{% if form.non_field_errors %}
-<div id="errorMsg">{{form.non_field_errors}}</div>
-{% endif %}
+      <fieldset>
+        {% if form.non_field_errors %}
+          <div id="errorMsg">{{form.non_field_errors}}</div>
+        {% endif %}
 
-{% for base_account in form.accounts %}
-{% with base_account.get_provider_account as account %}
-<div>
-<label for="id_account_{{base_account.id}}">
-<input id="id_account_{{base_account.id}}" type="radio" name="account" value="{{base_account.id}}"/>
-<span class="socialaccount_provider {{base_account.provider}} {{account.get_brand.id}}">{{account.get_brand.name}}</span>
-{{account}}
-</label>
-</div>
-{% endwith %}
-{% endfor %}
+        {% for base_account in form.accounts %}
+          {% with base_account.get_provider_account as account %}
+            <div>
+              <label for="id_account_{{base_account.id}}">
+                <input id="id_account_{{base_account.id}}" type="radio" name="account" value="{{base_account.id}}"/>
+                <span class="socialaccount_provider {{base_account.provider}} {{account.get_brand.id}}">{{account.get_brand.name}}</span>
+                &mdash; {{account}}
+              </label>
+            </div>
+          {% endwith %}
+        {% endfor %}
 
-<div>
-<button type="submit">{% trans 'Remove' %}</button>
-</div>
+        <div>
+          <button type="submit">{% trans 'Remove' %}</button>
+        </div>
 
-</fieldset>
+      </fieldset>
+    </form>
 
-</form>
+  {% else %}
+    <p>{% trans 'You currently have no social network accounts connected to this account.' %}</p>
+  {% endif %}
 
-{% else %}
-<p>{% trans 'You currently have no social network accounts connected to this account.' %}</p>
-{% endif %}
+  <h2>{% trans 'Add a 3rd Party Account' %}</h2>
 
-<h2>{% trans 'Add a 3rd Party Account' %}</h2>
-
-<ul class="socialaccount_providers">
-{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
-</ul>
+  <ul class="socialaccount_providers">
+    {% include "socialaccount/snippets/provider_list.html" with process="connect" %}
+  </ul>
 
 {% endblock %}
index 914d9849749cc026fdef0c3fa94804553f9bfeb5..5dd52ff37ca4f579c2d0c080e656f52d4f85e359 100644 (file)
                           </div>
                           {% if item.0 == 'NoteKarmaEvent' %}
                             <div class="small-12 columns activity_details_object">
-                              <a href="{{ event.note.get_absolute_url }}" class="activity_target">{{ event.note.name }}</a>
+                              <a href="{{ event.note.get_absolute_url }}" class="activity_target inherit-color">{{ event.note.name }}</a>
                             </div>
                             <div class="small-12 columns activity_details_context">
-                              <a href="{{ event.note.course.get_absolute_url }}" class="course_link">{{ event.note.course.name }} &bull;
+                              <a href="{{ event.note.course.get_absolute_url }}" class="course_link inherit-color">{{ event.note.course.name }} &bull;
                                 {% if event.note.course.school %}
                                   {{ event.note.course.school.name }}
                                 {% else %}
@@ -75,7 +75,7 @@
                           {% endif %}
                           {% if item.0 == 'CourseKarmaEvent' %}
                             <div class="small-12 columns activity_details_object">
-                              <a href="{{ event.course.get_absolute_url }}" class="activity_target">{{ event.course.name }}</a>
+                              <a href="{{ event.course.get_absolute_url }}" class="activity_target inherit-color">{{ event.course.name }}</a>
                             </div>
                             <div class="small-12 columns activity_details_context">
                               {{ event.course.school.name }}
                     {{ user.email }}
                   </div>
                   <div class="small-12 large-2 columns account_settings_edit">
-                    <a href="{% url 'account_email' %}"><i class="fa fa-pencil"></i> Edit</a>
+                    <a href="{% url 'account_email' %}" class="inherit-color"><i class="fa fa-pencil"></i> Edit</a>
                   </div>
                 </div>
               </div>
                     ********
                   </div>
                   <div class="small-12 large-2 columns account_settings_edit">
-                    <a href="{% url 'account_change_password' %}"><i class="fa fa-pencil"></i> Edit</a>
+                    <a href="{% url 'account_change_password' %}" class="inherit-color"><i class="fa fa-pencil"></i> Edit</a>
                   </div>
                 </div>
               </div>
                     {% social_account_list request.user %}
                   </div>
                   <div class="small-12 large-2 columns account_settings_edit">
-                    <a href="{% url 'socialaccount_connections' %}"><i class="fa fa-pencil"></i> Edit</a>
+                    <a href="{% url 'socialaccount_connections' %}" class="inherit-color"><i class="fa fa-pencil"></i> Edit</a>
                   </div>
                 </div>
               </div>