[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [styleguide/master] Update styleguide w lego
commit 5335337ceecac193a5f93e267062540cece105cf
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Tue Jul 9 15:25:09 2019 +0200
Update styleguide w lego
---
content/components/contents+en.lr | 2 +-
content/components/contents.lr | 2 +-
content/getting-started/contents+en.lr | 2 +-
content/getting-started/contents.lr | 2 +-
content/visuals/contents+en.lr | 2 +-
content/visuals/contents.lr | 2 +-
databags/menu+en.ini | 19 +++++++++++++++
databags/menu_footer+en.ini | 15 ++++++++++++
i18n/.gitignore | 2 ++
i18n/_compiled/en/LC_MESSAGES/contents.mo | Bin 581 -> 581 bytes
i18n/contents+en.po | 11 +++++----
i18n/contents.pot | 2 +-
styleguide.lektorproject | 6 +++++
templates/about.html | 6 +----
templates/components.html | 7 +-----
templates/getting-started.html | 6 +----
templates/layout.html | 38 ++++++++++++------------------
templates/macros/footer.html | 1 +
templates/page.html | 8 ++-----
templates/sidenav.html | 34 ++++++++++++++++++++++++++
20 files changed, 111 insertions(+), 56 deletions(-)
diff --git a/content/components/contents+en.lr b/content/components/contents+en.lr
index 938393a..849c39a 100644
--- a/content/components/contents+en.lr
+++ b/content/components/contents+en.lr
@@ -1,6 +1,6 @@
_model: page
---
-title: Components | Tor Styleguide
+title: Components
---
body:
diff --git a/content/components/contents.lr b/content/components/contents.lr
index 938393a..849c39a 100644
--- a/content/components/contents.lr
+++ b/content/components/contents.lr
@@ -1,6 +1,6 @@
_model: page
---
-title: Components | Tor Styleguide
+title: Components
---
body:
diff --git a/content/getting-started/contents+en.lr b/content/getting-started/contents+en.lr
index 601ca98..e1bd312 100644
--- a/content/getting-started/contents+en.lr
+++ b/content/getting-started/contents+en.lr
@@ -1,6 +1,6 @@
_model: page
---
-title: Getting Started | Tor Styleguide
+title: Getting Started
---
body:
diff --git a/content/getting-started/contents.lr b/content/getting-started/contents.lr
index 601ca98..e1bd312 100644
--- a/content/getting-started/contents.lr
+++ b/content/getting-started/contents.lr
@@ -1,6 +1,6 @@
_model: page
---
-title: Getting Started | Tor Styleguide
+title: Getting Started
---
body:
diff --git a/content/visuals/contents+en.lr b/content/visuals/contents+en.lr
index 65d42cd..d3f081e 100644
--- a/content/visuals/contents+en.lr
+++ b/content/visuals/contents+en.lr
@@ -1,6 +1,6 @@
_model: page
---
-title: Visuals | Tor Styleguide
+title: Visuals
---
body:
diff --git a/content/visuals/contents.lr b/content/visuals/contents.lr
index 65d42cd..1d8b443 100644
--- a/content/visuals/contents.lr
+++ b/content/visuals/contents.lr
@@ -1,6 +1,6 @@
_model: page
---
-title: Visuals | Tor Styleguide
+title: Visuals
---
body:
diff --git a/databags/menu+en.ini b/databags/menu+en.ini
new file mode 100644
index 0000000..3de793e
--- /dev/null
+++ b/databags/menu+en.ini
@@ -0,0 +1,19 @@
+[about]
+path = https://www.torproject.org/about/history
+label = About
+
+[documentation]
+path = https://2019.www.torproject.org/docs/documentation.html.en
+label = Documentation
+
+[support]
+path = https://support.torproject.org/
+label = Support
+
+[blog]
+path = https://blog.torproject.org
+label = Blog
+
+[donate]
+path = https://donate.torproject.org
+label = Donate
diff --git a/databags/menu_footer+en.ini b/databags/menu_footer+en.ini
new file mode 100644
index 0000000..b97b531
--- /dev/null
+++ b/databags/menu_footer+en.ini
@@ -0,0 +1,15 @@
+[jobs]
+path = https://www.torproject.org/about/jobs
+label = Jobs
+
+[blog]
+path = https://blog.torproject.org
+label = Blog
+
+[contact]
+path = https://www.torproject.org/contact
+label = Contact
+
+[press]
+path = https://www.torproject.org/press
+label = Press
diff --git a/i18n/.gitignore b/i18n/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/i18n/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/i18n/_compiled/en/LC_MESSAGES/contents.mo b/i18n/_compiled/en/LC_MESSAGES/contents.mo
index f0ab793..56b3c13 100644
Binary files a/i18n/_compiled/en/LC_MESSAGES/contents.mo and b/i18n/_compiled/en/LC_MESSAGES/contents.mo differ
diff --git a/i18n/contents+en.po b/i18n/contents+en.po
index add6059..c5fd200 100644
--- a/i18n/contents+en.po
+++ b/i18n/contents+en.po
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-07-09 14:31+CET\n"
-"PO-Revision-Date: 2018-11-02 14:16+CET\n"
+"POT-Creation-Date: 2019-06-25 17:05+CET\n"
+"PO-Revision-Date: 2018-11-29 17:17+CET\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: en\n"
@@ -94,11 +94,14 @@ msgstr "Search"
#~ "Trademark, copyright notices, and rules for use by third parties can be "
#~ "found in our "
-#~ msgid "Tor Project | Support"
-#~ msgstr "Tor Project | Support"
+#~ msgid "Tor Project | "
+#~ msgstr "Tor Project | "
#~ msgid "Tor Logo"
#~ msgstr "Tor Logo"
+#~ msgid "Topics"
+#~ msgstr "Topics"
+
#~ msgid "Permalink"
#~ msgstr "Permalink"
diff --git a/i18n/contents.pot b/i18n/contents.pot
index cd53efb..62e83e3 100644
--- a/i18n/contents.pot
+++ b/i18n/contents.pot
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-07-09 14:41+CET\n"
+"POT-Creation-Date: 2019-07-09 15:24+CET\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: en <LL@xxxxxx>\n"
diff --git a/styleguide.lektorproject b/styleguide.lektorproject
index d1b30cd..25405bb 100644
--- a/styleguide.lektorproject
+++ b/styleguide.lektorproject
@@ -3,3 +3,9 @@ name = styleguide
url = https://styleguide.torproject.org/
url_style = relative
locale = en
+
+[alternatives.en]
+name = English
+primary = yes
+url_prefix = /
+locale = en_US
diff --git a/templates/about.html b/templates/about.html
index c5dd469..a8732f4 100644
--- a/templates/about.html
+++ b/templates/about.html
@@ -1,5 +1,5 @@
{% extends "layout.html" %}
-{% block title %}{{ this.title }}{% endblock %}
+{% block title %}{{ this.title }} | Tor Styleguide {% endblock %}
{% block body %}
@@ -19,9 +19,5 @@
</div>
</div>
</div>
-
- {% include 'footer.html' %}
-
-
</main>
{% endblock %}
diff --git a/templates/components.html b/templates/components.html
index cb5b6cc..e627944 100644
--- a/templates/components.html
+++ b/templates/components.html
@@ -1,5 +1,5 @@
{% extends "layout.html" %}
-{% block title %}{{ this.title }}{% endblock %}
+{% block title %}{{ this.title }} | Tor Styleguide {% endblock %}
{% block body %}
<nav id="components-nav" class="nav flex-column d-none d-xl-block col-xl-1 bd-toc border">
@@ -287,10 +287,5 @@
</div>
</div>
</div>
-
-
- {% include 'footer.html' %}
-
-
</main>
{% endblock %}
diff --git a/templates/getting-started.html b/templates/getting-started.html
index 1a6c08b..2f289c9 100644
--- a/templates/getting-started.html
+++ b/templates/getting-started.html
@@ -1,5 +1,5 @@
{% extends "layout.html" %}
-{% block title %}{{ this.title }}{% endblock %}
+{% block title %}{{ this.title }} | Tor Styleguide {% endblock %}
{% block body %}
@@ -19,9 +19,5 @@
</div>
</div>
</div>
-
- {% include 'footer.html' %}
-
-
</main>
{% endblock %}
diff --git a/templates/layout.html b/templates/layout.html
index ec09553..5945f45 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -1,35 +1,27 @@
{% from "macros/links.html" import get_link %}
<!doctype html>
<html lang="en">
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="{{ '/static/bootstrap.css'|asseturl }}">
- <link rel="stylesheet" href="{{ '/static/fonts/open-iconic/font/css/open-iconic-bootstrap.css'|asseturl }}">
- <title>{% block title %}Tor Styleguide | The Tor Project {% endblock %}</title>
- <body>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" href="{{ '/static/css/bootstrap.css'|asseturl }}">
+<link rel="stylesheet" href="{{ '/static/fonts/fontawesome/css/all.min.css'|asseturl }}" rel="stylesheet">
+<title>{% block title %} | Tor Styleguide | The Tor Project {% endblock %}</title>
+ <body class="no-gutters">
<header>
{% include 'navbar.html' %}
</header>
<div class="page">
<div class="container-fluid">
- <div class="row flex-xl-nowrap">
- <div class="col-12 col-md-2 col-xl-1 bd-sidebar">
- <nav id="bd-docs-nav" class="collapse bd-links">
- <ul class="nav nav-pills flex-column">
- {% for id, item in bag('menu').items() %}
- <li{% if this.is_child_of(item.path) %} class="nav-item toc-entry toc-h2 active" {% else %} class="toc-entry toc-h2"{% endif %}><a class="nav-link" href="{{ item.path|url }}">{{ item.label }}</a></li> {% endfor %}
- </ul>
-
- </nav>
- </div>
-
- {% block body %}{% endblock %}
-
- </div>
+ <div class="row flex-xl-nowrap">
+ {% include 'sidenav.html' %}
+ <div class="row col-sm-12 col-xs-12 ml-sm-auto col-md-9 col-lg-9 mx-auto m-5">
+ {% block body %}{% endblock %}
+ </div>
+ </div>
</div>
-
-
</div>
- {% include 'footer.html' %}
+ <footer class="footer">
+ {% include 'footer.html' %}
+ </footer>
</body>
</html>
diff --git a/templates/macros/footer.html b/templates/macros/footer.html
new file mode 120000
index 0000000..9c9ca1b
--- /dev/null
+++ b/templates/macros/footer.html
@@ -0,0 +1 @@
+../../lego/templates/macros/footer.html
\ No newline at end of file
diff --git a/templates/page.html b/templates/page.html
index fbedb81..4b596c9 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -1,15 +1,11 @@
{% extends "layout.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
-<nav id="components-nav" class="d-none d-xl-block col-xl-2 bd-toc">
- <ul class="nav nav-pills flex-column sticky-top">
-
- </ul>
-</nav>
+
<main role="main" class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" data-spy="scroll" data-target="#components-nav" data-offset="0">
<h1>{{ this.title }}</h1>
{{ this.body }}
-
+
</main>
{% endblock %}
diff --git a/templates/sidenav.html b/templates/sidenav.html
new file mode 100644
index 0000000..5fa3433
--- /dev/null
+++ b/templates/sidenav.html
@@ -0,0 +1,34 @@
+<div class="container-fluid sidebar col-xs-12 col-sm-12 col-md-3 col-lg-3">
+ <nav class="smalltopics no-background navbar navbar-expand-lg navbar-light bg-white p-0 fixed">
+ <label class="side-toggler" for="menu-toggle">
+ <a class="btn btn-lg outline-primary text-primary navbar-toggler chevron" data-toggle="collapse" data-target="#navbarSupportedTopicsContent" aria-controls="navbarSupportedTopicsContent" aria-expanded="false" aria-label="Toggle navigation">
+ <span class="oi oi-chevron-top chevron-up"></span>
+ <span class="oi oi-chevron-bottom chevron-down"></span>
+ </a>
+ </label>
+ <input type="checkbox" id="menu-toggle"/>
+
+ <div class="collapse navbar-collapse burger-menu" id="navbarSupportedTopicsContent">
+ <ul class="nav nav-pills flex-column">
+ {% for child in this.children %}
+ <li{% if this.is_child_of(child.path) %} class="toc-entry toc-h2 active nav-item" {% else %} class="toc-entry toc-h2 nav-item" {% endif %}>
+ <a role="button" {% if this.is_child_of(child.path) %} class="nav-link active" {% else %} class="nav-link" {% endif %}
+ href="{{ child.path|url(alt=this.alt) }}">{{ _(child.title) }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ <hr class="mb-0" />
+ </nav>
+
+ <nav class="d-none d-sm-block bg-white border-right sidetopics" id="sidenav-topics" style="top:172px;">
+ <ul class="nav nav-pills flex-column">
+ {% for child in this.children %}
+ <li{% if this.is_child_of(child.path) %} class="toc-entry toc-h2 active nav-item" {% else %} class="toc-entry toc-h2 nav-item" {% endif %}>
+ <a role="button" {% if this.is_child_of(child.path) %} class="nav-link active" {% else %} class="nav-link" {% endif %}
+ href="{{ child.path|url(alt=this.alt) }}">{{ _(child.title) }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ </nav>
+</div>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits