[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [donate-static/staging] Change header add color remove full navbar
commit a11333fee7ebf5eddee41156ecc00573566ba516
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Mon Oct 19 20:22:55 2020 +0200
Change header add color remove full navbar
---
content/contents.lr | 4 +++-
lego | 2 +-
models/donate-form.ini | 4 ++++
templates/meta.html | 6 +-----
templates/navbar-min.html | 49 +++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 58 insertions(+), 7 deletions(-)
diff --git a/content/contents.lr b/content/contents.lr
index 4e429406..f4cc42db 100644
--- a/content/contents.lr
+++ b/content/contents.lr
@@ -84,7 +84,9 @@ tshirt_perk_monthly_label: T-Shirt
---
tshirt_perk_monthly_image: /static/images/donate/t-shirt-take-back-internet.png
---
-header_image: /static/css/images/home/png/use-tor.png
+header_image: /static/css/images/donate-banner.png
+---
+header_color: black
---
success_redirect_url:
---
diff --git a/lego b/lego
index 666de536..a1bf61f3 160000
--- a/lego
+++ b/lego
@@ -1 +1 @@
-Subproject commit 666de536f013d0ea90dc954b732ea1e1b0b618cf
+Subproject commit a1bf61f36ccf730df140f684e3ea6970b6d6a9d8
diff --git a/models/donate-form.ini b/models/donate-form.ini
index 943f775d..db053c7a 100644
--- a/models/donate-form.ini
+++ b/models/donate-form.ini
@@ -40,6 +40,10 @@ type = markdown
label = Header Image (centered)
type = string
+[fields.header_color]
+label = Header Color
+type = string
+
[fields.success_redirect_url]
label = URL to redirect to after donation completed successfully
type = url
diff --git a/templates/meta.html b/templates/meta.html
index 9e9c26b0..17a9652f 100644
--- a/templates/meta.html
+++ b/templates/meta.html
@@ -20,9 +20,5 @@
<title>{{ _("Tor Project") }} | {% block title %}{{ this.title }}{% endblock %}</title>
<body class="no-gutters">
<header>
- {% if this.path == '/download' %}
- {% include 'navbar-min.html' %}
- {% else %}
- {% include 'navbar.html' %}
- {% endif %}
+ {% include 'navbar-min.html' %}
</header>
diff --git a/templates/navbar-min.html b/templates/navbar-min.html
new file mode 100644
index 00000000..51e0bc3b
--- /dev/null
+++ b/templates/navbar-min.html
@@ -0,0 +1,49 @@
+{% if not this.color %}
+<div class="container-fluid bg-primary">
+ <nav class="navbar no-background navbar-expand-lg navbar-dark bg-primary p-2">
+{% elif this.color == 'primary' %}
+<div class="container-fluid bg-primary">
+ <nav class="navbar no-background navbar-expand-lg navbar-dark bg-primary p-2">
+{% else %}
+<div class="container-fluid bg-dark">
+ <nav class="navbar no-background navbar-expand-lg navbar-dark bg-dark p-2 d-flex justify-content-between">
+{% endif %}
+ <div>
+ <div class="row">
+ <a class="navbar-brand" href="{{ '/'|url(alt=this.alt) }}">
+ <img alt="{{ 'The Tor Project' }}" src="{{ '/static/images/tor-logo@xxxxxx'|asseturl }}" >
+ <span class="sr-only">Tor Logo</span>
+ </a>
+
+ {% set link = bag('links', this.alt, 'donate') %}
+ {% if link %}
+ <h4 class="pl-2 pr-2 pt-3"><a href="{{ link }}" title="{{ _("Donate") }}"><span class="badge badge-warning p-2">{{ _("Donate Now") }}</span></a></h4>
+ {% else %}
+ <h4 class="pl-2 pr-2 pt-3"><a href="https://www.torproject.org/donate/{{ this.alt }}" title="{{ _("Donate") }}"><span class="badge badge-warning p-2">{{ _("Donate Now") }}</span></a></h4>
+ {% endif %}
+ </div>
+ </div>
+ {% set alts = bag('alternatives').items() %}
+ {% if alts|length > 1 %}
+ <div class="btn-group dropdown float-right">
+ {% if not this.color %}
+ <button type="button" class="btn btn-primary bg-primary dropdown-toggle btn-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ {% elif this.color == 'primary' %}
+ <button type="button" class="btn btn-primary bg-primary dropdown-toggle btn-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ {% else %}
+ <button type="button" class="btn btn-dark bg-dark dropdown-toggle btn-block my-3 my-sm-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ {% endif %}
+ {{ bag('alternatives', this.alt, 'language') }}
+ </button>
+ <div class="dropdown-menu">
+ {% for id, item in bag('alternatives').items() %}
+ {% if this.alt != id %}
+ <a class="dropdown-item" href="{{ this.path|url(alt=id) }}">{{ item.language }}</a>
+ {% endif %}
+ {% endfor %}
+ </div>
+ </div>
+ {% endif %}
+
+ </nav>
+</div>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits