79333776

Date: 2025-01-06 17:04:43
Score: 2
Natty:
Report link

ANSWER:

I have it figured out, as i'm new to flask and working with full stack I wasn't aware of this, but it seems you only use url_for to reference static outside of the static folder.

When inside the static folder you use the standard relational paths.

(instead of)

@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("{{url_for('static', filename='/fonts/vendor/bootstrap/bootstrap-icons.woff2')}}") format("woff2"),
    url("{{url_for('static', filename='/fonts/vendor/bootstrap/bootstrap-icons.woff')}}") format("woff");
}

(it's this)

@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("../../../fonts/vendor/bootstrap/bootstrap-icons.woff2") format("woff2"),
    url("../../../fonts/vendor/bootstrap/bootstrap-icons.woff") format("woff");
}

(not sure if i should delete this question but seeing as I couldn't find the answer on stack overflow will leave it up in case anyone runs into a similar issue)

Reasons:
  • RegEx Blacklisted phrase (1.5): i'm new
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: ShaAnder