This forum is for assistance with theme development.

custom class for content type in a view or block template

I hope I'm not asking a question that has been answered somewhere... maybe I'm just not searching the right terms?

I am using the articles content type and have a few different views.  Page of teasers.  Sidebar Block of Fields (linked title only).

Change font color dynamically based on background

I have a few pages one with a full screen image and the other with a full screen video.  I have the main menu and site name overlaid on the image.  My questions is how can I make the font color change base on the background color.  I.E so that when the image is dark the text will be light and vica versa.

Member for

Hello,

how I can show how long someone user is a member on my site when he or she log in?

Thanks

Deleted Question

-- Sorted and nothing helpful came out of it so I deleted the question. 

Show multiple content types in a single page with twig

I have few content types such as news, lead story, events. I want to show those content types in a single page (Front Page and some other pages and that pages may content some static HTML content) with some logic using twig template. As an example I want to show one randomly selected lead story and three news items in a single page. How can I achieve this.

Twig template recommendations puts my paragraph in the "fields" folder, not "paragraphs

I know the title may be a bit difficult to understand. Basically, I have created a paragraph type in Drupal that holds a label and a link. Then I have page content that adds it and allows me to make more of them on the back end when building a page. Unfortunately, I want to style them in a way similar to some CTA buttons we already have, but the Twig debugging is saying that my paragraph type is a field, and thus isn't recognized as a paragraph. Could this be a result of a hook somewhere, or have I misunderstood what counts as a paragraph?

Pages

Subscribe with RSS Subscribe to RSS - Theme development