Announce
Abandoned
A Flarum extension. Make an announcement appear at the top of your forum. You may edit the message from the admin using the extension's settings module. Click the bullhorn (top left of site) to see the announcement. Click the "x" to close it. When the announcement is no longer needed, simply deactivate the extension in your admin. When you're ready to announce something new, reactivate the extension and type a new message.
The following screenshots are the mobile experience. The desktop experience is very similar. Also, if you don't like this layout/styling, keep scrolling. You have another option!
The announcement bullhorn:
After clicking the bullhorn:
Installation
composer require zerosonesfun/announce
Updating
composer update zerosonesfun/announce
php flarum cache:clear
Customization Tips
If you don't like the color of the bullhorn icon (which is what you click on to view the announcement) simply add custom CSS to your custom CSS box in the appearance section of your admin dashboard. For example, this will make the bullhorn bright white:
.Announce--Show.fas.fa-bullhorn.false {
color: #fff !important;
}
If you don't like where the announcement is positioned at all, and would rather it be fixed to the side of your forum, add all of the following CSS to your Custom CSS. But first, a screenshot...
With the following CSS, the bullhorn will now have an orange background and will be stuck to the side; once clicked the message is also stuck to the side. Caveat: With this style, I would not make your message any longer than about 780 characters. Otherwise, on mobile, the message may begin to be cut off. But, this has always been designed for fairly short/quick announcements, and 780 characters is quite a bit.
/* Announce */
@media only screen and (max-width: 767px) {
div #Announce {
left: 0 !important;
}
}
#Announce {
position: fixed !important;
left:0 !important;
top: 50% !important;
z-index: 999999;
}
#Announce .container {
margin: 0 !important;
padding-left: 0 !important;
}
#Announce .Announce--Icons .Announce--Show {
color: #fff !important;
background-color: coral;
padding: 10px;
border-top-right-radius: 3px !important;
border-bottom-right-radius: 3px !important;
border-top-left-radius: 0px !important;
border-bottom-left-radius: 0px !important;
}
#Announce .Announce--Content {
border-top-right-radius: 3px !important;
border-bottom-right-radius: 3px !important;
border-top-left-radius: 0px !important;
border-bottom-left-radius: 0px !important;
padding-top: 10px !important;
padding-bottom: 10px !important;
padding-right: 30px !important;
}
#Announce .Announce--Icons .Announce--Hide {
color: #fff !important;
position: absolute !important;
right: 35px !important;
top: 10px !important;
}
@media only screen and (min-width: 1px) {
#Announce .container {
width: 400px;
}
}
/* End of Announce */
Links