-
Notifications
You must be signed in to change notification settings - Fork 4
Image Link Blocks in Panels
Sarah Carney edited this page Mar 8, 2018
·
8 revisions
Note: Image Link Blocks have been replaced with the luggage_bean_card module. This method is still supported, but we recommend switching to the module so you can take advantage of new features, bug fixes, and other updates.
Suitcase Interim 1.0.6 added CSS support for image link block HTML mini-templates, which are just right for Mega Panels.
Codepen Demo: http://codepen.io/biology-it/pen/XMwVzB/
class="image-link link-red"
class="image-overlay"
class="image-overlay overlay-full"
- Ensure you are using a content authoring text format that allows HTML input, and does not filter out
<div>
,<span>
, or the class attribute. - Create a block. Structure > Blocks > Add Block
- Insert the snippet in the Block body
<div class="image-link link-red"><!-- Use desired classes -->
<a href="YOUR LINK URL">
<img src="YOUR IMAGE URL" alt="YOUR ALT TEXT">
<h2><span class="fa fa-YOUR-ICON" aria-hidden="true"></span>YOUR LINK TEXT</h2>
</a>
</div>
- Replace link url, image url, link text, and Font Awesome icon class
- Use the appropriate class to customize the design.
- There are three designs available. Use the classes provided. (See above.)
- There are six link colors available. These are Iowa State University brand colors, and have sufficient contrast with white text to satisfy WCAG AA standard.
-
link-red
for #cc0000 -
link-green
for #76881d -
link-blue
for #006ba6 -
link-dark-red
for #7c2529 -
link-dark-green
for #3E4827 -
link-dark-blue
for #003D4C
-
- Icons are Font Awesome. See a list of all Font Awesome icons: http://fontawesome.io/icons/
- Open the Panel where the new Block will go
- Click the gear icon in the desired panel and select "Add content"
- Find your new Block under Custom blocks
- Select "Override title" and leave field blank
- Finish
- Update and Save your Panel changes
- Choose an image size that will have the desired width and behavior on tablet and mobile screens. Recommended width is 750px.
- Icons are not required, and can be moved around in the
<h2
.