Hexo Theme Cupertino

Use Built-in Components

All built-in components are enabled by default, so they are ready out-of-box. Further configuration can be found:


Built-in Components

Container

By default, everything in the main part has no margin or padding to the viewport's edge. This allows you to create wide content without being restricted by a fixed width. So you have to use .container to bring margin and padding back:

<div class="container">
  <!-- your content here -->
</div>

Button

Both links and buttons can be shaped into a button's appearance:

Screenshot of link button and button

<a class="action-button-primary" href="#">Links</a>
<button class="action-button-primary">Button</button>

Badge

Screenshot of badges

<span class="badge">Stable</span>
<span class="badge warning">Warning</span>
<span class="badge secondary">Secondary</span>
<span class="badge success">Success</span>

Cards & Card Grids

Card grids can help you place multiple cards. Cards presents information of an item clearly.

Screenshot of cards in a card grid

{% cardGrid %}

{% card %}

{% cardCoverImg /img/000024.png "The logo of RSA CLI" %}

{% cardContent %}

{% cardContentTitle "RSA CLI" %}
{% cardContentDescription "A command line tool for RSA encryption and decryption." %}

{% endcardContent %}

{% cardActions %}

{% cardActionsLeft %}
<span class="badge">Stable</span>
{% endcardActionsLeft %}

{% cardActionsRight %}
<a class="action-button-primary" href="https://rsa.js.org/">Learn more</a>
<button class="action-button-primary">Button</button>
{% endcardActionsRight %}

{% endcardActions %}

{% endcard %}

{% endcardGrid %}

Carousel contains photos and allow visitors to scroll and view.

Screenshot of a carousel

<div class="carousel">
  <img src="/img/000036.jpg" class="carousel-item" />
  <figure>
    <img src="/img/000046.webp" alt="Dolore est aliquip." class="carousel-item" />
    <figcaption>Dolore est aliquip.</figcaption>
  </figure>
  <img src="/img/000041.webp" class="carousel-item" />
  <img src="/img/000042.webp" class="carousel-item" />
</div>

Callout

Callouts are used to highlight important information.

Screenshot of callouts in 4 types

Both icon and title are optional.

<htc-callout>
  <span slot="title">Default</span>
  Your content goes here.
</htc-callout>
<htc-callout type="warning">
  <span slot="icon"><i class="bi bi-exclamation-triangle-fill"></i></span>
  <span slot="title">Warning</span>
  Your content goes here.
</htc-callout>
<htc-callout type="accent">
  <span slot="icon"><i class="bi bi-palette-fill"></i></span>
  <span slot="title">Accent</span>
  Your content goes here.
</htc-callout>
<htc-callout type="success">
  <span slot="icon"><i class="bi bi-check-circle-fill"></i></span>
  <span slot="title">Success</span>
  Your content goes here.
</htc-callout>

Utilities

.block-large

Add class="block-large" to the block elements that you want to allow it a wider container. The large blocks will be wider than the article if the viewport allows.

.no-select

Prevents visitors from selecting texts. But note, the users still can access the unselectable text in DevTools.

.text-left, -center, -right

Used for customizing text alignment, useful if you're placing headings.

.text-uppercase, -lowercase, -capitalize

Used for transforming letters.

On this page