I've built a site with Hugo and using featherlight.js for pop-up lightbox. All working fine when hosted locally. But on the live version I'm having a weird issue where the links inside the pop-up are not working.
A full reproducible example is difficult, but I'll provide the relevant code and perhaps someone can identify what's likely causing the problem or tell me what other info they need.
Relevant code calling featherlight:
<a class="search-icon" href="#" data-featherlight="{{ .link | safeURL }}" > <i class="ti-search"></i> </a>
Where .link is html file compiled from markdown.
If I navigate directly to .link the content shows up fine, and the links in the content are fine, e.g.,:
<p>See more here </p>
But inside the pop-up lightbox, links in the content appear like this:
<p>See more here</p>
i.e., 'here' is outside the </a> tag.
This particular link uses Hugo code:
<p> {{.Params.Link_text}} <a href="{{ .Params.Link | absURL }}" > here </a> </p>
But the same thing occurs for the links written with Markdown.
A featherlight.js bug or something else?
It works after replacing this "https://code.jquery.com/jquery-latest.js" with "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js".
Related
I am new to angular material. I'm using material-cards in row layout.I want those cards to act like urls. When I right click on them I want to have options like Open in a new tab and all.If you can help me then that would be great.
Actually wrapping in tag works as #jeff-carey suggested above, I've just tried in Chrome browser:
<a href="http://google.com" style="display:block">
<md-card>
<md-card-content>
TEST
</md-card-content>
</md-card>
</a>
But seems it's not so good from ideological prospective.
I am working on an Ionic project and via json I was able to readout my data in the view. But for some reason my image won't come through.
Here is a screenshot of my console:
As you can see from the picture the data is coming in correctly.
My html code:
<ion-list>
<div ng-repeat="newsItem in newsItems">
<a href="#">
<img ng-src="{{newsItem.picture}}" width="80" height="80">
<p>{{newsItem.name}}</p>
</a>
</div>
</ion-list>
Anyone has an idea why the image is not showing?
ok, first you jsfiddle is broken ! but no biggie, just remove ';' from the first line. Second your json news doesn't have a pictures it's just this ...
{"newsID":"58","name":"Chemicar presentation","idk":"new","kind":"news","picture":"58.jpg","picture1":"","start_time":"1446073201"}
You are binding to {{newsItem.picture}} and as you can see your picture it's there as a 58.jpg but this is not a picture it's just a string of picture name, so that's why it's not showing anything in the html!
(Perhaps I should have put this in a comment; totally going to get flamed)
I wonder if it could be a z-index issue?
I am doing angularjs development and have a bevy of HTML ng-templates included inside tags in my HTML, like so:
<script type="text/ng-template" id="content_listing.html">
<div class="item_content">
<div class="horiz-nav-menu">
<h3> {{sectionName}} </h3>
<ul>
<li ng-repeat="navLink in navLinks"> <a href='#/{{navLink.Target}}' title='{{navLink.Tip}}'>{{navLink.Text}}</a> </li>
</ul>
</div>
</div>
</script>
It's highly annoying that my editor of choice, Vim, does not properly highlight the HTML because it is inside a script tag. As a result, I have created a custom syntax region for Vim and plopped it into a file after/syntax/html.vim which I have confirmed is getting processed when Vim starts up:
unlet b:current_syntax
syn include #HTML $VIMRUNTIME/syntax/html.vim
syn region htmlTemplate start=+<script [^>]*type *=[^>]*text/ng-template[^>]*>+ keepend end=+</script>+me=s-1 contains=#HTML,htmlScriptTag,#htmlPreproc
The problem is that the highlighting behavior is flaky (Vim 7.2). To make the highlighting work properly, I have to do things like scroll down so that the section with HTML scrolls off of the page and then scroll back, hit :e to reload the doc, etc. Also, even when the highlighting is displaying correctly, when I go to edit the HTML inside the tag the highlighting for that block turns off.
I am no expert on Vim syntax highlighting ... has anyone run into a similar thing? It looks to me like my region definition looks fine...
I'm new to Foundation. I setup a site previously using Foundation 4 and didn't have a problem with the top bar. But now, with Foundation 5, I'm not getting the post-breakpoint (I guess that's how I should describe it) dropdown functionality.
http://www.imdustindavis.com/test/foundation-5-topbar/
Am I missing something?
Thanks!
Modify the code in the title-area to
<ul class="title-area">
<li class="name">
<h1>My Site</h1>
</li>
<!-- This line needed to display a touch icon on navbar for small screens -->
<li class="toggle-topbar menu-icon"><span></span></li>
</ul>
You don't need to do anything else to make it work. The javascript in the Foundation.topbar.js file will automatically create and populate the touch menu for small screens.
Looks to me like you need
<li class="toggle-topbar menu-icon">
<a href="">
<span>Menu</span>
</a>
</li>
Which isn't mentioned in the docs.
However I found your question trying to figure out how to get that to actually do anything. No luck yet.
I have a click button. I am trying with angularjs. The page anchors at the top of the page, when I click it. How do I to stay at the same place in the browser when I click it?
<a href="#" ng-click="myFunction()">
{{_actions.refresh}}
</a>
There is a similar question here. But with jQuery solution described there. I would like to find a solution with angularjs.
<a ng-click="myFunction()">
{{_actions.refresh}}
</a>
Just remove href completely.
So, the "right" way to do it would be something like this:
<a name="myFunction"></a>
<a href="#myFunction" ng-click="myFunction()">
{{_actions.refresh}}
</a>
That way you could have some extra functionality in terms of someone sending that link, or someone visiting the page without JavaScript (have you thought about that experience yet?).
I obviously don't know your applications, but putting a name tag in there might be a helpful thing on several levels.