Skip to content

Commit

Permalink
Description of productions
Browse files Browse the repository at this point in the history
  • Loading branch information
davinov committed May 23, 2015
1 parent a67f225 commit e266051
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 59 deletions.
8 changes: 6 additions & 2 deletions _includes/production.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<div class="production">
<div class="image-block" style="background-image: url('img/productions/{{ production.image }}');"></div>
<div class="production {{ production.type }}">
<div class="image-block" style="background-image: url('img/productions/{{ production.image }}');">
<div class="description">
{{ production.content }}
</div>
</div>
<div class="details">
<h3>{{ production.name }}</h3>
<div class="date">{{ production.date | date: "%d/%m/%Y" }}</div>
Expand Down
2 changes: 2 additions & 0 deletions _productions/test-coming.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ image: test-coming.png
date: 2015-06-01
type: event
---

Un événement super cool
2 changes: 2 additions & 0 deletions _productions/test-oeuvre.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ image: test-work.png
date: 2015-01-10
type: work
---

Un projet ouf
31 changes: 4 additions & 27 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,34 +96,11 @@ a {
}
}

.hovered-tuto {
background: $brand-color;

.tuto {
display: none;

a {
text-decoration: underline;
&:hover {
color: $brand-color;
}
}
}
a {
text-decoration: underline;

&:hover {
> .button:first-child {
background: $text-color;
color: $brand-color;
}

.tuto {
display: block;
}
background: $text-color;
color: $brand-color;
}
}

.tuto {
padding: 2em;
background: $text-color;
color: $brand-color;
}
26 changes: 22 additions & 4 deletions _sass/_productions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,33 @@
justify-content: stretch;

transition: box-shadow 1s;

cursor: pointer;
&:hover, &:focus, &:active {
box-shadow: 0px 0px 0px 5px $grey-color-light;
}

.image-block {
background-size: cover;
flex: 1;
display: flex;
justify-content: stretch;

.description {
flex: 1;
background-color: transparentize($brand-color, 0.5);
color: $text-color;
display: flex;
overflow-x: hidden;
overflow-y: auto;
align-items: center;
justify-content: center;
text-align: center;
opacity: 0;
transition: opacity 0.5s;
}
}

&:hover {
.description {
opacity: 1;
}
}

.details {
Expand Down
34 changes: 8 additions & 26 deletions productions.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<article class="coming">
<h2>
À venir
Prochains événements
</h2>

<div class="production-list">
Expand All @@ -24,7 +24,7 @@ <h2>

<article class="past">
<h2>
Passés
Productions et évenements passés
</h2>

<div class="production-list">
Expand All @@ -44,28 +44,10 @@ <h3>{{ production.name }}</h3>
</article>

<article>
<div class="hovered-tuto">
<div class="button">
Ajouter une production
</div>

<div class="tuto">
<p>
Copier-coller le code ci-dessous et le compléter sur <a
href="https://github.com/animaux-du-futur/animaux-du-futur.github.io/new/master/_productions?filename=new-production.md"
target="_blank"
>cette page</a> :
</p>
<pre>
<code>
---
name: À compléter
image: fichier.png
date: 2015-06-01
---
</code>
</pre>
</div>

</div>
<a
class="button"
href="https://github.com/animaux-du-futur/animaux-du-futur.github.io/wiki/Productions"
>
Gérer les productions
</a>
</article>

0 comments on commit e266051

Please sign in to comment.