diff --git a/requirements.txt b/requirements.txt index e38f742..b4d677d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ Django>=1.7 +gadjo diff --git a/setup.py b/setup.py index d6252c6..cb96cd8 100644 --- a/setup.py +++ b/setup.py @@ -98,6 +98,7 @@ setup( 'Programming Language :: Python :: 2', ], install_requires=['django>=1.7', + 'gadjo', ], zip_safe=False, cmdclass={ diff --git a/welco/settings.py b/welco/settings.py index 5a2ae03..884c323 100644 --- a/welco/settings.py +++ b/welco/settings.py @@ -8,8 +8,10 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os +from django.conf import global_settings + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -36,6 +38,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'gadjo', ) MIDDLEWARE_CLASSES = ( @@ -82,6 +85,17 @@ USE_TZ = True STATIC_URL = '/static/' +STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + ('gadjo.finders.XStaticFinder',) + +STATICFILES_DIRS = ( + os.path.join(BASE_DIR, 'welco', 'static'), +) + +TEMPLATE_DIRS = ( + os.path.join(BASE_DIR, 'welco', 'templates'), +) + + local_settings_file = os.environ.get('WELCO_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')) if os.path.exists(local_settings_file): diff --git a/welco/static/css/style.css b/welco/static/css/style.css new file mode 100644 index 0000000..9a9061a --- /dev/null +++ b/welco/static/css/style.css @@ -0,0 +1,44 @@ +div#main-content { + width: 100%; + border: 0; + padding: 0; + height: calc(100vh - 8em); +} + +div#more-user-links { + display: none; +} + +div#content { + margin: 0; + padding: 0; + height: 100%; +} + +.all { + display: flex; + flex-wrap: wrap; + height: 100%; +} +.cell.top { + width: 100%; + height: 65%; + order: 0; +} + +.cell { + width: calc(100% / 3); + height: 35%; + order: 1; + overflow-y: auto; + transition: all 100ms ease; + border-bottom: 1px dotted #d8d8d8; + position: relative; +} + +div#content .cell h2 { + font-size: 100%; + padding-left: 1ex; + padding-bottom: 0; +} + diff --git a/welco/templates/welco/base.html b/welco/templates/welco/base.html new file mode 100644 index 0000000..e8bc08f --- /dev/null +++ b/welco/templates/welco/base.html @@ -0,0 +1,7 @@ +{% extends "gadjo/base.html" %} + +{% block page-title %}Welco{% endblock %} +{% block site-title %}Welco{% endblock %} + +{% block more-user-links %} +{% endblock %} diff --git a/welco/templates/welco/home.html b/welco/templates/welco/home.html new file mode 100644 index 0000000..10b2669 --- /dev/null +++ b/welco/templates/welco/home.html @@ -0,0 +1,27 @@ +{% extends "welco/base.html" %} +{% load i18n %} + +{% block content %} +
+
+

{% trans 'Mails' %}

+
+
+

{% trans 'Knowledge Database' %}

+
+
+

{% trans 'Contacts' %}

+
+
+

{% trans 'Qualification' %}

+
+
+ + + +{% endblock %} diff --git a/welco/urls.py b/welco/urls.py index 0cebc60..5dfecd4 100644 --- a/welco/urls.py +++ b/welco/urls.py @@ -1,10 +1,21 @@ -from django.conf.urls import patterns, include, url -from django.contrib import admin +# welco - multichannel request processing +# Copyright (C) 2015 Entr'ouvert +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from django.conf.urls import patterns, url urlpatterns = patterns('', - # Examples: - # url(r'^$', 'welco.views.home', name='home'), - # url(r'^blog/', include('blog.urls')), - - url(r'^admin/', include(admin.site.urls)), + url(r'^$', 'welco.views.home', name='home'), ) diff --git a/welco/views.py b/welco/views.py new file mode 100644 index 0000000..3bc6270 --- /dev/null +++ b/welco/views.py @@ -0,0 +1,23 @@ +# welco - multichannel request processing +# Copyright (C) 2015 Entr'ouvert +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from django.views.generic import TemplateView + + +class Home(TemplateView): + template_name = 'welco/home.html' + +home = Home.as_view()