laravel 5.4 helper function asset - laravel-5.3

below code gives error FatalErrorException in b7233f5d5bc1ea1ea4b2b6e36abbbf198d2e611f.php
syntax error, unexpected '{'
<a class="booking-item-review-person-avatar round" href="#">
<img src="asset('{{$trip->image}}')" alt="Image Alternative text" title="Afro" style="max-width: 120px;height:120px"/>
</a>

Try this
<img src="{{asset($trip->image)}}" alt="Image Alternative text" title="Afro" style="max-width: 120px;height:120px"/>

Related

Wordpress Pods shortcode pagination don't work

I've created a pods template for my pods archive and I use a shortcode inside of a new wordpress page for diplaying it. I'de like to display a pagination but when I use pagination=”true” pagination_type=”advanced” nothing happend. Can you please tell me what's wrong ?
Here my shortcode :
[pods name="seminaire2" orderby="ezdatedebut asc" template="archive_template_seminaire" limit="5" where="t.post_status in('publish')" pagination=”true” pagination_type=”advanced” ]
My pods template :
<div class="portfolio oceans terres atmosphere" style="display: inline-block;" data-bound="">
<div class="item_paysage">
<a class="item_link" a href="?p={#ID}">
<div class="vignette">
[if ezvignette ]
<img class="img-fluid " src="{#ezvignette._src}" alt="event_img" />
[else]
<div class="substitute_img fa fa-users"></div>
[/if]
<!--<img class="masque" src="http://wordpress.localhost/wp-content/themes/ipsltheme/ipsl/img/masque_paysage.png" alt="Masque IPSL"> -->
<img class="masque noprint" src='[masque name="portrait"]' alt="Marque IPSL">
</div>
</a>
<figcaption>
<div class="img_title">{#post_title}</div>
<div class="propos_img">{#ezdescription} </div>
</figcaption>
<button class="btn nuance-1"><span class="btn_title">Voir + </span></button>
<!--<button class="btn nuance-1"><i class="fa ipsl_sphere"></i><span class="btn_action">Site dédié</span></button>-->
</div>
</div>
<!--FIN PORTFOLIO ITEM-->

Background load before the image - angular js

Hi when I load the page I see the background of "images class" loading before the ng-src image is load
is there a way to fix that?
using Angular js
<div class="images" >
<img ng-if="expression" class="imgclass" ng-src="{{vm.src || '//:0' }}" />
<img ng-if="!expression" class="imgclass" ng-src="absolute url" />
</div>
I would try this:
<div class="images" ng-if="loaded===true" >
<img ng-if="expression" class="imgclass" ng-src="{{vm.src || '//:0' }}" ng-init="loaded = true"/>
<img ng-if="!expression" class="imgclass" ng-src="absolute url" ng-init="loaded = true"/>
</div>

Several Figure+Figcaption on one line

In a dialog i want to display several download links with a caption on the same line :
<md-dialog-content>
<div align="center" id="download">
<a ng-href="https://community.site.com/it/urbsi/SiteGenen/{{currentCartography}}.pdf"
download>
<figure>
<img src="style/images/pdf-icon.png" alt="Download PDF" width="15%" height="15%">
<figcaption>English PDF</figcaption>
</figure>
</a>
<a ng-href="https://community.site.com/it/urbsi/SiteGenen/{{currentCartography}}.pdf"
download>
<figure>
<img src="style/images/pdf-icon.png" alt="Download PDF" width="15%" height="15%">
<figcaption>French PDF</figcaption>
</figure>
</a> 
<a ng-href="https://community.site.com/it/urbsi/cartographies/{{currentCartography}}.vsd"
download>
<img src="style/images/vsd-icon.png" alt="Download VSD" width="15%" height="15%">
</a>   
<a ng-href="https://community.site.com/it/urbsi/SiteGenen/{{currentCartography}}_FS.png"
download>
<figure>
<img src="style/images/png-icon.png" alt="Download PNG" width="15%" height="15%">
<figcaption>English PNG</figcaption>
</figure>
</a>
<a ng-href="https://community.site.com/it/urbsi/SiteGenen/{{currentCartography}}_FS.png"
download>
<figure>
<img src="style/images/png-icon.png" alt="Download PNG" width="15%" height="15%">
<figcaption>French PNG</figcaption>
</figure>
</a>
</div>
</md-dialog-content>
But my links are displayed on different lines. I tried display: inline;but no luck.
Which gives this instead of a one line dialog :
use layout="row" inside your div tag.
<md-dialog-content>
<div align="center" id="download" layout="row">
// your anchor tag
</div>
</md-dialog-content>
note: as you uses <md-dialog-content> its means you are using angular-material-design

CSS and hide element

i need hide pics and no use display:none
I use Highlight script for create one gallery , the problem it´s i need only show 4 pics and no the others , the script let click in one pic and show the others with arrows , the problem it´s if i use display:none for the other pics and no in the first 4 , the other pics no show finally
I try other possibilities , but no works , i need hide all pics out of the firsts 4 but i can´t use display:none
The Best Regards
You can easily change this Highslide example gallery: http://highslide.com/examples/gallery-thumbstrip-above.html to have four visible thumbnails in the page instead of one visible thumbnail. The clue is to move the markup for the thumbnails you want to be visible, outside the hidden-container div.
The example gallery has one thumbnail outside the hidden-container div (see the source code).
jsFiddle with four visible thumbnails: http://jsfiddle.net/roadrash/Un4N7/ The HTML markup of a gallery with eight images, but only four visible thumbnails, will look like this:
<div class="highslide-gallery">
<a href="large-image1.jpg" onclick="hs.expand(this)" />
<img src="thumbnail1.jpg" alt="" />
</a>
<a href="large-image2.jpg" onclick="hs.expand(this)" />
<img src="thumbnail2.jpg" alt="" />
</a>
<a href="large-image3.jpg" onclick="hs.expand(this)" />
<img src="thumbnail3.jpg" alt="" />
</a>
<a href="large-image4.jpg" onclick="hs.expand(this)" />
<img src="thumbnail4.jpg" alt="" />
</a>
<div class="hidden-container">
<a href="large-image5.jpg" onclick="hs.expand(this)" />
<img src="thumbnail5.jpg" alt="" />
</a>
<a href="large-image6.jpg" onclick="hs.expand(this)" />
<img src="thumbnail6.jpg" alt="" />
</a>
<a href="large-image7.jpg" onclick="hs.expand(this)" />
<img src="thumbnail7.jpg" alt="" />
</a>
<a href="large-image8.jpg" onclick="hs.expand(this)" />
<img src="thumbnail8.jpg" alt="" />
</a>
</div>
</div>

How to prevent page jump when using # href to swap gallery images using a div ID?

I have been struggling with a problem for a while now. I've made a simple html gallery using CSS and a # href to essentially swap out different div ID's containing gallery images. The problem is that when you select the "next" or "previous" buttons in the gallery it jumps the page up in the browser so the gallery is aligned at the top of the page. Does anybody have any ideas how to prevent this?
Here is what the code for the gallery looks like:
<div id="pic1">
<img src="click/pic1.jpg" alt="" />
<a class="previous" href="#pic10"><b>Previous</b></a><a class="next" href="#pic2"><b>Next</b></a>
</div>
<div id="pic2">
<img src="click/pic2.jpg" alt="" />
<a class="previous" href="#pic1"><b>Previous</b></a><a class="next" href="#pic3"> <b>Next</b></a>
</div>
<div id="pic3">
<img src="click/pic3.jpg" alt="" />
<a class="previous" href="#pic2"><b>Previous</b></a><a class="next" href="#pic4"><b>Next</b></a>
</div>
<div id="pic4">
<img src="click/pic4.jpg" alt="" />
<a class="previous" href="#pic3"><b>Previous</b></a><a class="next" href="#pic5"> <b>Next</b></a>
</div>
<div id="pic5">
<img src="click/pic5.jpg" alt="" />
<a class="previous" href="#pic4"><b>Previous</b></a><a class="next" href="#pic6"><b>Next</b></a>
</div>
<div id="pic6">
<img src="click/pic6.jpg" alt="" />
<a class="previous" href="#pic5"><b>Previous</b></a><a class="next" href="#pic7"><b>Next</b></a>
</div>
<div id="pic7">
<img src="click/pic7.jpg" alt="" />
<a class="previous" href="#pic6"><b>Previous</b></a><a class="next" href="#pic8"><b>Next</b></a>
</div>
<div id="pic8">
<img src="click/pic8.jpg" alt="" />
<a class="previous" href="#pic7"><b>Previous</b></a><a class="next" href="#pic9"><b>Next</b></a>
</div>
<div id="pic9">
<img src="click/pic9.jpg" alt="" />
<a class="previous" href="#pic8"><b>Previous</b></a><a class="next" href="#pic10"><b>Next</b></a>
</div>
<div id="pic10">
<img src="click/pic10.jpg" alt="" />
<a class="previous" href="#pic9"><b>Previous</b></a><a class="next" href="#pic1"> <b>Next</b></a>
</div>
Any help would be greatly appreciated!
Instead of linking to #, link to javascript:void(0);
<a class="previous" href="javascript:void(0);">Next</a>
Or, prevent the default event with Javascript
$("a.previous, a.next").on("click", function(e) {
e.preventDefault();
});
You will need to use JQuery after you set
<a class="previous" href="javascript:void(0);">Next</a>
then call the JS:
$(document).ready(function(){
$('a.previous').click(function(e){
var picID= parseInt($(this).parent().attr("id").substr(3));//gets the pic id count
$("#pic"+(picID)).hide(); //hide the current div
$("#pic"+(picID-1)).show(); //show the previous div
});
$('a.next').click(function(e){
var picID= parseInt($(this).parent().attr("id").substr(3)); //gets the pic id count
$("#pic"+(picID)).hide(); //hide the current div
$("#pic"+(picID+1)).show(); //show the previous div
});
});
see: http://jsfiddle.net/uZ6g5/

Resources