Merge branch 'fix_sidebar'
This commit is contained in:
commit
33268ee859
2 changed files with 38 additions and 24 deletions
|
@ -22,23 +22,14 @@
|
||||||
<body onload="init()">
|
<body onload="init()">
|
||||||
{# NAVBAR #}
|
{# NAVBAR #}
|
||||||
<section class="navbar" id="nav">
|
<section class="navbar" id="nav">
|
||||||
|
{% for path in paths %}
|
||||||
|
<a href="{{ path.href }}">
|
||||||
|
<div class="navbar-block">
|
||||||
|
{{ path.name }}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<a href="/">
|
|
||||||
<div class="navbar-block">
|
|
||||||
Home
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="/curriculum-vitae">
|
|
||||||
<div class="navbar-block">
|
|
||||||
Curriculum Vitae
|
|
||||||
</div>
|
|
||||||
<a href="/ukraine">
|
|
||||||
<div class="navbar-block">
|
|
||||||
<img src="{% static "base_app/img/ukraine.png" %}" width="16" style="display:inline">
|
|
||||||
Ukraine
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<div class="navbar-button"
|
<div class="navbar-button"
|
||||||
onclick="navbar_click()"
|
onclick="navbar_click()"
|
||||||
>
|
>
|
||||||
|
|
|
@ -16,25 +16,48 @@ def get_domains():
|
||||||
|
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
class IndexView(TemplateView):
|
|
||||||
|
class GenericView(TemplateView):
|
||||||
|
def cx_handle_get(self, request, template, *args, **kwargs):
|
||||||
|
paths = [
|
||||||
|
{"href": "/",
|
||||||
|
"name": "Home"},
|
||||||
|
{"href": "/curriculum-vitae",
|
||||||
|
"name": "Curriculum Vitae"},
|
||||||
|
{"href": "/ukraine",
|
||||||
|
"name": "Ukraine"},
|
||||||
|
|
||||||
|
]
|
||||||
|
return render(request, template, {"paths" : paths})
|
||||||
|
|
||||||
|
class IndexView(GenericView):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
return render(request, "index.html", {})
|
paths = [
|
||||||
|
{"href": "/",
|
||||||
|
"name": "Home"},
|
||||||
|
{"href": "/curriculum-vitae",
|
||||||
|
"name": "Curriculum Vitae"},
|
||||||
|
{"href": "/ukraine",
|
||||||
|
"name": "Ukraine"},
|
||||||
|
|
||||||
class CVView(TemplateView):
|
]
|
||||||
|
return self.cx_handle_get(request, "index.html", {"paths" : paths})
|
||||||
|
|
||||||
|
class CVView(GenericView):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
return render(request, "CV.html", {})
|
return self.cx_handle_get(request, "CV.html", {})
|
||||||
|
|
||||||
class LoremView(TemplateView):
|
class LoremView(GenericView):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
return render(request, "lorem.html", {})
|
return self.cx_handle_get(request, "lorem.html", {})
|
||||||
|
|
||||||
class UkraineView(TemplateView):
|
class UkraineView(GenericView):
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
domains = get_domains()
|
domains = get_domains()
|
||||||
return render(request, "ukraine.html", {"domains" : domains})
|
return self.cx_handle_get(request, "ukraine.html", {"domains" : domains})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue