diff --git a/citavi_mapper/urls.py b/citavi_mapper/urls.py index 22bad4a..7367d47 100644 --- a/citavi_mapper/urls.py +++ b/citavi_mapper/urls.py @@ -5,12 +5,14 @@ from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() -from frontend.views import MainSite +from frontend.views import IndexView, RegisterView, LoginView urlpatterns = patterns('', # Examples: # url(r'^$', 'citavi_mapper.views.home', name='home'), # url(r'^blog/', include('blog.urls')), - url(r'^$', MainSite.as_view(), name='frontend-index'), + url(r'^$', IndexView.as_view(), name='frontend-index'), + url(r'^register/', RegisterView.as_view(), name='frontend-register'), + url(r'^login/', LoginView.as_view(), name='frontend-login'), url(r'^admin/', include(admin.site.urls)), ) \ No newline at end of file diff --git a/frontend/static/images/logo.png b/frontend/static/images/logo.png index b3e43dc..5fcc0bf 100644 Binary files a/frontend/static/images/logo.png and b/frontend/static/images/logo.png differ diff --git a/frontend/templates/base.html b/frontend/templates/base.html deleted file mode 100644 index 4709f62..0000000 --- a/frontend/templates/base.html +++ /dev/null @@ -1,42 +0,0 @@ -{% load staticfiles compressed %} - - - - - - - - {% block title %}Citavi Mapper :: {{title}}{% endblock %} - - - {% compressed_css 'bootstrap' %} - {% compressed_js 'bootstrap' %} - - - - -
- {% block content %}{% endblock %} -
- - - \ No newline at end of file diff --git a/frontend/templates/index.html b/frontend/templates/index.html new file mode 100644 index 0000000..556feaf --- /dev/null +++ b/frontend/templates/index.html @@ -0,0 +1,7 @@ +{% extends "layout/base.html" %} +{% block content %} +

+ Welcome to Citavi Mapper!
+ Feel free to discover. +

+{% endblock %} \ No newline at end of file diff --git a/frontend/templates/layout/base.html b/frontend/templates/layout/base.html new file mode 100644 index 0000000..66a573b --- /dev/null +++ b/frontend/templates/layout/base.html @@ -0,0 +1,40 @@ +{% load staticfiles compressed %} + + + + + + + + {% block title %}{{page_name}} :: {{page_title}}{% endblock %} + + {% compressed_css 'bootstrap' %} + {% compressed_js 'bootstrap' %} + + + + + +
+ {% block content %}{% endblock %} +
+ + + \ No newline at end of file diff --git a/frontend/templates/login.html b/frontend/templates/login.html new file mode 100644 index 0000000..7e293b9 --- /dev/null +++ b/frontend/templates/login.html @@ -0,0 +1,6 @@ +{% extends "layout/base.html" %} +{% block content %} +

+ LOGIN FORM HERE +

+{% endblock %} \ No newline at end of file diff --git a/frontend/templates/register.html b/frontend/templates/register.html new file mode 100644 index 0000000..bb1b002 --- /dev/null +++ b/frontend/templates/register.html @@ -0,0 +1,6 @@ +{% extends "layout/base.html" %} +{% block content %} +

+ REGISTER FORM HERE +

+{% endblock %} \ No newline at end of file diff --git a/frontend/views.py b/frontend/views.py index 55b9c83..67bc9a4 100644 --- a/frontend/views.py +++ b/frontend/views.py @@ -2,16 +2,29 @@ from django.views.generic import TemplateView -class MainSite(TemplateView): +class BaseSiteView(TemplateView): template_name = "base.html" + page_name = "Citavi Mapper" + page_title = "BASE" def get(self, request, **kwargs): self._request = request - return super(MainSite, self).get(request, **kwargs) + return super(BaseSiteView, self).get(request, **kwargs) def get_context_data(self, **kwargs): - context = super(MainSite, self).get_context_data(**kwargs) - context['title'] = 'Titeltest' - context['content'] = 'Foobar!' - context['headline'] = 'Yo!' + context = super(BaseSiteView, self).get_context_data(**kwargs) + context['page_name'] = self.page_name + context['page_title'] = self.page_title return context + +class IndexView(BaseSiteView): + template_name = "index.html" + page_title = "Index" + +class RegisterView(BaseSiteView): + template_name = "register.html" + page_title = "Register" + +class LoginView(BaseSiteView): + template_name = "login.html" + page_title = "Login"