Vertical Layout
Straight vertical thumbnail, content, and then CTA layout.
Card ComponentCard component is widely used in many information and summary display. Among
the use cases are presenting itemized products in e-commerece, data from search
list, and etc. Bissetii supports a number of card styling seemlessly.
This component is available starting from v1.12.1.
Bissetii currently supports a number of card designs via its sub-components. Feel free to explore each of them and deploy accordingly:
Straight vertical thumbnail, content, and then CTA layout.
Bissetii prepared a number of Hugo interfaces to generate Card component
seamlessly across all output formats.
Due to the massive data contents for a Card component, it was decided to
save and load it from a datafile (e.g. card1.toml) directly. There are
multiple parts vital to facilitate a proper card data file.
The datafile first starts with the overall card attributes. The following would be the minimum general card data:
|
|
max-content.max-content.Then, the datafile defines the <div class="content"> container’s contents. The
following would be the minimum content data:
|
|
The datafile then defines the <div class="cta"> container’s contents. The
following would be the minimum CTA data:
|
|
HTML or AMPHTML.HTML or AMPHTML are not blank, they will be used fo rendering
instead of this CTA link feature, effectively overriding it.N in
ascending order.id= attribute.class= attribute.rel= attribute.download attribute.target= attribute.Lastly, the datafile defines the content of the <div class="thumbnail">
container. The following would be the minimum thumbnail data:
|
|
HTML and AMPHTML.HTML, AMPHTML, and [Thumbnail.Image] are not blank or absent,
they will be used for rendering instead of this quick picture feature,
effectively overriding it.picture shortcode (See Image Component) is
used so the value MUST match the shortcode’s input alongside its
picture datafile.HTML and
AMPHTML.HTML or AMPHTML, they will be used for rendering instead of
this CTA link feature, effectively overriding it.Picture is not blank, it will be ignored and this quick image
featue shall overrides it.image shortcode (See Image Component) is
used so the fields and values MUST match the shortcode’s list of
inputs. They are:
alt= attribute.src=) attribute.width= attribute.height= attribute.ismap= attribute.loading= attribute.layout= attribute.class= attribute.sizes= attribute.By default, it is hard to process single or multiple card data across multiple outputs while maintaining a single input format. Hence, Bissetii prepared the following shortcodes to standardize the card rendering. These shortcodes are specific to Bissetii which works differently from Hugo.
card ShortcodeRenders a single card from a given data path.
|
|
DATAPATH - COMPULSORY. The Hugo’s pathing to the card data file.Example usage:
|
|
cards ShortcodeRenders a deck of cards from a given data file directory path and organize them using Grid Component.
|
|
DATAPATH - COMPULSORY
STYLE - OPTIONAL
style= attribute at deck level which will be added to .row Grid
container.CLASS - OPTIONAL
class= attribute at deck level which will be added to .row Grid
container.ID - OPTIONAL
id= attribute at deck level which will be added to .row Grid
container.Example usage:
|
|
Coming Soon.
Bissetii supports Card component seamlessly across multiple output formats.
Additionally, starting from version v1.13.0, the use of CSS variable is vital
for its upgrade from v1.12.5.
Bissetii HTML codes for this component are the same for Vanilla HTML5 and AMPHTML. Due to the undefined condition from W3C manuals, Bissetii is currently using class styling tag to structure the HTML component. The HTML key structure would be as follows:
|
|
<article> HTML syntax since the content are usually outside of
main content..Card CSS class tag and its
corresponding design TYPE (e.g. .vertical). By default, the
card is rendered in an error way so that you can rectify
your selection.style=
attributes.<div> container with .thumbnail CSS class tag to wrap all
thumbnails part..Card will set its
height to 0, allowing .content container to takes over the
spacing.<div> container with .content CSS class tag to wrap all
main contents part.<div> container with .cta CSS class tag to wrap all
call-to-action interaction elements..default CSS class to
quickly layout all CTA elements.Example code:
|
|
Bissetii provided a list of CSS variables dedicated for list styling alteration
without needing to recompile Sass. These variables are best applied directly to
the Card HTML tags. Example:
|
|
--card-gridAffects the grid layout of the card. The acceptable value shall be compatible
with grid: CSS field. The default is unset which is intentionally causing
rendering error while the Card sub-components shall define its own default
value.
--card-overflowAffects the overflow behavior of the entire card. The acceptable value shall
be compatible with overflow: CSS field. The default is hidden.
--card-widthAffects the width of the entire card. The acceptable value shall be compatible
with width: CSS field. The default is max-content.
--card-max-widthAffects the maximum width of the entire card. The acceptable value shall be
compatible with max-width: CSS field. The default is 100%.
--card-heightAffects the height of the entire card. The acceptable value shall be compatible
with height: CSS field. The default is fit-content.
--card-border-radiusAffects the edge roundness of the entire card. The acceptable value shall be
compatible with border-radius: CSS field. The default is 1rem.
--card-paddingAffects the padding spacing of the entire card. The acceptable value shall be
compatible with padding: CSS field. The default is 0.
--card-marginAffects the margin spacing of the entire card. The acceptable value shall be
compatible with margin: CSS field. The default is .5rem.
--card-borderAffects the border styling of the entire card. The acceptable value shall be
compatible with border: CSS field. The default is unset.
--card-backgroundAffects the background styling of the entire card. The acceptable value shall
be compatible with background: CSS field. The default is
var(--color-grey-50).
--card-filterAffects the filter styling of the entire card. The acceptable value shall be
compatible with filter: CSS field. The default is
drop-shadow(0 0 .1rem var(--color-grey-900)).
--card-thumbnail-overflowAffects the overflow behavior for the <div class="thumbnail"> container. The
acceptable value shall be compatible with overflow: CSS field. The default
is hidden.
--card-thumbnail-heightAffects the height of the <div class="thumbnail"> container. The acceptable
value shall be compatible with height: CSS field. The default is 100%.
--card-thumbnail-paddingAffects the padding spacing of the <div class="thumbnail"> container. The
acceptable value shall be compatible with padding: CSS field. The default is
0.
--card-thumbnail-marginAffects the margin spacing of the <div class="thumbnail"> container. The
acceptable value shall be compatible with margin: CSS field. The default is
0.
--card-content-overflowAffects the overflow behavior for the <div class="content"> container. The
acceptable value shall be compatible with overflow: CSS field. The default
is auto.
--card-content-heightAffects the height of the <div class="content"> container. The acceptable
value shall be compatible with height: CSS field. The default is unset.
--card-content-paddingAffects the padding spacing of the <div class="content"> container. The
acceptable value shall be compatible with padding: CSS field. The default is
0.
--card-content-marginAffects the margin spacing of the <div class="content"> container. The
acceptable value shall be compatible with margin: CSS field. The default is
0.
--card-cta-overflowAffects the overflow behavior for the <div class="cta"> container. The
acceptable value shall be compatible with overflow: CSS field. The default
is visible.
--card-cta-heightAffects the height of the <div class="cta"> container. The acceptable value
shall be compatible with height: CSS field. The default is unset.
--card-cta-paddingAffects the padding spacing of the <div class="cta"> container. The acceptable
value shall be compatible with padding: CSS field. The default is 0.
--card-cta-marginAffects the margin spacing of the <div class="cta"> container. The acceptable
value shall be compatible with margin: CSS field. The default is 0.
--card-cta-list-flex-directionAffects the direction cta items arrangement for List with .default CSS class.
The acceptable value shall be compatible with flex-direction: CSS field. The
default is row.
--card-cta-list-align-itemsAffects the cta items vertical alignment inside the List with .default CSS
class. The acceptable value shall be compatible with align-items: CSS field.
The default is center.
--card-cta-list-justify-contentAffects the cta items horizontal alignment inside the List with .default CSS
class. The acceptable value shall be compatible with justify-content: CSS
field. The default is center.
--card-cta-list-align-contentAffects the cta items overall content alignment inside the List with .default
CSS class. The acceptable value shall be compatible with align-content: CSS
field. The default is center.
This component does not rely on any Javascript.
Depending on release version, the Sass files work differently. Bissetii does not package Sass codes explictly so please view them via the git repository.
v1.13.0 and AboveBissetii uses Dart Sass to compile the styling Sass codes into CSS file. This component’s main Sass codes are available at the following location:
pkg/components/internal/card
Bissetii splits different card types into its own sub-components which has their own Sass codes.
v1.12.5 and BeforeThe Sass styling scripts that are responsible for styling cards are located in
assets/css/bissetii/modules/card
This is an optional module so one must include the following config into your own Sass configuration script:
$config-card: 1
Since card component is usually deployed inside some kind of table or
Grid Component layout,
It only uses margin-top for its hovering animation.
Here are the researches done to ensure Card component meets the necessary
quality assurances:
SCHEDULED COMING SOON
That’s all about Card component in Bissetii. If you need more feature or
need to report a bug, please feel free to file an issue at our
Issue Section.