Parcourir la source

Add basic home page

Jocelyn Delande il y a 9 ans
Parent
commit
fbcb6bf6d0

+ 0 - 0
wifiwithme/apps/pages/__init__.py


+ 5 - 0
wifiwithme/apps/pages/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class PagesConfig(AppConfig):
+    name = 'pages'

+ 37 - 0
wifiwithme/apps/pages/templates/pages/home.html

@@ -0,0 +1,37 @@
+{% extends "base.html" %}
+
+{% block body_class %}home{% endblock %}
+
+{% block content %}
+
+  <header class="jumbotron">
+    <div class="container">
+    <p>
+L'association <a href="//www.faimaison.net">FAImaison</a> expérimente à
+grande échelle (Nantes et environs) la création d'un réseau sans-fil à
+longue portée à des fins, entre autres, de <em>partage</em> et
+<em>fourniture</em> d'<strong>accès à internet</strong>.
+    </p>
+
+    <p>
+Pour cela, nous recherchons des volontaires, tant pour <strong>partager une
+partie de leur connexion</strong> que pour participer au réseau (accès à
+internet, partage local…).
+      </p>
+
+      <p>
+Renseigner ce formulaire nous permet de définir quelles <strong>zones
+d'expérimentations</strong> (avec une grande densité de volontaires)
+pourraient être intéressantes.
+      </p>
+
+      <p style="text-align:center">
+        <a href="{% url 'add_contrib' %}" class="btn btn-lg btn-primary btn-default">
+          Demander un raccordement
+        </a>
+      </p>
+    </div>
+  </header>
+
+
+{% endblock content %}

+ 7 - 0
wifiwithme/apps/pages/urls.py

@@ -0,0 +1,7 @@
+from django.conf.urls import url
+
+from .views import home
+
+urlpatterns = [
+    url(r'^$', home, name='home'),
+]

+ 5 - 0
wifiwithme/apps/pages/views.py

@@ -0,0 +1,5 @@
+from django.shortcuts import render
+
+
+def home(request):
+    return render(request, 'pages/home.html')

+ 1 - 0
wifiwithme/core/urls.py

@@ -14,4 +14,5 @@ urlpatterns = [
     url(prefix(r'accounts/logout/$'), logout, name='logout'),
     url(prefix(r'accounts/logout/$'), logout, name='logout'),
     url(prefix(r'admin/'), admin.site.urls),
     url(prefix(r'admin/'), admin.site.urls),
     url(prefix(r'map/'), include('contribmap.urls')),
     url(prefix(r'map/'), include('contribmap.urls')),
+    url(prefix(r''), include('pages.urls')),
 ]
 ]

+ 1 - 0
wifiwithme/settings/base.py

@@ -38,6 +38,7 @@ INSTALLED_APPS = [
     'django.contrib.staticfiles',
     'django.contrib.staticfiles',
     'core',
     'core',
     'contribmap',
     'contribmap',
+    'pages',
     'django.contrib.admin',
     'django.contrib.admin',
 ]
 ]
 
 

+ 19 - 5
wifiwithme/static/main.css

@@ -35,14 +35,25 @@ body > section {
   padding-bottom: 2em;
   padding-bottom: 2em;
 }
 }
 
 
-body.form > section {background-color: transparent;}
+body.form > section,
+body.home > section {
+    background-color: transparent;
+}
 
 
 body.form section header {
 body.form section header {
   margin-top: 365px;
   margin-top: 365px;
+}
+
+body.form section header,
+body.home section header {
   margin-bottom: 70px;
   margin-bottom: 70px;
   background-color: rgba(250,250,250,0.5);
   background-color: rgba(250,250,250,0.5);
 }
 }
 
 
+body.home section header {
+    margin-top: 0px;
+}
+
 body > footer {
 body > footer {
     /* See jumbotron */
     /* See jumbotron */
     margin-top: 30px;
     margin-top: 30px;
@@ -124,7 +135,8 @@ form > h2:first-child {
         max-width: 500px;
         max-width: 500px;
         background-color: rgba(250, 250, 250, 0.5);
         background-color: rgba(250, 250, 250, 0.5);
     }
     }
-    body.form section header {
+    body.form section header,
+    body.home section header,{
         margin-top: 0px
         margin-top: 0px
     }
     }
     body {
     body {
@@ -151,7 +163,8 @@ form > h2:first-child {
     h1 {
     h1 {
         max-width: 650px;
         max-width: 650px;
     }
     }
-    body.form section header {
+    body.form section header,
+    body.home section header {
         margin-top: 265px
         margin-top: 265px
     }
     }
     body {
     body {
@@ -165,7 +178,8 @@ form > h2:first-child {
         background-color: transparent;
         background-color: transparent;
 
 
     }
     }
-    body.form section header {
-        margin-top: 365px
+    body.form section header,
+    body.home section header {
+        margin-top: 250px
     }
     }
 }
 }