Questions tagged [pugjs]

pugjs is the Github organization which creates the "Pug" (previously known as "Jade") Node.js templating library.

Organization link: https://github.com/pugjs

79 questions
1
vote
0 answers

How do I iterate through object inside of conditional statement in pugjs?

How do I iterate through the object "item" inside of this if statement in pugjs? I want to skip over the given "item" if the identicalCount is not there (I have other functions carried out should it skip over this loop. each item in testResultData …
Jet.B.Pope
  • 642
  • 1
  • 5
  • 25
1
vote
1 answer

how to add a style attribute thats more than one word in pugjs

I am trying to add style attributes using pugsj and I cant figure how to add a style like line-height without my linters complaining. I have this pug template(doesnt work) Div( class="CoolAid" style={line-height:'40px', background-color:…
Fatah
  • 2,184
  • 4
  • 18
  • 39
1
vote
1 answer

How to integrate an external javascript file into PugJS?

I'm trying to make a web application using Node.js and Express and PugJS as a template engine. My problem: I'm using a google maps API and I want to code all my google maps API functions into a separate javascript file. I can't figure out how to…
Sam T
  • 31
  • 1
  • 2
1
vote
1 answer

Trying to embed PHP within PUGs property values

What I am trying to do (using gulp-pug, that uses pugjs): input(type='hidden', name="!{''}", value='loginForm') and what ever I could find on the pug interpolation page, but it always gives me something like…
BananaAcid
  • 3,221
  • 35
  • 38
1
vote
1 answer

How to use Pug/Jade iterations to create multiple elements with different content?

I'm presently learning iterations in Pug/Jade. I'd like to use this tool going forward. In the code below, you basically have what's supposed to amount to a slider. In the first instance, the #{i} is supposed to return values 1-4 to each listed…
1
vote
3 answers

PugJs - template file not found / directory ignored

I have a simple application that should output a small content. I use NodeJs, Express and Pug. const pug = require('pug'); const express = require('express'); const app = express(); const indexFile = 'index'; // the file to load app.set('view…
peterHasemann
  • 1,550
  • 4
  • 24
  • 56
1
vote
0 answers

Getting premailer-gulp-juice and gulp-pug working nicely together

this is my first post so I apologize if I do not do this correctly. I did search for terms relating to my issue and couldn't find anything. What I am working on is building an email building tool using nodejs and gulp. My file structure is like…
1
vote
2 answers

Search box with icon using bootstrap and pug displays icons under input

It should be simple but I can't see the problem. I'm building a page like menu in the center and a search box with icon on the right side, I'm using keystonejs, pugjs and bootstrap. Here's the problematic part of code: div(style='margin-top:60px;…
user3013860
  • 77
  • 1
  • 8
1
vote
1 answer

How to bind value inside a Pug.js filter

I'm tying to bind some value inside a Pug.js filter. But that filter works fine the value doesn't bind. Output Result with the filter