Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:akbargumbira/django-user-map
Browse files Browse the repository at this point in the history
  • Loading branch information
akbargumbira committed Mar 10, 2016
2 parents 786fbfe + 7d5e9e1 commit b9c8cf6
Show file tree
Hide file tree
Showing 10 changed files with 5,946 additions and 76 deletions.
77 changes: 19 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,67 +235,28 @@ But you can add a navigation menu so it looks like this as an example:

![User Map with Navigation](docs/img/with_nav.png)

To add navigation menu, add html file named ```navigation.html``` in ```user_map/templates/``` dir under your project's directory (along with your custom data privacy content). Django User Map uses Bootstrap 3, so you can use style classes and other stuffs from Bootstrap 3.
As an example the content could be something like this tresulting the above screenshot:
To add navigation menu, add html file named ```navigation.html``` in ```user_map/templates/``` dir under your project's directory (along with your custom data privacy content)

If you need more style or javascript resources to create this navigation menu, please add another template named ```extra_resources.html``` and save it in the same directory with the ```navigation.html```. These additional resources will be included in the head tag, so the content could be something like:

```html
<nav class="navbar navbar-default" style="margin-bottom: 0px;">
<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" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>

<link rel="stylesheet" href="/static/style/new/basic.css" type="text/css" />
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="/static/style/new/qgis-style.css" type="text/css" />
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap-responsive.min.css" type="text/css" />
<link rel="stylesheet" href="/static/font-awesome/css/font-awesome.min.css">


<style>
body {
padding-top : 0px !important;
}
.navbar-fixed-top {
position: relative;
}
</style>
```

## Testing

You can run the test suite by using django manage.py from your django project:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='django-user-map',
version='1.0.0',
version='1.1.0',
author='Akbar Gumbira',
author_email='[email protected]',
packages=find_packages(),
Expand Down
56 changes: 48 additions & 8 deletions user_map/static/user_map/css/user-map.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,27 @@ body {
-webkit-flex-direction: column;
flex-direction: column;
height:100%;

margin: 0;
}

.container {
width: 100%;
.bootstrap-wrapper {
flex:1;
display:flex;
height: 100%;
-webkit-flex-direction: column;
flex-direction: column;
}

#map {
width: 100%;
height: 100%;
}

.bootstrap-wrapper .container {
margin: 0px 0px 0px 50px;
}


#map .leaflet-top {
padding-top: 10px;
}
Expand All @@ -30,20 +40,50 @@ body {
background-color: rgba(250, 250, 250, 0.5);
}

.footer {
.bootstrap-wrapper .footer {
color: rgb(120, 120, 120);
margin-bottom: 20px;
}

.registration-form {
.bootstrap-wrapper .registration-form {
max-width: 600px;
}

.form-group .multiple-checkbox ul {
padding-left: 0;
list-style: outside none none;
.bootstrap-wrapper .form-group .multiple-checkbox ul {
padding-left: 0;
list-style: outside none none;
margin: 0px;
}

.modal {
display: none;
overflow: auto;
overflow-y: scroll;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
margin: 0px;
background-color: transparent;
width: auto;
border: none;
}

/* Override this style from bootstrap wrapper */
.bootstrap-wrapper .tooltip-inner {
padding: 3px 8px;
color: #ffffff;
text-align: center;
text-decoration: none;
background-color: #000000;
border-radius: 4px;
}

.leaflet-control-zoom a {
color: #000000 !important;
}
/* ******************** */
/* Misc */
/* ******************** */
Expand Down
Loading

0 comments on commit b9c8cf6

Please sign in to comment.