Skip to content

Show status page in two columns #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _includes/learn_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ <h1>Learn Defold</h1>
<div class="row">
<div class="columns two"><br/></div>
<div class="columns eight">
<br/>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-gap: 2rem; padding: 0px;">
{% include card.html title="Examples" body="A selection of small and discrete code samples, examples and snippets to learn from." link="/examples" icon="/images/icons/icons-learn-export_ic-learn-lego.svg" %}

Expand Down
3 changes: 1 addition & 2 deletions _scss/defold.scss
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
}
/* Overide section padding in skeleton.css */
.section {
padding: 8rem 0 7rem;
padding: 3rem 0 7rem;
}
.section.narrow {
padding: 1rem 0 1rem;
Expand Down Expand Up @@ -1054,7 +1054,6 @@ ul.checkmark li:before {
******************************************************************************/
.card {
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
margin-bottom: 4rem;
border-radius: 4px;
background-color: white;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion authors.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>Authors</h1>
</div>
<div class="row" style="margin-bottom: 30px;">
<div class="columns twelve">
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-gap: 0 1rem;">
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-gap: 2rem;">
{%- for author in site.data.authorindex -%}
<div><a href="/authors/{{ author.id }}">{{ author.name }}</a>&nbsp;({{ author.assets.size }})</div>
{%- endfor -%}
Expand Down
2 changes: 2 additions & 0 deletions corporate-partnerships.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ <h5 class="center">$6000/year ($500/month)</h5>
</div>
</div>

</br>

<p>If you are unable to find a suitable corporate partnership level you can reach out to us at <a href="mailto: [email protected]">[email protected]</a> to discuss a custom partnership level.</p>

<h3>Apply for Defold corporate partnership</h3>
Expand Down
40 changes: 14 additions & 26 deletions status.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
---
layout: hero_and_text
title: Build server status page
description: Build server status page
description: The Defold build servers are provided as a free service to all developers. Refer to this page to check their availability.
nav: floating
heatmap: false
background: /images/hero/defold-top-bg-transparent-2.png
after: [always_free.html, learn_section.html, donors_and_partners.html]
---
<div id="stage" class="columns twelve">
<h2 class="panel-title">Stage server</h2>
<div id="prod" class="columns six">
<h2 class="panel-title">Production server</h2>
<div id="statusPanel" class="panel">
<div class="panel-heading">
<h3 id="statusTitle" class="panel-title">
</h3>
</div>
</div>
<div class="row clearfix">
<div class="columns six">
<div id="list-1"></div>
</div>
<div class="columns six">
<div id="list-2"></div>
</div>
<div id="grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-gap: 2rem; padding: 0px;">
</div>
</div>

<div id="prod" class="columns twelve">
<h2 class="panel-title">Production server</h2>
<div id="stage" class="columns six">
<h2 class="panel-title">Stage server</h2>
<div id="statusPanel" class="panel">
<div class="panel-heading">
<h3 id="statusTitle" class="panel-title">
</h3>
</div>
</div>
<div class="row clearfix">
<div class="columns six">
<div id="list-1"></div>
</div>
<div class="columns six">
<div id="list-2"></div>
</div>
<div id="grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-gap: 2rem; padding: 0px;">
</div>
</div>

<script type="text/javascript">
const OperationalStatus = "Operational";
const UnreachableStatus = "Unreachable";
Expand Down Expand Up @@ -74,22 +63,21 @@ <h3 id="statusTitle" class="panel-title">
function handleResponse(response, rootId) {
var totalFullyOperatedPlatforms = 0;
var totalUnreachablePlatforms = 0;
var parent_block_1 = document.getElementById(rootId).querySelector("#list-1");
var parent_block_2 = document.getElementById(rootId).querySelector("#list-2");
var idx = 0;
var parentGrid = document.getElementById(rootId).querySelector("#grid");
var platformCount = 0;
for (var key in response) {
addBlock(key, response[key], idx % 2 == 0 ? parent_block_1 : parent_block_2);
addBlock(key, response[key], parentGrid);
if (response[key] == OperationalStatus) {
totalFullyOperatedPlatforms++;
} else if (response[key] == UnreachableStatus) {
totalUnreachablePlatforms++;
}
idx++;
platformCount++;
}
if (totalUnreachablePlatforms == idx) {
if (totalUnreachablePlatforms == platformCount) {
document.getElementById(rootId).querySelector("#statusPanel").classList.add("panel-danger");
document.getElementById(rootId).querySelector("#statusTitle").textContent = UnreachableStatus;
} else if (totalFullyOperatedPlatforms == idx) {
} else if (totalFullyOperatedPlatforms == platformCount) {
document.getElementById(rootId).querySelector("#statusPanel").classList.add("panel-success");
document.getElementById(rootId).querySelector("#statusTitle").textContent = OperationalStatus;
} else {
Expand Down