Twin Buttons with a stylized divider

Two buttons with a dividing message


You can view a live preview or take a look at the code required for this pattern. When viewing the code, you can copy it so that you can then paste it into your own site. Below the preview/code, you’ll see instructions on how to use block patterns on CMS.

Live Preview
OpenClose

Authenticate with CWL

— or —

Code
OpenClose
<!-- wp:group {"className":"","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"center","verticalAlignment":"top"}} -->
<div class="wp-block-group"><!-- wp:group {"className":"","layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:buttons {"layout":{"type":"flex","verticalAlignment":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"ubc-secondary-blue","style":{"border":{"radius":"4px"},"typography":{"fontSize":"16px"}}} -->
<div class="wp-block-button has-custom-font-size" style="font-size:16px"><a class="wp-block-button__link has-ubc-secondary-blue-background-color has-background wp-element-button" href="#" style="border-radius:4px"><i class="icon fa fa-unlock-alt" aria-hidden="true"> </i> CMS Sign In</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:paragraph {"align":"center","style":{"typography":{"textTransform":"lowercase"}},"textColor":"ubc-black","className":"under-button-explainer","fontSize":"small"} -->
<p class="has-text-align-center under-button-explainer has-ubc-black-color has-text-color has-small-font-size" style="text-transform:lowercase">Authenticate with <abbr title="campus wide login - UBC's authentication system">CWL</abbr></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"1em"},"padding":{"right":"1em","left":"1em"}}},"textColor":"ubc-black","className":"fancy-or"} -->
<p class="fancy-or has-ubc-black-color has-text-color" style="margin-top:1em;padding-right:1em;padding-left:1em"> — or — </p>
<!-- /wp:paragraph -->

<!-- wp:group {"className":"","layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:buttons {"layout":{"type":"flex","verticalAlignment":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button {"style":{"border":{"radius":"4px"},"typography":{"fontSize":"16px"}}} -->
<div class="wp-block-button has-custom-font-size" style="font-size:16px"><a class="wp-block-button__link wp-element-button" style="border-radius:4px"><i class="icon fa fa-question-circle" aria-hidden="true"> </i> Learn More</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

Prerequisites

There are no prerequisites to use this block pattern. You can copy and paste this code into your site and it should work immediately. However if you want the icons, you will need the JVM Rich Text Icons plugin active on your site.

Note: At the time of publishing (July 2023) there are no controls to handle the hover, focus, or active states for buttons. So you may need additional custom CSS to handle this.

Switch between the live preview and the code view to see what this might look like on your site and how to get it there

Available on every CMS website

How do I use block patterns on my site on CMS?

Block Patterns in WordPress are HTML with CSS (provided by special HTML comments). That means you’re able to simply copy a block (or selection of blocks) from one place, and paste them somewhere else, and they should look identical. In order to get the above block pattern on your site, try the following:

  1. Click the ‘Code’ tab above
  2. Click the ‘Copy to Clipboard’ icon in the top right of the code that is shown
  3. On your own site, add a new paragraph block to a post or a page
  4. Paste (ctrl+v on Windows, cmd+v on macOS) what you have on your clipboard
  5. Done!

alternative options

Here are some block patterns similar to this one