Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Adding banner images is accomplished through SCSS changes that require Developer access to your college website on the Pantheon platform. The process involves creating a Multidev branch of your college website, cloning the Multidev locally using GIT, making the SCSS changes and compiling them with a SASS compiler, testing your changes locally, and pushing them into your Multidev branch for further online testing. Once you have tested your changes on the Multidev, you can submit a merge request via Slack to have your changes merged to the development environment.

Instructions

Before you begin, please read through the Development section of the Knowledge Base. Make sure you can make a Merge request in order to complete the following steps.

Get the CSS class name

  • Open a browser and navigate to the a page on your college website with the image to replace

  • Hover over the image and right click and select “Inspect” to view HTML source for the image

  • Find the div id="branding-img" element wrapper. Note the class names for this div element

Code Block
languagehtml
<div id="branding-img" class="admissions-records students">

Place the image

  • Prepare an image with the high and width dimension of 1600x225 px

  • Name the image same as the CSS class name you found above, make sure it is all lowercase letters and includes dashes instead of spaces

e.g. rename Admissions and Records1600x255.PNG to admissions-records.png

  • If your image is for a section, place your image file in your colleges branding section folder docroot/sites/default/branding/sections

e.g. docroot/sites/default/branding/sections/admissions-records.png

  • If the image is for a program or an award page, place the image into its respective branding folder, create the folder if one doesn’t exist

e.g. docroot/sites/default/branding/programs/aviation.png

e.g. docroot/sites/default/branding/awards/airline-operations.png

Add the style

  • In your code editor, open docroot/sites/default/themes/[site-dir]/partials/_branding.scss

  • Add a line for your section's image using the class name noted earlier

Code Block
languagesass
  /* Section */
  #branding-img.admissions-records { background-image:url(#{$site_branding_path}/sections/admissions-records.png); }
  • Save and recompile your college's SCSS folder

  • If using the Lando development stack, you can use lando gulp

  • Refresh your web browser, you may need to clear Drupal caches to see changes

Merge Changes to Pantheon

Merge Request

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@863
showSpacefalse
sortmodified
typepage
reversetrue
labelskb-how-to-article
cqllabel = "kb-how-to-article" and type = "page" and space = "CF"
Page Properties
hiddentrue

Related issues