Foundation 4 - Tabs to responsive dropdown - responsive-design

I was wondering if there is an option that foundation 4 tabs goes to dropdown when window become small.
<div class="section-container auto" data-section>
<section class="active">
<p class="title" data-section-title>Section 1</p>
<div class="content" data-section-content>
<p>Content of section 1.</p>
</div>
</section>
<section>
<p class="title" data-section-title>Section 2</p>
<div class="content" data-section-content>
<p>Content of section 2.</p>
</div>
</section>
</div>
Here, links are just inside .

In foundation you can use visibility classes to control the elements based on screen sizes.
using visibility classes show-for-small-only and hide-for-small-only we present the div
respectively
<div class="show-for-small-only">
Dropdown Button<br>
<ul id="drop1" data-dropdown-content class="f-dropdown">
<li>This is a link</li>
<li>This is another</li>
<li>Yet another</li>
</ul>
</div>
<div class="hide-for-small-only">
<dl class="tabs" data-tab>
<dd class="active">Tab 1</dd>
<dd>Tab 2</dd>
<dd>Tab 3</dd>
<dd>Tab 4</dd>
</dl>
<div class="tabs-content">
<div class="content active" id="panel2-1">
<p>First panel content goes here...</p>
</div>
<div class="content" id="panel2-2">
<p>Second panel content goes here...</p>
</div>
<div class="content" id="panel2-3">
<p>Third panel content goes here...</p>
</div>
<div class="content" id="panel2-4">
<p>Fourth panel content goes here...</p>
</div>
</div>
</div>

Related

Jquery Flexslider in Angular

Our designer has given me jquery flexslider for showing recently viewed items in our project. I need to construct a slider of recently viewed products in angular js, dynamically based on provided flex slider.In my system, recently viewed items are stored as json object( not array).
First of all flexslider is not working, it means sliding feature is not working inside my angular project. I tried to use angular flex slider module from online and tried to iterate my nested object and construct a slider using my data. It is also not working(picture is not showing). My designer asked me to write down a directive, so overall design will not have any problem or any design modification.
Can any of you can help me regarding this
Jquery flex slider dynamic part inside partial as follows
<<div class="recent_summary clearfix">
<h2>RECENTLY VIEWED</h2>
<div class="nav_carousel">
<div class="carousel mini_thumb_slider">
<ul class="stage_nav">
<li ng-repeat="arrObj in recentItems">
<div ng-repeat="arrItem in arrObj.timestamp track by $index">
<div ng-repeat="(wsitekey,item) in arrItem.sites track by $index">
<div ng-repeat="(prokey,proMd5) in item.add_to_cart track by $index">
<div class="product-image mini">
<div class="p_image_innner">
<img ng-src="{{proMd5.image}}" title="{{proMd5.title}} by {{item.info.name}}">
<div class="rateit">
<div class="rateis">
</div>
</div>
<a class="quick-product" data-toggle="modal" data-target="#quick-popup" ng-click="set_current_product_pro(proMd5,item,prokey,wsitekey)">+</a>
</div>
</div>
<div class="caption"><a ng-click="menuShopApi('',item.info.name)">{{item.info.name}}</a></div>
</div>
<div ng-repeat="(prokey,proMd5) in item.failed_to_add_to_cart track by $index">
<div class="product-image mini">
<div class="p_image_innner">
<img ng-src="{{proMd5.image}}" title="{{proMd5.title}} by {{item.info.name}}">
<div class="rateit">
<div class="rateis">
</div>
</div>
<a class="quick-product" data-toggle="modal" data-target="#quick-popup" ng-click="set_current_product_pro(proMd5,item,prokey,wsitekey)">+</a>
</div>
</div>
<div class="caption"><a ng-click="menuShopApi('',item.info.name)">{{item.info.name}}</a></div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
Angular flex slider attempt to solve inside partial
<div class="recent_summary clearfix">
<h2>RECENTLY VIEWED</h2>
<div class="nav_carousel">
<div class="carousel mini_thumb_slider">
<ul class="stage_nav">
<li ng-repeat="arrObj in recentItems">
<div ng-repeat="arrItem in arrObj.timestamp track by $index">
<div ng-repeat="(wsitekey,item) in arrItem.sites track by $index">
<flex-slider flex-slide="proMd5 in item.add_to_cart track by $index">
<li>
<div class="product-image mini">
<div class="p_image_innner">
<img ng-src="{{proMd5.image}}" title="{{proMd5.title}} by {{item.info.name}}">
<div class="rateit">
<div class="rateis">
</div>
</div>
<a class="quick-product" data-toggle="modal" data-target="#quick-popup" ng-click="set_current_product_pro(proMd5,item,prokey,wsitekey)">+</a>
</div>
</div>
<div class="caption"><a ng-click="menuShopApi('',item.info.name)">{{item.info.name}}</a></div>
</li>
</flex-slider>
<div ng-repeat="(prokey,proMd5) in item.failed_to_add_to_cart track by $index">
<div class="product-image mini">
<div class="p_image_innner">
<img ng-src="{{proMd5.image}}" title="{{proMd5.title}} by {{item.info.name}}">
<div class="rateit">
<div class="rateis">
</div>
</div>
<a class="quick-product" data-toggle="modal" data-target="#quick-popup" ng-click="set_current_product_pro(proMd5,item,prokey,wsitekey)">+</a>
</div>
</div>
<div class="caption"><a ng-click="menuShopApi('',item.info.name)">{{item.info.name}}</a></div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
used scripts
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/flexslider/2.2.2/flexslider.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/flexslider/2.2.2/jquery.flexslider.js"></script>
<script src="https://rawgit.com/wilsonwc/angular-flexslider/master/angular-flexslider.js"></script>
Use Flexsilder without Angular and try this code:
var slider = $('#slider').data('flexslider');
slider.addSlide(obj, position);
or
$('#slider').flexslider('addSlide', obj[, position]);
Because HTML will be rendering after Flexsilder;

