Since this is my first time working with Jade, I am having a lot of issues.
My goal is this:
I have a simple server with a bunch of tickets. These tickets are meant to be served as a simple list, with an icon on their left indicating the status of that ticket (e.g. closed or open). I would like to use Jade for this along with Node.js' Express framework.
Here's what I tried so far:
jade layout
<!-- layout.jade -->
doctype html
html
head
title= title
link(rel='stylesheet', href='/src/style.css')
link(rel='stylesheet', href='http://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css')
body
block content
Main jade file
<!-- index.jade -->
<!-- index.jade -->
extends layout
block content
ul
each ticket in tickets
li
- const status = ticket.status === 'file' ? ['fas', 'fa-file-alt'] : ['far', 'fa-folder-open']
i(class=status)
a(href='#')= ticket.description
The problem is that this gives a weird box like the icon doesn't exist.
This is what the result looks like:
How can I fix the icon not showing up?
Help appreciated. Thanks.