switch div to sections

This commit is contained in:
MathuraMG 2016-08-12 14:19:23 -04:00
parent 8f68b3aa58
commit be010b8ac0
7 changed files with 19 additions and 21 deletions

View File

@ -99,14 +99,14 @@ class Editor extends React.Component {
render() {
return (
<div>
<div ref="container" className="editor-holder" tabIndex="0" title="code editor" role="main">
<section title="code editor" role="main">
<div ref="container" className="editor-holder" tabIndex="0">
</div>
<EditorAccessibility
lintMessages={this.props.lintMessages}
lineNo={this.props.lineNo}
/>
</div>
</section>
);
}
}

View File

@ -154,7 +154,7 @@ class Preferences extends React.Component {
>Off</button>
</div>
</div>
<div className="preference preference--hidden">
<div className="preference">
<h4 className="preference__title">Lint Warning Sound</h4>
<div className="preference__options">
<button

View File

@ -135,7 +135,7 @@ class PreviewFrame extends React.Component {
htmlHeadContents += '<script src="/data.js"></script>\n';
htmlHeadContents += '<script src="/interceptor-functions.js"></script>\n';
htmlHeadContents += '<script src="/intercept-p5.js"></script>\n';
htmlHeadContents += `<script type="text/javascript" src="http://chir.ag/projects/ntc/ntc.js"></script>`;
htmlHeadContents += '<script type="text/javascript" src="http://chir.ag/projects/ntc/ntc.js"></script>';
htmlFile = htmlFile.replace(/(?:<head.*?>)([\s\S]*?)(?:<\/head>)/gmi, `<head>\n${htmlHeadContents}\n</head>`);
// const htmlHead = htmlFile.match(/(?:<head.*?>)([\s\S]*?)(?:<\/head>)/gmi);
@ -170,15 +170,15 @@ class PreviewFrame extends React.Component {
render() {
return (
<iframe
className="preview-frame"
aria-label="sketch output"
role="main"
tabIndex="0"
frameBorder="0"
title="sketch output"
sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms"
/>
<iframe
className="preview-frame"
aria-label="sketch output"
role="main"
tabIndex="0"
frameBorder="0"
title="sketch output"
sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms"
/>
);
}
}

View File

@ -21,7 +21,7 @@ function Toolbar(props) {
});
return (
<div className="toolbar">
<section className="toolbar" title="toolbar" role="main">
<img className="toolbar__logo" src={logoUrl} alt="p5js Logo" />
<button className={playButtonClass} onClick={props.startSketch} aria-label="play sketch">
<InlineSVG src={playUrl} alt="Play Sketch" />
@ -55,7 +55,7 @@ function Toolbar(props) {
>
<InlineSVG src={preferencesUrl} alt="Show Preferences" />
</button>
</div>
</section>
);
}

View File

@ -71,6 +71,7 @@
color: $light-primary-text-color;
background-color: $light-modal-button-background-color;
padding: 0;
margin-bottom: #{20 / $base-font-size}rem;
line-height: #{50 / $base-font-size}rem;
& g {
fill: $light-primary-text-color;

View File

@ -35,7 +35,7 @@
.preference {
display: flex;
flex-wrap: wrap;
padding-bottom: #{40 / $base-font-size}rem;
padding-bottom: #{12 / $base-font-size}rem;
& + & {
border-top: 2px dashed $light-button-border-color;
}

View File

@ -1,9 +1,6 @@
var shadowDOMElement;
var canvasLocation ='';
//for object in setpu (??)
funcNames = refData["classitems"].map(function(x){
return {
name: x["name"],
@ -15,7 +12,7 @@ funcNames = refData["classitems"].map(function(x){
});
funcNames = funcNames.filter(function(x) {
let className = x["class"];
var className = x["class"];
return (x["name"] && x["params"] && (className==='p5'));
})