Skip to content

Commit

Permalink
Switch to Bootstrap
Browse files Browse the repository at this point in the history
We really need a responsive layout and using Bootstrap is easiest way as
I already know it. Having something lighter might be better...

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed May 4, 2015
1 parent 9a2eda9 commit 990cf98
Show file tree
Hide file tree
Showing 14 changed files with 274 additions and 246 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@
/weblate_web/files/
*.mo
db.sqlite3
/django
17 changes: 14 additions & 3 deletions weblate_web/html/base-features.html
@@ -1,18 +1,29 @@
{% load i18n %}
<a class="feature" href="http://docs.weblate.org/en/latest/faq.html#how-to-create-automatic-worflow">

<div class="row">

<div class="col-lg-4 feature">
<a href="http://docs.weblate.org/en/latest/faq.html#how-to-create-automatic-worflow">
<div class="fa fa-gears fa-4x"></div>
<h4>{% trans "Continuous translation" %}</h4>
<p>{% trans "Automated translation process can closely follow development of your project." %}</p>
</a>
</div>

<a class="feature" href="http://docs.weblate.org/en/latest/user/checks.html">
<div class="col-lg-4 feature">
<a href="http://docs.weblate.org/en/latest/user/checks.html">
<div class="fa fa-search fa-4x"></div>
<h4>{% trans "Quality checks" %}</h4>
<p>{% trans "Customizable quality checks will help you in improving quality of translations." %}</p>
</a>
</div>

<a class="feature" href="http://docs.weblate.org/en/latest/faq.html#how-does-weblate-credit-translators">
<div class="col-lg-4 feature">
<a href="http://docs.weblate.org/en/latest/faq.html#how-does-weblate-credit-translators">
<div class="fa fa-user fa-4x"></div>
<h4>{% trans "Attribution" %}</h4>
<p>{% trans "All your translators will be properly credited in the version control system." %}</p>
</a>
</div>

</div>
118 changes: 73 additions & 45 deletions weblate_web/html/base.html
Expand Up @@ -10,8 +10,7 @@
<meta name="robots" content="index, follow" />
<meta name="description" content="{% block description %}{% endblock %}" />
<meta name="keywords" content="weblate,git,gettext,resources,json,po,mo,qts,CAT,web,{% trans "translate" context "Keyword" %}" />
<link rel="stylesheet" type="text/css" href="/media/style.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/media/colorbox.css">
<link rel="author" href="mailto:michal@cihar.com" />
<link rel="shortcut icon" href="/media/favicon.ico" type="image/x-icon" />
Expand All @@ -34,66 +33,94 @@
{% endif %}
{% endfor %}
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="/media/custom.css">

<script src="/media/jquery.colorbox-min.js"></script>
<script src="/media/code.js"></script>
<meta name="google-site-verification" content="SSd77ql2j6xSOlvDHT2pO2r3ZMQQyMVTycyse-l9i6A" />
<meta name="wot-verification" content="b166aac1728babda4ade" />
</head>
<body {% if LANGUAGE_BIDI %}class="dir-rtl"{% endif %}>
<a class="logo" href="{% url 'home' %}"><img src="/media/weblate-128.png" width="128" height="128" alt="{% trans "Weblate logo" %}"/></a>
<nav>
<a href="{% url 'home' %}">{% trans "Home" %}</a>
<a href="http://blog.cihar.com/archives/weblate/">{% trans "Blog" %}</a>
<a href="{% url 'try' %}">{% trans "Try" %}</a>
<a href="{% url 'features'%}">{% trans "Features" %}</a>
<a href="http://docs.weblate.org/">{% trans "Docs" %}</a>
<a href="{% url 'download' %}">{% trans "Download" %}</a>
<a href="{% url 'hosting' %}">{% trans "Hosting" %}</a>
<a href="{% url 'contribute' %}">{% trans "Develop" %}</a>
<a href="{% url 'donate' %}">{% trans "Donate" %}</a>
<a href="{% url 'support' %}">{% trans "Support" %}</a>
<a href="{% url 'tour' %}">{% trans "Tour" %}</a>
<a href="{% url 'thanks' %}">{% trans "Thanks" %}</a>
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">{% trans "Toggle navigation" %}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'home' %}">
<img class="logo" src="/media/weblate-128.png" alt="{% trans "Weblate logo" %}" />
Weblate
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="http://blog.cihar.com/archives/weblate/">{% trans "Blog" %}</a></li>
<li><a href="{% url 'try' %}">{% trans "Try" %}</a></li>
<li><a href="{% url 'features'%}">{% trans "Features" %}</a></li>
<li><a href="http://docs.weblate.org/">{% trans "Docs" %}</a></li>
<li><a href="{% url 'download' %}">{% trans "Download" %}</a></li>
<li><a href="{% url 'hosting' %}">{% trans "Hosting" %}</a></li>
<li><a href="{% url 'contribute' %}">{% trans "Develop" %}</a></li>
<li><a href="{% url 'donate' %}">{% trans "Donate" %}</a></li>
<li><a href="{% url 'support' %}">{% trans "Support" %}</a></li>
<li><a href="{% url 'tour' %}">{% trans "Tour" %}</a></li>
<li><a href="{% url 'thanks' %}">{% trans "Thanks" %}</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-globe"></span>
{% for lang in LANGUAGES %}{% if lang.0 == LANGUAGE_CODE %}{{ lang.1 }}{% endif %}{% endfor %}
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
{% for lang_code, lang_name in languages %}
{% language lang_code %}
<li><a href="{% if url_name %}{% url url_name %}{% else %}{% url 'home' %}{% endif %}">{{ lang_name }}</a></li>
{% endlanguage %}
{% endfor %}
<li role="presentation" class="divider"></li>
<li><a href="{% url 'contribute' %}#translate">{% trans "Help with translations!" %}</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<header>
<a class="language" href="#">
<span class="fa fa-globe"></span>
{% for lang in LANGUAGES %}{% if lang.0 == LANGUAGE_CODE %}{{ lang.1 }}{% endif %}{% endfor %}
</a>

