Commit 29521520 authored by Leila's avatar Leila

end before comments

parent a631b8d0
source ~/workspace/personal_project/cuisine-entre-amis/venv/bin/activate
......@@ -23,7 +23,6 @@ class ContactForm(forms.ModelForm):
self.helper.layout = Layout(
'name',
'mail',
'phone',
'message',
Submit('submit', 'Envoyer', css_class='pull-right')
)
# Generated by Django 2.1.1 on 2018-10-22 14:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cuisine_entre_amis', '0009_author_bgimage'),
]
operations = [
migrations.AddField(
model_name='post',
name='intro_pic',
field=models.ImageField(default=True, upload_to=''),
),
]
......@@ -44,6 +44,7 @@ class Post(models.Model):
publish_on = models.DateTimeField('Publish on', blank=True, null=True)
intro = models.TextField(blank=True, null=True)
author = models.ForeignKey('Author', on_delete=models.CASCADE)
intro_pic = models.ImageField(default=True)
tags = TaggableManager()
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -38,27 +38,24 @@
<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="{% url 'post' %}">Cuisine entre amis</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="menu nav navbar-nav">
<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>
</form>
</div><!--/.nav-collapse -->
<div class="btn-group menu">
<button class="btn dropdown-toggle" type="button" id="dropdownmenu" data-toggle="dropdown" aria-haspopup="true" aria-expended="false">
<i class="fa fa-bars"></i>
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>
<form method="get" action="{% url 'search' %}" class="navbar-form search-form navbar-right" role="search">
<div class="form-group">
<input type="text" class="form-control" name="q" value="{{ request.GET.q }}">
<button type="Submit" class="btn btn-default search"><i class="fa fa-search"></i></button>
</div>
</form>
</div>
</nav>
<main>
......
......@@ -4,18 +4,13 @@
{% block content %}
<div class="contact">
<div class="contact-picture">
<div class="hidden-xs col-sm-6">
<img src="../static/img/contact.jpg">
</div>
</div>
<p>Une question ? un avis ? N'hésitez pas à me contacter :)</p>
<div class="contact-form">
<div class="formulaire col-xs-12 col-sm-6">
<div class="formulaire col-xs-12">
<div class="form-horizontal">
{% crispy form %}
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -15,9 +15,10 @@
<a href="{% url 'tagged_entries' tag.slug %}" class="tag btn btn-default btn-sm">{{ tag }}</a>
{% endfor %}
<button class="readmore btn btn-sm" type="submit">
<a href="{% url 'post_details' object.pk %}">Read more</a>
<a href="{% url 'post_details' object.pk %}">Lire plus</a>
</button>
</div>
<img class="intro_pic" src="{{object.intro_pic.url}}">
</div>
<div class="clearfix"></div>
{%endfor%}
......
......@@ -4,3 +4,4 @@ $brand-primary: #56CEE9;
$white: #fff;
$font-family-base: "Bellota", Arial, sans-serif;
$font-size-base: 18px;
$fa-font-path: "../fonts/fontawesome";
.contact-picture{
margin-top: 20vh;
main {
margin: 30;
}
.contact-form {
.submit{
@media(min-width:751px) {
margin-top: 40px;
}
background-color: $brand-primary;
color: $white;
}
.pull-right {
float: none !important;
margin-top: 30px;
margin-bottom: 200px;
margin-left: 450px;
margin-top: -35px;
}
}
......@@ -4,7 +4,50 @@ main {
margin-bottom: 70px;
}
.search {
.fa-search {
float: right;
height: 26px;
}
margin-right: 1px;
@media(min-width:517px) and (max-width:768px) {
display: none;
}
}
.menu {
margin-top: 5px;
float: right;
@media(min-width:517px) and (max-width:768px) {
margin-top: -45px;
}
}
.navbar-top {
.btn-group {
.btn {
background-color: $white;
}
a:hover, a:focus {
background-color: transparent;
}
}
@media(min-width:517px) and (max-width:750px) {
background: $brand-primary;
height: 20px;
a {
font-size: 15px;
width: 40%;
}
}
background: url("../../static/img/gateau.jpg");
background-repeat: no-repeat;
background-size: cover;
......@@ -18,9 +61,10 @@ main {
.container {
width: 100%;
}
.navbar-header {
img {
float: left;
width: 50px;
......@@ -28,6 +72,9 @@ main {
}
a {
@media(min-width:517px) and (max-width:75px) {
font-size: 14px !important;
}
color: $white;
}
......@@ -35,26 +82,6 @@ main {
color: $white;
}
}
.menu {
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;
}
}
}
......
......@@ -38,9 +38,11 @@
overflow-y: scroll;
padding: 5px;
width: 70%;
margin-bottom: 10px;
>img {
margin-right: 10px;
margin-bottom: 10px;
}
}
}
......
/*!
* Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
@import "fontawesome/variables";
@import "fontawesome/mixins";
@import "fontawesome/path";
@import "fontawesome/core";
@import "fontawesome/larger";
@import "fontawesome/fixed-width";
@import "fontawesome/list";
@import "fontawesome/bordered-pulled";
@import "fontawesome/animated";
@import "fontawesome/rotated-flipped";
@import "fontawesome/stacked";
@import "fontawesome/icons";
.article {
width: 100%;
.left {
......@@ -10,6 +12,12 @@
}
}
img {
display: flex;
margin: auto;
max-width: 30%;
}
.title-article {
width: 100%;
......@@ -21,7 +29,22 @@
}
}
@media(min-width:517px) and (max-width:750px) {
.intro_pic {
margin-top: 150px;
max-width: 50%;
}
}
.article-body {
@media(min-width:517px) and (max-width:907px) {
height: initial;
.intro_pic {
margin-top: 100px;
}
}
width: 50%;
height: 30%;
padding: 10px 10px 10px 10px;
......@@ -50,6 +73,11 @@
}
.readmore {
@media(min-width:517px) and (max-width:907px) {
margin-top: 22px;
}
background-color: $white;
float: right;
font-weight: bold;
......
// Spinning Icons
// --------------------------
.#{$fa-css-prefix}-spin {
-webkit-animation: fa-spin 2s infinite linear;
animation: fa-spin 2s infinite linear;
}
.#{$fa-css-prefix}-pulse {
-webkit-animation: fa-spin 1s infinite steps(8);
animation: fa-spin 1s infinite steps(8);
}
@-webkit-keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
// Bordered & Pulled
// -------------------------
.#{$fa-css-prefix}-border {
padding: .2em .25em .15em;
border: solid .08em $fa-border-color;
border-radius: .1em;
}
.#{$fa-css-prefix}-pull-left { float: left; }
.#{$fa-css-prefix}-pull-right { float: right; }
.#{$fa-css-prefix} {
&.#{$fa-css-prefix}-pull-left { margin-right: .3em; }
&.#{$fa-css-prefix}-pull-right { margin-left: .3em; }
}
/* Deprecated as of 4.4.0 */
.pull-right { float: right; }
.pull-left { float: left; }
.#{$fa-css-prefix} {
&.pull-left { margin-right: .3em; }
&.pull-right { margin-left: .3em; }
}
// Base Class Definition
// -------------------------
.#{$fa-css-prefix} {
display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
// Fixed Width Icons
// -------------------------
.#{$fa-css-prefix}-fw {
width: (18em / 14);
text-align: center;
}
This diff is collapsed.
// Icon Sizes
// -------------------------
/* makes the font 33% larger relative to the icon container */
.#{$fa-css-prefix}-lg {
font-size: (4em / 3);
line-height: (3em / 4);
vertical-align: -15%;
}
.#{$fa-css-prefix}-2x { font-size: 2em; }
.#{$fa-css-prefix}-3x { font-size: 3em; }
.#{$fa-css-prefix}-4x { font-size: 4em; }
.#{$fa-css-prefix}-5x { font-size: 5em; }
// List Icons
// -------------------------
.#{$fa-css-prefix}-ul {
padding-left: 0;
margin-left: $fa-li-width;
list-style-type: none;
> li { position: relative; }
}
.#{$fa-css-prefix}-li {
position: absolute;
left: -$fa-li-width;
width: $fa-li-width;
top: (2em / 14);
text-align: center;
&.#{$fa-css-prefix}-lg {
left: -$fa-li-width + (4em / 14);
}
}
// Mixins
// --------------------------
@mixin fa-icon() {
display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@mixin fa-icon-rotate($degrees, $rotation) {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
-webkit-transform: rotate($degrees);
-ms-transform: rotate($degrees);
transform: rotate($degrees);
}
@mixin fa-icon-flip($horiz, $vert, $rotation) {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
-webkit-transform: scale($horiz, $vert);
-ms-transform: scale($horiz, $vert);
transform: scale($horiz, $vert);
}
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),
url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
// src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
font-weight: normal;
font-style: normal;
}
// Rotated & Flipped Icons
// -------------------------
.#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
.#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
.#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
.#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
.#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
// Hook for IE8-9
// -------------------------
:root .#{$fa-css-prefix}-rotate-90,
:root .#{$fa-css-prefix}-rotate-180,
:root .#{$fa-css-prefix}-rotate-270,
:root .#{$fa-css-prefix}-flip-horizontal,
:root .#{$fa-css-prefix}-flip-vertical {
filter: none;
}
// Stacked Icons
// -------------------------
.#{$fa-css-prefix}-stack {
position: relative;
display: inline-block;
width: 2em;
height: 2em;
line-height: 2em;
vertical-align: middle;
}
.#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
position: absolute;
left: 0;
width: 100%;
text-align: center;
}
.#{$fa-css-prefix}-stack-1x { line-height: inherit; }
.#{$fa-css-prefix}-stack-2x { font-size: 2em; }
.#{$fa-css-prefix}-inverse { color: $fa-inverse; }
This diff is collapsed.
......@@ -6,3 +6,4 @@
@import "FontleroyBrown-webfont";
@import "bellota";
@import "details";
@import "fontawesome";
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