Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

How to add a banner image to a section in the codebase with SCSS.

Instructions

Follow the repo’s README.md instructions for code editing workflow.

Place your image file in [site-dir]/branding/sections in your college site folder (e.g. rsc/branding/sections/admissions-records.png)

Open a browser and navigate to the a page 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.

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

In your code editor, open [site-dir]/themes/[site-dir]/partials/_branding.scss in your site's theme folder. Add a line for your section's image using the class name noted earlier.

  /* 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 dev stack you can use lando gulp.

Refresh your web browser. May need to clear Drupal cache lando drush cc all.

Follow the README.md instructions to push your changes as a pull request.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.