view templates/sat_website/base.html @ 120:80a0f195231a

show the campaign big banner on the "overview" page
author souliane <souliane@mailoo.org>
date Fri, 06 Nov 2015 09:07:12 +0100
parents e138879873f1
children 699b9b130368
line wrap: on
line source

{% comment %}
SàT website: Salut à Toi's presentation website
Copyright (C) 2012  Jérôme Poisson (goffi@goffi.org)

This file is part of SàT website.

SàT website is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}

{% load staticfiles %}
{% load i18n %}
{% load utils %}
{% get_current_language as LANGUAGE_CODE %}

<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{% static "bootstrap/css/bootstrap.min.css" %}">
    <link rel="stylesheet" href="{% static "bootstrap/css/bootstrap-theme.min.css" %}">
    <link rel="stylesheet" href="{% static "css/sat_website.css" %}">
    <link rel="icon" type="image/png" href="{% static "images/sat_logo_32.png" %}">
    <title>{% block title %}{% trans "Salut à Toi: the multi frontend, multipurpose communication tool" %}{% endblock %}</title>
</head>
<body role="document">
	{% comment %}FIXME: remove "" and "overview" from the following test when the campaign is over{% endcomment %}
    {% if category != "" and category != "overview" and category != "membership" and category != "membership_form" and category != "thank_you" %}
	    <div class="alert alert-info banner">
	        <div class="container">

				{% comment %}
				<div class="row">
	            <div class="col-md-10">
			        {% trans "We need your support to continue and move forward! Take the time to read about what we do. If you like it, please join the association." %}
			        {% include "sat_website/finance.html" %}
	            </div>
	            <div class="col-md-2">
	                <a class="btn btn-default" href="membership.html" role="button">{% trans "Membership" %}</a>
	            </div>
				</div>
	            
				# FIXME: dirty implementation just for the duration of the campaign!
	            {% endcomment %}
	            <div class="text-center">
	            	{{ campaign_countdown }}
	            	{% if campaign_countdown > 1 %}{% trans " days" %}{% else %}{% trans "day" %}{% endif %}
	            	{% trans "left to support our" %}
	            	<a class="btn btn-default" style="float:none" href="http://www.arizuka.com/{{LANGUAGE_CODE}}/projects/libervia/" target="#" role="button">{% trans "crowdfunding campaign" %}</a>
					{% trans "for an Android interface!" %}
				</div>

	        </div>
	    </div>
	{% else %}
	    <div class="banner"></div>
    {% endif %}
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header" id="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <img id="sat_logo" src="{% static "images/sat_logo.svg" %}">
                <a class="navbar-brand" href="overview.html">
                    Salut à Toi
                </a>
            </div>
            <div id="navbar" class="collapse navbar-collapse">
                {% include "sat_website/menu.html" with style="nav navbar-nav" categories=categories %}
                {% include "sat_website/menu.html" with style="nav navbar-nav pull-right" categories=categories_right language_select=True %}
            </div>
            <noscript>
                {% for cat_url, item in categories.items %}
                    {% if item|is_tuple %}
                        {% for subcat_url, cat_name in item.1.items %}
                            <a class="btn btn-default" role="button" href="{{ subcat_url }}.html">{{ cat_name }}</a>
                        {% endfor %}
                    {% endif %}
                {% endfor %}
                <form id="language_form" class="form-inline" action="{% url 'set_language' %}" method="post">
	                {% csrf_token %}
	                <input name="next" type="hidden" value="{{ redirect_to }}" />
	                <select id="language_select" name="language">
	                    {% get_language_info_list for available_languages as languages %}
	                    {% for language in languages %}
	                        <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>{{ language.name_local|title }}</option>
	                    {% endfor %}
	                </select>
	                <input type="submit" value="{% trans "Set language" %}" />
	            </form>
            </noscript>
        </div>
    </nav>

    <script src="{% static "js/jquery.min.js" %}"></script>
    {% block content %}{% endblock %}
	<footer class="text-center">
		<address>
			{% trans '"Salut à Toi" association' %} -
			<a href="mailto:contact@salut-a-toi.invalid">contact</a> {% trans "(replace invalid with org)" %}
		</address>
	</footer>
    <script src="{% static "bootstrap/js/bootstrap.min.js" %}"></script>
    <script src="{% static "js/sat_website.js" %}"></script>
</body>
</html>