Questions tagged [jade4j]

jade4j's intention is to be able to process jade templates in Java without the need of a JavaScript environment, while being fully compatible with the original jade syntax.

jade4j's intention is to be able to process jade templates in Java without the need of a JavaScript environment, while being fully compatible with the original jade syntax (source).

52 questions
15
votes
2 answers

iterate over an array of objects in jade/pugjs

I have the following json object: var partners =[{ "name":"partnerx", "image": "imagex" }, { "name": "partnery", "image": "imagey" }] I want to put into a ul object using jade and I tried: ul#slides.swiper-wrapper mixin partners(name, image) …
hopper
  • 4,230
  • 8
  • 36
  • 49
4
votes
1 answer

How to pass a mixin reference into another mixin as a mixin parameter in jade4j

What I want to achieve is as follows in jade4j - mixin mixin_a() p This is mixin A mixin mixin_b(mixin_reference) p This is mixin B +mixin_reference() +mixin_b(mixin_a) Here I am passing mixin_a as a reference in mixin_b and expecting…
abhnv
  • 41
  • 1
  • 3
2
votes
2 answers

pug add/remove class name by variable from NodeJS

I have a pug template that should should display red text when an error is returned and green text when an operation is successful. I have difficulty setting the

classname(s) based on the status response returned from my NodeJS backend. My…

CybeX
  • 2,060
  • 3
  • 48
  • 115
2
votes
0 answers

Pug, if statement in form not extracting data

I'm trying to dynamically to create a form in pug. form(method='POST' action=postRoute) each component in step.components .row if (component.pug == 'name') …
DaAmidza
  • 336
  • 2
  • 7
  • 25
2
votes
1 answer

Button is not getting inserted inside table row in Pug

I am trying to add the button as row element in Pug table. But button is not getting inserted at specific row following is the pug code table tr#headtag th DishName th Quantity th Currently_Done th Predicted …
vishal M
  • 71
  • 5
2
votes
1 answer

nodejs form post request is not working

I working with nodejs and jade to create a login form. In my first step i want to pass the fieldname (id=name, and name=name) to the backend. I have tried both methods (sending post request from form and from postman) but either methods give no…
Erik hoeven
  • 1,442
  • 6
  • 26
  • 41
2
votes
0 answers

How to convert a login.pug file to login.ejs file in node.js?

I am trying to convert login.pug file to login.ejs file in node.js which contains below code.please help me how to convert below code into login.ejs extends layout block content div(id="root" style="width: 280px; margin: 40px auto; padding:…
priyanka
  • 29
  • 3
2
votes
1 answer

Spring (with Jade) Resources

The Problem My spring-boot application recently changed routing from host/endpoint to host/middle/endpoint. Since the change, I am running into an issue where the resources are not being found relative to the new url structure. Before, I could…
moonboy
  • 1,296
  • 4
  • 16
  • 29
1
vote
0 answers

Display data from sqlite database in jade template

I am trying to show all the data from a sqlite database into jade file. However i am manage to show list of all tables from the database into the template but when i want to display the data from the tables into a template i could not.It just shows…
1
vote
1 answer

unexpected text ", in pug file javascript

I'm having the following error. I don't know how to fix it. I new to handling pug files. It is showing the following error: Error: /home/nobin/jadeApp/views/show_message.pug:9:33 7| else 8| h3 New person, > 9| …
NobinPegasus
  • 545
  • 2
  • 16
1
vote
0 answers

springboot not loading Jade pages from controller

I am a beginner in Spring. I am trying to build login page for an application. The problem is I am not able to load the login page from the controller. Below is the code for controller. @RestController public class RootViewController…
nullvoid
  • 45
  • 1
  • 1
  • 11
1
vote
1 answer

Why the li tag not getting the value of loop variable?

I am trying to loop through the object that is coming from app.js. I am using each loop in PUG/JADE, so that I can use its value to print some values. But the li is not getting the value of loop variable Note : I am getting 'post.title' and…
Sami
  • 466
  • 1
  • 5
  • 12
1
vote
0 answers

Coverting jade to handlebars

I am trying to convert the layout.jade to handlebars. What are the equivalents of block content and block sidebar, please? doctype html html(lang='en') head title= title meta(charset='utf-8') meta(name='viewport',…
chikitin
  • 762
  • 6
  • 28
1
vote
1 answer

jade iteration through dataset object from mongodb database

i'm building a bookstore app with expressjs and using mongodb to store data i have a database of books i want to display to my index.jade but i keep running into an infinite loop extends layout block content .content each book in books …
Baraa Araki
  • 61
  • 1
  • 6
1
vote
1 answer

CSS not getting applied for the jade template in node express application

I am trying to send an email from node+express application. I am using sendgrid for sending the emails. Data for the email text is taken from the jade, supported by node. Although the email is getting delievered to the respective email, but the…
Rohan Kangale
  • 931
  • 4
  • 11
  • 29
1
2 3 4