Commit 141212c9 authored by Leila's avatar Leila
Browse files

:heavy_plus_sign creating first step of the blog

parent e87a9817
Pipeline #1815 canceled with stages
......@@ -5196,26 +5196,35 @@ main {
margin-left: 15px;
margin-bottom: 70px; }
.navbar-fixed-top {
background-color: #56CEE9;
height: 5%;
padding-bottom: 0;
margin-bottom: 0; }
.navbar-fixed-top .container {
height: 100%; }
.navbar-fixed-top .search {
float: right; }
.navbar-fixed-top .navbar-header img {
.navbar-top {
background: url("../../static/img/gateau.jpg");
background-repeat: no-repeat;
background-size: cover;
height: 100%;
width: 100%;
padding: 0;
margin: 0;
border: 0;
border-radius: 0; }
.navbar-top .container {
width: 100%; }
.navbar-top .navbar-header img {
float: left;
width: 50px;
height: 50px; }
.navbar-fixed-top .navbar-header a {
color: #fff; }
.navbar-fixed-top .navbar-header a:hover, .navbar-fixed-top .navbar-header a:focus {
.navbar-top .navbar-header a {
color: #fff; }
.navbar-fixed-top .menu a {
.navbar-top .navbar-header a:hover, .navbar-top .navbar-header a:focus {
color: #fff; }
.navbar-fixed-top .menu a:hover, .navbar-fixed-top .menu a:focus {
.navbar-top .menu {
float: right;
margin-left: 10px;
margin-top: 2px;
padding-bottom: 8px;
padding-top: 4px; }
.navbar-top .menu .btn-group .btn {
background-color: #fff; }
.navbar-top .menu a:hover, .navbar-top .menu a:focus {
background-color: transparent; }
.footer {
......@@ -5240,52 +5249,42 @@ main {
float: none !important;
margin-top: 30px; }
.title-article {
width: 100%; }
.title-article h2 {
font-family: "fontleroybrownregular";
font-size: 50px;
text-align: center; }
.article {
width: 100%; }
width: 50%; }
.article-body {
width: 100%;
height: 40%;
background: rgba(0, 0, 0, 0.65);
width: 50%;
height: 30%;
padding: 10px 10px 10px 10px;
border-radius: 5px; }
.article-body .article-text {
float: right;
border-radius: 5px;
color: #fff;
padding: 8px;
width: 60%; }
color: #0d5566;
padding: 8px; }
.article-body .article-text p {
font-family: "Bellota";
width: 100%;
text-align: justify;
float: right; }
.article-body .article-text small {
color: #56CEE9; }
.article-body .intro-pic {
width: 40%;
float: left;
height: 100%; }
.article-body .intro-pic img {
width: 100%;
height: 100%; }
.article-body .readmore {
background-color: #fff;
float: right;
font-weight: bold; }
font-weight: bold;
margin-top: -20px; }
.article-body .readmore a {
text-decoration: none; }
.readmore {
margin-top: -20px; }
.tag {
margin-left: 10px;
margin-top: -20px; }
margin-top: -20px;
border: none; }
@font-face {
font-family: "fontleroybrownregular";
......@@ -5297,8 +5296,7 @@ main {
font-family: 'Bellota';
src: url("../fonts/bootstrap/../Bellota-Regular-webfont.eot");
src: url("../fonts/bootstrap/../Bellota-Regular-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/bootstrap/../Bellota-Regular-webfont.woff") format("woff"), url("../fonts/bootstrap/../Bellota-Regular-webfont.ttf") format("truetype"), url("../fonts/bootstrap/../Bellota-Regular-webfont.svg#Bellota") format("svg"); }
main {
min-height: 100%; }
.container-fluid {
margin-top: -50px; }
.title-article {
width: 100%; }
.title-article h2 {
font-family: "fontleroybrownregular"; }
......@@ -28,7 +28,7 @@
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-fixed-top">
<nav class="navbar navbar-top">
<div class="container">
<div class="navbar-header">
<img class="logo-top" src="{% static "img/logo.png" %}">
......@@ -38,18 +38,25 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Cuisine entre amis</a>
<a class="navbar-brand" href="#">Cuisine entre amis</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="menu nav navbar-nav">
<li class="active"><a href="{% url 'post' %}">Articles</a></li>
<li class="active"><a href="{% url 'contact' %}">Contact</a></li>
<div class="btn-group">
<button class="btn dropdown-toggle" type="button" id="dropdownmenu" data-toggle="dropdown" aria-haspopup="true" aria-expended="false">
menu
</button>
<div class="dropdown-menu" aria-labelledby="dropdownmenu">
<li><a class="dropdown-item" href="{% url 'post' %}">Articles</a></li>
<li><a class="dropdown-item" href="{% url 'contact' %}">Contact</a></li>
</div>
</div>
</ul>
<form method="get" action="{% url 'search' %}" class="navbar-form search navbar-right" role="search">
<div class="form-group">
<input type="text" class="form-control" name="q" value="{{ request.GET.q }}" placeholder="Search">
</div>
<button type="Submit" class="btn btn-default">Submit</button>
<button type="Submit" class="btn btn-default">Search</button>
</form>
</div><!--/.nav-collapse -->
</div>
......
......@@ -10,12 +10,8 @@
<div class="container">
<div class="article-body">
<div class="article-text">
<small>publish on {{object.publish_on}}</small>
<p>{{object.intro|linebreaks}}</p>
</div>
<div class="intro-pic">
<img src="{{object.intro_pic.url}}">
</div>
{% for tag in object.tags.all %}
<a href="{% url 'tagged_entries' tag.slug %}" class="tag btn btn-default btn-sm">{{ tag }}</a>
{% endfor %}
......
{% extends "base.html" %}
{% load staticfiles %}
{% block content %}
<html>
<head>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Cuisine entre amis">
<meta name="author" content="Leila Verhaegen">
<title>Cuisine entre amis</title>
<link href="/static/css/site.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="/static/cookielaw/css/cookielaw.css" rel="stylesheet">
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/cookielaw/js/cookielaw.js"></script>
</head>
<div class="container-fluid" style="height:90%;">
<div class="title-article">
<h2>{{object.title}}</h2>
</div>
<small>publish on {{object.publish_on}} by {{object.author}}</small></br>
{% for part in object.parts.all %}
{% if part.type == 'left' %}
<img style="max-width: 40%; padding:5px; float:left;" src="{{part.pic.url}}" >
......@@ -21,5 +43,4 @@
<div class="clearfix"></div>
{% endfor %}
</div>
{% endblock %}
</html>
......@@ -3,7 +3,7 @@ from django.views.generic.edit import FormView
from django.db.models import Q
from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy
from taggit.models import Tag
......
.contact-picture{
margin-top: 20vh;
}
......@@ -5,12 +6,12 @@
.contact-form {
.submit{
background-color: $brand-primary;
color: $white;
background-color: $brand-primary;
color: $white;
}
.pull-right {
float: none !important;
margin-top: 30px;
float: none !important;
margin-top: 30px;
}
}
\ No newline at end of file
}
......@@ -4,24 +4,23 @@ main {
margin-bottom: 70px;
}
.navbar-fixed-top {
background-color: $brand-primary;
height: 5%;
padding-bottom: 0;
margin-bottom: 0;
.navbar-top {
background: url("../../static/img/gateau.jpg");
background-repeat: no-repeat;
background-size: cover;
height: 100%;
width: 100%;
padding: 0;
margin: 0;
border: 0;
border-radius: 0;
.container {
height: 100%;
}
.search {
float: right;
width: 100%;
}
.navbar-header {
img {
float: left;
width: 50px;
......@@ -38,10 +37,20 @@ main {
}
.menu {
a {
color: $white;
float: right;
margin-left: 10px;
margin-top: 2px;
padding-bottom: 8px;
padding-top: 4px;
.btn-group {
.btn {
background-color: $white;
}
}
a:hover, a:focus {
background-color: transparent;
}
......@@ -62,7 +71,7 @@ main {
color: #ff8316;
}
a:active, a:hover {
text-decoration: none;
text-decoration: none;
}
}
}
main {
min-height: 100%;
}
.title-article {
width: 100%;
.container-fluid {
margin-top: -50px;
h2 {
font-family: "fontleroybrownregular";
}
}
.title-article {
width: 100%;
h2 {
font-family: "fontleroybrownregular";
font-size: 50px;
......@@ -7,13 +10,12 @@
}
.article {
width: 100%;
width: 50%;
}
.article-body {
width: 100%;
height: 40%;
background: rgba(0, 0, 0, .65);
width: 50%;
height: 30%;
padding: 10px 10px 10px 10px;
border-radius: 5px;
......@@ -26,30 +28,16 @@
float: right;
}
small{
color: $brand-primary;
}
float: right;
border-radius: 5px;
color: $white;
color: darken($brand-primary, 40%);
padding: 8px;
width: 60%;
}
.intro-pic {
width: 40%;
float: left;
height: 100%;
img {
width: 100%;
height: 100%;
}
}
.readmore {
background-color: $white;
float: right;
font-weight: bold;
margin-top: -20px;
a {
text-decoration: none;
......@@ -57,11 +45,8 @@
}
}
.readmore {
margin-top: -20px;
}
.tag {
margin-left: 10px;
margin-top: -20px;
border: none;
}
......@@ -35,19 +35,18 @@ INSTALLED_APPS = (
'crispy_forms',
'cookielaw',
'kombu.transport.django.KombuAppConfig',
# 'kombu.transport.django.KombuAppConfig',
)
MIDDLEWARE_CLASSES = (
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
]
ROOT_URLCONF = 'urls'
......@@ -102,7 +101,7 @@ if DEBUG:
'debug_toolbar',
'template_timings_panel',
)
MIDDLEWARE_CLASSES += (
MIDDLEWARE += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
......
......@@ -19,7 +19,7 @@ urlpatterns = [
# Examples:
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', admin.site.urls),
url(r'^contact/$', ContactView.as_view(template_name='cuisine_entre_amis/contact.html'), name='contact'),
url(r'^tagged/(?P<slug>[\w-]+)\.html$', PostTaggedView.as_view(), name='tagged_entries'),
url(r'search\.html$', PostSearchView.as_view(), name='search'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment