Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement hextra/hero-section, defining a h2 heading on front-page #388

Open
fmunteanu opened this issue May 8, 2024 · 9 comments
Open

Comments

@fmunteanu
Copy link
Contributor

fmunteanu commented May 8, 2024

Feature Description

Hi @imfing,

On Hextra front-page, I need the ability to insert a h2 heading, defining additional section titles. For example, adding a subtitle above hextra/feature-grid.

Proposed Solution

I created the following layouts/shortcodes/hextra/hero-section.html shortcode, implementing a section:

{{- $style := .Get "style" -}}

<h2
  class="not-prose hx-text-4xl hx-font-bold hx-leading-none hx-tracking-tighter md:hx-text-3xl hx-py-2 hx-bg-clip-text hx-text-transparent hx-bg-gradient-to-r hx-from-gray-900 hx-to-gray-600 dark:hx-from-gray-100 dark:hx-to-gray-400"
  {{ with $style }}style="{{ . | safeCSS }}"{{ end }}
>
  {{ .Inner | markdownify }}
</h2>

Code Usage

Example of hextra/hero-section shortcode usage:

<div class="hx-mt-6 hx-mb-6">
{{< hextra/hero-section >}}
  Used Technologies
{{< /hextra/hero-section >}}
</div>

Implementation Result

Note the Used Technologies section title, above the hextra/feature-grid:

image

@mafendi
Copy link
Contributor

mafendi commented May 9, 2024

Hi!

Could you please provide a code that you use for a big picture in a hero section?

Thanks.

@fmunteanu
Copy link
Contributor Author

@mafendi see #387.

@mafendi
Copy link
Contributor

mafendi commented May 9, 2024

@mafendi see #387.

Thanks! 😊

@fmunteanu
Copy link
Contributor Author

I think these two hero features are very useful for the front-page and should be implemented.

@imfing
Copy link
Owner

imfing commented May 16, 2024

@fmunteanu Can you send PRs for these? thank you

@fmunteanu
Copy link
Contributor Author

@imfing will do, thank you for considering it!

@fmunteanu
Copy link
Contributor Author

@imfing I implemented header size in #390. Is a nice addition to original feature.

@fmunteanu
Copy link
Contributor Author

fmunteanu commented May 24, 2024

@mafendi #389 was merged into main branch, see the PR description for the updated code usage.

@imfing can we please have #390 merged also?

@mafendi
Copy link
Contributor

mafendi commented May 24, 2024

@mafendi #389 was merged into main branch, see the PR description for the updated code usage.

@imfing can we please have #390 merged also?

Great, thanks a lot 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants