Additional Home Page Image Blocks

Here you’ll find some new options you can implement on the current template to display images on the home page. Maybe you want a new block or two in addition to what you already have going on, or maybe you want to switch things up and swap out the slideshow and the two images next to it.

We’ll show examples of the new pieces, have the HTML and CSS to copy/paste, and have an example walkthrough.

 

Some general notes before looking at the specifics:

  • The dummy images used in the examples show you their dimensions. You should use the width that you see, but feel free to use a different height if you like. Considering how things scale in the mobile view, as a general recommendation try to avoid having heights smaller than 250px.

  • Having said that, avoid using differing heights within a row. You don’t need uniform heights for all the images on your homepage, but all the images in a row within one of these new blocks should have the same height. You can see in the example below that when there are differing heights, the images with smaller heights will distort/stretch the image when it makes those images match the height of the image with the largest height in the row:

  • In all the examples the links will be pointing to buy_textbooks.asp, the images will be dummy images, and there will be dummy copy for the alt tags. You will need to update each to suit your needs.


Wrapping Blocks

When the width of the browser changes, the images within the block will shift and rearrange themselves onto a new row or rows. Images that were in a row when viewed on desktop will most likely end up stacked in a column on mobile.

Here are some different versions to try out:

Two Image Row

<div class="double-banners"> <a href="buy_textbooks.asp"><img src="images/demo_800x500.png" alt="800x500 placeholder"></a> <a href="buy_textbooks.asp"><img src="images/demo_800x500.png" alt="800x500 placeholder"></a> </div>

 

Three Image Row

<div class="triple-banners"> <a href="buy_textbooks.asp"><img src="images/demo_533x500.png" alt="533x500 placeholder"></a> <a href="buy_textbooks.asp"><img src="images/demo_533x500.png" alt="533x500 placeholder"></a> <a href="buy_textbooks.asp"><img src="images/demo_533x500.png" alt="533x500 placeholder"></a> </div>

 

Four Image Row

<div class="quad-banners"> <a href="buy_textbooks.asp"><img src="images/demo_400x400.png" alt="400x400 placeholder"></a> <a href="buy_textbooks.asp"><img src="images/demo_400x400.png" alt="400x400 placeholder"></a> <a href="buy_textbooks.asp"><img src="images/demo_400x400.png" alt="400x400 placeholder"></a> <a href="buy_textbooks.asp"><img src="images/demo_400x400.png" alt="400x400 placeholder"></a> </div>

Non-Wrapping Blocks

When the width of the browser changes, the images within the block will maintain their order in the row and not shift to a new row. They will scale down in size to fit the new viewport width. With this in mind, you will want to make sure your image’s message can still be conveyed effectively at a smaller size.

Here are some different versions to try out:

Single Full Width

 

One-third/Two-thirds Split

 

Two-thirds/One-third Split

 

Even Split - 2

 

Even Split - 3

 

Even Split - 4


CSS

The CSS below contains the styling for both the wrapping and non-wrapping blocks. Paste the following into your css/main.css file:


Step-by-step Example

Brief:

  1. Create new outerweb file, name as you see fit.

  2. On default.asp, add include for that new outerweb file, in the order you want it to appear.

  3. Upload new image(s) to images directory.

  4. Add the content to the new outerweb file.

  5. Paste in the new styles to main.css.

  6. Refresh your staging site, confirm new content looks good, content deploy to production.

Long version:

  1. Once you’re in your site files, expand your outerweb folder. You should have an o_site_blank.asp file to make a copy from, but really you can make a copy of whatever outerweb file you want, because you will be deleting the content and replacing it with new stuff. So, make a copy of a file and rename it something relevant to the content.

  2. Go up a directory from outerweb so you’re seeing the root files of your site files, there you should find your home page - default.asp.

    You need to add an include statement to call for that outerweb file you just created. It will look like this (if you happened to name your new outerweb file o_home_promos.asp):
    <!-- #INCLUDE FILE="outerweb/o_home_promos.asp" -->
    You’ll see that the include statements on default.asp are laid out in the order you see them when looking at the page in browser, it starts with the header at the top and ends with the footer at the bottom. Insert your include statement where you would like it to appear. Ex: if you want it to come directly after your announcements block, you’d put the new include statement after
    <!-- #INCLUDE VIRTUAL="/innerweb/v4.0/i_home_announcements.asp" -->

    If you want to replace the slideshow (slideshow.asp) and the two images to the right of it (o_home_right_col.asp), you’ll need to disable the include statements for those two pieces by putting a space between the # symbol and the word INCLUDE, that will break the include and hide the content. Then, put in your include statement after the slideshow.asp and o_home_right_col.asp includes. NOTE: You’ll see those two includes you’re commenting out are wrapped by a div assigned the class “marketing-ads”, you want to place the include for your new piece OUTSIDE that div:

  3. Go ahead and upload the new images for the new content into your “images” directory. Make sure you’ve adjusted the quality of your image so it has as small of a file size as possible while still looking good (optimized images = faster page load times).

  4. Add the content to your new outerweb file. Feel free to copy/paste from the code snippet examples above, swapping out the dummy image file name(s) with your actual image file name(s). Update the link to point to where you want it to go instead of “buy_textbooks.asp” like you get in the examples. If you’re linking away from your site you need to include the full URL, but if you’re linking somewhere on your site, you just need to put in the container page (what you see in the address bar after your project name; if you’re looking your staging site. ex: https://staging.prismservices.net/demo/site_about_us.asp - “site_about_us.asp” is what you’d link to if you wanted to point to the About Us page). Also, don’t forget to add useful alt tags!

  5. Copy the all the CSS from further up this page. Then open the “css” folder in your site files and open main.css. Make room at the bottom and paste in the CSS from this page, and then save the main.css file. NOTE: If you are adding a new image block that will live directly below your existing slideshow, you need to comment in the two rules for .marketing-ads that are at the very bottom of the CSS provided on this page. See below:

  6. Refresh your staging site and make sure everything looks good. NOTE: the old style of your homepage may be cached by your browser, so it might be a good idea to do a hard refresh (ctrl+shift+R for Chrome) when you’re first checking things out on staging. Once you’ve determined staging looks the way you want, you’re good to do the content deployment from https://manager.prismservices.net/ to move the changes to your live site.

 

FIRST PUBLISHED 05/19/2021