Comments

cbe243 created an issue. See original summary.

neslee canil pinto’s picture

Status: Active » Needs review
StatusFileSize
new976 bytes

Banner At the Bottom

cbe243’s picture

Thank you!
Only problem, I couldn't find (or Terminal) the

 /**
  * Implements hook_page_top().
  */
-function simple_cookie_compliance_page_top(array &$page_top) {
+function simple_cookie_compliance_page_bottom(array &$page_top) {
   $config = \Drupal::config('simple_cookie_compliance.settings');
   $use_no_script = $config->get('no_script', TRUE);
   $message = $config->get('message.value');

But instead, line 73, I replace $page['page_top']['simple_cookie_compliance'] = array( by $page['page_bottom']['simple_cookie_compliance'] = array( and it works.

neslee canil pinto’s picture

Ok cbe243
Can you commit these changes or i have to apply another patch with updates

neslee canil pinto’s picture

StatusFileSize
new391 bytes

Updated the changes

guardiola86’s picture

StatusFileSize
new764 bytes

I've added some custom styling in case it's useful to anyone. I've made links yellow, added a media query to make it look good on mobile and adjusted paddings and margins.

damienmckenna’s picture

StatusFileSize
new1.96 KB

This patch provides an option to control whether the message is shown at the top of the page (using the "page_top" region, which is how it works now) or at the bottom of the page (using the "page_bottom" region). It also adds an option on the settings page to control it.

damienmckenna’s picture

BTW the rest of the changes are just CSS that can be added to the theme to customize the message as needed, so the patch in #7 removes the CSS changes of the previous patches.

damienmckenna’s picture

FWIW this is the CSS we're using in our theme to control the message's location:

.cookie-compliance {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 100;
}