Foundation 5 top bar - responsive-design

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.

Related

Links not working inside featherlight popup

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".

Issue with React development server refresh. How do i solve it?

Welcome.
I just started to learn ReactJS, for the first few attempts, it was okay, but since a few hours, every time, when I create a new component, after I define the exact component and gives it content, when I attempt to use it in the App.js, or anywhere (after importation, of course), it displays a few components, but not all, either I refresh it.
The only solution is, if I delete the closing bracket of the return statement, save it, wait for the error on the development server, then write it back.
e.g.
function MainNavigation() {
return (
<header>
<div>React Meetups</div>
<nav>
<ul>
<li>
<Link to="/">All Meetups</Link>
</li>
<li>
<Link to="/new-meetup">Add New Meetup</Link>
</li>
<li>
<Link to="/favorites">My Favorites</Link>
</li>
</ul>
</nav>
</header>
);
}
In this case, after ctrl+s, the dev. server displays the div, and the "All Meetups" list item with the link, but not the other two.
If i delete the ); part of the statement, then save it, and write back, then save it again, only then will the changes appear.
Any ideas?
Few problem which I can think of are as follow
Try to do hard refresh instead of deleting the ");"
Try to inspect the file from developer console. May be some css color ias same as background color.

How to make material cards in layout act like urls?

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.

custom vim syntax highlighting for angularjs is flaky

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...

<a> tag brings me to top of page with angularjs. But I want to stay at the same place

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.

Resources