write a reply

Help with Font Icons in Main Profile(cuz im dumb lol)

Tidal Wave
aliasAkira, Tsunami, Tsu, Aki
pronounsAny
4,225written posts
AkiraTsunamiearned bits
offlinecurrently
AkiraTsunami
Part of the Furniture
AkiraTsunami Avatar
I've got a hurricane in my head, I can't feel a thing, but it's better than dead
Okay, i'm awful with explaining what I want, but... I'ma try.

If anyone can help me that would be absolutely great.

BASICALLY. I want to be able to let members pick a font icon from a list, (or input it in a text area form if it has to be) from cappucicons(if that matters much) As a group icon? Because I cannot get group icons to work in the main profile page.

I would like the icon to show up as a background behind a set of information. I HAVE ENOUGH KNOWLEDGE to know how to frame it the way I want it, but I don't know how to apply this sort of thing. So if someone could help me get the group icons or an inputable font icon on the main profile page. I'm sorry for this horrible explanation lol.


tldr; I want a font icon/group icon as a background for some information in the main profile. If it's the font icon, the members have to be able to add it to the profile.

THANKS!

aliasantiviral
pronounsHe/Him
245written posts
Beetleearned bits
offlinecurrently
Beetle
Full Member
Beetle Avatar
With FontAwesome it's just a matter of using a profile field and then setting it up like:
<i class="fa-solid fa-<!-- |field_#| -->"></i>

I tried doing the same with cappucicons, but I can't seem to get it to work in the same way.

Solar Waltz, an 18+ panfandom set in NYC
Tidal Wave
aliasAkira, Tsunami, Tsu, Aki
pronounsAny
4,225written posts
AkiraTsunamiearned bits
offlinecurrently
AkiraTsunami
Part of the Furniture
AkiraTsunami Avatar
I've got a hurricane in my head, I can't feel a thing, but it's better than dead
:o I GOT IT TO WORK WITH CAPPUCCICONS!! its the same concept, but its cp cp-iconname

though it might be because im privately hosting cappuccicons too. still! THANK YOU SO MUCH FOR THE HELP!!

phantom of the black parade
pronounsshe / her pronouns
4,373written posts
Kuroyaearned bits
offlinecurrently
Kuroya
Part of the Furniture
Kuroya Avatar
what do you want to know? my height, hobbies, quirks, the color of my underwear?
technically, as long as all of the corresponding abbreviations are on it, you can just use the same field for multiple different options. so like.

<i class="fa-solid fa-<!-- |field_1| --> cp cp-<!-- |field_1| -->"></i>

that should work with both fontawesome and cappuccicons, and you can add more on for it to work in the same way

937written posts
gimmickearned bits
offlinecurrently
gimmick
Part of the Furniture
gimmick Avatar
All birds and men are sure to die but songs may live forever
If you're still wondering how to go the group icon route, one option is including the icons for all the groups in your HTML but setting them as display: none, wrapping them inside a div, and then targeting which icon to show based on the div's class. The HTML might look something like this:

<div class="group-icon <!-- |group| -->">
<i class="cp cp-A"></i>
<i class="cp cp-B"></i>
<i class="cp cp-C"></i>
</div>

And the CSS
.group-icon i {
display: none;
}
.groupA .cp-A,
.groupB .cp-B,
.groupC .cp-C {
display: block;
}

That way, if an account is in groupA, it'll show the <i class="cp cp-A"></i> element, but none of the others. <!--|group|--> is interchangeable with <!--|field_#|--> too of course



A second option is wrapping them each individually in a div, and targeting which div to show rather than which icon 

<div class="group-icon <!-- |group| -->"><i class="A"></i></div>
<div class="group-icon <!-- |group| -->"><i class="B"></i></div>
<div class="group-icon <!-- |group| -->"><i class="C"></i></div>
<div class="group-icon <!-- |group| -->"><i class="D"></i></div>

Modified CSS
.group-icon {
display: none;
}
.group-icon:where(.groupA, .groupB, .groupC) {
display: block;
}


This version might be messier in terms of HTML, but the CSS has less to keep track of because you don't need to remember which icon corresponds to which group. Up to you which you prefer.
last edit on Sept 4, 2023 3:30:07 GMT by gimmick
Tidal Wave
aliasAkira, Tsunami, Tsu, Aki
pronounsAny
4,225written posts
AkiraTsunamiearned bits
offlinecurrently
AkiraTsunami
Part of the Furniture
AkiraTsunami Avatar
I've got a hurricane in my head, I can't feel a thing, but it's better than dead
also very good to know! thank you! for now ive got a list of the group icons and members can just yeet them into profile fields lol.