CuBoulder / ucb_campus_news

Custom module enabling the Campus News Block
GNU General Public License v2.0
0 stars 0 forks source link

Campus News Block Styling #6

Closed kevincrafts closed 1 month ago

kevincrafts commented 3 months ago

The campus news block should be able to have styles like the other blocks, so if they are added to a page together they can have similar displays.

image
timurtripp commented 3 months ago

The Campus News block was built completely differently from our other blocks due to the unique challenge of the configuration form connecting to CU Boulder Today to pull in the available filters. We'll need to discuss the feasibility and importance of doing this.

jnicholCU commented 2 months ago

Block Styles (Tab):



Icon Settings: (Accordion)

Icon (allowed options)

Icon Position (Select option : class)

Icon Color (Select option : class)

Icon Size (Select option : class)

Block Heading: (Accordion)

Heading (Select option : tag)

Heading Alignment (Select option : class)

Heading Style (Select option : class)

Block Style: (Accordion)

Background Style (Select option : class)

Block Typography: (Accordion)

Title Font Scale (Select option : class)

Content Font Scale (Select option : class)

jnicholCU commented 2 months ago

This is the basic html layout for those classes


<div class="{{attributes}} {{Title Font Scale}} {{Content Font Scale}} {{Icon Position}} {{Heading Alignment}} ">
  {{ title_prefix }}
  {% if label %}
    <div class="block-title-outer">
      <{{Heading Tag}}{{title_attributes}} class="block-title {{ Heading Style }}">
        <span class='block-title-icon {{ Icon Color }} {{ Icon Position }} {{ Icon Size }}'>
          {{ FONT AWESOME ICON }}
        </span>
        <span class="block-title-text">
          {{ label }}
        </span>
      </{{Heading Tag}}>
    </div>
  {% endif %}
  {{ title_suffix }}
  <div class="text-block-body block-content">
    {{ content.field_text_block_body }}
  </div>
</div>