Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
make site valid in accordance to W3C validator..
Browse files Browse the repository at this point in the history
Fixes gitpod-io/website#842
  • Loading branch information
nisarhassan12 committed Jan 18, 2021
1 parent 49c7da9 commit cdd3bac
Show file tree
Hide file tree
Showing 25 changed files with 123 additions and 96 deletions.
10 changes: 7 additions & 3 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const StyledBanner = styled.header`
text-align: center;
}
.sub {
display: block;
}
.para {
margin-top: 3rem;
Expand Down Expand Up @@ -76,10 +80,10 @@ const Banner: React.SFC<BannerProps> = ({ subtitle, title, paragraph, linkPath,
<div className="row pattern">
<StyledBanner role="banner" className="banner">
<div className="banner__text">
<header>
<p className="sub h3">{subtitle}</p>
<h1>
<span className="sub h3">{subtitle}</span>
{title}
</header>
</h1>
{paragraph ? <p className="para">{paragraph}</p> : null}
{link(linkPath, linkText, '', true, false)}
{children}
Expand Down
21 changes: 8 additions & 13 deletions src/components/FeatureCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import { sizes } from '../styles/variables'
import Pattern from '../resources/pattern-2.jpg'
import IconTick from '../resources/icon-tick-2.svg'

const Styled = styled.div<{
direction?: string
flexDirectionColumnForImgContainer?: boolean
opposite?: boolean
hasFigFootnote?: boolean
}>`
const Styled = styled.div<any>`
display: flex;
justify-content: space-between;
position: relative;
Expand Down Expand Up @@ -43,7 +38,7 @@ const Styled = styled.div<{
&:nth-of-type(2n) {
@media (min-width: 1141px) {
flex-direction: ${({ opposite }) => (opposite ? 'reverse' : 'row-reverse')};
flex-direction: ${({ opposite }) => (opposite ? 'row' : 'row-reverse')};
}
@media (min-width: 1141px) {
Expand Down Expand Up @@ -130,15 +125,15 @@ const Styled = styled.div<{
}
@media (min-width: 1141px) {
padding-right: ${({ direction }) => (direction === 'right' ? '8rem' : '')};
padding-left: ${({ direction }) => (!(direction === 'right') ? '8rem' : '')};
padding-right: ${(props) => (props["data-direction"] === 'right' ? '8rem' : '')};
padding-left: ${(props) => (!(props["data-direction"] === 'right') ? '8rem' : '')};
min-height: 520px;
max-height: 500px;
flex: 0 0 52%;
&::before {
left: ${({ direction }) => (direction === 'right' ? '' : 0)};
right: ${({ direction }) => (!(direction === 'right') ? '' : 0)};
left: ${(props) => (props["data-direction"] === 'right' ? '' : 0)};
right: ${(props) => (!(props["data-direction"] === 'right') ? '' : 0)};
width: 60vw;
}
}
Expand Down Expand Up @@ -181,7 +176,7 @@ const Styled = styled.div<{
.in-view::before {
@media (min-width: 1141px) {
animation: ${({ direction }) => (direction === 'right' ? 'slideInLeft' : 'slideInRight')} 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1 normal
animation: ${(props) => (props["data-direction"] === 'right' ? 'slideInLeft' : 'slideInRight')} 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1 normal
forwards;
}
}
Expand Down Expand Up @@ -301,7 +296,7 @@ const FeatureCard = ({
return (
<Styled
className="row"
direction={direction}
data-direction={direction}
flexDirectionColumnForImgContainer={featuresList && featuresList.length ? true : false}
opposite={opposite}
hasFigFootnote={hasFigFootnote}
Expand Down
22 changes: 19 additions & 3 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,26 @@ const StyledFooter = styled.footer`
flex-wrap: wrap;
@media(max-width: 650px) {
justify-content: space-between;
justify-content: center;
ul {
padding-bottom: 4rem;
border-bottom: 1px solid #ddd;
width: 48%;
text-align: center;
@media(max-width: 650px) {
width: 46%;
margin-left: 2%;
margin-right: 2%;
}
@media(max-width: 400px) {
width: 48%;
margin-left: 1%;
margin-right: 1%;
}
&:not(:last-child) {
margin-bottom: 5rem;
}
Expand All @@ -34,13 +46,16 @@ const StyledFooter = styled.footer`
img {
transform: translateX(1rem);
}
@media(max-width: 650px) {
transform: none;
}
}
}
}
}
li {
&:not(:last-child) {
margin-bottom: 1.6rem;
}
Expand Down Expand Up @@ -79,6 +94,8 @@ const StyledFooter = styled.footer`
}
.contact {
max-width: 11rem;
li:not(:first-child) {
display: inline-block;
margin-left: 2rem;
Expand Down Expand Up @@ -173,7 +190,6 @@ const Footer: React.SFC<{}> = () => (
</svg>
</a>
</li>
<br aria-hidden={true} />
<li>
<a href="https://twitter.com/gitpod" target="_blank" rel="noopener" title="Twitter">
<svg
Expand Down
4 changes: 2 additions & 2 deletions src/components/MoreInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ const PricingLinks = ({ img, title, text, links, backgroundShouldBeWhite }: Pric
return (
<div
className="pattern-bg"
style={{ marginBottom: backgroundShouldBeWhite ? '' : '10rem', background: backgroundShouldBeWhite ? 'none' : '' }}
style={{ marginBottom: backgroundShouldBeWhite ? '' : '10rem', ...(backgroundShouldBeWhite && {background: 'none'}) }}
>
<div className="row">
<StyledPricingLinks>
{Img}
<div>
<h2>{Title}</h2>
<p>{Text}</p>
{Text}
<span className="btn-wrapper">{Links}</span>
</div>
</StyledPricingLinks>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ const Nav = () => {
<div className="nav__burger-container">
<Link to="/"><img alt="Gitpod Logo" src={GitpodLogoDark} /></Link>
<div className="btns">
<a href="https://gitpod.io/login/" rel="noopener" style={{ display: isNavRendered ? 'none' : '' }}>Log In</a>
<a href="https://gitpod.io/login/" rel="noopener" style={{...(isNavRendered && { display: 'none'})}}>Log In</a>
<div className="nav__btn-container" aria-live="assertive">
<button
className="nav__btn"
Expand Down
8 changes: 5 additions & 3 deletions src/components/PopOver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const StyledDescripion = styled.span`
}
`

class Description extends React.Component<{ description: string | JSX.Element; textPosition?: string }, {}> {
class Description extends React.Component<{ description: string | JSX.Element; textPosition?: string; questionMarkShouldNotBeAButton?: boolean }, {}> {
state = {
isRendered: false
}
Expand All @@ -96,7 +96,7 @@ class Description extends React.Component<{ description: string | JSX.Element; t

render() {
const { isRendered } = this.state
const { description } = this.props
const { description, questionMarkShouldNotBeAButton } = this.props
const positionBottom = this.props.textPosition === 'bottom'

return (
Expand All @@ -107,7 +107,9 @@ class Description extends React.Component<{ description: string | JSX.Element; t
onFocus={this.handleMouseEnter}
onBlur={this.handleMouseLeave}
>
<button onClick={this.handleClick}>?</button>
{
questionMarkShouldNotBeAButton ? <span onClick={this.handleClick} tabIndex={1}>?</span> : <button onClick={this.handleClick}>?</button>
}
{isRendered ? <div className={`${positionBottom ? 'bottom' : ''} description__text`}>{description}</div> : null}
</StyledDescripion>
)
Expand Down
6 changes: 3 additions & 3 deletions src/components/TrustedBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const StyledTrustedBy = styled.section`
}
`

const StyledBrandImage = styled.img<{ transform?: string }>`
const StyledBrandImage = styled.img<{ transformValue?: string }>`
width: 9.5rem;
@media(max-width: ${sizes.breakpoints.lg}) {
Expand All @@ -90,7 +90,7 @@ const StyledBrandImage = styled.img<{ transform?: string }>`
}
@media(min-width: calc(${sizes.breakpoints.lg} + 1px)) {
transform: ${({ transform }) => (transform ? transform : 'none')};
transform: ${({ transformValue }) => (transformValue ? transformValue : 'none')};
}
`

Expand All @@ -117,7 +117,7 @@ const TrustedBy = ({ brands, title, styles }: TrustedByProps) => (
<div className="logos">
{brands.map((b: Brand) => (
<a href={b.url} target="_blank" className="trustedBy">
<StyledBrandImage src={b.svg} alt={b.alt} transform={b.transform} className={b.className} />
<StyledBrandImage src={b.svg} alt={b.alt} transformValue={b.transform} className={b.className} />
</a>
))}
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/components/blog/PostPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const StyledPostPreview = styled.div`
font-weight: 400;
flex-wrap: wrap;
}
.author-name {
font-weight: 600;
}
`

interface BlogData {
Expand Down Expand Up @@ -102,7 +106,7 @@ const PostPreview: React.SFC<PostPreviewProps> = (props) => {
<span>
by {
authors.map((author, idx) => <React.Fragment>
<a href={`https://github.com/${author.socialProfiles.github}`} target="_blank">{author.name}</a>{idx < authors.length - 1 ? ', ' : ''}
<span className="author-name">{author.name}</span>{idx < authors.length - 1 ? ', ' : ''}
</React.Fragment>)
}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/features/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Intro = () => (
<div className="row">
<Styled>
<section className="intro pattern">
<object role="presentation" tabIndex={-1} data={IceStick} className="ice-stick" />
<object tabIndex={-1} data={IceStick} className="ice-stick" />
<h1>Features</h1>
<div className="features">
{features.map((f, i) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/index/GetStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const GetStarted = () => (
{projects.map((project, i) => (
<Project
key={i}
image={<object role="presentation" tabIndex={-1} data={project.image} />}
image={<object tabIndex={-1} data={project.image} />}
title={project.title}
githubUrl={project.githubUrl}
gitlabUrl={project.gitlabUrl}
Expand Down
50 changes: 25 additions & 25 deletions src/components/index/PrefixInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,41 +272,41 @@ const PrefixInput = () => {

return (
<Styled>
<div className="header" aria-hidden="true">
<div className="dots">
<span className="header" aria-hidden="true">
<span className="dots">
<span>&nbsp;</span>
<span>&nbsp;</span>
<span>&nbsp;</span>
</div>
<div className="tab">
<div className="bar">
</span>
<span className="tab">
<span className="bar">
&nbsp;
</div>
</span>
<img src={Close} />
</div>
<div className="new-tab">
</span>
<span className="new-tab">
<img src={Plus} />
</div>
</div>
<div className="main">
<div className="bar-container" aria-hidden="true">
<div className="bar">&nbsp;</div>
<div className="bar">&nbsp;</div>
<div className="bar">&nbsp;</div>
</div>
<div className="input-container">
<div className="label">
</span>
</span>
<span className="main">
<span className="bar-container" aria-hidden="true">
<span className="bar">&nbsp;</span>
<span className="bar">&nbsp;</span>
<span className="bar">&nbsp;</span>
</span>
<span className="input-container">
<span className="label">
<img src={World} aria-hidden="true" />
<span>https://gitpod.io/#</span>
</div>
</span>
<span className="wrapper">
<input
defaultValue={url}
onKeyPress={handleReturn}
onChange={handleChange}
type="text"
/>
<div className="message" style={ error ? {color: '#bf4338'} : {}}>
<span className="message" style={ error ? {color: '#bf4338'} : {}}>
<>
<p>
{ error ? error : 'Enter your GitLab, GitHub, or Bitbucket URL' }
Expand All @@ -320,13 +320,13 @@ const PrefixInput = () => {
Start Workspace
</a>
</>
</div>
</span>
</span>
</div>
</div>
<div className="info">
</span>
</span>
<span className="info">
&nbsp;
</div>
</span>
</Styled>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/index/TextFeature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TextFeature = ({ path, alt, title, text, btnText, href }: TextFeatureProps
<h3>
<strong>{title}</strong>
</h3>
<p>{text}</p>
<>{text}</>
{btnText ? (
<a href={href} target="_blank" className="btn">
{btnText}
Expand Down
Loading

0 comments on commit cdd3bac

Please sign in to comment.