mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-11-14 19:14:56 -05:00
move About window styling into a CSS file
This commit is contained in:
parent
6b1d93fc93
commit
93a94d8253
3 changed files with 32 additions and 18 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -7,6 +7,7 @@
|
|||
# File types which we know are binary
|
||||
|
||||
# Prefer LF for most file types
|
||||
*.css text eol=lf
|
||||
*.htm text eol=lf
|
||||
*.html text eol=lf
|
||||
*.js text eol=lf
|
||||
|
|
26
src/renderer/about.css
Normal file
26
src/renderer/about.css
Normal file
|
@ -0,0 +1,26 @@
|
|||
html, body {
|
||||
color: white;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.aboutBox {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.aboutLogo {
|
||||
max-width: 10rem;
|
||||
max-height: 10rem;
|
||||
}
|
||||
|
||||
.aboutText {
|
||||
margin: 1.5rem;
|
||||
}
|
||||
|
||||
.aboutDetails {
|
||||
font-size: x-small;
|
||||
}
|
|
@ -3,33 +3,20 @@ import ReactDOM from 'react-dom';
|
|||
import {productName, version} from '../../package.json';
|
||||
|
||||
import logo from '../icon/ScratchDesktop.svg';
|
||||
import styles from './about.css';
|
||||
|
||||
// TODO: localization?
|
||||
const AboutElement = () => (
|
||||
<div
|
||||
style={{
|
||||
color: 'white',
|
||||
fontFamily: '"Helvetica Neue", Helvetica, Arial, sans-serif',
|
||||
fontWeight: 'bolder',
|
||||
margin: 0,
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
transform: 'translate(-50%, -50%)'
|
||||
}}
|
||||
>
|
||||
<div className={styles.aboutBox}>
|
||||
<div><img
|
||||
alt={`${productName} icon`}
|
||||
src={logo}
|
||||
style={{
|
||||
maxWidth: '10rem',
|
||||
maxHeight: '10rem'
|
||||
}}
|
||||
className={styles.aboutLogo}
|
||||
/></div>
|
||||
<div style={{margin: '1.5rem'}}>
|
||||
<div className={styles.aboutText}>
|
||||
<h2>{productName}</h2>
|
||||
<div>Version {version}</div>
|
||||
<table style={{fontSize: 'x-small'}}>
|
||||
<table className={styles.aboutDetails}>
|
||||
{
|
||||
['Electron', 'Chrome'].map(component => {
|
||||
const componentVersion = process.versions[component.toLowerCase()];
|
||||
|
|
Loading…
Reference in a new issue