0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Added frontend styles for CTA card (#22163)

Ref https://linear.app/ghost/issue/PLG-337/create-cta-card-web-design
This commit is contained in:
Sanne de Vries 2025-02-11 14:12:05 +01:00 committed by GitHub
parent 8f28205042
commit 7c0b814c9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 140 additions and 2 deletions

View file

@ -6,7 +6,7 @@
.kg-callout-card {
display: flex;
padding: 1.2em 1.6em;
border-radius: 3px;
border-radius: 8px;
}
.kg-callout-card-grey {
@ -15,7 +15,7 @@
.kg-callout-card-white {
background: transparent;
box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25);
box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.2);
}
.kg-callout-card-blue {

View file

@ -0,0 +1,138 @@
.kg-cta-card,
.kg-cta-card * {
box-sizing: border-box;
}
.kg-cta-card {
display: flex;
flex-direction: column;
border-radius: 8px;
}
.kg-cta-bg-grey {
background: rgba(124, 139, 154, 0.13);
}
.kg-cta-bg-white {
background: transparent;
box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.2);
}
.kg-cta-bg-blue {
background: rgba(33, 172, 232, 0.12);
}
.kg-cta-bg-green {
background: rgba(52, 183, 67, 0.12);
}
.kg-cta-bg-yellow {
background: rgba(240, 165, 15, 0.13);
}
.kg-cta-bg-red {
background: rgba(209, 46, 46, 0.11);
}
.kg-cta-sponsor-label {
margin: 0 2.4rem;
padding: 1.2rem 0;
border-bottom: 1px solid rgba(124, 139, 154, 0.2);
color: rgba(0, 0, 0, 0.4);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
}
.kg-cta-bg-none .kg-cta-sponsor-label {
margin: 0;
}
.kg-cta-content {
display: flex;
padding: 2.4rem;
gap: 2.4rem;
}
.kg-cta-bg-none .kg-cta-content {
padding: 2.4rem 0;
border-bottom: 1px solid rgba(124, 139, 154, 0.2);
}
.kg-cta-minimal .kg-cta-content {
flex-direction: row;
}
.kg-cta-immersive .kg-cta-content {
flex-direction: column;
}
.kg-cta-content-inner {
display: flex;
flex-direction: column;
gap: 2.4rem;
}
.kg-cta-image-container {
flex-shrink: 0;
}
.kg-cta-image-container img {
object-fit: cover;
border-radius: 6px;
}
.kg-cta-minimal .kg-cta-image-container img {
width: 64px;
height: 64px;
}
.kg-cta-text {
font-size: .95em;
}
.kg-cta-immersive .kg-cta-text {
text-align: center;
}
.kg-cta-text p {
text-wrap: pretty;
}
.kg-cta-text p + p {
margin-top: 2rem;
}
a.kg-cta-button {
display: flex;
position: static;
align-items: center;
padding: 0 2rem;
height: 2.4em;
justify-content: center;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-size: 0.95em;
font-weight: 600;
text-decoration: none;
border-radius: 6px;
transition: opacity 0.2s ease-in-out;
}
a.kg-cta-button:hover {
opacity: 0.85;
}
a.kg-cta-button.kg-style-accent {
background-color: var(--ghost-accent-color);
}
.kg-cta-minimal a.kg-cta-button {
width: max-content;
}
.kg-cta-immersive a.kg-cta-button {
width: 100%;
}