Skip to content

Commit

Permalink
refactor(themes): remove april fools 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnans2006 committed Apr 1, 2024
1 parent a7bf99a commit a983e1d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 149 deletions.
1 change: 0 additions & 1 deletion intranet/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ def get_month_seconds():
"intranet.apps.auth",
"intranet.apps.bus",
"intranet.apps.cslapps",
"intranet.apps.customthemes",
"intranet.apps.django",
"intranet.apps.eighth",
"intranet.apps.enrichment",
Expand Down
124 changes: 0 additions & 124 deletions intranet/static/themes/april_fools/april_fools.css
Original file line number Diff line number Diff line change
@@ -1,124 +0,0 @@
.header .logo {
background-image: url(/static/themes/april_fools/april_fools_logo.png);
}

.intranet-title h1 {
color: #ECD294;
font-weight: bold;
font-size: 16pt;
}

.header {
background: linear-gradient(90deg, #001135, #2b1de8, #ff2400, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #001135);
background-size: 1800% 1800%;
-webkit-animation: rainbow 60s ease infinite;
-z-animation: rainbow 60s ease infinite;
-o-animation: rainbow 60s ease infinite;
animation: rainbow 60s ease infinite;
}

.nav .selected {
background-color: #eab63b !important;
}

.widget, .nav {
border: 2px solid #eab63b;
border-color: #eab63b !important;
box-shadow: 0 0 5px #efc96e;
}

.widget-title {
border-bottom-color: #eab63b !important;
}

.nav li {
border-color: #eab63b !important;
}

.chat-nav-icon {
font-size: 18pt;
position: relative;
}

.chat-iframe {
width: 90vw;
height: 90vh;
border: 0;
}

.chat-warning {
position: relative;
top: 25px;
right: 5vw;
float: right;
}

@-webkit-keyframes animBg {
0% {
background-position-x: 0;
}
100% {
background-position-x: 500px;
}
}

@keyframes animBg {
0% {
background-position-x: 0;
}
100% {
background-position-x: 500px;
}
}

.ion-welcome-icons {
height: 50px;
width: 100%;
background-image: url(https://ion.tjhsst.edu/static/img/icons.png);
background-size: auto 150px;
background-position: center -51px;
background-repeat: repeat-x;
position: absolute;
top: 74%;
margin-top: -25px;
animation: animBg 20s linear infinite;
-webkit-animation: animBg 20s linear infinite;
}

.ion-welcome-continue {
padding: 10px 20px;
position: absolute;
bottom: 10px;
left: 50%;
margin-left: -60px;
width: 120px;
}

@media (max-width: 767px) {
.chat-warning {
position: static;
margin-bottom: 10px
}
}

@-webkit-keyframes rainbow {
0%{background-position:0% 82%}
50%{background-position:100% 19%}
100%{background-position:0% 82%}
}
@-moz-keyframes rainbow {
0%{background-position:0% 82%}
50%{background-position:100% 19%}
100%{background-position:0% 82%}
}
@-o-keyframes rainbow {
0%{background-position:0% 82%}
50%{background-position:100% 19%}
100%{background-position:0% 82%}
}
@keyframes rainbow {
0%{background-position:0% 50%}
50%{background-position:100% 19%}
100%{background-position:0% 82%}
}

22 changes: 0 additions & 22 deletions intranet/static/themes/april_fools/april_fools.js
Original file line number Diff line number Diff line change
@@ -1,22 +0,0 @@
$(function() {
$('link[rel="icon"]').attr('href', '/static/themes/april_fools/april_fools_logo.png');
$(".intranet-title h1").text("Intranet 4");
let navbar = $("ul.nav");
$(navbar).append($(`
<li class="nav-chat">
<a href="/chat">
<i class="chat-nav-icon fas fa-comments"></i>
ChatION
</a>
</li>
`));
$(navbar).find("li.nav-chat").click(function() {
$(this).addClass("selected");
});
if(location.href.endsWith("chat")) {
$(navbar).find("li.nav-chat").addClass("selected");
}
if(window.innerWidth > 768) {
$("iframe").attr("scrolling", "no");
}
});
Binary file not shown.
4 changes: 2 additions & 2 deletions intranet/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def get_theme_name() -> str:
elif (today.month == 10 and 27 <= today.day <= 31) or (today.month == 11 and today.day == 1):
return "halloween"
# Enable when a new idea for April Fools 2024 comes around
# elif (today.month == 3 and (28 <= today.day <= 31)) or (today.month == 4 and (1 <= today.day <= 3)):
# return "april_fools"
elif (today.month == 3 and (28 <= today.day <= 31)) or (today.month == 4 and (1 <= today.day <= 3)):
return "april_fools"

return None

Expand Down

0 comments on commit a983e1d

Please sign in to comment.