<div class="languages">
<div class="choice">
{% for lang_code, lang_name in languages %}
{% language lang_code %}
<a href="{% if url_name %}{% url url_name %}{% else %}{% url 'home' %}{% endif %}">{{ lang_name }}</a>
{% endlanguage %}
{% endfor %}


</div>
<a href="{% url 'contribute' %}#translate">{% trans "Help with translations!" %}</a>
<div class="jumbotron">
<div class="container">
<h1>
{% block header %}
Weblate
{% endblock %}
</h1>
<p class="headline">
{% block headline %}
{% endblock %}
</p>
{% block extrajumbo %}
{% endblock %}
</div>
</div>

<h1>
{% block header %}
Weblate
{% endblock %}
</h1>
<p class="headline">
{% block headline %}
{% endblock %}
</p>
</header>
<div class="content">
<div class="container">

{% block content %}
{% endblock %}
</div>
<div class="clearer"></div>

<footer>
<ul class="footer">
<li>Copyright &copy; 2012 - 2015 <a href="http://cihar.com/">Michal Čihař</a></li>
<li>{% url 'donate' as donate_url %}{% blocktrans %}Weblate is free software, but welcomes <a href="{{ donate_url }}">donations</a>.{% endblocktrans %}</li>
<li><a href="https://plus.google.com/+WeblateOrg" rel="publisher" style="display: none">{% trans "Visit us on Google+" %}</a></li>
</ul>
</footer>
<!-- Piwik Image Tracker -->
Expand All @@ -115,5 +142,6 @@ <h1>
<noscript><p><img src="http://stats.cihar.com/piwik.php?idsite=12" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

</div>
</body>
</html>
6 changes: 6 additions & 0 deletions weblate_web/html/contribute.html
Expand Up @@ -5,6 +5,12 @@
{% block description %}
{% block headline %}{% trans "Weblate is being developed by an open community." %}{% endblock %}
{% endblock %}
{% block extrajumbo %}
<p>
<a class="btn btn-primary btn-lg" href="https://github.com/nijel/weblate/" role="button"><i class="fa fa-github"></i> {% trans "View sources" %}</a>
<a class="btn btn-primary btn-lg" href="https://hosted.weblate.org/engage/weblate/" role="button"><i class="fa fa-globe"></i> {% trans "Translate" %}</a>
</p>
{% endblock %}
{% block content %}

<p>
Expand Down
22 changes: 18 additions & 4 deletions weblate_web/html/donate.html
Expand Up @@ -5,6 +5,14 @@
{% block description %}
{% block headline %}{% trans "Weblate is free, but welcomes donations." %}{% endblock %}
{% endblock %}
{% block extrajumbo %}
<p>
<a href="https://gratipay.com/nijel/" class="btn btn-primary btn-lg" role="button">
<i class="fa fa-gratipay"></i>
{% trans "Donate using Gratipay" %}
</a>
</p>
{% endblock %}
{% block content %}

<h2>{% trans "Regular donations" %}</h2>
Expand All @@ -13,7 +21,8 @@ <h2>{% trans "Regular donations" %}</h2>
{% blocktrans %}Regular donations allow sustainability of Weblate development and help to fund free hosting for free software. You don't have to spend big money, every penny counts.{% endblocktrans %}
</p>

<a href="https://gratipay.com/nijel/" class="button">
<a href="https://gratipay.com/nijel/" class="btn btn-primary">
<i class="fa fa-gratipay"></i>
{% trans "Donate using Gratipay" %}
</a>

Expand All @@ -23,7 +32,8 @@ <h2>{% trans "Regular donations" %}</h2>

<h2>{% trans "Fund features" %}</h2>

<a href="https://www.bountysource.com/trackers/253393-nijel-weblate" class="button">
<a href="https://www.bountysource.com/trackers/253393-nijel-weblate" class="btn btn-primary">
<i class="fa fa-money"></i>
{% trans "Fund on Bountysource" %}
</a>

Expand All @@ -40,14 +50,18 @@ <h2>{% trans "Donate" %}</h2>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="AXN88S8GX5MQ4" />
<button class="button" type="submit">{% trans "Donate using PayPal" %}</button>
<button class="btn btn-primary" type="submit">
<i class="fa fa-paypal"></i>
{% trans "Donate using PayPal" %}
</button>
</form>

<p>
{% trans "PayPal allows you to send money from credit card, PayPal balance or a bank account." %}
</p>

<a href="https://www.coinbase.com/checkouts/e7c16485643a51c08cd66de46f13f0d8" class="button">
<a href="https://www.coinbase.com/checkouts/e7c16485643a51c08cd66de46f13f0d8" class="btn btn-primary">
<i class="fa fa-bitcoin"></i>
{% trans "Donate using Coinbase" %}
</a>

Expand Down
6 changes: 6 additions & 0 deletions weblate_web/html/download.html
Expand Up @@ -6,6 +6,12 @@
{% block description %}
{% block headline %}{% trans "Weblate comes with complete source code." %}{% endblock %}
{% endblock %}

{% block extrajumbo %}
<p>
<a class="btn btn-primary btn-lg" href="https://github.com/nijel/weblate/" role="button"><i class="fa fa-github"></i> {% trans "View sources" %}</a>
</p>
{% endblock %}
{% block content %}

<h2>{% trans "Code" %}</h2>
Expand Down

0 comments on commit 990cf98

Please sign in to comment.