mirror of
https://ark.sudovanilla.org/Korbs/Pandora.git
synced 2025-01-05 18:03:53 +00:00
Compare commits
No commits in common. "ab66e178c861a136c3be30499f7d673c3a985597" and "cc996376f5bd7ce04a3eceed29d871bfe4244cc2" have entirely different histories.
ab66e178c8
...
cc996376f5
3
index.ts
3
index.ts
|
@ -1,9 +1,8 @@
|
||||||
// Blocks
|
// Blocks
|
||||||
import CallToAction from "./src/blocks/CallToAction.astro";
|
import CallToAction from "./src/blocks/CallToAction.astro";
|
||||||
import Hero from "./src/blocks/Hero.astro"
|
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import Image from "./src/Image.astro";
|
import Image from "./src/Image.astro";
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
export {CallToAction, Image, Hero}
|
export {CallToAction, Image}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@sudovanilla/pandora",
|
"name": "@sudovanilla/pandora",
|
||||||
"version": "1.7.2",
|
"version": "1.7.0",
|
||||||
"author": "SudoVanilla",
|
"author": "SudoVanilla",
|
||||||
"displayName": "Pandora",
|
"displayName": "Pandora",
|
||||||
"description": "Astro component library built for SudoVanilla related websites and projects.",
|
"description": "Astro component library built for SudoVanilla related websites and projects.",
|
||||||
|
|
|
@ -18,8 +18,12 @@ const {
|
||||||
fit={Fit}
|
fit={Fit}
|
||||||
format={Format}
|
format={Format}
|
||||||
quality={Quality}
|
quality={Quality}
|
||||||
onload="this.style.transition = '1s opacity, 1s box-shadow'; this.style.opacity = '1'"
|
onload="this.style.opacity = '1'"
|
||||||
inferSize
|
inferSize
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style>img {opacity: 0}</style>
|
<style>
|
||||||
|
img {
|
||||||
|
opacity: 0; /* Fade in when it's loaded, see "onload" in component */
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -8,7 +8,6 @@ const {
|
||||||
ImageAlt,
|
ImageAlt,
|
||||||
|
|
||||||
Label,
|
Label,
|
||||||
LabelType,
|
|
||||||
Shadow,
|
Shadow,
|
||||||
|
|
||||||
PrimaryAction,
|
PrimaryAction,
|
||||||
|
@ -39,7 +38,7 @@ import Image from '../Image.astro'
|
||||||
<div class="pd-cta-end-actions">
|
<div class="pd-cta-end-actions">
|
||||||
{SecondaryActionText ? <a id="cta-secondary" href={SecondaryAction}>{SecondaryActionText}</a> : null}
|
{SecondaryActionText ? <a id="cta-secondary" href={SecondaryAction}>{SecondaryActionText}</a> : null}
|
||||||
{PrimaryActionText ? <a id="cta-primary" href={PrimaryAction}>{PrimaryActionText}</a> : null}
|
{PrimaryActionText ? <a id="cta-primary" href={PrimaryAction}>{PrimaryActionText}</a> : null}
|
||||||
{Label ? <p class={'pd-cta-label pd-cta-label-' + LabelType}>{Label}</p> : null}
|
{Label ? <p id="cta-label">{Label}</p> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,7 +98,7 @@ import Image from '../Image.astro'
|
||||||
0.3s background,
|
0.3s background,
|
||||||
0.6s color;
|
0.6s color;
|
||||||
}
|
}
|
||||||
.pd-cta-label {
|
#cta-label {
|
||||||
border-color: rgb(247, 247, 149);
|
border-color: rgb(247, 247, 149);
|
||||||
background: rgb(247, 247, 149);
|
background: rgb(247, 247, 149);
|
||||||
color: black !important;
|
color: black !important;
|
||||||
|
@ -110,14 +109,6 @@ import Image from '../Image.astro'
|
||||||
transition:
|
transition:
|
||||||
0.3s background,
|
0.3s background,
|
||||||
0.6s color;
|
0.6s color;
|
||||||
&.pd-cta-label-Note {
|
|
||||||
background-color: #1f6feb;
|
|
||||||
color: white !important;
|
|
||||||
}
|
|
||||||
&.pd-cta-label-Warning {
|
|
||||||
background-color: #da3633;
|
|
||||||
color: white !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
---
|
|
||||||
// Properties
|
|
||||||
const {
|
|
||||||
Title,
|
|
||||||
Description,
|
|
||||||
|
|
||||||
ImageSource,
|
|
||||||
ImageAlt,
|
|
||||||
} = Astro.props
|
|
||||||
|
|
||||||
// Components
|
|
||||||
import Image from '../Image.astro'
|
|
||||||
---
|
|
||||||
|
|
||||||
<div class="pd-hero">
|
|
||||||
<Image Source={ImageSource} Alt={ImageAlt}/>
|
|
||||||
<div class="pd-hero-content">
|
|
||||||
<h2>{Title}</h2>
|
|
||||||
<p>{Description}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.pd-hero {
|
|
||||||
position: relative;
|
|
||||||
height: 500px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
img {
|
|
||||||
position: absolute;
|
|
||||||
z-index: -1;
|
|
||||||
border-radius: 12px;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: center;
|
|
||||||
opacity: 0.5 !important;
|
|
||||||
filter: brightness(0.75);
|
|
||||||
}
|
|
||||||
.pd-hero-content {
|
|
||||||
margin-left: 10%;
|
|
||||||
color: var(--pandora-text);
|
|
||||||
* {margin: 0px}
|
|
||||||
h2 {font-size: 48px}
|
|
||||||
p {font-size: 24px}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
Reference in a new issue