foreach ($blocs as $id => $bloc) {
- if (($i % 2) == 0 && $i != 0) {
- $res.='<div class="spacer"></div>';
- }
+// if (($i % 2) == 0 && $i != 0) {
+// $res.='<div class="spacer"></div>';
+// }
$image = $this->view->imageProcess()->imageProcessGetUrl($bloc['photo'], $bloc['titre'], 120, 120);
$db = Zend_Db_Table::getDefaultAdapter();
$s = $db->select()->from('realisations')
->order('date DESC');
- if (!$acl) {
+ //if (!$acl) {
$s->where('online = ?', 1);
- }
+ //}
$q = $s->query();
$this->headScript()->addScriptAndStyle('slideshow');
echo $this->twocols();
?>
-<div class="agency-pictos">
+<div class="agency-pictos mb-4vw">
<div class="bloc-holder content">
<?php echo $this->agencyPictos($this->pictos); ?>
</div>
</div>
-<div class="agency-photo"><?php echo $this->imageSlideshowContinuous($this->photo, 650, array(), array('arrowspermanent' => 1)); ?></div>
+<div class="agency-photo mb-4vw"><?php echo $this->imageSlideshowContinuous($this->photo, 650, array(), array('arrowspermanent' => 1)); ?></div>
-<section class="agency-persons">
+<section class="agency-persons mb-4vw">
<div class="bloc-holder content">
<h2><?php echo ucfirst($this->equipe['titre']); ?></h2>
<?php echo $this->agencyBlocs($this->equipe); ?>
</div>
-</section>
\ No newline at end of file
+</section>
?>
<div class="content">
- <div class="title text-block mx-auto mb-20 wow fadeInUp"><?php echo $this->markupDotclear($this->titre); ?></div>
+ <div class="title text-block mb-4vw wow fadeInUp"><?php echo $this->markupDotclear($this->titre); ?></div>
<div id="casestudies-tagslist" class="wow fadeInUp">
function load_commons_once() {
- new WOW().init(); // Set up wow.js on-scroll animations
+ // Modify WOW.js to allow resetting animated status (see taglist.js)
+ WOW.prototype.addBox = function(element){
+ this.boxes.push(element);
+ };
+ window.wow = new WOW();
+ wow.init(); // Set up wow.js on-scroll animations
$('a[href^="mailto:"]').not('[data-event]').each(function () {
columnWidth: this.columnWidth,
gutter: this.gutter
},
+
+ // ToDo: refactor this so isotope isn't so tied to jQtaglist and so we can have different options - eg. disable animation on case studies isotope but leave on for portfolio? Maybe have a data attribute that is read by the JS?
+
transitionDuration: 0 // Disable isotope animations because they interfere with WOW.js
// animationOptions: {
// duration: 0,
// }
});
- this.container.on('arrangeComplete', function () {
- // Todo: figure out how to make WOW transitions trigger properly each time isotope finishes rearranging. Note: isotope is called multiple times by resize function so that might cause problems with triggering methods...
- console.log('Isotope arrangeComplete');
- $("#casestudies-list a").removeClass('animated').addClass('animated');
- // $("#casestudies-list a").addClass("wow fadeInUp")
- // $("#casestudies-list a").attr("style","visibility: visible; animation-name: fadeInUp;");
- });
-
// Show the container now Isotope is active
this.container.css('display', 'block');
$('.tags li.active').removeClass('active');
$(this).addClass('active');
+ // Reset animations on elements for WOW.js when re-filtering
+ // Ref: https://github.com/matthieua/WOW/issues/46#issuecomment-133760823
+ $this.container.find('a').each(function() {
+
+ $(this).css({
+ 'visibility' : 'hidden',
+ 'animation-name' : 'none'
+ });
+
+ $(this).removeClass('animated');
+
+ wow.addBox(this);
+ });
+
+ // Bump scroll so WOW.js runs... There must be a better way to do this
+ window.scrollTo(window.scrollX, window.scrollY + 1);
+ window.scrollTo(window.scrollX, window.scrollY - 1);
+
var filterID = $(this).data('id');
$this.filter(filterID);
var ww = Math.min($(window).width(), 1920);
- ww *= 0.9; // Remove margins (5% each side)
+ ww *= 0.8; // Remove margins (10% each side)
// Handle extra padding that is added for small screens
//if ($('html').hasClass('small')) {
+// Allow vw units to be used but cap them when screen is above content-max-width.\r
+.constrain(@property, @value) {\r
+ @{property}: @value;\r
+\r
+ @media (min-width: @content-max-width) {\r
+ @{property}: unit(@value) / 100 * @content-max-width;\r
+ }\r
+}\r
+\r
+\r
.media {\r
overflow: hidden;\r
}\r
.content-center() {\r
max-width: @content-max-width;\r
min-width: 530px; // Be careful of this setting and affecting the viewport initial-scale\r
- padding-right: 5vw;\r
- padding-left: 5vw;\r
+ .constrain(padding-right, 10vw);\r
+ .constrain(padding-left, 10vw);\r
margin: 0 auto;\r
\r
// Above max content width, fix padding so it doesn't scale too much\r
@media (min-width: @content-max-width) {\r
- padding-right: 0.05 * @content-max-width;\r
- padding-left: 0.05 * @content-max-width;\r
+ padding-right: 0.1 * @content-max-width;\r
+ padding-left: 0.1 * @content-max-width;\r
}\r
}\r
\r
margin-right: auto;
}
-.mb-0 {
- margin-bottom: 0;
-}
-
-.mb-1 {
- margin-bottom: .25rem;
-}
-
-.mb-2 {
- margin-bottom: .5rem;
-}
-
-.mb-3 {
- margin-bottom: .75rem;
-}
-
-.mb-4 {
- margin-bottom: 1rem;
-}
-
-.mb-6 {
- margin-bottom: 1.5rem;
-}
-
-.mb-8 {
- margin-bottom: 2rem;
-}
-
-.mb-12 {
- margin-bottom: 3rem;
-}
-
-.mb-16 {
- margin-bottom: 4rem;
-}
-
-.mb-20 {
- margin-bottom: 5rem;
-}
+.ml-0 { margin-left: 0; }
+.mr-0 { margin-right: 0; }
+
+// Bottom Margins
+.mb-0 { margin-bottom: 0; }
+.mb-1 { margin-bottom: .25rem; }
+.mb-2 { margin-bottom: .5rem; }
+.mb-3 { margin-bottom: .75rem; }
+.mb-4 { margin-bottom: 1rem; }
+.mb-6 { margin-bottom: 1.5rem; }
+.mb-8 { margin-bottom: 2rem; }
+.mb-12 { margin-bottom: 3rem; }
+.mb-16 { margin-bottom: 4rem; }
+.mb-20 { margin-bottom: 5rem; }
+
+// VW-based margins
+.mb-3vw { .constrain(margin-bottom, 3vw); }
+.mb-4vw { .constrain(margin-bottom, 4vw); }
+.mb-5vw { .constrain(margin-bottom, 5vw); }
+
+.ml-2vw { .constrain(margin-left, 2vw); }
+.ml-3vw { .constrain(margin-left, 3vw); }
+.ml-4vw { .constrain(margin-left, 4vw); }
+
+.mr-2vw { .constrain(margin-right, 2vw); }
+.mr-3vw { .constrain(margin-right, 3vw); }
+.mr-4vw { .constrain(margin-right, 4vw); }
+
+// VW-based padding
+.pb-3vw { .constrain(padding-bottom, 3vw); }
+.pb-4vw { .constrain(padding-bottom, 4vw); }
+.pb-5vw { .constrain(padding-bottom, 5vw); }
+
+.pl-2vw { .constrain(padding-left, 2vw); }
+.pl-3vw { .constrain(padding-left, 3vw); }
+.pl-4vw { .constrain(padding-left, 4vw); }
+
+.pr-2vw { .constrain(padding-right, 2vw); }
+.pr-3vw { .constrain(padding-right, 3vw); }
+.pr-4vw { .constrain(padding-right, 4vw); }
.agency-pictos {
/* Agence pictos */
.bloc-holder {
- padding-bottom: 25px;
- margin-top: -25px;
overflow: hidden;
}
.bloc-holder h2 {
font-weight: 300;
font-size: 32px;
+ margin-bottom: 0 !important;
}
article {
background-color: #fff;
color: #222428;
.bloc-holder {
- padding-top: 50px;
- padding-bottom: 25px;
overflow: hidden;
}
vertical-align: top;
width: 50%;
min-width: 480px;
- padding-right: 25px;
margin: 25px 0;
+ &:nth-child(odd) {
+ .pr-3vw;
+ }
+ &:nth-child(even) {
+ .pl-3vw;
+ }
+
+
@media screen and (max-width: 1048px) {
width: 100%;
}
}
.title {
- margin: 50px auto 10px auto;
+ margin: 50px 0 10px;
h1 {
text-align: left;
font-size: 56px;
}
p {
- line-height: 1.4;
+ line-height: 1.6;
}
}
}
.inner {
- max-width: 504px; // (1048 / 2) - 20px to account for middle padding on each column
- padding-left: 34px;
- float: right;
- width: 100%;
+ .content-center();
+ //max-width: 504px; // (1048 / 2) - 20px to account for middle padding on each column
+ //padding-left: 34px;
+ //float: right;
+ //width: 100%;
}
@media screen and (max-width: 790px) {
display: none;
}
-}
\ No newline at end of file
+}
padding-right: 20px;
margin-bottom: 50px;
- &:nth-of-type(2n) {
- padding-right: 0;
- padding-left: 20px;
+ &:nth-of-type(odd) {
+ .pr-2vw;
+ }
+ &:nth-of-type(even) {
+ .pl-2vw;
}
@media screen and (max-width: 990px) {
}
}
-}
\ No newline at end of file
+}
@import "00-constants";
#realisations-list {
- max-width: 980px;
+ //max-width: 980px;
margin: 0 auto;
padding: 14px 0 50px 0;
img {
display: block;
transition: transform 0.25s ease-out; // Speed of the hover-out animation
+ max-width: 100%;
+ height: auto;
}
h2, h3 {
}
}
}
-}
\ No newline at end of file
+}
.twocols {
- max-width: 980px;
+ //max-width: 980px;
margin: 0 auto;
.dotclear {
p {
- margin: 20px 0;
+ margin: 1.5em 0;
}
ul {
white-space: normal;
display: inline-block;
width: 50%;
- padding-right: 20px;
+ .pr-2vw;
vertical-align: top;
&:last-child {
padding-right: 0;
- padding-left: 20px;
+ .pl-2vw;
}
}
}
}
}
-}
\ No newline at end of file
+}