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

feat: flesh in mid section #847

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ actively employed in developing a cooperative RPG.

- Turn-key development environment with Github Codespaces
- Infrastructure as Code (IaC) for streamlined DevOps pipeline
- Event-driven microservices architecture
- Event-driven microservices architecture with data lake
- Continuous integration and continuous deployment (CI/CD) leveraging AWS

## Getting Started
Expand Down
Binary file removed clients/admin-client/public/assets/diamonds.jpg
Binary file not shown.
30 changes: 25 additions & 5 deletions clients/admin-client/src/pages/home.page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Hero, Paper, Button, Link, FontAwesomeIcon, faArrowRight } from '@cats-cradle/design-system/dist/main';
import { Hero, Paper, Button, Link, FontAwesomeIcon, faArrowRight, BasicCard } from '@cats-cradle/design-system/dist/main';

export default function HomePage() {
return (
Expand All @@ -9,16 +9,36 @@ export default function HomePage() {
lead="Introducing our latest tool designed exclusively for you."
>
</Hero>
<main className="container mt-5">
<main className="container-fluid mt-5">
<Paper elevation="1" className='p-5'>
<div className="container">
<h2>Latest</h2>
<h3>Archetypes</h3>
<p>
<div className="row row-cols-1 row-cols-md-3">
<div className="col mb-3">
<BasicCard title="Archetypes" imageSrc="/assets/clouds.jpg" ribbonText='New Archetypes'>
<p>
Dive into the world of character archetypes with ease.
Uncover diverse options, check out base stats, and seamlessly explore backstories—all in one place.
No-frills, just a straightforward way to look at the data. Raise a <Link href='https://github.com/hxtree/cats-cradle/pulls'>pull request</Link> to suggest changes.
No-frills, just a straightforward way to look at the data.
</p>
<Button href="/archetypes" color="secondary">Try It <FontAwesomeIcon icon={faArrowRight}/></Button>
</BasicCard>
</div>
<div className="col mb-3">
<BasicCard title="Game Portal" imageSrc="/assets/clouds.jpg">
NekosGate admin portal is a powerful tool that allows you to manage your game with ease.
</BasicCard>
</div>
<div className="col mb-3">
<BasicCard title="Open Source Software" imageSrc="/assets/clouds.jpg">
Shape the future of development with us!
Contribute your expertise to help.
Join our community today!
Raise a <Link href='https://github.com/hxtree/cats-cradle/pulls'>pull request</Link> to suggest changes.
</BasicCard>
</div>
</div>
</div>
</Paper>
</main>
</>
Expand Down
Binary file added clients/design-system/public/sample.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 10 additions & 16 deletions clients/design-system/src/components/Card/BasicCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,25 @@ export type BasicCardProps = {
title?: string;
body?: string;
url?: string;
cta?: string;
imageSrc?: string;
ribbonText?: string;
ribbonColor?: string;
children?: React.ReactNode;
};

// TODO finish fleshing in basic card props
export const BasicCard = (props: BasicCardProps): JSX.Element => {
const { cta, body, title, children } = props;
const defaultCta = 'Learn More';

const callOut = "Save 10% Off";
const callOutColor = "primary";
const { ribbonText, body, title, imageSrc, children } = props;

return (
<div className="card">
<div className="card h-100 border-radius-4">
<div className='card-thumbnail'>
<div className='card-call-out px-4'>{callOut}</div>
<svg className="bd-placeholder-img card-img-top"
width="100%" height="180" xmlns="http://www.w3.org/2000/svg" role="img"
aria-label="Placeholder: Image cap" preserveAspectRatio="xMidYMid slice"
focusable="false"><title>Placeholder</title>
<rect width="100%" height="100%" fill="#868e96"></rect>
<text x="50%" y="50%" fill="#dee2e6" dy=".3em">Sample Image</text>
</svg>
<div className="card-img-top-wrapper">
<div className="card-img-top" style={{background: `url(${imageSrc})`}}/>
</div>
{ribbonText && <div className='card-call-out px-4'>{ribbonText}</div>}
</div>
<div className="card-body">
<div className="card-body p-4">
<h5 className="card-title">{title}</h5>
<p className="card-text">
{body}
Expand Down
20 changes: 20 additions & 0 deletions clients/design-system/src/components/Card/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,29 @@
$card-color: $color-murrey;
$card-call-out-offset: 16px;
.card {
border-radius: 1rem;
&:hover {
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
cursor: pointer;
.card-img-top {
transform: scale(1.02);
transition: transform .2s;
}
}
.card-thumbnail {
margin:0;
position: relative;
.card-img-top-wrapper {
overflow: hidden;
height: 180px;
.card-img-top {
height: 180px;
background-color: $color-gray !important;
background-size: 100% 100% !important;
background-position: center center;
}
}

.card-call-out {
text-transform: uppercase;
font-weight: bold;
Expand Down
51 changes: 51 additions & 0 deletions clients/design-system/src/components/Images/Images.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import React from 'react';

export interface BgImageProps {
}

export const BgImage = (props: BgImageProps) => {

return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
<defs>
<linearGradient id="gradient1" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style={{stopColor: 'rgb(255,255,0)', stopOpacity: 1}} />
<stop offset="100%" style={{stopColor: 'rgb(255,0,0)', stopOpacity: 1}} />
</linearGradient>
<linearGradient id="gradient2" x1="0%" y1="100%" x2="100%" y2="0%">
<stop offset="0%" style={{stopColor: 'rgb(0,0,255)', stopOpacity: 1}} />
<stop offset="100%" style={{stopColor: 'rgb(0,255,255)', stopOpacity: 1}} />
</linearGradient>
<linearGradient id="gradient3" x1="50%" y1="0%" x2="50%" y2="100%">
<stop offset="0%" style={{stopColor: 'rgb(0,255,0)', stopOpacity: 1}} />
<stop offset="100%" style={{stopColor: 'rgb(255,0,255)', stopOpacity: 1}} />
</linearGradient>
<pattern id="triangles" width="100" height="100" patternUnits="userSpaceOnUse">
<polygon points="50,0 0,100 100,100" fill="url(#gradient1)"/>
<polygon points="50,0 100,100 100,0" fill="url(#gradient2)"/>
<polygon points="50,0 0,100 0,0" fill="url(#gradient3)"/>
</pattern>
</defs>
<polygon points="100,20 155,55 130,130 70,130 45,55" fill="url(#triangles)"/>
</svg>
);




// triangle gradient
// return(
// <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
// <defs>
// <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
// <stop offset="0%" style={{stopColor:"rgb(255,255,0)",stopOpacity:1}} />
// <stop offset="100%" style={{stopColor:"rgb(255,0,0)",stopOpacity:1}} />
// </linearGradient>
// <pattern id="triangles" width="20" height="20" patternUnits="userSpaceOnUse">
// <polygon points="10,0 0,20 20,20" fill="url(#gradient)"/>
// </pattern>
// </defs>
// <rect width="100%" height="100%" fill="url(#triangles)"/>
// </svg>
// )
}
1 change: 1 addition & 0 deletions clients/design-system/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ export * from './Layout/Layout';
export * from './Card/BasicCard';
export * from './Paper/Paper';
export * from './Hero/Hero';
export * from './Images/Images';
4 changes: 2 additions & 2 deletions clients/design-system/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ $success: #7952b3;
@import "bootstrap/scss/badge";
@import "bootstrap/scss/alert";
// @import "bootstrap/scss/progress";
// @import "bootstrap/scss/list-group";
@import "bootstrap/scss/list-group";
@import "bootstrap/scss/close";
// @import "bootstrap/scss/toasts";
@import "bootstrap/scss/toasts";
@import "bootstrap/scss/modal"; // Requires transitions
// @import "bootstrap/scss/tooltip";
@import "bootstrap/scss/popover";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,24 @@ export default {
} as Meta<typeof BasicCard>;

export const Default = (args: BasicCardProps) =>
<BasicCard {...args}/>;
<div className="row row-cols-1 row-cols-md-3 row-cols-md-4">
<div className="col mb-3">
<BasicCard {...args}>
Welcome to Day
</BasicCard>
</div>
<div className="col mb-3">
<BasicCard {...args} title="What, Why, When, Where" imageSrc="/sample.jpg">
Seven out of Ten Cats
</BasicCard>
</div>
<div className="col mb-3">
<BasicCard {...args} title="Turn-key Property Management" ribbonText='Learn More'>
How goes property management?
</BasicCard>
</div>
</div>

Default.args = {
title: 'Welcome To Day',
cta: 'Learn More'
}
} as BasicCardProps;
Loading