Using ui-router with Kendo TabStrip

I am trying to implement a Kendo Tab Strip and that applies ui-router to display the contents of the tab. I can get the tab strip to display but not the contents using the ui-view. Anyone have an example of how to make these items work together.
Sample of my html.
<div class="main-template">
<div class="row">
<h3>Welcome to the Dashboard</h3>
<div ng-controller="Navigation">
<div kendo-tab-strip k-content-urls="[ null, null]">
<!-- tab list -->
<ul>
<li class="k-state-active" url="#/invoice">Invoice Management</li>
<li url="#/shipment">Shipment Management</li>
</ul>
</div>
<div ui-view></div>
</div>
</div>
</div>
I was not merging everything together as I should. In the li markup I should have used ui-sref instead of url.
<div class="main-template" style="margin-left: 10px;">
<div class="row">
<h3>Welcome to the Dashboard</h3>
<!--<a ui-sref="invoice">Invoice</a>
<div ui-view></div>-->
<div ng-controller="Navigation">
<div kendo-tab-strip="tabs">
<!-- tab list -->
<ul>
<li class="k-state-active" ui-sref="invoice">Invoice Management</li>
<li ui-sref="shipment">Shipment Management</li>
</ul>
</div>
<div ui-view></div>
</div>
</div>
</div>

Drupal 7 customize view theme

