barryvan
(Barry van Oudtshoorn)
27. November 2017 um 00:24
1
As Christmas approaches, you may want to add a bit of festive flair to your forum. So I present a (very simple) Christmas hats theme:
A couple of notes:
This theme assumes list avatars are 25x25 with a 2px border all round; you may need to tweak some of the positioning in the CSS for your avatars.
It also assumes that thread avatars are 64x64 with a 2px border all round; again, tweak the positioning as you see fit.
To avoid excessive festiveness, not all avatars in lists will be bedecked with Christmas cheer, but once you open up a thread, everyone is part of the fun.
(Aside: it looks like I wasn’t the first to think of this !)
Enjoy!
47 „Gefällt mir“
Is it possible to add only hats to my current themes?
barryvan
(Barry van Oudtshoorn)
6. Dezember 2017 um 21:48
5
Yep! You can add it as a “theme component” to your existing themes. This is how I’m using it.
4 „Gefällt mir“
Works like a charm, thank you!
1 „Gefällt mir“
Pad_Pors
(Pad Pors)
26. August 2018 um 13:54
7
is it possible to put the hat on a especial user? or on users of a especial group?
2 „Gefällt mir“
Stephen
(Stephen)
6. November 2018 um 00:52
9
Is it still possible to use .dcstyle.json for components? If not we should get this fixed ASAP - Christmas hats all round!
4 „Gefällt mir“
Johani
(Joe)
6. November 2018 um 09:19
10
Yes, that’s still the format you get when you export a theme / component from the admin. There are two options to get this component up to date.
directly edit the file to add the component flag.
import the component, convert it, then export it again.
Either of those options will work to ensure that the component gets imported as a… well… component.
4 „Gefällt mir“
Jason3
(Jason)
9. November 2018 um 20:45
11
this is a great component. i was wondering, is there a way to add turkey wings to the profile pictures for thanksgiving?
2 „Gefällt mir“
Stephen
(Stephen)
9. November 2018 um 20:50
12
Sure, just prepare a PNG or gif with transparency, upload it and alter the CSS so that it refers to your image.
6 „Gefällt mir“
Jason3
(Jason)
15. Dezember 2018 um 23:53
13
thank you for your help, my forums are loving all the Christmas themes and hat components.
thank you for the great component to work off of, its awesome
( is there anyway to add a gif instead of a pic? i would love to add flashing lights around profile pics )
2 „Gefällt mir“
Stephen
(Stephen)
16. Dezember 2018 um 02:09
14
Sure, GIFs support transparency. If you can make it and align it then it should work fine AFAIK.
6 „Gefällt mir“
Jason3
(Jason)
16. Dezember 2018 um 04:54
15
it works absolutely perfect, thank you, my forums are filled with so much Holiday awesomeness, thank you
5 „Gefällt mir“
jtbayly
19. Dezember 2018 um 13:08
16
Is anybody up for updating this to get it working on mobile?
Jason3
(Jason)
19. Dezember 2018 um 13:10
17
this works on mobile on my site.
i’ve changed it so there are 4 different type of hats the users can choose from
it works great
make sure you have it installed under “mobile”
and heres the css code i use
.topic-avatar {
position: relative;
}
.topic-avatar > a::after {
content: "";
background-image: url($elf);
background-size: contain;
background-position: center;
background-repeat: no-repeat;
position: absolute;
top: -68%;
left: -27%;
width: 130%;
height: 100%;
}
.topic-post:nth-of-type(2n) .topic-avatar > a::after {
transform: rotate(-5deg) translateX(-4px);
}
.topic-post:nth-of-type(5n) .topic-avatar > a::after {
transform: rotate(5deg) translateX(4px);
}
.topic-post:nth-of-type(3n) .topic-avatar > a::after {
transform: scaleX(-1) rotate(5deg) translateX(-8px);
}
.topic-list .posters > a.latest {
position: relative;
}
.topic-list .posters > a.latest::after {
content: "";
background-image: url($elf);
background-size: contain;
background-position: center;
background-repeat: no-repeat;
position: absolute;
top: -14px;
left: -5px;
width: 32px;
height: 24px;
}
.topic-list tr:nth-of-type(3n) .posters > a.latest::after {
transform: scaleX(-1);
left: 2px;
}
4 „Gefällt mir“
jtbayly
19. Dezember 2018 um 13:15
18
Odd. I have just installed the component from the GitHub repo, enabled it in my theme, and Santa hats show up on Desktop but not on mobile for me.
Also, I tried viewing the demo with the same results.
Edit: I’m on iOS. Perhaps it’s device specific?
Jason3
(Jason)
19. Dezember 2018 um 13:16
19
i’m on IOS. i think if you install from GitHub, it installs only on desktop, you need to copy and paste and add it under “mobile”
2 „Gefällt mir“
cpradio
(cpradio)
19. Dezember 2018 um 13:17
20
Ideally someone could update the component to use Common instead of Desktop (so it applies to both automatically)
1 „Gefällt mir“
jtbayly
19. Dezember 2018 um 13:19
21
Thanks for the help, I hadn’t read too carefully, and I’m not familiar with themes/components yet, so I was expecting it to “just work.” I’ll give it a shot with your instructions.
Yeah, that’d be nice. It’s a bit beyond my ability at the moment, I’m afraid, or I’d try to contribute back in that way.
1 „Gefällt mir“