Skip to content

Instantly share code, notes, and snippets.

@JonasEriksson
Last active December 12, 2016 18:39
Show Gist options
  • Save JonasEriksson/c859a836ab770959f8ca7652f0986a0e to your computer and use it in GitHub Desktop.
Save JonasEriksson/c859a836ab770959f8ca7652f0986a0e to your computer and use it in GitHub Desktop.
<!--- Note: This is meant to be a super-simple "Warning or Update or Hint on the startpage. For example a sportsclub might announce changed training times, or a competition.
This requires an Extended Attribute for the Site/Default named WarningColour and noticeBGcolour, as well as a textfield named ImportantNotice. If it is not set, we fall back on the Material Colour definition of"orange darken-4" --->
<cfoutput>
<cfif len(#$.siteConfig('WarningColour')#)>
<cfset noticeBGcolour = #$.siteConfig('WarningColour')#><cfelse><cfset noticeBGcolour = "orange darken-4">
</cfif>
<cfif len($.siteConfig('ImportantNotice'))>
<div class="container-fluid">
<div class="row" style="background-color: #noticeBGcolour#">
<div class="container">
<div class="col-sm-12 col-md-12 col-lg-12">
<h5 class="text-center" style="color:white">#$.siteConfig('ImportantNotice')#</h5>
</div> <!-- /col-sm-12 col-md-12 col-lg-12 -->
</div> <!-- /container -->
</div> <!-- /row -->
</div> <!-- /container-fluid -->
</cfif>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment