You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure what I'm doing wrong here but I have created mixins file with a couple of mixins that I have created for my project. I keep getting the following errors in console.
pug_mixins.job-card is not a function
pug_mixins.btn is not a function
Mixins file:
mixin job-card(url, title, description, date, location, type, category)
a(href=url)
.job-listings-body
h5 #{title || 'Physical Therapist / Clinic Director'}
p #{description || 'In this position the physical therapy assistant will provide physical therapy in a team environment, and under the direction and supervision of the staff physical therapist in a skilled nursing facility.'}
.related-jobs-meta
span #[i.fa.fa-calendar] #{date || '1 Day Ago'}
span #[i.fa.fa-map-marker] #{location || 'Southern Pines, NC 28387'}
span #[i.fa.fa-clock-o] #{type || 'Full Time'}
span #[i.fa.fa-tag] #{category || 'Nursing'}
.lob-listing-apply-btn #[i.fa.fa-check-circle] Apply Online!
mixin btn(url, text, type)
- var btnType = type;
if btnType === 'button'
button(type="button")&attributes(attributes)= text
else
a(href=url)&attributes(attributes)= text
Example Include File in template:
+btn('#', 'test', 'button')
Page Template:
include mixins.pug
- var pageTitle = 'Job Details Page'
doctype html
html(lang="en")
head
include regions/head.pug
body
// Toolbar
include menus/toolbar.pug
// Header
section.job-header
.container
p We've Got This Great Job For You!
h1 Physical Therapist - Skilled Nursing / Cynthiana, KY
// Sub Header
section.job-sub-header
.container
.related-jobs-meta
span #[i.fa.fa-calendar] 3 Days Ago
span #[i.fa.fa-map-marker] Southern Pines, NC 28387
span #[i.fa.fa-clock-o] Full Time
// Main Content
section.main-content
// Sidebar
.col-desktop-5
// Form
include components/job-form.pug
// Review Carousel
include components/testimonial-carousel.pug
// Related Jobs
include components/sidebar-related-jobs.pug
// footer
include regions/footer.pug
The text was updated successfully, but these errors were encountered:
Not sure what I'm doing wrong here but I have created mixins file with a couple of mixins that I have created for my project. I keep getting the following errors in console.
pug_mixins.job-card is not a function
pug_mixins.btn is not a function
Mixins file:
Example Include File in template:
+btn('#', 'test', 'button')
Page Template:
The text was updated successfully, but these errors were encountered: