...
 
Commits (16)
......@@ -6,12 +6,18 @@ In config ([_config.yml]) you need to change this line to your own.
```
title: example status
description: example description to site
url: 'https://example.com'
baseurl: '/status' # if you want to connect your own domain to the status of the quotation marks leave blank or remove this line.
url: 'https://example.com'
repository: 'https://example.gitlab.com/example-name/example-project'
email: admin@example.com
email:
to: admin@example.com
subject: Report
body: You report
footer_name: Report on Email
twitter:
username: examplestatus
body: You report
footer_name: Report on Twitter
widget: true
rows: 10 # example, default 8
```
......@@ -24,7 +30,6 @@ timezone: Europe/Moscow # example
## How to create incident
There are 3 types of incident [danger], [warning], [success].
You can use these drafts as you want, just note that the history displays danger incident.
Posts need to be created in the folder [_posts]
## Schedules
......
......@@ -2,7 +2,7 @@ source "https://rubygems.org"
ruby RUBY_VERSION
# This will help ensure the proper Jekyll version is running.
gem "jekyll", "3.8.1"
gem "jekyll", "3.8.2"
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
......
......@@ -4,9 +4,15 @@ description: Information on the status of tophackr services.
url: 'https://status.tophackr.com'
baseurl: # /status
repository: 'https://gitlab.com/tophackr/status'
email: tophackr@icloud.com
email:
to: tophackr@icloud.com
subject: Report
body: You report
footer_name: Report on Email
twitter:
username: tophackrstatus
body: You report
footer_name: Report on Twitter
widget: false
rows: # default 8
......
<br>
<div class="row justify-content-center">
<div class="col-md-{{ site.rows | default: 8 }}">
<div class="card">
<div class="card-body">
<a href="{% if page.layout == 'default' %}{{ '/history/' | absolute_url }}{% else %}{{ '/' | absolute_url }}{% endif %}" class="float-left small text-muted">
<i class="fas fa-long-arrow-alt-left"></i>
&nbsp;{% if page.layout == 'post' or page.url == '/history/' %}Current Status{% elsif page.layout == 'default' %}Incidents history{% else %}Back to home{% endif %}
</a>
<a href="{{ '/edit/master/' | prepend: site.repository | append: page.path }}" class="float-right small text-muted">
<i class="fas fa-code-branch"></i>
&nbsp;Edit on GitLab
</a>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<a href="{% if page.layout == 'default' %}{{ '/incidents/' | absolute_url }}{% else %}{{ '/' | absolute_url }}{% endif %}" class="float-left small text-muted">
<i class="fas fa-long-arrow-alt-left"></i>
&nbsp;{%- if page.layout == 'post' or page.url == '/incidents/' -%}Current Status{%- elsif page.layout == 'default' -%}Incidents history{%- else -%}Back to home{%- endif -%}
</a>
<a href="{{ '/edit/master/' | prepend: site.repository | append: page.path }}" class="float-right small text-muted">
<i class="fas fa-code-branch"></i>
&nbsp;Edit on GitLab
</a>
</li>
</ul>
</div>
</div>
</div>
{% comment %}
<!--
#
# Create valid email url
#
-->
{% endcomment %}
{%- assign email_subject = site.email.subject | url_encode -%}
{%- assign email_body = site.email.body | url_encode -%}
{%- assign email_url = site.email.to | prepend: 'mailto:' | append: '?subject=' | append: email_subject | append: '&body=' | append: email_body -%}
{% comment %}
<!--
#
# Create valid twitter url
#
-->
{% endcomment %}
{%- assign twitter_body = site.twitter.body | url_encode -%}
{%- assign twitter_url = site.twitter.username | prepend: '&via=' | prepend: twitter_body | prepend: 'https://twitter.com/intent/tweet?text=' -%}
<br><br>
{% include config.html %}
<br>
<footer class="container font-weight-light">
<div class="row justify-content-center">
<div class="col-md-{{ site.rows | default: 8 }}">
{% assign email_body = 'You report' | url_encode %}
{% assign email_subject = 'Report' %}
{% assign twitter_body = site.twitter.username | prepend: '@' | append: ' You report' | url_encode %}
<div class="col-md-{{ site.rows | default: 8 }} small">
<ul class="float-left list-inline">
<a href="{{ site.email | prepend: 'mailto:' | append: '?subject=' | append: email_subject | append: '&body=' | append: email_body }}" class="list-inline-item">Report on Email</a>
<a href="{{ 'https://twitter.com/intent/tweet?text=' | append: twitter_body }}" class="list-inline-item">Report on Twitter</a>
<a href="{{ email_url }}" class="list-inline-item">{{ site.email.footer_name }}</a>
<a href="{{ twitter_url }}" class="list-inline-item">{{ site.twitter.footer_name }}</a>
</ul>
<span class="float-right">
Powered by <a href="https://tophackr.com">tophackr</a>
......@@ -16,9 +14,9 @@
</div>
</div>
</footer>
<br><br>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" type="text/javascript"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript">$('[data-toggle="tooltip"]').tooltip();</script>
<script async src="https://platform.twitter.com/widgets.js" type="text/javascript"></script>
......@@ -3,25 +3,16 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="{{ '/assets/favicon.ico' | relative_url }}">
<link rel="icon" type="image/png" href="{{ '/assets/favicon.png?v2' | relative_url }}">
<link rel="icon" type="image/x-icon" href="{{ '/assets/favicon.ico?v2' | relative_url }}">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<title>{%- if page.title -%}{{ page.title | escape }}{%- else -%}{{ site.title | escape }}{%- endif -%}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.12/css/all.css" type="text/css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" type="text/css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" type="text/css">
<style type="text/css">
a.text-muted,
a.text-muted:hover,
a.text-muted:focus {
text-decoration: none;
}
a.text-muted:hover,
a.text-muted:focus {
color: #bd2130 !important;
}
</style>
<link rel="stylesheet" href="{{ '/assets/main.css' | absolute_url }}?2" type="text/css">
<link rel="canonical" href="{{ page.url | remove: 'index.html' | absolute_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | absolute_url }}">
......
{% assign dateago1 = 'now' | date: '%s' %}
{% assign dateago2 = site.posts[0].date | date: '%F' %}
{% assign dateago3 = dateago2 | date: '%s' %}
{% assign dateago4 = dateago1 | minus: dateago3 %}
{% assign dateago5 = dateago4 | divided_by: 86400 %}
{% capture dateago6 %}
{%- assign datenow = 'now' | date: '%s' -%}
{%- assign dateago = site.posts[0].date | date: '%F' -%}
{%- assign dateago = dateago | date: '%s' -%}
{%- assign dateago = datenow | minus: dateago -%}
{%- assign dateago = dateago | divided_by: 86400 -%}
{%- capture dateago -%}
Last incident
{% case dateago5 %}
{% when 0 %}today
{% when 1 %}{{ dateago5 }} day ago
{% else %}{{ dateago5 }} days ago
{% endcase %}
{% endcapture %}
{% case dateago %}
{%- when 0 -%}today
{%- when 1 -%}{{ dateago }} day ago
{%- else -%}{{ dateago }} days ago
{%- endcase -%}
{%- endcapture -%}
<div class="container">
<div class="row justify-content-center">
<nav class="navbar col-md-{{ site.rows | default: 8 }}">
<a class="navbar-brand text-dark" href=" {{ '/' | absolute_url }}">{{ site.title }}</a>
<a class="navbar-brand text-dark" href="{{ '/' | absolute_url }}">{{ site.title }}</a>
{% if site.posts[0] %}
<br class="d-lg-none d-xl-none">
<strong class="text-muted text-uppercase d-lg-none d-xl-none" data-toggle="tooltip" data-html="true" title="<small>{{ site.posts[0].date | date_to_xmlschema }}</small>" style="cursor: help;">{{ dateago6 }}</strong>
<strong class="navbar-text text-muted text-uppercase float-right d-none d-lg-block d-xl-block" data-toggle="tooltip" data-html="true" title="<small>{{ site.posts[0].date | date_to_xmlschema }}</small>" style="cursor: help;">{{ dateago6 }}</strong>
<strong id="last_incident" class="navbar-text text-muted text-uppercase float-left d-lg-none d-xl-none" data-toggle="tooltip" data-placement="bottom" data-html="true" title="<small>{{ site.posts[0].date | date_to_xmlschema }}</small>">{{ dateago }}</strong>
<strong id="last_incident" class="navbar-text text-muted text-uppercase float-right d-none d-lg-block d-xl-block" data-toggle="tooltip" data-placement="bottom" data-html="true" title="<small>{{ site.posts[0].date | date_to_xmlschema }}</small>">{{ dateago }}</strong>
{% endif %}
</nav>
</div>
......
......@@ -4,7 +4,6 @@
<body>
{% include navbar.html %}
<div class="page-header">
<br>
<div class="container">
{{ content }}
</div>
......
......@@ -4,8 +4,24 @@ layout: default
<div class="row justify-content-center">
<div class="col-md-8">
{% if page.url != '/history/' %}<h1>{{ page.title }}</h1>{% endif %}
{{ content }}
<table class="table">
<thead>
<tr>
<td style="border-top: 0px;">
<h5>{{ page.title }}</h5>
</td>
</tr>
</thead>
<tbody>
{% if page.url != '/incidents/' %}
<tr>
<td>{{ content }}</td>
</tr>
{% else %}
{{ content }}
{% endif %}
</tbody>
</table>
</div>
</div>
{% include card_footer.html %}
......@@ -5,11 +5,13 @@ permalink: /about/
hide: false
---
{% include config.html %}
This site is for information on the status of tophackr services.
If you are in doubt about the status of the site, you can check on [this][uptime] site, and then inform us in [issues], by [email] or [twitter].
If you are in doubt about the status of the site, you can check on [this][uptime]{: target="_blank" } site, and then inform us in [issues]{: target="_blank" }, by [email] or [twitter].
[uptime]: https://www.uptrends.com/tools/uptime
[issues]: {{ site.repository }}/issues
[email]: mailto:{{ site.email }}
[twitter]: https://twitter.com/{{ site.twitter.username }}
[email]: {{ email_url }}
[twitter]: {{ twitter_url }}
This diff is collapsed.
assets/favicon.ico

4.19 KB | W: | H:

assets/favicon.ico

14.7 KB | W: | H:

assets/favicon.ico
assets/favicon.ico
assets/favicon.ico
assets/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
@import url('https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700');
a.text-muted,
a.text-muted:hover,
a.text-muted:focus {
text-decoration: none;
}
a.text-muted:hover,
a.text-muted:focus {
color: #bd2130 !important;
}
#last_incident {
font-family: 'Open Sans Condensed', sans-serif;
cursor: help;
}
......@@ -2,29 +2,19 @@
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ '/' | absolute_url }}</link>
<atom:link href="{{ '/feed.xml' | absolute_url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:10 %}
{%- for post in site.posts limit:10 -%}
{%- assign content = post.content | remove: '<p>' | remove: '</p>' | xml_escape -%}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<title>{{ post.status | prepend: '[' | append: '] ' | append: content }}</title>
<description>{{ content }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | absolute_url }}</link>
<guid isPermaLink="true">{{ post.url | absolute_url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
<link>{{ '' | absolute_url }}</link>
<guid>{{ post.date | date: '%F' | prepend: '/incidents/#' | absolute_url }}</guid>
</item>
{% endfor %}
{%- endfor -%}
</channel>
</rss>
---
layout: page
title: Incidents History
permalink: /history/
hide: true
---
{% assign isincident = false %}
{% for post in site.posts %}
{% unless post.next %}
<h3 class="text-primary">{{ post.date | date: '%B %Y' }}</h3>
<hr>
{% else %}
{% capture date %}{{ post.date | date: '%B %Y' }}{% endcapture %}
{% capture ndate %}{{ post.next.date | date: '%B %Y' }}{% endcapture %}
{% if date != ndate %}
<br>
<h3 class="text-primary">{{ post.date | date: '%B %Y' }}</h3>
<hr>
{% endif %}
{% endunless %}
{% if post.status == 'danger' %}
<h4>
<a href="{{ post.url | absolute_url }}">{{ post.content }}</a>
</h4>
<small class="text-muted">
Posted {{ post.date | date: '%B %d, %Y - %H:%M' }} {{ site.zone }}
</small>
<br><br>
{% assign isincident = true %}
{% endif %}
{% endfor %}
{% if isincident == false %}
<h3>There was not a single incidents.</h3>
{% endif %}
---
layout: page
title: Incidents History
permalink: /incidents/
hide: true
---
{%- for post in site.posts -%}
{%- unless post.next -%}
<tr id="{{ post.date | date: '%F' }}">
<td>
<h6 class="text-primary">{{ post.date | date: '%B %d, %Y' }}</h6>
{%- else -%}
{%- assign date = post.date | date: '%B %d, %Y' -%}
{%- assign ndate = post.next.date | date: '%B %d, %Y' -%}
{%- if date != ndate -%}
</td>
</tr>
<tr id="{{ post.date | date: '%F' }}">
<td>
<h6 class="text-primary">{{ post.date | date: '%B %d, %Y' }}</h6>
{%- endif -%}
{%- endunless -%}
<div class="row small">
<time class="col-md-2 text-monospace text-muted" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%R %z' | slice: 0, 9 }}</time>
<strong class="col-md-10{% if post.status %} text-{{ post.status }}{% endif %}">{{ post.content | remove: '<p>' | remove: '</p>' }}</strong>
</div>
{%- endfor -%}
</td>
</tr>
......@@ -2,71 +2,8 @@
layout: default
---
{% comment %}
<!--
#
# Variable now.
#
-->
{% endcomment %}
{% capture datenow %}{{ 'now' | date: '%s' }}{% endcapture %}
{% comment %}
<!--
#
# timestamp variables.
#
-->
{% endcomment %}
{% capture time1 %}{{ 86400 }}{% endcapture %}
{% capture time2 %}{{ 86400 | times: 2 }}{% endcapture %}
{% capture time3 %}{{ 86400 | times: 3 }}{% endcapture %}
{% capture time4 %}{{ 86400 | times: 4 }}{% endcapture %}
{% capture time5 %}{{ 86400 | times: 5 }}{% endcapture %}
{% capture time6 %}{{ 86400 | times: 6 }}{% endcapture %}
{% comment %}
<!--
#
# Variable week.
#
-->
{% endcomment %}
{% capture dateweek1 %}{{ datenow }}{% endcapture %}
{% capture dateweek2 %}{{ datenow | minus: time1 }}{% endcapture %}
{% capture dateweek3 %}{{ datenow | minus: time2 }}{% endcapture %}
{% capture dateweek4 %}{{ datenow | minus: time3 }}{% endcapture %}
{% capture dateweek5 %}{{ datenow | minus: time4 }}{% endcapture %}
{% capture dateweek6 %}{{ datenow | minus: time5 }}{% endcapture %}
{% capture dateweek7 %}{{ datenow | minus: time6 }}{% endcapture %}
{% comment %}
<!--
#
# Variable days.
#
-->
{% endcomment %}
{% capture dateday1 %}{{ dateweek1 | date: '%B %d, %Y' }}{% endcapture %}
{% capture dateday2 %}{{ dateweek2 | date: '%B %d, %Y' }}{% endcapture %}
{% capture dateday3 %}{{ dateweek3 | date: '%B %d, %Y' }}{% endcapture %}
{% capture dateday4 %}{{ dateweek4 | date: '%B %d, %Y' }}{% endcapture %}
{% capture dateday5 %}{{ dateweek5 | date: '%B %d, %Y' }}{% endcapture %}
{% capture dateday6 %}{{ dateweek6 | date: '%B %d, %Y' }}{% endcapture %}
{% capture dateday7 %}{{ dateweek7 | date: '%B %d, %Y' }}{% endcapture %}
{% comment %}
<!--
#
# Create array
#
-->
{% endcomment %}
{% capture datecarray %}{{ dateday1 }}- {{ dateday2 }}- {{ dateday3 }}- {{ dateday4 }}- {{ dateday5 }}- {{ dateday6}}- {{ dateday7 }}{% endcapture %}
{% assign datearray = datecarray | split: '- ' %}
{% for my_page in site.pages %}
{% if my_page.title and my_page.hide == false %}
{%- for my_page in site.pages -%}
{%- if my_page.title and my_page.hide == false -%}
<div class="row justify-content-center">
<div class="col-md-{{ site.rows | default: 8 }}">
<div class="table-responsive">
......@@ -89,59 +26,60 @@ layout: default
</div>
</div>
</div>
{% endif %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
<div class="row justify-content-center">
<div class="col-md-{{ site.rows | default: 8 }}">
<div class="table-responsive">
<table class="table" style="overflow: hidden;">
<thead>
<table class="table">
<thead>
<tr>
<td style="border-top: 0px;">
<h5>
Past Incidents
<a href="{{ '/feed.xml' | absolute_url }}" class="float-right text-muted" data-toggle="tooltip" title="Subscribe via RSS">
<i class="fas fa-rss fa-xs fa-fw"></i>
</a>
</h5>
</td>
</tr>
</thead>
<tbody>
{%- assign daten = 'now' | date: '%s' -%}
{%- for item in (1..7) -%}
{%- assign isincident = false -%}
{%- assign datevar = daten | date: '%B %d, %Y' -%}
<tr>
<td style="border-top: 0px;">
<h5>
Past Incidents
<a href="{{ '/feed.xml' | absolute_url }}" class="float-right text-muted" data-toggle="tooltip" title="Subscribe via RSS">
<i class="fas fa-rss fa-xs fa-fw"></i>
</a>
</h5>
</td>
</tr>
</thead>
<tbody>
{% for item in datearray %}
{% assign isincident = false %}
<tr>
<td>
<h6>{{ item }}</h6>
{% for post in site.posts %}
{% assign postdate = post.date | date: '%B %d, %Y' %}
{% if item == postdate %}
{% assign isincident = true %}
<div class="row small">
<time class="col-md-2 text-monospace text-muted" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%R %z' | slice: 0, 9 }}</time>
<strong class="col-md-10{% if post.status %} text-{{ post.status }}{% endif %}">{{ post.content | remove: '<p>' | remove: '</p>' }}</strong>
</div>
{% endif %}
{% endfor %}
{% if isincident == false %}
<td>
<h6>{{ daten | date: '%B %d, %Y' }}</h6>
{%- for post in site.posts -%}
{%- assign postvar = post.date | date: '%B %d, %Y' -%}
{%- if datevar == postvar -%}
{%- assign isincident = true -%}
<div class="row small">
<time class="col-md-2 text-monospace text-muted" datetime="{{ item | date_to_xmlschema }}">{{ item | date: '%R %z' | slice: 0, 9 }}</time>
<strong class="col-md-10 text-success">All systems normal.</strong>
<time class="col-md-2 text-monospace text-muted" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%R %z' | slice: 0, 9 }}</time>
<strong class="col-md-10{% if post.status %} text-{{ post.status }}{% endif %}">{{ post.content | remove: '<p>' | remove: '</p>' }}</strong>
</div>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{%- endif -%}
{%- endfor -%}
{%- if isincident == false -%}
<div class="row small">
<time class="col-md-2 text-monospace text-muted" datetime="{{ datevar | date_to_xmlschema }}">{{ datevar | date: '%R %z' | slice: 0, 9 }}</time>
<strong class="col-md-10 text-success">All systems normal.</strong>
</div>
{%- endif -%}
</td>
</tr>
{%- assign daten = daten | minus: 86400 -%}
{%- endfor -%}
</tbody>
</table>
</div>
</div>
{% if site.twitter.widget == true %}
{%- if site.twitter.widget == true -%}
<div class="row justify-content-center">
<div class="col-md-{{ site.rows | default: 8 }}">
<a class="twitter-timeline" data-height="500" data-link-color="#19CF86" href="{{ site.twitter.username | prepend: 'https://twitter.com/' | append: '?ref_src=twsrc%5Etfw' }}">Tweets by {{ site.twitter.username }}</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<a class="twitter-timeline" data-height="500" data-link-color="#19CF86" href="{{ site.twitter.username | prepend: 'https://twitter.com/' | append: '?ref_src=twsrc%5Etfw' }}">Tweets by {{ site.twitter }}</a>
</div>
</div>
{% endif %}
{%- endif -%}
{% include card_footer.html %}