Add weekly contests, bump to 1.1.5

pull/67/head
tobspr 4 years ago
parent 68f5010baa
commit 553442e953

@ -118,7 +118,7 @@
pointer-events: all; pointer-events: all;
@include S(width, 350px); @include S(width, 350px);
> strong { strong {
font-weight: bold; font-weight: bold;
} }
@ -139,6 +139,14 @@
background-color: rgb(250, 206, 206); background-color: rgb(250, 206, 206);
} }
} }
ul.bucketList {
padding-left: 30px;
li {
display: list-item;
}
}
} }
> .buttons { > .buttons {

@ -60,28 +60,17 @@
.mainWrapper { .mainWrapper {
@include S(padding, 0, 10px); @include S(padding, 0, 10px);
align-items: center; align-items: start;
justify-items: center; justify-items: center;
&.noDemo { @include S(grid-column-gap, 10px);
display: flex; display: grid;
flex-direction: column; grid-template-columns: 1fr 1fr;
align-items: center;
justify-content: center;
}
&.demo {
@include S(grid-column-gap, 10px);
display: grid;
grid-template-columns: 1fr 1fr;
}
.standaloneBanner { .standaloneBanner {
background: rgb(255, 234, 245); background: rgb(255, 234, 245);
@include S(border-radius, $globalBorderRadius); @include S(border-radius, $globalBorderRadius);
height: 100%;
box-sizing: border-box; box-sizing: border-box;
@include S(width, 300px);
@include S(padding, 15px); @include S(padding, 15px);
display: flex; display: flex;
@ -165,6 +154,44 @@
border: #{D(2px)} solid rgba(0, 10, 20, 0.1); border: #{D(2px)} solid rgba(0, 10, 20, 0.1);
} }
.sideContainer {
display: flex;
flex-direction: column;
@include S(width, 300px);
.standaloneBanner {
flex-grow: 1;
@include S(margin-bottom, 10px);
}
.contest {
flex-grow: 1;
background: rgb(32, 187, 166);
@include S(padding, 15px);
h3 {
@include Heading;
color: #fff;
font-weight: bold;
text-transform: uppercase;
@include S(margin-bottom, 5px);
}
p {
color: #fff;
@include Text;
strong {
font-weight: bold;
}
@include S(margin-bottom, 5px);
}
button {
background: #fff;
color: #333538;
}
}
}
.mainContainer { .mainContainer {
display: flex; display: flex;
align-items: center; align-items: center;

@ -1,4 +1,9 @@
export const CHANGELOG = [ export const CHANGELOG = [
{
version: "1.1.5",
date: "03.06.2020",
entries: ["Added weekly contests!"],
},
{ {
version: "1.1.4", version: "1.1.4",
date: "01.06.2020", date: "01.06.2020",

@ -83,7 +83,7 @@ export const globalConfig = {
debug: { debug: {
/* dev:start */ /* dev:start */
fastGameEnter: true, // fastGameEnter: true,
// noArtificialDelays: true, // noArtificialDelays: true,
// disableSavegameWrite: true, // disableSavegameWrite: true,
// showEntityBounds: true, // showEntityBounds: true,

@ -24,10 +24,6 @@ export class MainMenuState extends GameState {
<p>${T.demoBanners.intro}</p> <p>${T.demoBanners.intro}</p>
<ul>
${T.demoBanners.advantages.map(advantage => `<li>${advantage}</li>`).join("")}
</ul>
<a href="#" class="steamLink" target="_blank">Get the shapez.io standalone!</a> <a href="#" class="steamLink" target="_blank">Get the shapez.io standalone!</a>
`; `;
@ -54,18 +50,22 @@ export class MainMenuState extends GameState {
<div class="logo"> <div class="logo">
<img src="${cachebust("res/logo.png")}" alt="shapez.io Logo"> <img src="${cachebust("res/logo.png")}" alt="shapez.io Logo">
${
IS_DEMO && this.app.platformWrapper.getShowDemoBadges()
? `<div class="demoBadge"></div>`
: ""
}
</div> </div>
<div class="mainWrapper ${IS_DEMO ? "demo" : "noDemo"}"> <div class="mainWrapper ${IS_DEMO ? "demo" : "noDemo"}">
${IS_DEMO ? `<div class="standaloneBanner">${bannerHtml}</div>` : ""}
<div class="sideContainer">
${IS_DEMO ? `<div class="standaloneBanner">${bannerHtml}</div>` : ""}
<div class="contest">
<h3>${T.mainMenu.contests.contest_01_03062020.title}</h3>
<p>${T.mainMenu.contests.contest_01_03062020.desc}</p>
<button class="styledButton participateContest">${
T.mainMenu.contests.showInfo
}</button>
</div>
</div>
<div class="mainContainer"> <div class="mainContainer">
${ ${
isSupportedBrowser() isSupportedBrowser()
@ -220,6 +220,8 @@ export class MainMenuState extends GameState {
this.trackClicks(qs(".settingsButton"), this.onSettingsButtonClicked); this.trackClicks(qs(".settingsButton"), this.onSettingsButtonClicked);
this.trackClicks(qs(".changelog"), this.onChangelogClicked); this.trackClicks(qs(".changelog"), this.onChangelogClicked);
this.trackClicks(qs(".participateContest"), this.onContestClicked);
if (G_IS_STANDALONE) { if (G_IS_STANDALONE) {
this.trackClicks(qs(".exitAppButton"), this.onExitAppButtonClicked); this.trackClicks(qs(".exitAppButton"), this.onExitAppButtonClicked);
} }
@ -267,6 +269,15 @@ export class MainMenuState extends GameState {
this.moveToState("ChangelogState"); this.moveToState("ChangelogState");
} }
onContestClicked() {
this.app.analytics.trackUiClick("contest_click");
this.dialogs.showInfo(
T.mainMenu.contests.contest_01_03062020.title,
T.mainMenu.contests.contest_01_03062020.longDesc
);
}
renderSavegames() { renderSavegames() {
const oldContainer = this.htmlElement.querySelector(".mainContainer .savegames"); const oldContainer = this.htmlElement.querySelector(".mainContainer .savegames");
if (oldContainer) { if (oldContainer) {

@ -64,15 +64,9 @@ global:
demoBanners: demoBanners:
# This is the "advertisement" shown in the main menu and other various places # This is the "advertisement" shown in the main menu and other various places
title: Hey! title: Demo Version
intro: >- intro: >-
If you enjoy this game, please consider buying the full version! Get the standalone to unlock all features!
advantages:
- Unlimited savegames
- Waypoints
- Dark mode & more
- >-
Allow me to further develop shapez.io ❤️
mainMenu: mainMenu:
play: Play play: Play
@ -88,6 +82,28 @@ mainMenu:
savegameLevel: Level <x> savegameLevel: Level <x>
savegameLevelUnknown: Unknown Level savegameLevelUnknown: Unknown Level
contests:
contest_01_03062020:
title: "Contest #01"
desc: Win <strong>$25</strong> for the coolest base!
longDesc: >-
To give something back to you, I thought it would be cool to make weekly contests!
<br><br>
<strong>This weeks topic:</strong> Build the coolest base!
<br><br>
Here's the deal:<br>
<ul class="bucketList">
<li>Submit a screenshot of your base to <strong>contest@shapez.io</strong></li>
<li>Bonus points if you share it on social media!</li>
<li>I will choose 5 screenshots and propose it to the <strong>discord</strong> community to vote.</li>
<li>The winner gets <strong>$25</strong> (Paypal, Amazon Gift Card, whatever you prefer)</li>
<li>Deadline: 07.06.2020 12:00 CEST</li>
</ul>
<br>
I'm looking forward to seeing your awesome creations!
showInfo: Participate
dialogs: dialogs:
buttons: buttons:
ok: OK ok: OK
@ -153,7 +169,7 @@ dialogs:
leaveNotPossibleInDemo: leaveNotPossibleInDemo:
title: Demo version title: Demo version
desc: Your game was saved but you will not be able to restore it in the demo. Restoring your savegames is only possible in the full version. Are you sure? desc: Your game has been saved, but you will not be able to restore it in the demo. Restoring your savegames is only possible in the full version. Are you sure?
newUpdate: newUpdate:
title: Update available title: Update available

@ -1 +1 @@
1.1.4 1.1.5
Loading…
Cancel
Save