fix aria issues and run prettier

This commit is contained in:
Karol Wypchlo 2020-02-21 11:09:38 +01:00
parent 36b7eb92b5
commit 2f42639884
5 changed files with 20 additions and 37 deletions

View File

@ -3,7 +3,7 @@ module.exports = {
title: `Skynet`,
description: `Skynet is a decentralized file sharing and content distribution protocol.`,
author: `Nebulous`,
siteUrl: 'https://siasky.net'
siteUrl: `https://siasky.net`
},
plugins: [
`gatsby-plugin-sass`,

View File

@ -1,15 +1,15 @@
import React, { useState } from "react";
import classNames from "classnames";
import { Light as SyntaxHighlighter } from "react-syntax-highlighter";
import { javascript, go, python, bash } from 'react-syntax-highlighter/dist/esm/languages/hljs';
import { javascript, go, python, bash } from "react-syntax-highlighter/dist/esm/languages/hljs";
import Colors from "./Colors";
import * as snippets from "./Code";
import "./CodeExamples.scss";
SyntaxHighlighter.registerLanguage('javascript', javascript);
SyntaxHighlighter.registerLanguage('go', go);
SyntaxHighlighter.registerLanguage('python', python);
SyntaxHighlighter.registerLanguage('bash', bash);
SyntaxHighlighter.registerLanguage("javascript", javascript);
SyntaxHighlighter.registerLanguage("go", go);
SyntaxHighlighter.registerLanguage("python", python);
SyntaxHighlighter.registerLanguage("bash", bash);
export default function CodeExamples() {
const [active, setActive] = useState(1);

View File

@ -96,8 +96,8 @@ export default class HomeUpload extends Component {
<p>Paste the link to retrieve your file</p>
<form className="home-upload-retrieve-form" onSubmit={this.handleSkylink}>
<input name="skylink" type="text" placeholder="sia://" />
<button type="submit">
<input name="skylink" type="text" placeholder="sia://" aria-labelledby="Skylink" />
<button type="submit" aria-label="Retrieve file">
<DownArrow />
</button>
</form>

View File

@ -20,7 +20,13 @@ const CustomForm = ({ status, message, onValidated, light, id }) => {
return (
<form className={classNames("home-stay-form", { light })} onSubmit={e => e.preventDefault()}>
<input ref={node => (email = node)} type="email" placeholder="Email Address" validate="true" />
<input
ref={node => (email = node)}
type="email"
placeholder="Email Address"
validate="true"
aria-labelledby="Email Address"
/>
<div className="home-form-stay-existing">
<input ref={node => (user = node)} type="checkbox" id={id} />
<label htmlFor={id}>I have previous experience using Sia</label>

View File

@ -10,29 +10,10 @@ export default function TopSwoosh({ ...props }) {
{...props}
>
<defs>
<filter
id="a"
width="103.4%"
height="103.4%"
x="-1.7%"
y="-1.7%"
filterUnits="objectBoundingBox"
>
<feMorphology
in="SourceAlpha"
operator="dilate"
radius="1"
result="shadowSpreadOuter1"
></feMorphology>
<feOffset
in="shadowSpreadOuter1"
result="shadowOffsetOuter1"
></feOffset>
<feMorphology
in="SourceAlpha"
radius="1"
result="shadowInner"
></feMorphology>
<filter id="a" width="103.4%" height="103.4%" x="-1.7%" y="-1.7%" filterUnits="objectBoundingBox">
<feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"></feMorphology>
<feOffset in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<feMorphology in="SourceAlpha" radius="1" result="shadowInner"></feMorphology>
<feOffset in="shadowInner" result="shadowInner"></feOffset>
<feComposite
in="shadowOffsetOuter1"
@ -40,11 +21,7 @@ export default function TopSwoosh({ ...props }) {
operator="out"
result="shadowOffsetOuter1"
></feComposite>
<feGaussianBlur
in="shadowOffsetOuter1"
result="shadowBlurOuter1"
stdDeviation="4"
></feGaussianBlur>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="4"></feGaussianBlur>
<feColorMatrix
in="shadowBlurOuter1"
values="0 0 0 0 0.341176471 0 0 0 0 0.709803922 0 0 0 0 0.376470588 0 0 0 0.3 0"