0.0.7 • Published 2 years ago

astro-sections v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

🚀 Astro sections

📘 Documentation →

🧑‍🚀 Astro website →

This components are designed to allow creation of structured website sections. They define a set of standard classes to be easyly customizzable, you can check an example here: https://github.com/warpsio/astros.

It works for every website but it's designed to integrate seamlessy with warpsio templates.

How To Use

In any of your Astro pages, import the sections you need

---
/* Import the components you need */
import { Section, ImageSection, HalfSection, EmptySection, Hero } from "astro-sections";
---

<html lang="en">
	<head>
		<SEO title="A Very Descriptive Title" description="A heavily optimized description full of well-researched keywords." />
	</head>
	<head>
		<body>
			<Hero {...props} />
			<ImageSection {...props} />
			<HalfSection {...props} />
			<EmptySection {...props} />
			<Section {...props} />
		</body>
	</head>
</html>

Supported Props

EmptySection

PropnameTypeDefaultRequiredDescription
idstringnullId to add to section element
classstringnullClass to add to section element
altboolfalseAdd "alt" class to element
containerbooltrueAdd "container" class

npm.io

Section

PropnameTypeDefaultRequiredDescription
idstringnullId to add to section element
titlestringnullTitle, check position in the chart (Have to pass lmap for localization)
subtitlestringnullsubtitle, check position in the chart (Have to pass lmap for localization)
descriptionstringnullDescription, check position in the chart (Have to pass lmap for localization)
classstringnullClass to add to section element
altboolfalseAdd "alt" class to element
containerbooltrueAdd "container" class
lmapObject{}Localization map, needed for localization of title, subtitle and description

npm.io

Half Section

PropnameTypeDefaultRequiredDescription
idstringnullId to add to section element
titlestringnullTitle, check position in the chart (Have to pass lmap for localization)
subtitlestringnullsubtitle, check position in the chart (Have to pass lmap for localization)
descriptionstringnullDescription, check position in the chart (Have to pass lmap for localization)
classstringnullClass to add to section element
altboolfalseAdd "alt" class to element
containerbooltrueAdd "container" class
invertedbooltrueInvert position of the 2 sides
verticalAlignmentstring"start"Vertical alignment for title and description side
lmapObject{}Localization map, needed for localization of title, subtitle and description

npm.io

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago