mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-11 20:20:50 +02:00
lil more finishing
This commit is contained in:
@ -16,6 +16,9 @@ class JS13K extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const codeSizeInKb = this.props.codeSize
|
||||
? (this.props.codeSize / 1024).toFixed(2)
|
||||
: 0;
|
||||
return (
|
||||
<div class="flex flex-v-center">
|
||||
<img
|
||||
@ -23,13 +26,16 @@ class JS13K extends Component {
|
||||
alt="JS13K Games logo"
|
||||
height="24"
|
||||
/>{' '}
|
||||
<div class="footer__js13k-text">{this.state.daysLeft} days to go</div>
|
||||
<div class="footer__js13k-days-left">
|
||||
{this.state.daysLeft} days to go
|
||||
</div>
|
||||
<div
|
||||
class="footer__js13k-code-size"
|
||||
style={{
|
||||
color: this.props.codeSize > 10 ? 'crimson' : 'limegreen'
|
||||
color: codeSizeInKb > 10 ? 'crimson' : 'limegreen'
|
||||
}}
|
||||
>
|
||||
{(this.props.codeSize / 1024).toFixed(2)} KB/ 13KB
|
||||
{codeSizeInKb} KB/ 13KB
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -120,9 +126,11 @@ export default class Footer extends Component {
|
||||
</div>
|
||||
|
||||
{this.props.prefs.isJs13kModeOn ? (
|
||||
<div class="flex">
|
||||
<div class="flex flex-v-center">
|
||||
<JS13K codeSize={this.props.codeSize} />
|
||||
<button onClick={this.props.onJs13KBtnClick}>Help</button>
|
||||
<button class="dark-btn" onClick={this.props.onJs13KBtnClick}>
|
||||
JS13KGames Help
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
@ -1076,11 +1076,11 @@ export default class App extends Component {
|
||||
var fileContent = getCompleteHtml(html, css, js, item, true);
|
||||
|
||||
var zip = new JSZip();
|
||||
// Add an top-level, arbitrary text file with contents
|
||||
zip.file('index.html', fileContent);
|
||||
[result[3]].map(externalLib =>
|
||||
zip.file(externalLib.name, externalLib.code)
|
||||
);
|
||||
for (let i = 3; i < result.length; i++) {
|
||||
const externalLib = result[i];
|
||||
zip.file(externalLib.name, externalLib.code);
|
||||
}
|
||||
|
||||
console.log('ORIGINAL', this.calculateTextSize(fileContent));
|
||||
|
||||
|
@ -15,8 +15,7 @@ body {
|
||||
font-size: 87.5%;
|
||||
/* speocifically for mobile when keyboard is open */
|
||||
position: relative;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
|
||||
sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||
}
|
||||
|
||||
h1 {
|
||||
@ -224,8 +223,7 @@ textarea {
|
||||
}
|
||||
|
||||
.btn--primary {
|
||||
background: var(--color-button)
|
||||
linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0px, transparent);
|
||||
background: var(--color-button) linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0px, transparent);
|
||||
color: white;
|
||||
}
|
||||
|
||||
@ -600,11 +598,7 @@ body > #demo-frame {
|
||||
margin-left: 10px;
|
||||
padding: 0px 8px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.9);
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(0, 0, 0, 0.5) 0,
|
||||
rgba(255, 255, 255, 0.1) 100%
|
||||
);
|
||||
background: linear-gradient( 180deg, rgba(0, 0, 0, 0.5) 0, rgba(255, 255, 255, 0.1) 100%);
|
||||
/*text-shadow: 0px 1px 1px rgba(0,0,0,1);*/
|
||||
box-shadow: 0 -1px 0px 0 rgba(255, 255, 255, 0.15);
|
||||
text-transform: uppercase;
|
||||
@ -1469,8 +1463,7 @@ body:not(.is-app) .show-when-app {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background: white
|
||||
url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width:32px;height:32px" viewBox="0 0 24 24"><path fill="limegreen" d="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z" /></svg>');
|
||||
background: white url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width:32px;height:32px" viewBox="0 0 24 24"><path fill="limegreen" d="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z" /></svg>');
|
||||
}
|
||||
|
||||
.bookmarklet {
|
||||
@ -1509,13 +1502,16 @@ body:not(.is-app) .show-when-app {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.footer__js13k-text {
|
||||
.footer__js13k-days-left {
|
||||
padding: 1px 9px;
|
||||
text-transform: uppercase;
|
||||
background: #b12a34;
|
||||
color: white;
|
||||
border-radius: 3px;
|
||||
letter-spacing: 0.7px;
|
||||
}
|
||||
|
||||
.footer__js13k-code-size {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user