mirror of
https://ark.sudovanilla.org/Korbs/Pandora.git
synced 2025-01-09 20:03:55 +00:00
Compare commits
No commits in common. "c5d967913a3ebada4f6ac950e08e1a2bf4485e3e" and "9d9328ff9a44d39aad1a70a5114fd9f3c25524f5" have entirely different histories.
c5d967913a
...
9d9328ff9a
|
@ -9,7 +9,7 @@ An Astro component library for SudoVanilla related websites and projects.
|
||||||
|
|
||||||
To install Pandora for your Astro website, running the following:
|
To install Pandora for your Astro website, running the following:
|
||||||
```
|
```
|
||||||
bun install --registry https://js.registry.sudovanilla.org/
|
bun install --registry https://registry.sudovanilla.org/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -31,6 +31,7 @@ import {CallToAction} from "@sudovanilla/pandora"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
3
index.ts
3
index.ts
|
@ -3,8 +3,7 @@ import CallToAction from "./src/blocks/CallToAction.astro";
|
||||||
import Hero from "./src/blocks/Hero.astro"
|
import Hero from "./src/blocks/Hero.astro"
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import Banner from "./src/Banner.astro"
|
|
||||||
import Image from "./src/Image.astro";
|
import Image from "./src/Image.astro";
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
export {Banner, CallToAction, Image, Hero}
|
export {CallToAction, Image, Hero}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@sudovanilla/pandora",
|
"name": "@sudovanilla/pandora",
|
||||||
"version": "1.7.3",
|
"version": "1.7.21",
|
||||||
"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.",
|
||||||
|
@ -25,8 +25,8 @@
|
||||||
"website"
|
"website"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"publish": "npm publish && npm publish --registry https://js.registry.sudovanilla.org/",
|
"publish": "bun publish && bun publish --registry https://registry.sudovanilla.org/",
|
||||||
"test": "cd test/ && npm start"
|
"test": "cd test/ && bun start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"astro-tooltips": "^0.6.2"
|
"astro-tooltips": "^0.6.2"
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
---
|
|
||||||
const {
|
|
||||||
Title,
|
|
||||||
Message,
|
|
||||||
Type,
|
|
||||||
Link
|
|
||||||
} = Astro.props
|
|
||||||
---
|
|
||||||
|
|
||||||
<a href={Link} class={"pd-banner pd-banner-type-" + Type}>
|
|
||||||
<p class="pd-banner-title"><slot name="icon"/> {Title}</p>
|
|
||||||
<p class="pd-banner-message">{Message}</p>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.pd-banner {
|
|
||||||
background: gray;
|
|
||||||
color: white;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
border-radius: 6px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
@media screen and (max-width: 800px) {
|
|
||||||
flex-direction: column;
|
|
||||||
.pd-banner-message {padding: 24px}
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
.pd-banner-title {
|
|
||||||
@media screen and (max-width: 800px) {
|
|
||||||
border-radius: 6px 6px 0px 0px !important;
|
|
||||||
width: 100%;
|
|
||||||
padding: 12px 0px 12px 50px !important;
|
|
||||||
}
|
|
||||||
display: flex;
|
|
||||||
gap: 12px;
|
|
||||||
align-items: center;
|
|
||||||
background: #00000038;
|
|
||||||
padding: 12px 16px;
|
|
||||||
border-radius: 6px 0px 0px 6px;
|
|
||||||
margin-right: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.pd-banner-type-Dangerous {background: #a42626; color: white}
|
|
||||||
.pd-banner-type-Update {background: #3a66b9; color: white}
|
|
||||||
.pd-banner-type-Warning {background: #e6e680; color: black}
|
|
||||||
</style>
|
|
|
@ -54,11 +54,9 @@ import Image from '../Image.astro'
|
||||||
margin: 24px 0px 140px 0px;
|
margin: 24px 0px 140px 0px;
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
flex-direction: column-reverse !important;
|
flex-direction: column-reverse !important;
|
||||||
margin-bottom: 48px;
|
|
||||||
}
|
}
|
||||||
&:nth-child(odd) {
|
&:nth-child(odd) {
|
||||||
flex-direction: row-reverse !important;
|
flex-direction: row-reverse !important;
|
||||||
@media screen and (max-width: 800px) {flex-direction: column !important}
|
|
||||||
img {
|
img {
|
||||||
box-shadow: 10px 10px 0px 0px var(--pandora-shadows);
|
box-shadow: 10px 10px 0px 0px var(--pandora-shadows);
|
||||||
transition: 1s box-shadow;
|
transition: 1s box-shadow;
|
||||||
|
@ -69,7 +67,6 @@ import Image from '../Image.astro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:nth-child(even) {
|
&:nth-child(even) {
|
||||||
@media screen and (max-width: 800px) {flex-direction: column !important}
|
|
||||||
img {
|
img {
|
||||||
box-shadow: -10px 10px 0px 0px var(--pandora-shadows);
|
box-shadow: -10px 10px 0px 0px var(--pandora-shadows);
|
||||||
transition: 1s box-shadow;
|
transition: 1s box-shadow;
|
||||||
|
@ -81,23 +78,15 @@ import Image from '../Image.astro'
|
||||||
}
|
}
|
||||||
.pd-cta-start {
|
.pd-cta-start {
|
||||||
position: relative;
|
position: relative;
|
||||||
@media screen and (max-width: 800px) {width: 100% !important}
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
@media screen and (max-width: 800px) {
|
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pd-cta-end {
|
.pd-cta-end {
|
||||||
min-width: 50%;
|
min-width: 50%;
|
||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
@media screen and (max-width: 800px) {
|
|
||||||
max-width: 100%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
a {
|
a {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 1px var(--pandora-borders) solid !important;
|
border: 1px var(--pandora-borders) solid !important;
|
||||||
|
|
Loading…
Reference in a new issue