This forum is for assistance with theme development.

How to readonly change the creation date in node view?

After thinking about it, I decided to keep the system 'creation date', but modify it in the view node to adapt the format so that users can see the date with the Italian format (eg. 27 August 2022)
With Views it 's easy, but here I don't know how to do it.
Has anyone already solved this kind of need or know how it could be done?
Thank you very much

A simple theme for Drupal 9?

Is there responsive Drupal 9 themes that allow easy editing? I just want to have it ready for all platforms (mobile first), and then add my own colors, font sizes etc. I tried Bootstrap 5, made a sub-theme, but it seems much too over my head and nothing I do in the CSS seems to have any effect on the website.

How do I keep a twig variable from getting cached?

I have a content-type (house) with a date field "field_visiting_date" to indicate when a house can be visited.

Instead of just display the date, I also show how many days there are left until it's visiting day,
so in short, the difference in days between the visiting_day date and today. I currently have in my node display "teaser" twig file:

How to display second sidebar on top on mobile devices?

My theme is a subtheme of Bootstrap5. I only have content in the Main content region and in Sidebar second (nothing in Sidebar first).

On large screens, I want to show them side by side, with the Main content on the Left and the Second sidebar on the right. This happens by default.

On mobile screens, I want to show them stacked, with the Second sidebar on top and the Main content below. Currently, it is the other way round (Main content on top and Second sidebar below). How can I switch them around on mobile?

How to pass custom variable from module to jQuery in Drupal 9?

Im the Wallclock module, I have the following Javascript library defined in wallclock.libraries.yml:

digital:
  css:
    component:
      css/wallclock.css: {}
  js:
    js/digital.js: { weight: -1 }
  dependencies:
     - core/jquery
     - core/jquery.once
     - core/drupal
     - core/drupalSettings

The file js/digital.js contains:

Help getting rid of excess vertical whitespace

I maintain a module that provides a block with a wall clock embedded – Wallclock. The clock is mainly created in a file called templates/wallclock.html.twig, which consists of some SVG to create the clock and hands. In this template I've put placeholder for some text, which shows as "This string should be placed just below the clock face."  This is how in currently looks if the block with the block is placed inside the main content region:

Pages

Subscribe with RSS Subscribe to RSS - Theme development