mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-08 10:34:55 +02:00
lil more finishing
This commit is contained in:
parent
800504e1fd
commit
df4b5a749d
@ -16,6 +16,9 @@ class JS13K extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const codeSizeInKb = this.props.codeSize
|
||||||
|
? (this.props.codeSize / 1024).toFixed(2)
|
||||||
|
: 0;
|
||||||
return (
|
return (
|
||||||
<div class="flex flex-v-center">
|
<div class="flex flex-v-center">
|
||||||
<img
|
<img
|
||||||
@ -23,13 +26,16 @@ class JS13K extends Component {
|
|||||||
alt="JS13K Games logo"
|
alt="JS13K Games logo"
|
||||||
height="24"
|
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
|
<div
|
||||||
|
class="footer__js13k-code-size"
|
||||||
style={{
|
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>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -120,9 +126,11 @@ export default class Footer extends Component {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{this.props.prefs.isJs13kModeOn ? (
|
{this.props.prefs.isJs13kModeOn ? (
|
||||||
<div class="flex">
|
<div class="flex flex-v-center">
|
||||||
<JS13K codeSize={this.props.codeSize} />
|
<JS13K codeSize={this.props.codeSize} />
|
||||||
<button onClick={this.props.onJs13KBtnClick}>Help</button>
|
<button class="dark-btn" onClick={this.props.onJs13KBtnClick}>
|
||||||
|
JS13KGames Help
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
@ -1076,11 +1076,11 @@ export default class App extends Component {
|
|||||||
var fileContent = getCompleteHtml(html, css, js, item, true);
|
var fileContent = getCompleteHtml(html, css, js, item, true);
|
||||||
|
|
||||||
var zip = new JSZip();
|
var zip = new JSZip();
|
||||||
// Add an top-level, arbitrary text file with contents
|
|
||||||
zip.file('index.html', fileContent);
|
zip.file('index.html', fileContent);
|
||||||
[result[3]].map(externalLib =>
|
for (let i = 3; i < result.length; i++) {
|
||||||
zip.file(externalLib.name, externalLib.code)
|
const externalLib = result[i];
|
||||||
);
|
zip.file(externalLib.name, externalLib.code);
|
||||||
|
}
|
||||||
|
|
||||||
console.log('ORIGINAL', this.calculateTextSize(fileContent));
|
console.log('ORIGINAL', this.calculateTextSize(fileContent));
|
||||||
|
|
||||||
|
@ -15,8 +15,7 @@ body {
|
|||||||
font-size: 87.5%;
|
font-size: 87.5%;
|
||||||
/* speocifically for mobile when keyboard is open */
|
/* speocifically for mobile when keyboard is open */
|
||||||
position: relative;
|
position: relative;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||||
sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@ -224,8 +223,7 @@ textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn--primary {
|
.btn--primary {
|
||||||
background: var(--color-button)
|
background: var(--color-button) linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0px, transparent);
|
||||||
linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0px, transparent);
|
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -600,11 +598,7 @@ body > #demo-frame {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
padding: 0px 8px;
|
padding: 0px 8px;
|
||||||
border: 1px solid rgba(0, 0, 0, 0.9);
|
border: 1px solid rgba(0, 0, 0, 0.9);
|
||||||
background: linear-gradient(
|
background: linear-gradient( 180deg, rgba(0, 0, 0, 0.5) 0, rgba(255, 255, 255, 0.1) 100%);
|
||||||
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);*/
|
/*text-shadow: 0px 1px 1px rgba(0,0,0,1);*/
|
||||||
box-shadow: 0 -1px 0px 0 rgba(255, 255, 255, 0.15);
|
box-shadow: 0 -1px 0px 0 rgba(255, 255, 255, 0.15);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@ -1469,8 +1463,7 @@ body:not(.is-app) .show-when-app {
|
|||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: white
|
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>');
|
||||||
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 {
|
.bookmarklet {
|
||||||
@ -1509,13 +1502,16 @@ body:not(.is-app) .show-when-app {
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer__js13k-text {
|
.footer__js13k-days-left {
|
||||||
padding: 1px 9px;
|
padding: 1px 9px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
background: #b12a34;
|
background: #b12a34;
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
letter-spacing: 0.7px;
|
letter-spacing: 0.7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer__js13k-code-size {
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user