Please, in the section PORTFOLIO I need to put videos. Besides the pictures I need to put videos that when I click, a window opens and show me the video in a magnific-pop-up.css for example.
Can you help me?
Thank you very much
profart
POSTED: 2016-09-13
Hello CESARALBAS,
You can open the video in a popup window.
To do this, you need to add initialization in general.js. I do it like this:
The code for this element you can find in the file "theme.css" (section "Responsive" near the end of file). However, these options will only be used on the screens whose width is less than 1201 pixels and more than 991.
Initially, the size of the previously installed file (line 887):
Hello, please, in portfolio, how can I erase the "ALL" option? I need that, when you load the page it shows the first option, in this case "Cities" and when you want to click other options they will show.
I do not want when I load the web all be displayed together. It's possible?
Thank you
profart
POSTED: 2016-10-18
Hello CESARALBAS,
The easiest way - to use a trigger. After initialization add this string:
It's possible in the section "Portfolio" set a maximum of images to show? Now, when you select the option "All" it shows all the images you have and if you have a lot of the page stretches a lot.
It's possible make that it shows the first three images and through a number of pages or a carousel you can see the rest?
Thank you very much
profart
POSTED: 2016-11-21
Hello CESARALBAS,
You can overload the filter "*" or write a new filter. The implementation of this approach is shown below (general.js):
What I want to try to do Is to divide "Features" into three individual sections: cities, life, whatch. And that each section shows a maximum of 3 images.
The other images would be hidden through a "carousel" with next and previous options.
It's this possible? Could I use ID or CLASS of another templates like : id="carousel" class="section-wrapper clearfix" , I have seen that it use in Harvest Hill 001022 template?
Thank you very much
profart
POSTED: 2016-11-22
Hello CESARALBAS,
My answer to both comments.
| Hello, sorry but I've put the code in the "general.js" but it doesn't work.
You can set filters based on limitations on the number of elements.
For all elements you can use
filter: ':nth-child(-n+3)'
or
function() {
return $(this).index() < 3;
}
For filtered elements (full initialization block):
View History
Can you help me?
Thank you very much
You can open the video in a popup window.
To do this, you need to add initialization in general.js. I do it like this:
// Change this (from '.portfolio-item')
$('.portfolio-item-image').magnificPopup({
type: 'image',
closeBtnInside: true,
mainClass: 'mfp-with-zoom'
});
// Add this
$('.portfolio-item-video').magnificPopup({
type: 'iframe',
closeBtnInside: true,
mainClass: 'mfp-with-zoom'
});
In this case, you also need to add classes (portfolio-item-image or portfolio-item-video) to the element "div" as follows and change "href" attribute:
Before:
<a href="IMAGE_LINK" class="portfolio-item watch">
After:
--- for image
<a href="IMAGE_LINK" class="portfolio-item portfolio-item-image watch">
--- for video
<a href="https://www.youtube.com/watch?v=VIDEO" class="portfolio-item portfolio-item-video video">
As an example, you can take mine, located on the demo link to the template, but instead "index.html" select "index-w-video.html".
Thank You,
Warm Regards,
Valery
http://vtdes.ru/demo/janderson/index-w-video.html
To place the text you need to initialize the magnific (general.js) followed by the parameter "titleSrc":
$('.portfolio-item-image').magnificPopup({
type: 'image',
closeBtnInside: true,
titleSrc: 'title', // Add this
mainClass: 'mfp-with-zoom'
});
You also need to add an attribute "title" (titleSrc parameter in init, you can change it) to the link to the item:
<a href="IMAGE" class="portfolio-item portfolio-item-image cities" title="Portfolio image 1">
After that you need to add styles for the text element (class "mfp-title"). As an example, I did this:
<style>
.mfp-title {
position: relative;
top: -52px;
padding: 15px;
color: #fff;
font-weight: 300;
font-size: 24px;
font-family: "Open Sans Condensed",sans-serif;
background: rgba(255, 85, 85, 0.9);
}
</style>
link to demo page:
http://vtdes.ru/demo/janderson/index-w-video.html
Thank You,
Warm Regards,
Valery
View History
And if in the pop-up with an image I want to put text? How I can do?
Thank you very much
View History
@media screen and (max-width: 1200px)
.portfolio-item {
max-width: 200px;
height: 133px;
Thank you.
The code for this element you can find in the file "theme.css" (section "Responsive" near the end of file). However, these options will only be used on the screens whose width is less than 1201 pixels and more than 991.
Initially, the size of the previously installed file (line 887):
.portfolio-item {
...
width: 267px;
height: 178px;
...
}
Thank You,
Warm Regards,
Valery
View History
I do not want when I load the web all be displayed together. It's possible?
Thank you
The easiest way - to use a trigger. After initialization add this string:
$('[data-filter=".cities"]').trigger('click')
View History
View History
View History
It's possible make that it shows the first three images and through a number of pages or a carousel you can see the rest?
Thank you very much
You can overload the filter "*" or write a new filter. The implementation of this approach is shown below (general.js):
var $portfolio = $('.portfolio');
$portfolio.isotope({
itemSelector: '.portfolio-item',
layoutMode : 'masonry',
masonry : {
columnWidth: '.portfolio-item'
}
});
var cnt_elements = 0,
max_elements = 4;
var filterFns = {
'*-lim': function() {
return ++cnt_elements <= max_elements;
}
}
$('.portfolio-filter-button').click(function() {
var $this = $(this),
filter = $this.attr('data-filter');
if (filter == '*-lim') {
cnt_elements = 0;
filter = filterFns['*-lim'];
}
$('.portfolio-filter-button-active').removeClass('portfolio-filter-button-active');
$this.addClass('portfolio-filter-button-active');
$portfolio.isotope({
filter: filter,
animationOptions: {
duration: 750,
queue: false
}
});
});
On the demo page, you can see the new filter "Lim (4)".
data-filter attribute of this button is set to "*-lim".
Thank You,
Warm Regards,
Valery
View History
I replied to you below:)
View History
The other images would be hidden through a "carousel" with next and previous options.
It's this possible? Could I use ID or CLASS of another templates like : id="carousel" class="section-wrapper clearfix" , I have seen that it use in Harvest Hill 001022 template?
Thank you very much
My answer to both comments.
| Hello, sorry but I've put the code in the "general.js" but it doesn't work.
You can set filters based on limitations on the number of elements.
For all elements you can use
filter: ':nth-child(-n+3)'
or
function() {
return $(this).index() < 3;
}
For filtered elements (full initialization block):
var $portfolio = $('.portfolio');
$portfolio.isotope({
itemSelector: '.portfolio-item',
layoutMode : 'masonry',
masonry : {
columnWidth: '.portfolio-item'
}
});
var cnt_elements = 0,
max_elements = 3;
$('.portfolio-filter-button').click(function() {
var $this = $(this),
filter = $this.attr('data-filter');
// Find all elements (itemSelector property)
if (filter == '*') filter = '.portfolio-item';
// "Hide" all elements
$portfolio.find('.portfolio-item').removeClass('filtered');
// Find and limit
cnt_elements = 0;
$portfolio.find(filter).each(function() {
if (++cnt_elements <= max_elements) $(this).addClass('filtered');
});
$('.portfolio-filter-button-active').removeClass('portfolio-filter-button-active');
$this.addClass('portfolio-filter-button-active');
$portfolio.isotope({
filter: '.filtered',
animationOptions: {
duration: 750,
queue: false
}
});
});
If you have any problems, please send me the address of your site in the mail, be sure to take a look and answer.
Thank You,
Warm Regards,
Valery
View History
Thank you very much
Add video instead of the main image is very simple.
Here is an example of how this can be done:
Place this ntml code in section "header":
<div class="video-wrapper">
<video class="video-home" autoplay muted loop>
<source src="videos/space.mp4" type="video/mp4">
<source src="videos/space.webm" type="video/webm">
</video>
</div>
... And just add style any way you like:
<style>
.video-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
overflow: hidden;
}
</style>
Video is presented here in two formats: .mp4 and .webm.
You can use any free service on the Internet to convert your video.
Example you can see the link
http://vtdes.ru/demo/janderson/index-w-video.html
Thank You,
Warm Regards,
Valery