Foxtrek_64
Active member
Hi all,
Trying to figure out how to get this wired up and it's giving me a bit of trouble. I have a custom bbcode added, intended to be used as such:
The custom bbcode adds a custom class,
This all works great. Next I've added a template, toki_pona.less, with the following content. Pulling from GitHub is temporary until I can get things working.
After this, I edited
When I view a page with the custom bbcode on it, I get the raw text in the standard font for my theme. Inspecting the element, I do have the expected span with
Do I need to put this somewhere other than extra.less? How can I get this style to be applied?
Edit: It appears I did not scroll up. It looks like it is being registered correctly, but there is quite possibly something wrong with my less code.
The
Am I doing the right thing to register a new font family or is there a better way of going about it?
Trying to figure out how to get this wired up and it's giving me a bit of trouble. I have a custom bbcode added, intended to be used as such:
[tok]jan pi (toki-pona) li jan pi (pona mute)[/tok]
The custom bbcode adds a custom class,
.toki-pona
, and wraps the text in a span.<span class="toki-pona">jan pi (toki-pona) li jan pi (pona mute)</span>
This all works great. Next I've added a template, toki_pona.less, with the following content. Pulling from GitHub is temporary until I can get things working.
Less:
@font-face {
font-family: 'FairfaxPonaHD';
src: url('https://github.com/kreativekorp/open-relay/raw/refs/heads/master/FairfaxHD/FairfaxPonaHD.eot');
src: url('https://github.com/kreativekorp/open-relay/raw/refs/heads/master/FairfaxHD/FairfaxPonaHD.eot#iefix') format('embedded-opentype'),
url('https://github.com/kreativekorp/open-relay/raw/refs/heads/master/FairfaxHD/FairfaxPonaHD.ttf') format('truetype')
font-weight: normal;
font-style: normal;
}
.toki-pona {
font-family: 'FairfaxPonaHD'
}
After this, I edited
extra.less
and added it inline after a couple of entries added by my theme:
Code:
{{ include('xenfocus_base.less') }}
{{ include('xenfocus_theme.less') }}
{{ include('toki_pona.less') }}
When I view a page with the custom bbcode on it, I get the raw text in the standard font for my theme. Inspecting the element, I do have the expected span with
class="toki-pona"
, however XF doesn't seem to be able to find this class.Do I need to put this somewhere other than extra.less? How can I get this style to be applied?
Edit: It appears I did not scroll up. It looks like it is being registered correctly, but there is quite possibly something wrong with my less code.
The
@font-face
declaration appears to break some styling in my page, particularly in relation to the header.Am I doing the right thing to register a new font family or is there a better way of going about it?
Last edited: