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

Showcase page refresh #3235

Merged
merged 22 commits into from
Aug 25, 2022
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
643 changes: 281 additions & 362 deletions website/showcase.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions website/src/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@
.item {
list-style: none;

a img {
border-radius: 20%;
img {
border-radius: 16px;
overflow: hidden;
box-shadow: 0 6px 14px rgb(20 20 20 / 8%);
}
}
}
Expand Down
266 changes: 217 additions & 49 deletions website/src/css/showcase.scss
Original file line number Diff line number Diff line change
@@ -1,37 +1,216 @@
@import "shared";

:root {
--showcase-icon-background: rgb(0 0 0 / 1.5%);
}

html[data-theme="dark"] {
--showcase-icon-background: rgb(255 255 255 / 1.5%);
}

.plugin-pages .main-wrapper {
width: 100%;
max-width: 100%;
}

.sectionContainer {
max-width: 1360px;
padding: 0 20px;
margin: 0 auto;
position: relative;
}

.headerContainer {
h1 {
margin: 16px 0 28px;
color: white;

span {
color: var(--ifm-color-primary);
}
}

p {
color: var(--ifm-color-secondary-dark);
font-size: 19px;
}
}

.showcaseSection {
max-width: 800px;
margin: 64px auto;
max-width: 1320px;
text-align: center;
padding: 0 20px;
margin: 8px auto 54px;
padding: 20px 16px 16px;
border: 1px solid var(--ifm-hr-border-color);
border-radius: 12px;

&.showcaseCustomers {
border: 0;
box-shadow: none;
}

&:first-child {
margin-top: 12px;
}

&:last-child {
margin-bottom: 0;
}

h2 {
margin: 4px -20px 12px;
padding: 0 40px 0;
text-align: left;

img {
margin: 16px 0 8px;
height: 40px;
}

&.withLogo {
min-height: 60px;
}
}

.showcaseSectionDescription {
text-align: left;
color: var(--subtle);
padding: 0 20px;
margin-bottom: 8px;
}

.showcase img {
height: 100px;
height: 80px;
border-radius: 20px;
}

.logos img {
padding: 0;
.logos {
display: grid;
grid-template-columns: 1fr;
grid-gap: 28px;
margin: 20px 20px 16px;

.icon {
padding: 0;
}
}

.info {
.showcase {
border-radius: 10px;
display: flex;
flex-direction: column;
border: 1px solid var(--ifm-hr-border-color);
transition: transform 0.25s ease-in-out;
overflow: hidden;
position: relative;

h3 {
margin-bottom: 0;
line-height: 21px;
padding: 0 6px 4px;
font-size: 18px;
}

p {
margin: 8px 0 18px;
padding-top: 0 !important;

a {
@extend %link-style;
}
}

h3,
p {
color: var(--ifm-color-emphasis-800);
}

&:hover .icon {
transform: scale3d(1.03, 1.03, 1);
}

.iconBox {
display: flex;
justify-content: center;
background: linear-gradient(var(--showcase-icon-background), transparent);
padding: 20px 20px 8px;
width: 100%;
overflow: visible;
}

.iconBackground {
filter: blur(28px);
position: absolute;
opacity: 0.16;
transform: scale(1.38);
}

.icon {
box-shadow: 0 8px 16px rgb(20 20 20 / 7%);
position: relative;
z-index: 1;
transition: transform 200ms ease-in-out;
}

.showcaseContent {
padding: 8px 16px 0;
display: flex;
flex-direction: column;
justify-content: space-between;
flex-grow: 1;
}

.showcaseLinks span {
color: var(--subtle);
}
}

.articleButton {
color: var(--ifm-color-emphasis-600);
font-weight: 500;
font-size: 15px;
padding: 6px 12px;
margin: 0 -17px;
border-radius: 0;
border: 0;
border-top: 1px solid var(--ifm-color-emphasis-300);

&:hover {
background: var(--ifm-menu-color-background-hover);
color: var(--ifm-font-color-secondary);
}
}
}

p a {
@extend %link-style;
.footerContainer {
text-align: center;

p {
color: #858a96;

a {
@extend %link-style-dark;
color: #fff;
background: none !important;

&:hover {
background: none !important;
color: var(--ifm-color-primary);
}
}
}

.form-button {
.formButton {
@extend %button-link-style;
color: #fff;
border-color: var(--ifm-color-primary);
margin-top: 20px;
margin-bottom: 36px;
border-width: 2px;
font-weight: 500;

&:hover {
border-color: var(--ifm-color-primary);
color: var(--ifm-font-color-base) !important;
color: var(--ifm-color-primary);
}
}
}
Expand All @@ -41,14 +220,22 @@ html[data-theme="dark"] .showcaseSection {
@extend %link-style-dark;
}

.form-button {
.articleButton {
color: var(--ifm-color-emphasis-400);
}

.formButton {
color: var(--ifm-color-secondary-dark);
}

.iconBackground {
opacity: 0.15;
}
}

.home-showcase-section {
max-width: 800px;
margin: 20px auto 20px auto;
margin: 20px auto;
text-align: center;
padding-bottom: 40px;

Expand Down Expand Up @@ -88,52 +275,33 @@ html[data-theme="dark"] .showcaseSection {
text-align: center;
}

.showcase {
margin: 30px auto 30px auto;
width: 100%;
display: inline-block;
text-align: center;
vertical-align: top;

h3 {
margin-bottom: 0;
line-height: 21px;
padding: 5px 5px 2px;
font-size: 21px;
}

p {
margin-top: 5px;
padding-top: 0 !important;
}

h3,
p {
color: var(--ifm-color-emphasis-800);
@media only screen and (min-width: 600px) {
.showcaseSection .logos {
grid-template-columns: repeat(2, 1fr);
}
}

@media only screen and (max-device-width: 840px) {
.showcaseSection {
width: 100%;
@media only screen and (min-width: 768px) {
.showcaseSection .logos {
grid-template-columns: repeat(3, 1fr);
}
}

@media only screen and (min-width: 600px) {
.showcase {
width: 50%;
@media only screen and (min-width: 996px) {
.showcaseSection .logos {
grid-template-columns: repeat(4, 1fr);
}
}

@media only screen and (min-width: 960px) {
.showcase {
width: 25%;
@media only screen and (min-width: 1320px) {
.showcaseSection .logos {
grid-template-columns: repeat(5, 1fr);
}
}

@media only screen and (min-device-width: 736px) {
.showcaseSection .showcase img {
width: 100px;
max-height: 100px;
@media only screen and (max-width: 1400px) {
.showcaseSection {
margin-left: 20px;
margin-right: 20px;
}
}
17 changes: 14 additions & 3 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,23 @@ function GitHubStarButton() {
);
}

function Section({
export function Section({
element = 'section',
children,
className,
background = 'light',
}) {
const El = element;
return <El className={`Section ${className} ${background}`}>{children}</El>;
return (
<El
className={
className
? `Section ${className} ${background}`
: `Section ${background}`
}>
{children}
</El>
);
}

function TwoColumns({columnOne, columnTwo, reverse}) {
Expand Down Expand Up @@ -425,7 +434,9 @@ function VideoContent() {

function AppList() {
const {siteConfig} = useDocusaurusContext();
const apps = siteConfig.customFields.users.filter(app => app.pinned);
const apps = Object.values(siteConfig.customFields.users)
.flat()
.filter(app => app.pinned);

return (
<ul className="AppList">
Expand Down
Loading