Hello Abdul,
I am answering your questions one by one:
I want to add a caption to an un-CDS image in image gallery, how can I add something like that’s?
- Images are fields inside paragraph types. As you have already noticed, by default they don’t render with a caption. So obviously you will need a separate text field which will play the role of the caption.
- After adding the additional field, you need to change the way the image field is rendered. This can be achieved by creating changing the template of the field for this specific paragraph type. To save some time I suggest you a nice medium article on how to modify the template of a field in a content type. The only difference between your implementation and the article is that the article modifies a field of a content type while you should modify the field of a paragraph type [The technical difference is that instead of field–node–field…html.twig, you should have field–paragraph–field…html.twig]. You can find more about drupal template conventions on this Drupal documentation..
How can I add other BG colors or font colors to article box, thumbnail box…?
Good question. Color fields of Article Box, thumbnail box etc are also fields in paragraph types. If you visit the “Manage Form Display” page of Article Box - for example /admin/structure/paragraphs_type/cern_article_box/form-display - then you will notice that there is a list of HEX color codes
You can append this list with the desired colors.
Hope this helps. Let me know if you have more questions.
Best Regards,
Kostas