I have the HTML as below:
<div class="top-grids">
<div class="container">
<div class="col-md-4 top-grid text-center">
<div class="top-grid-pic">
<img src="images/pic01.png" title="Boots" />
<span>Boots</span>
</div>
<div class="top-grid-pic-info">
Seeall
</div>
</div>
<div class="col-md-4 top-grid text-center">
<div class="top-grid-pic">
<img src="images/pic02.png" title="Boots" />
<span>Casual</span>
</div>
<div class="top-grid-pic-info">
Seeall
</div>
</div>
<div class="col-md-4 top-grid text-center">
<div class="top-grid-pic">
<img src="images/pic03.png" title="Boots" />
<span>Formal</span>
</div>
<div class="top-grid-pic-info">
Seeall
</div>
</div>
<div class="clearfix"> </div>
</div>
</div>
In Drupal 7, I have created a view (block) and named it "Featured Products". I have added two fields - image and title. Please check the attached screen shot.
After doing the same, I have created a view file named "views-view-field--new-uc-products--block.tpl.php" and write the code as below:
<div class="top-grids">
<div class="container">
<?php print $output; ?>
</div>
and place this under the 'templates' folder.
Now I see the drupal site and the View Source file which contains the below HTML structure:
<div class="view-content">
<table class="views-table cols-0" >
<tbody>
<tr class="odd views-row-first">
<td >
<div class="top-grids">
<div class="container">
<div class="col-md-4 top-grid text-center">
<div class="top-grid-pic"><div class="product-image"><div class="main-product-image"><img typeof="foaf:Image" src="http://localhost/uberdrupal/sites/default/files/styles/uc_product/public/515sRCSoS9L._SX331_BO1%2C204%2C203%2C200_.jpg?itok=4Exqjiv3" alt="" title="" /></div></div>
</div>
</div>
</td>
<td class="views-field views-field-title" >
<div class="top-grids">
<div class="container">
<span>Twisted</span>
</div>
<div class="top-grid-pic-info">
See All
</div>
</div> </div>
</div>
Can Someone tell me how can I customize the view template so that it can show the HTML as I desired?
Thanks
Go to admin/structure/views/settings and have these settings
Then go to your view and under Advanced, you will have Theme:Information. Click it and you will be shown a list of tpl files that you can change the html as you wish.

CSS Selector in a tree like structure

I have a tree like structure in HTML, and starting from the root, I would like to access only the content of its direct children using CSS selectors. Note that I don't have control on the structure of the HTML, so I cannot change it.
An example will help a lot here. Consider the following HTML code:
<div class="node">
<div class="children">
<div class="node">
<div class="children">
<div class="node">
<div class="children">
</div>
<div class="content">
<p class="name">Quarter-Final 1</p>
</div>
</div>
</div>
<div class="content">
<p class="name">Semi-Final 1</p>
</div>
</div>
<div class="node">
<div class="children">
<div class="node">
<div class="children">
</div>
<div class="content">
<p class="name">Quarter-Final 2</p>
</div>
</div>
</div>
<div class="content">
<p class="name">Semi-Final 2</p>
</div>
</div>
</div>
<div class="content">
<p class="name">Final</p>
</div>
</div>
I would like to get only the names of Semi-Final 1 and Semi-Final 2. Ideally with one CSS selector. How can it be done?
Thanks
Something along these lines (works only with jQuery at the moment, will work in CSS4):
.node > .children > .node > .content > .name:not(.node > .children > .node > .children .content > .name)

Bootstrap columns aren't lining up

I have a layout with 4 columns, 4x col-md-3. When I try to make the screen smaller, these columns have to behave to first 3 columns, then 2, and then 1 when the screen is too small.
But they don't, the columns just become smaller, and don't move beneath the other columns.
I must be missing something.
Code:
<div class="row-fluid vakanties_strip_wrapper">
<div ng-repeat="vakantie in vakanties">
<a ui-sref="details_vakantie/({ vakantieId: vakantie.ID })">
<div class="col-lg-3">
<div class="vakantie_blok" ng-class="$even ? 'red' : 'blue'">
<div class="vakantie_strip_img">
SOME IMAGE
</div>
<div class="vakantie_strip_tekst_beschr">
SOME TEXT
</div>
</div>
</div>
</a>
</div>
<div class="clearfix"></div>
</div>
Try with this option.
<div class="row-fluid vakanties_strip_wrapper">
<div ng-repeat="vakantie in vakanties">
<a ui-sref="details_vakantie/({ vakantieId: vakantie.ID })">
<div class="col-xs-12 col-sm-6 col-lg-3">
<div class="vakantie_blok" ng-class="$even ? 'red' : 'blue'">
<div class="vakantie_strip_img">
SOME IMAGE
</div>
<div class="vakantie_strip_tekst_beschr">
SOME TEXT
</div>
</div>
</div>
</a>
</div>
<div class="clearfix"></div>

Resources