Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed bootstrap carousel to jquery.cycle for info bars.

  • Loading branch information...
commit f61c4f3e4a3f94af47ca39ef7d1f59f095f309d3 1 parent d045d6f
@cammoore cammoore authored
View
25 makahiki/static/less/makahiki.less
@@ -134,7 +134,7 @@
}
.info-bar h4 {
- .pagination-centered;
+ text-align: center;
}
.info-bar h4 a {
@@ -150,13 +150,23 @@
.show;
}
-.info-bar .carousel {
- margin-bottom: 0;
+.info-bar div {
+ text-align: center;
+}
+
+.info-bar #single-cycle div, .info-bar #single-cycle h4 {
+ text-align: center;
+ width: 100%;
+}
+
+.info-bar .btn {
+ float: right;
}
-.info-bar .carousel-inner .item {
- height: @baseLineHeight * 3;
+.info-bar-logout {
+ float: right;
}
+
.makahiki-box-title {
display: inline;
margin-left: auto;
@@ -393,6 +403,11 @@ body {
text-align: center;
}
+#scoreboard-pager a {
+ margin: 0 5px;
+ padding: 3px 5px;
+ text-decoration: none
+}
/***** Help styles *****/
#widget-help-dialog {
text-align: left;
View
2  makahiki/static/less/theme-default.less
@@ -47,7 +47,7 @@
@page-bkg-image: "../images/bubbles.jpg";
@page-logo: "../images/icons/icon-uh-logo.png";
@page-font-color: @black;
-@page-link-color: @blueCyan;
+@page-link-color: @blueDark;
// Questbar
@questbar-bkg-color-start: @darkGreen;
@questbar-bkg-color-end: @darkGreen;
View
62 makahiki/templates/components/RIB.html
@@ -1,35 +1,63 @@
{% load avatar_tags %}
{% if user.is_authenticated %}
+{% with user.get_profile as profile %}
+{% with user.get_profile.team as team %}
+<script type="text/javascript">
+$(document).ready(function() {
+$('#wide-personal-cycle').cycle({
+ fx: "fade",
+ timeout: 3500,
+ delay: -1000,
+ sync: true
+});
+$('#wide-team-cycle').cycle({
+ fx: "fade",
+ timeout: 3500,
+ delay: -1000,
+ sync: true
+});
+$('#wide-round-cycle').cycle({
+ fx: "fade",
+ timeout: 3500,
+ delay: -1000,
+ sync: true
+});
+$('#single-cycle').cycle({
+ fx: "fade",
+ timeout: 3500,
+ delay: -1000,
+ sync: true
+});
+});
+</script>
<div id="info-bar-wide" class="container-fluid makahiki-box info-bar">
<div class="row-fluid">
- <div class="span12">
<div class="span1">
<img src="{% avatar_url user 60 %}" />
</div>
- <div id="wide-personal-cycle" class="span3 carousel">
- <div class="carousel-inner">
+ <div class="span3">
+ <div id="wide-personal-cycle">
{% include "components/user_points.html" %}
</div>
</div>
- <div id="wide-team-cycle" class="span3 carousel">
- <div class="carousel-inner">
+ <div class="span3">
+ <div id="wide-team-cycle">
{% include "components/team_points.html" %}
</div>
</div>
- <div id="wide-round-cycle" class="span3 carousel">
- <div class="carousel-inner">
+ <div class="span3">
+ <div id="wide-round-cycle">
{% include "components/round_cycle.html" %}
</div>
</div>
<div class="span2">
+ <a href="{% url account_logout %}" class="info-bar-logout">Logout</a>
<button id="header-feedback1" href="javascript:void(0);" class="btn">Send Feedback</button>
- <a href="{% url account_logout %}">Logout</a>
</div>
</div>
- </div>
</div>
-<div id="info-bar-single" class="container makahiki-box info-bar">
- <div class="row">
+<div id="info-bar-single" class="container-fluid makahiki-box info-bar">
+ <div class="row-fluid">
<div id="feedback-single" class="span2">
<button id="header-feedback2" href="javascript:void(0);" class="btn">Send Feedback</button>
</div>
@@ -37,12 +65,14 @@
<a href="{% url account_logout %}">Logout</a>
</div>
</div>
- <div class="row">
- <div id="sngle-cycle" class="carousel">
- <div class="carousel-inner">
- {% include "components/RIB_single.html" %}
- </div>
+ <div class="row-fluid">
+ <div class="span12">
+ <div id="single-cycle">
+ {% include "components/RIB_single.html" %}
+ </div>
</div>
</div>
</div>
+{% endwith %}
+{% endwith %}
{% endif %}
View
64 makahiki/templates/components/RIB_single.html
@@ -3,58 +3,58 @@
{# {% cache 600 infobar request.user.username %} #}
{% with user.get_profile as profile %}
{% if CURRENT_ROUND_INFO and CURRENT_ROUND_INFO.name != 'Overall' %}
- <div class="item active">
- <h4>{{profile.name}}</h4>
- {{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}.
+ <div>
+ <h4>{{profile.name}}</h4>
+ {{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}.
</div>
- <div class="item">
- <h4>{{profile.name}}</h4>
- {{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_overall_rank}}/{{OVERALL_MEMBER_COUNT}} overall.
+ <div>
+ <h4>{{profile.name}}</h4>
+ {{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_overall_rank}}/{{OVERALL_MEMBER_COUNT}} overall.
</div>
{% endif %}
- <div class="item">
- <h4>{{profile.name}}</h4>
- Overall: {{profile.points}} points #{{profile.team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}
+ <div>
+ <h4>{{profile.name}}</h4>
+ Overall: {{profile.points}} points #{{profile.team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}
</div>
- <div class="item">
- <h4>{{profile.name}}</h4>
- Overall: {{profile.points}} points #{{profile.overall_rank}}/{{OVERALL_MEMBER_COUNT}}
+ <div>
+ <h4>{{profile.name}}</h4>
+ Overall: {{profile.points}} points #{{profile.overall_rank}}/{{OVERALL_MEMBER_COUNT}}
</div>
{% endwith %}
{% with user.get_profile.team as team %}
- <div class="item">
- <h4>{{team}}</h4>
- {{CURRENT_ROUND_INFO.name}}: {{team.current_round_points}} points. #{{team.current_round_rank}}/{{TEAM_COUNT}}.
+ <div>
+ <h4>{{team}}</h4>
+ {{CURRENT_ROUND_INFO.name}}: {{team.current_round_points}} points. #{{team.current_round_rank}}/{{TEAM_COUNT}}.
</div>
{% if energy_rank_info %}
- <div class="item">
- <h4>{{team}}</h4>
- {{CURRENT_ROUND_INFO.name}}: <span id="round-energy-value"></span> kWh.
-#<span id="round-energy-rank"></span> out of {{TEAM_COUNT}}.
+ <div>
+ <h4>{{team}}</h4>
+ {{CURRENT_ROUND_INFO.name}}: <span id="round-energy-value"></span> kWh.
+ #<span id="round-energy-rank"></span> out of {{TEAM_COUNT}}.
</div>
{% endif %}
- <div class="item">
- <h4>{{team}}</h4>
- Overall: {{team.points}} points. #{{team.rank}} out of {{TEAM_COUNT}}
+ <div>
+ <h4>{{team}}</h4>
+ Overall: {{team.points}} points. #{{team.rank}} out of {{TEAM_COUNT}}
</div>
{% if energy_rank_info %}
- <div class="item">
- <h4>{{team}}</h4>
- Overall: {{ energy_rank_info.usage }} kWh. #{{ energy_rank_info.rank }} out of {{TEAM_COUNT}}.
+ <div>
+ <h4>{{team}}</h4>
+ Overall: {{ energy_rank_info.usage }} kWh. #{{ energy_rank_info.rank }} out of {{TEAM_COUNT}}.
</div>
{% endif %}
{% endwith %}
- <div class="item">
- <h4>{{ CURRENT_ROUND_INFO.name }}</h4>
- Ends on {{CURRENT_ROUND_INFO.end}}.
+ <div>
+ <h4>{{ CURRENT_ROUND_INFO.name }}</h4>
+ Ends on {{CURRENT_ROUND_INFO.end}}
</div>
{% for event in AVAILABLE_EVENTS %}
- <div class="item">
- <h4><a href="{% url activity_task event.type event.slug %}">{{ event.title }}</a></h4>
- {{event.event_date}}
+ <div>
+ <h4><a href="{% url activity_task event.type event.slug %}">{{ event.title }}</a></h4>
+ {{event.event_date}}
</div>
{% empty %}
- <div class="item">
+ <div>
Sorry, no upcoming events.<br>
Check back later.
</div>
View
30 makahiki/templates/components/round_cycle.html
@@ -1,24 +1,22 @@
-<!-- FIXME: round cycle is the upcoming events. Need to get these from the database somehow. -->
{% if IN_COMPETITION %}
-<div class="item active">
- <ul>
- <li><h4>{{ CURRENT_ROUND_INFO.name }}</h4></li>
- <li>Ends on {{CURRENT_ROUND_INFO.end}}</li>
- </ul>
+<div>
+ <div class="span3">
+ <h4>{{ CURRENT_ROUND_INFO.name }}</h4>
+ Ends on {{CURRENT_ROUND_INFO.end}}
+ </div>
</div>
{% endif %}
{% for event in AVAILABLE_EVENTS %}
-<div class="item">
- <ul>
- <li><h4><a href="{% url activity_task event.type event.slug %}">{{ event.title }}</a></h4></li>
- <li>{{event.event_date}}</li>
- </ul>
+<div>
+ <div class="span3">
+<h4><a href="{% url activity_task event.type event.slug %}">{{ event.title }}</a></h4>
+{{event.event_date}}
+ </div>
</div>
{% empty %}
-<div class="item">
- <ul>
- <li>Sorry, no upcoming events.</li>
- <li>Check back later.</li>
- </ul>
+<div>
+ <div class="span3">
+Sorry, no upcoming events. Check back later.
+ </div>
</div>
{% endfor %}
View
46 makahiki/templates/components/team_points.html
@@ -4,40 +4,30 @@
{% if team and team.group %}
{% cache 600 infobar team.name %}
{% if CURRENT_ROUND_INFO and CURRENT_ROUND_INFO.name != 'Overall' %}
-<!-- First slideshow element -->
-<div class="item active">
- <h4>{{team}}</h4>
- <ul>
- <li>{{CURRENT_ROUND_INFO.name}}: {{team.current_round_points}} points.
- #{{team.current_round_rank}}/{{TEAM_COUNT}}.
- </li>
- </ul>
-</div>
+<div>
+ <div class="span3">
+<h4>{{team}}</h4>{{CURRENT_ROUND_INFO.name}}: {{team.current_round_points}} points. #{{team.current_round_rank}}/{{TEAM_COUNT}}.
+ </div>
+</div>
{% if energy_rank_info %}
-<!-- Second slideshow element -->
-<div class="item">
- <h4>{{team}}</h4>
- <ul>
- <li>{{CURRENT_ROUND_INFO.name}}: <span id="round-energy-value"></span> kWh.
- #<span id="round-energy-rank"></span> out of {{TEAM_COUNT}}.</li>
- </ul>
+<div>
+ <div class="span3">
+<h4>{{team}}</h4>{{CURRENT_ROUND_INFO.name}}: <span id="round-energy-value"></span> kWh.
+#<span id="round-energy-rank"></span> out of {{TEAM_COUNT}}.
+ </div>
</div>
{% endif %}
{% endif %}
-<!-- Third slideshow element -->
-<div class="item">
- <h4>{{team}}</h4>
- <ul>
- <li>Overall: {{team.points}} points. #{{team.rank}} out of {{TEAM_COUNT}}</li>
- </ul>
+<div>
+ <div class="span3">
+<h4>{{team}}</h4>Overall: {{team.points}} points. #{{team.rank}} out of {{TEAM_COUNT}}
+ </div>
</div>
{% if energy_rank_info %}
-<!-- Fourth slideshow element -->
-<div class="item">
- <h4>{{team}}</h4>
- <ul>
- <li>Overall: {{ energy_rank_info.usage }} kWh. #{{ energy_rank_info.rank }} out of {{TEAM_COUNT}}.</li>
- </ul>
+<div>
+ <div class="span3">
+<h4>{{team}}</h4>Overall: {{ energy_rank_info.usage }} kWh. #{{ energy_rank_info.rank }} out of {{TEAM_COUNT}}.
+ </div>
</div>
{% endif %}
{% endcache %}
View
72 makahiki/templates/components/user_points.html
@@ -2,51 +2,41 @@
{% cache 600 infobar request.user.username %}
{% with user.get_profile as profile %}
-{% if CURRENT_ROUND_INFO and CURRENT_ROUND_INFO.name != 'Overall' %}
-<!-- First slideshow element -->
-<div id="header-user-overall-rank1" class="item active">
- <h4>{{profile.name}}</h4>
- <ul>
- <li>{{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}.</li>
- </ul>
+ {% if CURRENT_ROUND_INFO and CURRENT_ROUND_INFO.name != 'Overall' %}
+<div>
+ <div class="span3">
+<h4>{{profile.name}}</h4>{{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}.
+ </div>
</div>
-<!-- Second slideshow element -->
-<div id="header-user-overall-rank2" class="item">
- <h4>{{profile.name}}</h4>
- <ul>
- <li>{{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_overall_rank}}/{{OVERALL_MEMBER_COUNT}} overall.</li>
- </ul>
+<div>
+ <div class="span3">
+<h4>{{profile.name}}</h4>{{CURRENT_ROUND_INFO.name}}: {{profile.current_round_points}} points #{{profile.current_round_overall_rank}}/{{OVERALL_MEMBER_COUNT}} overall.
+ </div>
</div>
-{% endif %}
-<!-- Third slideshow element -->
-<div id="header-user-team-rank3" class="item">
- <h4>{{profile.name}}</h4>
- <ul>
- <li>Overall: {{profile.points}} points #{{profile.team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}</li>
- </ul>
+ {% endif %}
+<div>
+ <div class="span3">
+<h4>{{profile.name}}</h4>Overall: {{profile.points}} points #{{profile.team_rank}}/{{TEAM_MEMBER_COUNT}} in {{profile.team.name}}
+ </div>
</div>
-<!-- Fourth slideshow element -->
-<div id="header-user-overall-rank4" class="item">
- <h4>{{profile.name}}</h4>
- <ul>
- <li>Overall: {{profile.points}} points #{{profile.overall_rank}}/{{OVERALL_MEMBER_COUNT}}</li>
- </ul>
+<div>
+ <div class="span3">
+<h4>{{profile.name}}</h4>Overall: {{profile.points}} points #{{profile.overall_rank}}/{{OVERALL_MEMBER_COUNT}}
+ </div>
</div>
-
-{% if profile.canopy_member %}
-<!-- Fifth slideshow element -->
-{% with canopy_info=profile.canopy_karma_info %}
-<div id="header-user-overall-rank5" >
- <div id="header-user-points" class="item">
- <h4>{{profile.name}}</h4>
- <div>{{profile.canopy_karma}} Canopy Karma points</div>
- </div>
- <div id="header-user-rank" class="item">
- <h4>{{profile.name}}</h4>
- <div>#{{canopy_info.rank}} out of {{canopy_info.total}} overall</div>
- </div>
+ {% if profile.canopy_member %}
+ {% with canopy_info=profile.canopy_karma_info %}
+<div>
+ <div class="span3">
+<h4>{{profile.name}}</h4>{{profile.canopy_karma}} Canopy Karma points
+ </div>
</div>
-{% endwith %}
-{% endif %}
+<div>
+ <div class="span3">
+<h4>{{profile.name}}</h4>#{{canopy_info.rank}} out of {{canopy_info.total}} overall
+ </div>
+</div>
+ {% endwith %}
+ {% endif %}
{% endwith %}
{% endcache %}
View
7 makahiki/templates/logged_in_base.html
@@ -16,6 +16,7 @@
<script src="{{STATIC_URL}}bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="{{STATIC_URL}}bootstrap/js/bootstrap-tooltip.js" type="text/javascript"></script>
+ <script src="{{STATIC_URL}}js/jquery.cycle.all.js" type="text/javascript" ></script>
<script src="{{STATIC_URL}}js/jquery.purr.js" type="text/javascript" ></script>
<script src="{{STATIC_URL}}js/makahiki.js" type="text/javascript"></script>
<script src="{{STATIC_URL}}js/feedback.js" type="text/javascript"></script>
@@ -70,12 +71,6 @@
<!-- javascript
================================================== -->
<script type="text/javascript">
- jQuery(document).ready(function() {
- jQuery('#sngle-cycle').carousel()
- jQuery('#wide-personal-cycle').carousel()
- jQuery('#wide-team-cycle').carousel()
- jQuery('#wide-round-cycle').carousel()
- });
</script>
{% block page_cycles %}{% endblock page_cycles %}
{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.