Skip to content

Commit

Permalink
add version to dispatch header
Browse files Browse the repository at this point in the history
  • Loading branch information
Rowansdabomb committed Mar 2, 2019
1 parent 1d58682 commit ca47c4c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dispatch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '0.5.29'
__version__ = '0.5.30'

2 changes: 1 addition & 1 deletion dispatch/static/manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dispatch",
"version": "0.5.29",
"version": "0.5.30",
"description": "The frontend framework for the Dispatch publishing platform.",
"author": "Peter Siemens <[email protected]>",
"homepage": "https://www.ubyssey.ca",
Expand Down
9 changes: 5 additions & 4 deletions dispatch/static/manager/src/js/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ class Header extends React.Component {
}
}

renderLink(url, classes, icon, value) {
renderLink(url, classes, icon, value, subscript) {
return (
<Button
minimal={true}
onClick={() => this.props.goTo(url)}
icon={icon}>
{value}
{subscript && <div className='dispatch-version'>{subscript}</div>}
</Button>
)
}
Expand All @@ -35,13 +36,13 @@ class Header extends React.Component {
<header className='c-header'>
<nav className='bp3-navbar bp3-dark'>
<div className='bp3-navbar-group bp3-align-left'>
{this.renderLink('/', 'nav-logo', 'selection', 'dispatch')}
{this.renderLink('/', 'nav-logo', 'selection', 'dispatch', '0.5.30')}
<span className='bp3-navbar-divider' />
<HeaderButtons goTo={this.props.goTo} />
</div>
<div className='bp3-navbar-group bp3-align-right'>
{this.renderLink('/profile/', null, 'user', '')}
{this.renderLink('/logout/', null, 'log-out', '')}
{this.renderLink('/profile/', null, 'user', '', null)}
{this.renderLink('/logout/', null, 'log-out', '', null)}
</div>
</nav>
</header>
Expand Down
8 changes: 8 additions & 0 deletions dispatch/static/manager/src/styles/components/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ $border-bottom-height: 2px;
}
}

.dispatch-version {
// Position
position: absolute;
margin-left: 25px;
// Text
font-size: .7rem;
}

@media ($bp-larger-than-tablet) {
.nav-link-group {
// Structure
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(name='dispatch',
version='0.5.29',
version='0.5.30',
description='A publishing platform for modern newspapers',
url='https://github.com/ubyssey/dispatch',
author='Peter Siemens',
Expand Down

0 comments on commit ca47c4c

Please sign in to comment.