Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add search to navbar #347

Merged
merged 1 commit into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions website/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@
.navbar-static-top .navbar-header {
z-index:4;
}
.navbar-static-top .navbar-brand img {
margin-left:20px;
}
.navbar-top-links img {
width: 20px;
height: 20px;
}
.navbar-static-top textarea {
resize:vertical;
.form-group textarea {
height: 34px;
}
.screenshot-hash {
Expand Down
17 changes: 0 additions & 17 deletions website/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ body{
background-color: #fff;
}

.navbar-default{
background-color: #fff;
padding: 20px;
border-width: 0;
}

@media only screen and (max-width: 800px){
.navbar-header{
float: left;
Expand All @@ -17,31 +11,26 @@ body{
display: none;
}
}

.navbar-default .tagline{
font-size: 14px;
color: #999;
line-height: 20px;
padding-left: 5px;
font-weight: 300;
}

.page-header{
font-weight: 400;
font-size: 40px;
padding: 30px;
margin: 20px 0;
border-bottom-width: 1px;
}

.chrome-plugin{
color: #dd4252;
}

.sponsor-hunt{
color: #dd4252;
}

.social-feeds{
color: #dd4252;
}
Expand Down Expand Up @@ -83,17 +72,11 @@ a:hover{
margin: 30px auto;
}
}

.form input,.form textarea,.form label{
/* margin:5px auto;*/
}

.form label{
color: #777;
}

.form .form-group{
/*margin-top: 20px;*/
margin:0;
}

Expand Down
137 changes: 66 additions & 71 deletions website/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,80 +41,75 @@
</style>
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/">
<img src="{% static "img/logo-small-transparent.png" %}">
</a>
<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="/">
<img src="{% static "img/logo-small-transparent.png" %}">
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://chrome.google.com/webstore/detail/bugheist/bififchikfckcnblimmncopjinfgccme?hl=en" target="_new">Add to chrome</a></li>
<li><a href="/social">Social</a></li>
<li><a href="/report">Report Bug</a></li>
<li><a href="/start" class="sponsor-hunt">Bug Hunt</a></li>
<li><a href="#" id="startTour" class="start-tour">Tour</a></li>

<ul class="nav navbar-top-links navbar-right">
{% if request.user.is_authenticated %}
<li class="dropdown user-menu">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
{% if request.user.userprofile.avatar %}
<img src="{{ request.user.userprofile.avatar }}">
{% elif request.user.socialaccount_set.all.0.get_avatar_url %}
<img src="{{request.user.socialaccount_set.all.0.get_avatar_url}}">
{% else %}
{% gravatar request.user.email 20 %}
{% endif %}
{{request.user.username}} ({{ request.user|score|default:"0" }} Pts) <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li>
<a href="/accounts/profile/">
<i class="fa fa-user fa-fw"></i> User Profile
</a>
</li>
<li>
<a href="/accounts/password/change/">
<i class="fa fa-gear fa-fw"></i> Settings
</a>
</li>
<li class="divider"></li>
<li>
<a href="/accounts/logout/">
<i class="fa fa-sign-out fa-fw"></i> Logout
</a>
</li>
</ul>
</li>
{% else %}
<a href="/accounts/signup">
<button class="btn btn-default login-button">Signup</button>
</a>
<a data-toggle="modal" href="#login">
<button class="btn btn-default login-button">Login</button>
</a>
{% endif %}
<li style="float:left;"><a id="chrome_ext" href="https://chrome.google.com/webstore/detail/bugheist/bififchikfckcnblimmncopjinfgccme?hl=en" target="_new" class="chrome-plugin">
+ Add to chrome
</a></li>
<li style="float:left;">
<a href="/social" class="social-feeds">Social Feeds</a>
</li>
<li style="float:left;">
<a href="/report" class="report-bug">Report Bug</a>
</li>
<li style="float:left;">
<a href="/start" class="sponsor-hunt">Sponsor a Bug Hunt</a>
</li>
<li style="float:left;">
<a href="#" id="startTour" class="start-tour">Tour</a>
</li>
<li style="float:left;">
<a href="/search" class="sponsor-hunt">Search</a>
</li>
</ul>
<div class="col-md-12">
<div class="col-md-4">
<span class="tagline">Win prizes for reporting bugs</span><br>
<span class="tagline">We want everyone to love your website</span>
</div>
</div>
</nav>
{% if request.user.is_authenticated %}
<li class="dropdown user-menu">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
{% if request.user.userprofile.avatar %}
<img src="{{ request.user.userprofile.avatar }}">
{% elif request.user.socialaccount_set.all.0.get_avatar_url %}
<img src="{{request.user.socialaccount_set.all.0.get_avatar_url}}">
{% else %}
{% gravatar request.user.email 20 %}
{% endif %}
{{request.user.username}} ({{ request.user|score|default:"0" }} Pts) <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li>
<a href="/accounts/profile/">
<i class="fa fa-user fa-fw"></i> User Profile
</a>
</li>
<li>
<a href="/accounts/password/change/">
<i class="fa fa-gear fa-fw"></i> Change Password
</a>
</li>
<li class="divider"></li>
<li>
<a href="/accounts/logout/">
<i class="fa fa-sign-out fa-fw"></i> Logout
</a>
</li>
</ul>
</li>
{% else %}
<li><a href="/accounts/signup">Signup</a></li>
<li><a href="#login" data-toggle="modal">Login</a></li>
{% endif %}
</ul>
<form class="navbar-form navbar-right" action="/search" method="get">
<div class="form-group">
<input type="text" name="query" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">
<i class="fa fa-search"></i>
</button>
</form>
</div>
</div>
</nav>
<div id="wrapper">
<div id="page-wrapper">
<div class="container">
{% block content %}
Expand Down
Loading