# Share your Discourse Christmas decorations!

**URL:** https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188
**Category:** Community Building
**Created:** [December 5, 2019, 5:02pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188 "2019-12-05T17:02:28Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [December 5, 2019, 5:02pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/1 "2019-12-05T17:02:28Z")

</div>

Hi,

Here are some Christmas animated lights you can add under Discourse’s header.

This is an implementation of Toby’s Christmas Lights on Codepen: [https://codepen.io/tobyj/pen/QjvEex](https://codepen.io/tobyj/pen/QjvEex)  
I tweaked the code a bit to make it fit Discourse.

See it in action here: [https://forum.monocycle.info/](https://forum.monocycle.info/) (I’ll remove them in January)

**Screenshots:**

 ![chris](https://global.discourse-cdn.com/meta/original/4X/d/4/8/d48c8ee4935f25a335c31613b629e2a10c86479c.jpeg)

On mobile (they will not follow the sticky header):

 ![chris-mobile](https://global.discourse-cdn.com/meta/original/4X/8/1/e/81eccff6f47f4f50f8b41f83eae3e1392c6a4287.jpeg)

With a dark theme:

 ![christmas-desktop-dark](https://global.discourse-cdn.com/meta/original/4X/3/2/7/327a8b750702d64875d572e8e149e33653363774.jpeg)

**How to add it to Discourse:**

1. Go to your admin panel → customization → choose your current theme → custom CSS/HTML
2. Add this code in your CSS tab:

```scss

/* Christmas Lights

   Copyright (c) 2019 by Toby (https://codepen.io/tobyj/pen/QjvEex)
   Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/

$globe-width: 12px;
$globe-height: 15px;
$globe-spacing: 40px;
$globe-spread: 3px;
$light-off-opacity: 0.4;
$speed: 0.5;

.lightrope {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  position: absolute;
  left: 0;
  z-index: 1;
  margin: -54px 0 0 0;
  padding: 0;
  pointer-events: none;
  width: 100%;
  li {
    position: relative;
    animation-fill-mode: both; 
    animation-iteration-count:infinite;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: $globe-width;
    height: $globe-height;
    border-radius: 50%;
    margin: $globe-spacing/2;
    display: inline-block;
    background: rgba(0,247,165,1);
    box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(0,247,165,1);
    animation-name: flash-1;
    animation-duration: 2s;
    &:nth-child(2n+1) {
      background: rgba(0,255,255,1);
      box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(0,255,255,0.5);
      animation-name: flash-2;
      animation-duration: 0.4s;
    }
    &:nth-child(4n+2) {
      background: rgba(247,0,148,1);
      box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(247,0,148,1);
      animation-name: flash-3;
      animation-duration: 1.1s / $speed;
    }
    &:nth-child(odd) {
      animation-duration: 1.8s / $speed;
    }
    &:nth-child(3n+1) {
      animation-duration: 1.4s / $speed;
    }
    &:before {
      content: "";
      position: absolute;
      background: #222;
      width: ($globe-width - 2);
      height: $globe-height/3;
      border-radius: 3px;
      top: (0 - ($globe-height/6));
      left: 1px;
    }
    &:after {
      content: "";
      top: (0 - $globe-height/2);
      left: $globe-width - 3;
      position: absolute;
      width: $globe-spacing + 12;
      height: ($globe-height/3 * 2);
      border-bottom: solid #222 2px;
      border-radius: 50%;
    }
    &:last-child:after {
      content: none;
    }
    &:first-child {
      margin-left: -$globe-spacing/2-$globe-width;
    }
  }
}
@keyframes flash-1 { 
    0%, 100% { background: rgba(0,247,165,1);
    box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(0,247,165,1);} 
    50% { background: rgba(0,247,165,$light-off-opacity);
    box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(0,247,165,0.2);}
}
@keyframes flash-2 { 
    0%, 100% { background: rgba(0,255,255,1);
    box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(0,255,255,1);} 
    50% { background: rgba(0,255,255,$light-off-opacity);
    box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(0,255,255,0.2);}
}
@keyframes flash-3 { 
    0%, 100% { background: rgba(247,0,148,1);
    box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(247,0,148,1);} 
    50% { background: rgba(247,0,148,$light-off-opacity);
    box-shadow: 0px $globe-height/6 $globe-width*2 $globe-spread rgba(247,0,148,0.2);}
}
/* mobile */
.mobile-view .lightrope {
    margin-top: -36px;
}

```

1. Add this code in your After header tab:

```html
<ul class="lightrope">
<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>
</ul>

```

(You may want to add some more `<li></li>` if you want your lights to take all the width of a 4K monitor. Currently, it fits a 2k monitor)

Save & Enjoy!

If you want to change the lights’ appearance, edit these variables at the beginning of the SCSS code:

```scss
$globe-width: 12px;
$globe-height: 15px;
$globe-spacing: 40px;
$globe-spread: 3px;
$light-off-opacity: 0.4;
$speed: 0.5;

```

---

<div class="post-metadata">

### Author: ![habeycole](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/habeycole/32/128367_2.png) [@habeycole](https://meta.discourse.org/u/habeycole)
#### Post date: [December 5, 2019, 7:01pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/2 "2019-12-05T19:01:22Z")

</div>

Absolutely amazing. I’m definitely having this on my Discourse site, for sure! 💏

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [December 5, 2019, 9:52pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/3 "2019-12-05T21:52:54Z")

</div>

The classic Santa claus hats on avatars:

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/b/0b1bdf1482d44dfc2a60a1f6f5816e7b4e4bf624.png)  
Hat from [uihere.com](https://www.uihere.com/free-cliparts/santa-claus-santa-suit-hat-christmas-clip-art-avatar-christmas-cliparts-2201572) : ![G6gA3Wn](https://global.discourse-cdn.com/meta/original/3X/5/e/5eb5713f820a61cf4bfa2e20214e9af7b566d8d5.png)

**How to add it to Discourse:**

1. Go to your admin panel → customization → choose your current theme → custom CSS/HTML
2. Add this code in your CSS tab:

```css
.main-avatar:after {
    content: url(https://i.imgur.com/G6gA3Wn.png);
    position: absolute;
    top: -5px;
    left: -19px;
}
.mobile-view .main-avatar:after {
    top: -17px;
}

```

(the hats should only appear on a topic view)

Save and enjoy your hats!

I recommend you to host the hat image on your Discourse server.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 6, 2019, 9:29am UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/4 "2019-12-06T09:29:03Z")

</div>

I know @dax posted some here a while ago, are they still valid?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [December 6, 2019, 10:07am UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/5 "2019-12-06T10:07:24Z")

</div>

There is another christmas hat tutorial here: [Christmas hats! - #7 by cpradio](https://meta.discourse.org/t/christmas-hats/51846/7)  
A christmas hat theme component here: [Christmas hats component](https://meta.discourse.org/t/christmas-hats-component/74853)  
A snowing effect: [Discourse snowing effect? - #4 by david](https://meta.discourse.org/t/discourse-snowing-effect/135151/4)  
Another snowing effect and a santa claus head as a loading image: [https://meta.discourse.org/t/christmas-theme/36389](https://meta.discourse.org/t/christmas-theme/36389)

---

<div class="post-metadata">

### Author: ![b481](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@b481](https://meta.discourse.org/u/b481)
#### Post date: [November 21, 2020, 2:49am UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/6 "2020-11-21T02:49:09Z")

</div>

can’t wait to incorporate this in a week or so. thanks OP! 😌

---

<div class="post-metadata">

### Author: ![anon23393886](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@anon23393886](https://meta.discourse.org/u/anon23393886)
#### Post date: [November 21, 2020, 4:09am UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/7 "2020-11-21T04:09:48Z")

</div>

We need a theme like that for Thanksgiving.

---

<div class="post-metadata">

### Author: ![soraiden](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/soraiden/32/547061_2.png) [@soraiden](https://meta.discourse.org/u/soraiden)
#### Post date: [December 21, 2020, 6:56am UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/8 "2020-12-21T06:56:41Z")

</div>

Thank you! Will turn the lights on Christmas morning.

 ![Screen Shot 2020-12-20 at 11.52.22 PM](https://global.discourse-cdn.com/meta/original/3X/f/6/f6366f82c90e9abb5f8d6ae4dbbe8c796e731b64.jpeg)

---

<div class="post-metadata">

### Author: ![meghna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meghna/32/453356_2.png) [@meghna](https://meta.discourse.org/u/meghna)
#### Post date: [December 21, 2020, 6:44pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/9 "2020-12-21T18:44:35Z")

</div>

I made a theme component out of different Christmas decoration ideas where each flair can be individually enabled/disabled.

> [@Christmas Decoration Component christmas\_tree](https://meta.discourse.org/t/christmas-decoration-component/173949):
>
> Adding a bit of festive flair to your forum – I present a Christmas decoration component! christmas_tree This component includes three flairs: Christmas Lights Christmas Hats Christmas Decoration Image Each flair can be individually enabled/disabled via theme settings. For Christmas Decoration Image there is also a setting to invert color for forum with Dark theme. The Christmas lights were inspired from @Ca…

---

<div class="post-metadata">

### Author: ![JimPas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimpas/32/148179_2.png) [@JimPas](https://meta.discourse.org/u/JimPas)
#### Post date: [December 21, 2020, 8:02pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/10 "2020-12-21T20:02:57Z")

</div>

> [@meghna](#):
>
> I made a theme component out of different Christmas decoration ideas where each flair can be individually enabled/disabled.

That was a great idea! Last year I had a few users who, as soon as I mentioned the Christmas flairs, said “I don’t want that on my avatar.” Bah, humbug. 😐

---

<div class="post-metadata">

### Author: ![P2W](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/p2w/32/304345_2.png) [@P2W](https://meta.discourse.org/u/P2W)
#### Post date: [December 21, 2020, 9:43pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/11 "2020-12-21T21:43:03Z")

</div>

Awesomeness nice job

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [December 15, 2021, 12:36pm UTC](https://meta.discourse.org/t/share-your-discourse-christmas-decorations/135188/12 "2021-12-15T12:36:03Z")

</div>

Due to the changes in how the Discourse sticky header work, the Christmas lights on the first post won’t be sticky anymore.

But that’s not a big deal.

Also, I changed a margin value that was outdated.
