Skip to content

Commit 6ffe21d

Browse files
authored
Merge branch 'develop' into themify-lader
2 parents 5c74357 + 2cd9067 commit 6ffe21d

File tree

4 files changed

+48
-16
lines changed

4 files changed

+48
-16
lines changed

client/common/icons.jsx

+15-15
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,28 @@ import CircleInfo from '../images/circle-info.svg';
2929
// could also give these a default size, color, etc. based on the theme
3030
// Need to add size to these - like small icon, medium icon, large icon. etc.
3131
function withLabel(SvgComponent) {
32-
const Icon = (props) => {
33-
const StyledIcon = styled(SvgComponent)`
34-
&&& {
35-
color: ${prop('Icon.default')};
32+
const StyledIcon = styled(SvgComponent)`
33+
&&& {
34+
color: ${prop('Icon.default')};
35+
& g,
36+
& path,
37+
& polygon {
38+
opacity: 1;
39+
fill: ${prop('Icon.default')};
40+
}
41+
&:hover {
42+
color: ${prop('Icon.hover')};
3643
& g,
3744
& path,
3845
& polygon {
3946
opacity: 1;
40-
fill: ${prop('Icon.default')};
41-
}
42-
&:hover {
43-
color: ${prop('Icon.hover')};
44-
& g,
45-
& path,
46-
& polygon {
47-
opacity: 1;
48-
fill: ${prop('Icon.hover')};
49-
}
47+
fill: ${prop('Icon.hover')};
5048
}
5149
}
52-
`;
50+
}
51+
`;
5352

53+
const Icon = (props) => {
5454
const { 'aria-label': ariaLabel } = props;
5555
if (ariaLabel) {
5656
return (

client/modules/IDE/components/About.jsx

+14
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import React from 'react';
2+
import { useSelector } from 'react-redux';
23
import { Helmet } from 'react-helmet';
34
import { useTranslation } from 'react-i18next';
45
import { Link } from 'react-router';
56
import SquareLogoIcon from '../../../images/p5js-square-logo.svg';
67
// import PlayIcon from '../../../images/play.svg';
78
import AsteriskIcon from '../../../images/p5-asterisk.svg';
9+
import packageData from '../../../../package.json';
810

911
function About(props) {
1012
const { t } = useTranslation();
13+
const p5version = useSelector((state) => {
14+
const index = state.files.find((file) => file.name === 'index.html');
15+
return index?.content.match(/\/p5\.js\/([\d.]+)\//)?.[1];
16+
});
1117
return (
1218
<div className="about__content">
1319
<Helmet>
@@ -20,6 +26,14 @@ function About(props) {
2026
aria-label={t('Common.p5logoARIA')}
2127
focusable="false"
2228
/>
29+
<div className="about__content-column">
30+
<p className="about__version-info">
31+
Web Editor: <span>v{packageData?.version}</span>
32+
</p>
33+
<p className="about__version-info">
34+
p5.js: <span>v{p5version}</span>
35+
</p>
36+
</div>
2337
</div>
2438
<div className="about__content-column">
2539
<h3 className="about__content-column-title">{t('About.NewP5')}</h3>

client/modules/Preview/EmbedFrame.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function injectLocalFiles(files, htmlFile, options) {
227227
const accessiblelib = sketchDoc.createElement('script');
228228
accessiblelib.setAttribute(
229229
'src',
230-
'https://cdn.jsdelivr.net/gh/processing/p5.accessibility@v0.1.1/dist/p5.accessibility.js'
230+
'https://cdn.jsdelivr.net/gh/processing/p5.accessibility@0.1.1/dist/p5-accessibility.js'
231231
);
232232
const accessibleOutputs = sketchDoc.createElement('section');
233233
accessibleOutputs.setAttribute('id', 'accessible-outputs');

client/styles/components/_about.scss

+18
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@
7474
}
7575
}
7676

77+
.about__version-info {
78+
@include themify() {
79+
padding-top: #{8 / $base-font-size}rem;
80+
font-size: #{16 / $base-font-size}rem;
81+
span {
82+
color: getThemifyVariable('logo-color');
83+
}
84+
&:first-child {
85+
padding-top: #{30 /$base-font-size}rem;
86+
}
87+
}
88+
// span {
89+
// @include themify() {
90+
// fill: getThemifyVariable('logo-color');
91+
// }
92+
// }
93+
}
94+
7795
.about__footer {
7896
display: flex;
7997
justify-content: space-between;

0 commit comments

Comments
 (0)