This forum is for assistance with theme development.

How to close the navigation menu when you click outside ?

I have a site with the Bootstrap 3.3.7 theme and I want the farm navigation menu to click when I click outside.

I managed to make it work with the following code :

    (function ($) {
      'use strict';
    
      $(document).click(function (event) {
           $('.navbar-collapse-first').collapse('hide');
      });
    
    }(jQuery));

My problem :

When I click next to a link in the navigation menu, it closes. I want it to close only when I click OUTSIDE of the menu.

trying to modify an installed theme in Drupal 8

Hi, this may be a naive question as I'm a real beginner to web development. I built a blog website using Drupal 8, and downloaded and installed a theme. I would like to modify the theme, as I want to make the site title smaller and the navigation menu bigger. I first used the browser's inspect element tool to modify the CSS, which did exactly what I wanted. However, when I attempted to modify the style.css file and upload the modified version to the server, my changes did not take effect.

Performance of displaying content based on value of a Field?

I have ten custom List (integer) Fields, each has 5 values to choose from on the list. Within my Twig configuration I've been programmatically using {% if node.field_options.value == 'X' %} to display some CSS and an Image based on value returned.

Performance wise, is there anything wrong with doing this or will it slow down rendering of the page?

.theme file cache problem

I have a strange problem with a .theme file on a Drupal 8 (8.5.4) site

Drupal are not registrating any changes that I make to the file.
Right now the file is empty but all the old functions still active on the site.

Drupal only registrate if I rename or delete the .theme file.

I have cleared the cache with Drush cr and from the GUI, but stil no effect.

I have delete the whole theme folder at reinstalled it, but no effect.

The site is running on a nginx/1.10.3 server and using Redis Cache.

I have no knowlegs of Redis.

Custom Theming with Bootstrap

Hello,

I'm using a bootstrap sub-theme to make a webpage.

Which is the right way to declare my bootstrap grid classes(col-xs-* ....)?

Inside the page.tpl.php or to the template.php with the function subtheme_name_preprocess_page().

If the right way is inside the template.php how I can do it?

Thanks!

Open Social Adding block region to socialblue theme

Thank you for you all for helping me in the past in the forum dedicated to drupal open social.

Pages

Subscribe with RSS Subscribe to RSS - Theme development