Menu icon Foundation

Designer | Asheville, NC

My name is Dustin Harrell and I am a web designer and developer located in Asheville, NC. I believe that the key to becoming a better designer and developer requires constant education, a solid work ethic, and a strong attention to detail. I strive to remind myself of these fundamental's daily.

My Posts


My Comments

Dustin Harrell commented on Dustin Harrell's post over 1 year

I was able to write a helper function to do this.
Helper Function:
/**
* Handlebars block helper to dynamically return a data value.
* @param {mixed} a - The full data object to pull values from.
* @param {mixed} b - The key of the value you would like to render.
* @param {object} options - Handlebars object used to pull the user provided text and find the value.
* @returns If the value exists return it if not return null.
*/
module.exports = function(object, key, options) {
// Sanitize user provided text.
var value = String(options.fn(this)).trim();

// If a value exists return it else return nothing.
if (value) {
return object[key][value];
}
else {
return null;
}
}

 
Example:
{{#getDataValue authors author}}image{{/getDataValue}}
 

Dustin Harrell commented on Alex's post over 1 year

Hi Alex,
I have done this on my own company website.  See the link below for an example using ZURB Stack 6.4.1.
https://foundation.zurb.com/forum/posts/51775-adding-new-gulp-tasks-to-panini#comment_43006

Dustin Harrell commented on Andrew Cetnarskyj's post over 1 year

Hi Andrew,
I'm not sure if you were able to successfully create your sitemap task.  I have implemented this feature on my company website.  Below is an example from my gulp-sitemap function.

Install gulp-sitemap (npm install --save-dev gulp-sitemap)
Copy the function below to your gulpfile (assuming you are using the latest version of ZURB Stack - I'm running 6.4.1)
Add a call to sitemap in your build task, and modify the siteUrl variable accordingly. 

Note: This implementation also removes trailing slashes from the sitemap via the mappings array.
gulpfile.bable.js
// Generate a sitemap from generated html files.
function sitemap() {
return gulp.src(PATHS.dist + '//*.html')
.pipe($.sitemap({
siteUrl: 'http://example.com',
mappings: [{
pages: ['
/*'],
getLoc(siteUrl, loc, entry) {
// Removes the trailing slash if it exists
return loc.replace(/\/$/, '');
}
}]
}))
.pipe(gulp.dest(PATHS.dist));
}

Dustin Harrell commented on Markus Lind's post over 2 years

Roy Six has the correct answer.  It appears that the contain-to-grid class no longer works.  Wrap your top bar markup in a div with the class grid-container and you shouldn't have any issues.

Dustin Harrell commented on Clay Hymas's post about 3 years

I had this same issue today and was able to add the classes quickly and easily by just updating the $breakpoint-classes variable in my sass settings file.
By default Foundation 6 uses:$breakpoint-classes: (small medium large);
Change to:$breakpoint-classes: (small medium large xlarge xxlarge);
Then recompile and you're good to go! :D

Posts Followed

  • 2
    Replies
  • gulp.babel.js | Sitemap XML

    By Alex

    Babelsitemapgulptaskcli

    Hi friends! Please tell me, how a can create task for "sitemap xml" in new version CLI a file gulp.babel.js? My old file gulp.js had task like this : // Sitemap XML Genereted gulp.task('sitemap', function () {     gulp.src('src/pages/*.html... (continued)

    Last Reply by aamir khan 4 months ago





Following

    No Content

Followers

My Posts

My Comments

You commented on Dustin Harrell's post over 1 year

I was able to write a helper function to do this.
Helper Function:
/**
* Handlebars block helper to dynamically return a data value.
* @param {mixed} a - The full data object to pull values from.
* @param {mixed} b - The key of the value you would like to render.
* @param {object} options - Handlebars object used to pull the user provided text and find the value.
* @returns If the value exists return it if not return null.
*/
module.exports = function(object, key, options) {
// Sanitize user provided text.
var value = String(options.fn(this)).trim();

// If a value exists return it else return nothing.
if (value) {
return object[key][value];
}
else {
return null;
}
}

 
Example:
{{#getDataValue authors author}}image{{/getDataValue}}
 

You commented on Alex's post over 1 year

Hi Alex,
I have done this on my own company website.  See the link below for an example using ZURB Stack 6.4.1.
https://foundation.zurb.com/forum/posts/51775-adding-new-gulp-tasks-to-panini#comment_43006

You commented on Andrew Cetnarskyj's post over 1 year

Hi Andrew,
I'm not sure if you were able to successfully create your sitemap task.  I have implemented this feature on my company website.  Below is an example from my gulp-sitemap function.

Install gulp-sitemap (npm install --save-dev gulp-sitemap)
Copy the function below to your gulpfile (assuming you are using the latest version of ZURB Stack - I'm running 6.4.1)
Add a call to sitemap in your build task, and modify the siteUrl variable accordingly. 

Note: This implementation also removes trailing slashes from the sitemap via the mappings array.
gulpfile.bable.js
// Generate a sitemap from generated html files.
function sitemap() {
return gulp.src(PATHS.dist + '//*.html')
.pipe($.sitemap({
siteUrl: 'http://example.com',
mappings: [{
pages: ['
/*'],
getLoc(siteUrl, loc, entry) {
// Removes the trailing slash if it exists
return loc.replace(/\/$/, '');
}
}]
}))
.pipe(gulp.dest(PATHS.dist));
}

You commented on Markus Lind's post over 2 years

Roy Six has the correct answer.  It appears that the contain-to-grid class no longer works.  Wrap your top bar markup in a div with the class grid-container and you shouldn't have any issues.

You commented on Clay Hymas's post about 3 years

I had this same issue today and was able to add the classes quickly and easily by just updating the $breakpoint-classes variable in my sass settings file.
By default Foundation 6 uses:$breakpoint-classes: (small medium large);
Change to:$breakpoint-classes: (small medium large xlarge xxlarge);
Then recompile and you're good to go! :D

Posts Followed



Following

  • No Content

Followers

  • No Content