Skip to content

Commit

Permalink
docs: Restyle documentation landing page and community page (#24393)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagorossener authored Jun 15, 2023
1 parent fa82ee1 commit 892de8a
Show file tree
Hide file tree
Showing 46 changed files with 1,567 additions and 628 deletions.
49 changes: 30 additions & 19 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const config = {
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/favicon.ico',
favicon: '/img/favicon.ico',
organizationName: 'apache', // Usually your GitHub org/user name.
projectName: 'superset', // Usually your repo name.
themes: ['@saucelabs/theme-github-codeblock'],
Expand Down Expand Up @@ -177,8 +177,8 @@ const config = {
navbar: {
logo: {
alt: 'Superset Logo',
src: 'img/superset-logo-horiz.svg',
srcDark: 'img/superset-logo-horiz-dark.svg',
src: '/img/superset-logo-horiz.svg',
srcDark: '/img/superset-logo-horiz-dark.svg',
},
items: [
{
Expand Down Expand Up @@ -219,28 +219,40 @@ const config = {
},
],
},
{
href: '/docs/intro',
position: 'right',
className: 'default-button-theme get-started-button',
label: 'Get Started',
},
{
href: 'https://github.com/apache/superset',
position: 'right',
class: 'github-logo-container',
className: 'github-button',
},
],
},
footer: {
style: 'dark',
links: [],
copyright: `Copyright © ${new Date().getFullYear()},
The <a href="https://www.apache.org/" target="_blank" rel="noreferrer">Apache Software Foundation</a>,
Licensed under the Apache <a href="https://apache.org/licenses/LICENSE-2.0" target="_blank" rel="noreferrer">License</a>. <br/>
<small>Apache Superset, Apache, Superset, the Superset logo, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation. All other products or name brands are trademarks of their respective holders, including The Apache Software Foundation.
<a href="https://www.apache.org/" target="_blank">Apache Software Foundation</a> resources</small><br />
<small>
<a href="https://www.apache.org/security/" target="_blank" rel="noreferrer">Security</a>&nbsp;|&nbsp;
<a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noreferrer">Donate</a>&nbsp;|&nbsp;
<a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noreferrer">Thanks</a>&nbsp;|&nbsp;
<a href="https://apache.org/events/current-event" target="_blank" rel="noreferrer">Events</a>&nbsp;|&nbsp;
<a href="https://apache.org/licenses/" target="_blank" rel="noreferrer">License</a>
</small>`,
copyright: `
<div class="footer__applitools">
We use &nbsp;<a href="https://applitools.com/" target="_blank" rel="nofollow"><img src="/img/applitools.png" title="Applitools" /></a>
</div>
<p>Copyright © ${new Date().getFullYear()},
The <a href="https://www.apache.org/" target="_blank" rel="noreferrer">Apache Software Foundation</a>,
Licensed under the Apache <a href="https://apache.org/licenses/LICENSE-2.0" target="_blank" rel="noreferrer">License</a>.</p>
<p><small>Apache Superset, Apache, Superset, the Superset logo, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation. All other products or name brands are trademarks of their respective holders, including The Apache Software Foundation.
<a href="https://www.apache.org/" target="_blank">Apache Software Foundation</a> resources</small></p>
<img class="footer__divider" src="/img/community/line.png" alt="Divider" />
<p>
<small>
<a href="https://www.apache.org/security/" target="_blank" rel="noreferrer">Security</a>&nbsp;|&nbsp;
<a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noreferrer">Donate</a>&nbsp;|&nbsp;
<a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noreferrer">Thanks</a>&nbsp;|&nbsp;
<a href="https://apache.org/events/current-event" target="_blank" rel="noreferrer">Events</a>&nbsp;|&nbsp;
<a href="https://apache.org/licenses/" target="_blank" rel="noreferrer">License</a>
</small>
</p>`,
},
prism: {
theme: lightCodeTheme,
Expand All @@ -250,8 +262,7 @@ const config = {
scripts: [
'/script/matomo.js',
{
src:
'https://www.bugherd.com/sidebarv2.js?apikey=enilpiu7bgexxsnoqfjtxa',
src: 'https://www.bugherd.com/sidebarv2.js?apikey=enilpiu7bgexxsnoqfjtxa',
async: true,
},
],
Expand Down
53 changes: 53 additions & 0 deletions docs/src/components/BlurredSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React, { ReactNode } from 'react';
import styled from '@emotion/styled';
import { mq } from '../utils';

const StyledBlurredSection = styled('section')`
text-align: center;
border-bottom: 1px solid var(--ifm-border-color);
overflow: hidden;
.blur {
max-width: 635px;
width: 100%;
margin-top: -70px;
margin-bottom: -35px;
position: relative;
z-index: -1;
${mq[1]} {
margin-top: -40px;
}
}
`;

interface BlurredSectionProps {
children: ReactNode;
}

const BlurredSection = ({ children }: BlurredSectionProps) => {
return (
<StyledBlurredSection>
{children}
<img className="blur" src="/img/community/blur.png" alt="Blur" />
</StyledBlurredSection>
);
};

export default BlurredSection;
123 changes: 123 additions & 0 deletions docs/src/components/SectionHeader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import styled from '@emotion/styled';
import { mq } from '../utils';

type StyledSectionHeaderProps = {
dark: boolean;
};

const StyledSectionHeader = styled('div')<StyledSectionHeaderProps>`
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 75px 20px 0;
max-width: 720px;
margin: 0 auto;
${mq[1]} {
padding-top: 55px;
}
.title,
.subtitle {
color: ${props =>
props.dark
? 'var(--ifm-font-base-color-inverse)'
: 'var(--ifm-font-base-color)'};
}
`;

const StyledSectionHeaderH1 = styled(StyledSectionHeader)`
.title {
font-size: 96px;
${mq[1]} {
font-size: 46px;
}
}
.line {
margin-top: -45px;
margin-bottom: 15px;
${mq[1]} {
margin-top: -20px;
margin-bottom: 30px;
}
}
.subtitle {
font-size: 30px;
line-height: 40px;
${mq[1]} {
font-size: 25px;
line-height: 29px;
}
}
`;

const StyledSectionHeaderH2 = styled(StyledSectionHeader)`
.title {
font-size: 48px;
${mq[1]} {
font-size: 34px;
}
}
.line {
margin-top: -15px;
margin-bottom: 15px;
${mq[1]} {
margin-top: -5px;
}
}
.subtitle {
font-size: 24px;
line-height: 32px;
${mq[1]} {
font-size: 18px;
line-height: 26px;
}
}
`;

interface SectionHeaderProps {
level: any;
title: string;
subtitle?: string;
dark?: boolean;
}

const SectionHeader = ({
level,
title,
subtitle,
dark,
}: SectionHeaderProps) => {
const Heading = level;

const StyledRoot =
level === 'h1' ? StyledSectionHeaderH1 : StyledSectionHeaderH2;

return (
<StyledRoot dark={!!dark}>
<Heading className="title">{title}</Heading>
<img className="line" src="/img/community/line.png" alt="line" />
{subtitle && <p className="subtitle">{subtitle}</p>}
</StyledRoot>
);
};

export default SectionHeader;
Loading

0 comments on commit 892de8a

Please sign in to comment.