Color Buttons w/Icons and Color Inversion on Hover (City of Santa Maria)

Body

Introduction

Color buttons with icons. The colors invert when hovering over them.

This module was originally designed by Andrew Bouwmeester at City of Santa Maria.

Screenshot

Two columns of buttons with icons

Module Settings

  • Show Border: unchecked
  • Show Name: unchecked
  • Sanitize Content: unchecked
  • Layout Notes: Works best as two modules side-by-side

Module Code

To use the code in the box below, when creating a new module:

  1. Click the Source button in the top-left of the WYSIWYG editor
  2. Paste the code from below
  3. Update links or images to match your environment references
  4. Click the Source button again to see a preview of the content
    Note: some styling may not display until the module is viewed in the client portal
  5. Save the module

Module 1

<div class="ModuleContent">
<div style="overflow: hidden;">
<style type="text/css">.custbutton {
    border: 1px solid #244ca3;
    border-radius: 8px;
    padding: 5px 2px;
    margin-bottom: 5px;
    width: 100%;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: #2b2b2b;
box-shadow: 2px 2px 5px #b9b9b9;
transition-duration: 0.5s;
transition: transform 0.2s ease-in;
  }

 

  span.icon {
    min-width: 60px;
    display: inline-block;
    float: left;
    margin: 5px 10px;
    margin-right: 0;
    height: 100%;
  }

  .icon .fa {
    color: #244ca3 !important;
transition: transform 0.2s ease-in;
  }


  .title {
    font-size: 1.2em;
    font-weight: bold;
  }

  .description {
    overflow: hidden;
  }
  .custbutton:hover {
!transform: scale(1.01,1.01);
    border: 1px solid #244ca3;
    background: #244ca3;
    box-shadow: 2px 2px 5px #b9b9b9;
    text-decoration: none;
    !color: yellow !important;
     color: white !important;
   .icon .fa {
      !color: yellow !important;
       color: white !important;
transform: scale(1.15);
    }

}

.custbutton:active {
  background-color: #244ca3;
  box-shadow: 0 5px #666;

  transform: translateY(2px);
  }
</style>
<div class="container-fluid" style="padding: 0px;"><a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=246" target="_blank" title="Accounts &amp; Access Category"><span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-users"></span></span></span> </span> <span class="title">Accounts &amp; Access</span><br />
<span class="description">New accounts, manage access, password resets, offboarding, etc</span> </a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=247" target="_blank" title="Computers &amp; Hardware Category"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-mobile"></span></span></span> </span> <span class="title">Computers &amp; Hardware</span><br />
<span class="description">Computers, monitors,&nbsp;and other hardware</span> </a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=249" target="_blank" title="Email Category"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-envelope"></span></span></span> </span> <span class="title">Email</span><br />
<span class="description">Email accounts, distribution lists, report spam and phishing</span> </a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=250" target="_blank" title="Network &amp; Connectivity Category"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-wifi"></span></span></span> </span> <span class="title">Network &amp; Connectivity</span><br />
<span class="description">Wired and wireless internet access, VPN, connectivity issues</span> </a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=248" target="_blank" title="Phones Category"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-phone"></span></span></span> </span> <span class="title">Phones</span><br />
<span class="description">Request a&nbsp;desk phone, or report phone issues</span> </a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=240" target="_blank" title="Printers &amp; Scanners Category"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-print"></span></span></span> </span> <span class="title">Printer &amp; Scanners</span><br />
<span class="description">Printers and Scanners support</span> </a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=525" target="_blank" title="Software Category"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-windows"></span></span></span> </span> <span class="title">Software</span><br />
<span class="description">Install, upgrade, purchase, troubleshoot applications &amp; software</span></a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceCatalog?CategoryID=265" target="_blank" title="Radio Category"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-walkie-talkie"></span></span></span> </span> <span class="title">Radio</span><br />
<span class="description">Radio Programming, Assignment, and Repair</span></a></div>
</div>
</div>

Module 2

<div class="ModuleContent">
<div style="overflow: hidden;">
<style type="text/css">.custbutton {
    border: 1px solid #244ca3;
    border-radius: 8px;
    padding: 5px 2px;
    margin-bottom: 5px;
    width: 100%;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: #2b2b2b;
box-shadow: 2px 2px 5px #b9b9b9;
transition-duration: 0.5s;
transition: transform 0.2s ease-in;
  }

 

  span.icon {
    min-width: 60px;
    display: inline-block;
    float: left;
    margin: 5px 10px;
    margin-right: 0;
    height: 100%;
  }

  .icon .fa {
    color: #244ca3 !important;
transition: transform 0.2s ease-in;
  }


  .title {
    font-size: 1.2em;
    font-weight: bold;
  }

  .description {
    overflow: hidden;
  }
  .custbutton:hover {
!transform: scale(1.01,1.01);
    border: 1px solid #244ca3;
    background: #244ca3;
    box-shadow: 2px 2px 5px #b9b9b9;
    text-decoration: none;
    !color: yellow !important;
     color: white !important;
   .icon .fa {
      !color: yellow !important;
       color: white !important;
transform: scale(1.15);
    }

}

.custbutton:active {
  background-color: #244ca3;
  box-shadow: 0 5px #666;

  transform: translateY(2px);
  }
</style>
<div class="container-fluid" style="padding: 0px;"><a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceDet?ID=674" target="_blank" title="Onboard (New Network Account)"><span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-user-plus"></span></span></span> </span> <span class="title">Onboarding (New Account)</span><br />
<span class="description">Onboarding of new hire with email and access rights</span> </a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceDet?ID=2267" target="_blank" title="Offboarding"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-user-times"></span></span></span> </span> <span class="title">Offboarding (Deactivate Account)</span><br />
<span class="description">Deactivate network account and access</span></a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceDet?ID=676" target="_blank" title="Suspicious Email"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-fish"></span></span></span> </span> <span class="title">Suspicious Email</span><br />
<span class="description">Report phishing and other suspicious emails</span></a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceDet?ID=670" target="_blank" title="Purchase"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-shopping-cart"></span></span></span> </span> <span class="title">Purchase Hardware</span><br />
<span class="description">Purchase hardware</span></a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceDet?ID=2406" target="_blank" title="Purchase"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-cart-plus"></span></span></span> </span> <span class="title">Purchase Software</span><br />
<span class="description">Purchase software through IT</span></a> <a class="custbutton" href="https://servicedesk.cityofsantamaria.org/TDClient/47/Portal/Requests/ServiceDet?ID=663" target="_blank" title="Rent Equipment"> <span class="icon"> <span aria-label="span widget" contenteditable="false" role="region" tabindex="-1"><span aria-hidden="true" aria-label="icon" contenteditable="false" role="region" tabindex="-1"><span class="fa fa-fw fa-3x fa-laptop"></span></span></span> </span> <span class="title">Rent Equipment</span><br />
<span class="description">Rent laptops, projectors, and other equipment</span></a></div>
</div>
</div>

Details

Details

Article ID: 158208
Created
Tue 4/2/24 6:34 PM
Modified
Thu 11/7/24 9:32 PM