Laravel Font face in layout and other blade -
I have layout view with two fonts in a CSS and header, and there is a header output for another blade view: They both work fine in this layout view. But I have another scene: style2 css works fine in my second view, but the fonts are missing. I have tried putting a font script in the header section in my second view, but still nothing. What can be the problem? You can use an This type of approach will remove the need for relative path because it will solve a complete URL. This will remove the "relative wizard", as Zawaki mentioned in the comment. {{HTML :: Style ('css / style1.css')}} @Elder ('header') & lt; Style type = "text / css" & gt; @ Font-face {font-family: new-font; Src: url ('font / brandon_grotesque_medium.ttf'); } & Lt; / Style & gt; & Lt; Style type = "text / css" & gt; @ font-face {font-family: Noto-Sans; Src: url ('font / NotoSans-Bold.ttf'); } & Lt; / Style & gt;
@extends ('layout') @section ('header') {{HTML :: style ('css / posts / style2.css')} } @ Stop @ section ('content') my content here @stop
property () .
& style style = "text / css" & gt; @ Font-face {font-family: nav-font; src: url ('{{asset (' font / brandon_grotesque_medium.ttf ')}}'); } & Lt; / Style & gt; & Lt; Style type = "text / css" & gt; @ font-face {font-family: Noto-Sans; Src: url ('{{asset (' font / NotoSans-Bold.ttf ')}}'); } & Lt; / Style & gt;
Comments
Post a Comment