-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Qwizi/new-components
feat: added hero component
- Loading branch information
Showing
4 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<c-vars bg title center min_h_screen="True" overlay image_src image_alt="Image alternative text" bg_opacity="60" | ||
center="True" reverse="False"/> | ||
|
||
{% if overlay and image_src %} | ||
<div | ||
class="hero{% if min_h_screen %} min-h-screen{% endif %}" | ||
style="background-image: url({{ image_src }});" | ||
{{ attrs }} | ||
> | ||
<div class="hero-overlay bg-opacity-{{ bg_opacity }}"></div> | ||
<div class="hero-content text-neutral-content text-center"> | ||
<div class="max-w-md"> | ||
{% if title %} | ||
<h1 class="mb-5 text-5xl font-bold">{{ title }}</h1> | ||
{% endif %} | ||
{{ slot }} | ||
</div> | ||
</div> | ||
</div> | ||
{% else %} | ||
<div class="hero bg-{{ bg }}{% if min_h_screen %} min-h-screen{% endif %}" {{ attrs }}> | ||
{% if center is True %} | ||
<div class="hero-content text-center"> | ||
{% else %} | ||
{% if reverse %} | ||
<div class="hero-content flex-col lg:flex-row-reverse"> | ||
{% else %} | ||
<div class="hero-content flex-col lg:flex-row"> | ||
{% endif %} | ||
|
||
{% if image_src %} | ||
<img | ||
src="{{ image_src }}" | ||
class="max-w-sm rounded-lg shadow-2xl" | ||
alt="{{ image_alt }}" | ||
/> | ||
{% endif %} | ||
{% endif %} | ||
<div class="{% if center is True%}max-w-md{% endif %}"> | ||
{% if title %} | ||
<h1 class="text-5xl font-bold">{{ title }}</h1> | ||
{% endif %} | ||
{{ slot }} | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<c-vars h="32" w="32" rounded shrink/> | ||
|
||
<div class="skeleton h-32 w-32{% if rounded %} rounded-{{ rounded }}{% endif %}{% if shrink %} shrink-{{ shrink }}{% endif %}"></div> | ||
<div class="skeleton h-{{ h }} w-{{ w }}{% if rounded %} rounded-{{ rounded }}{% endif %}{% if shrink %} shrink-{{ shrink }}{% endif %}"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<c-vars type title description position align/> | ||
|
||
<div class="toas{% if position %} toast-{{ position }}{% endif %}{% if align %} toast-align{% endif %}"> | ||
<div class="toas{% if position %} toast-{{ position }}{% endif %}{% if align %} toast-{{ align }}{% endif %}" {{ attrs }}> | ||
<c-alert type="{{ type }}" title="{{ title }}" description="{{ description }}"/> | ||
</div> |