Skip to content

Commit

Permalink
Upgrade to Bulma 0.7.x and add badge
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Jul 5, 2018
1 parent cc58e7a commit fd0e39d
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 29 deletions.
24 changes: 22 additions & 2 deletions bulrush/static/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,28 @@ article .section {
footer.footer {
position: relative;

.icon.is-small {
vertical-align: baseline;
.credits {
align-items: center;
display: flex;
justify-content: center;

> * {
display: inline-block;
padding: 0 0.5rem;

&:not(:last-child) {
border-right: 1px solid @darker-grey;
}

&.badge {
height: 1.5rem;
padding-left: 0;
}
}

.icon.is-small {
vertical-align: baseline;
}
}

.github-fork-ribbon-wrapper {
Expand Down
Binary file added bulrush/static/images/made-with-bulma--black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 29 additions & 25 deletions bulrush/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width">
<title>{% block title %}{{ SITENAME }}{% endblock %}</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.1/css/bulma.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
{% assets filters="less,yui_css", output="css/main.%(version)s.css", "css/main.less" %}
<link rel="stylesheet" href="{{ SITEURL }}/{{ ASSET_URL }}">
{% endassets %}
Expand All @@ -23,34 +23,36 @@
<header class="hero is-primary">
<div class="hero-head">
<div class="container">
<nav class="nav">
<div class="nav-left">
<a class="nav-item is-brand title is-3{% if output_file == "index.html" %} is-active{% endif %}"
<nav class="navbar">
<div class="navbar-brand">
<a class="navbar-item title is-3{% if output_file == "index.html" %} is-active{% endif %}"
href="{{ SITEURL }}/">{{ SITENAME }}</a>
</div>
</nav>
</div>
</div>
</header>

<nav class="nav has-shadow is-hidden-print">
<nav class="navbar has-shadow is-hidden-print">
<div class="container">
<div class="nav-center"></div>
<span id="navToggle" class="nav-toggle">
<div class="navbar-center"></div>
<span id="navToggle" class="navbar-burger">
<span></span>
<span></span>
<span></span>
</span>
<div id="navMenu" class="nav-right nav-menu">
{% for title, link in MENUITEMS|reverse %}
<a class="nav-item is-tab" href="{{ link }}">{{ title }}</a>
{% endfor %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
{% for cat, null in categories|reverse %}
<a class="nav-item is-tab {% if cat == category %}is-active{% endif %}"
href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a>
{% endfor %}
{% endif %}
<div id="navMenu" class="navbar-menu">
<div class="navbar-end">
{% for title, link in MENUITEMS|reverse %}
<a class="navbar-item is-tab" href="{{ link }}">{{ title }}</a>
{% endfor %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
{% for cat, null in categories|reverse %}
<a class="navbar-item is-tab {% if cat == category %}is-active{% endif %}"
href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</nav>
Expand Down Expand Up @@ -121,11 +123,13 @@
<footer class="footer">
<div class="container has-text-centered">
{% if SITESUBTITLE %} <p class="subtitle">{{ SITESUBTITLE }}</p>{% endif %}
<p><a href="https://github.com/textbook/bulrush">Bulrush</a> theme for
<a href="https://blog.getpelican.com/">Pelican</a>
| <span class="icon is-small"><i class="fa fa-html5"></i></span> HTML 5
| <span class="icon is-small"><i class="fa fa-css3"></i></span> CSS 3
</p>
<div class="credits">
<span><a href="https://github.com/textbook/bulrush">Bulrush</a> theme for
<a href="https://blog.getpelican.com/">Pelican</a></span>
<span><span class="icon is-small"><i class="fa fa-html5"></i></span> HTML 5</span>
<span><span class="icon is-small"><i class="fa fa-css3"></i></span> CSS 3</span>
<img class="badge" src="https://bulma.io/images/made-with-bulma--black.png">
</div>
</div>
{% include 'github.html' %}
</footer>
Expand All @@ -136,10 +140,10 @@
document.getElementById('navToggle').addEventListener('click', function () {
var nav = document.getElementById('navMenu');
var className = nav.getAttribute('class');
if (className == 'nav-right nav-menu') {
nav.className = 'nav-right nav-menu is-active';
if (className == 'navbar-menu') {
nav.className = 'navbar-menu is-active';
} else {
nav.className = 'nav-right nav-menu';
nav.className = 'navbar-menu';
}
});
</script>
Expand Down
4 changes: 3 additions & 1 deletion bulrush/templates/taglist.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% if article.tags %}
{% for tag in article.tags %}
<span class="tag is-small"><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a></span>
<span class="tag is-small is-rounded">
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a>
</span>
{% endfor %}
{% endif %}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
test_suite='tests',
tests_require=['pelican'],
url='https://github.com/textbook/bulrush',
version='0.1.1',
version='0.2.0',
)

0 comments on commit fd0e39d

Please sign in to comment.