Skip to content

Commit

Permalink
active nav menu
Browse files Browse the repository at this point in the history
  • Loading branch information
umitdincel authored and ulgens committed Oct 4, 2020
1 parent 154ac7c commit 519c252
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
5 changes: 5 additions & 0 deletions people/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ class PeopleView(ListView):

def get_success_url(self):
return reverse("people:index")

def get_context_data(self, **kwargs):
context = super(PeopleView, self).get_context_data(**kwargs)
context['page'] = 'people'
return context
5 changes: 5 additions & 0 deletions presentations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@

class PresentationsView(ListView):
model = Presentation

def get_context_data(self, **kwargs):
context = super(PresentationsView, self).get_context_data(**kwargs)
context['page'] = 'presentation'
return context
6 changes: 3 additions & 3 deletions static_files/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ footer .copyright span:before {
height: 120px;
line-height: 120px;
text-align: center;
margin: 0;
margin: 0 0 20px 0;
background-color: rgba(238, 238, 238, 0.9);
}

Expand All @@ -399,11 +399,11 @@ footer .copyright span:before {
}

.event .presentations {
padding: 20px 20px 0;
padding: 0 20px;
}

.event .presentations .presentation {
margin-bottom: 20px;
margin-bottom: 10px;
}

.event .presentations .presentation-title {
Expand Down
6 changes: 3 additions & 3 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@
<li class="nav-item">
<a data-toggle="collapse" href="#pyistanbul">NEDİR?</a>
</li>
<li class="nav-item">
<li class="nav-item {% if page == 'presentation' %}active{% endif %}">
<a href="{% url 'presentations:index' %}">SUNUMLAR</a>
</li>
<li class="nav-item logo">
<a href="{% url 'blog:home' %}">
<img src="{% static 'images/logo.svg' %}" alt="Pyistanbul">
</a>
</li>
<li class="nav-item active"><a href="{% url 'people:index' %}">İNSANLAR</a></li>
<li class="nav-item"><a href="#">İŞ İLANLARI</a></li>
<li class="nav-item {% if page == 'people' %}active{% endif %}"><a href="{% url 'people:index' %}">İNSANLAR</a></li>
<li class="nav-item {% if page == 'blog' %}active{% endif %}"><a href="#">BLOG</a></li>
</ul>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions templates/people/person_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ <h4 class="modal-title">Yeni Kişi</h4>
{% include 'djangospam/cookieform.html' %}
<form action="{% url 'people:index' %}" method="post">
{% csrf_token %}
{{ form }}
<!-- <div class="form-group">
<div class="form-group">
<label for="form-name">Ad ve Soyad</label>
<input type="text" class="form-control" id="name" placeholder="Ad ve Soyad">
</div>
Expand All @@ -69,7 +68,7 @@ <h4 class="modal-title">Yeni Kişi</h4>
<div class="form-group">
<label for="form-github">Github</label>
<input type="text" class="form-control" id="form-github" placeholder="@pyistanbul">
</div> -->
</div>
<button type="submit" class="btn btn-primary btn-block">Submit</button>
</form>
</div>
Expand Down

0 comments on commit 519c252

Please sign in to comment.