From d7500b363fee49307304fa623f74649cb408b532 Mon Sep 17 00:00:00 2001 From: Mantas <11616378+mistermantas@users.noreply.github.com> Date: Wed, 11 Jul 2018 14:45:50 +0300 Subject: v2-dev2 --- README.md | 21 ++--- archetypes/default.md | 1 + exampleSite/config.yml | 124 ++++++++++++------------ exampleSite/content/api.html | 6 ++ exampleSite/content/stats.html | 5 + exampleSite/layouts/README.md | 3 + exampleSite/netlify.toml | 14 +++ exampleSite/static/README.md | 9 ++ exampleSite/static/logo.png | Bin 0 -> 21758 bytes images/highlight.png | Bin 0 -> 96928 bytes images/screenshot.png | Bin 19460 -> 47463 bytes images/tn.png | Bin 11355 -> 38424 bytes layouts/_default/single.html | 6 +- layouts/index.html | 40 ++++++-- layouts/issues/single.html | 10 +- layouts/partials/custom/above-footer.html | 8 ++ layouts/partials/custom/above-header.html | 8 ++ layouts/partials/custom/below-footer.html | 8 ++ layouts/partials/custom/below-header.html | 8 ++ layouts/partials/custom/meta.html | 8 ++ layouts/partials/footer.html | 1 + layouts/partials/header.html | 1 + layouts/partials/js.html | 152 +++++++++++++++++++++++++----- layouts/partials/meta.html | 40 ++++++-- layouts/uptime/single.html | 21 +++++ static/admin/config.yml | 21 +++-- static/favicon.png | Bin 0 -> 86930 bytes static/sw.js | 14 +++ theme.toml | 2 +- 29 files changed, 405 insertions(+), 126 deletions(-) create mode 100644 exampleSite/content/api.html create mode 100644 exampleSite/layouts/README.md create mode 100644 exampleSite/netlify.toml create mode 100644 exampleSite/static/README.md create mode 100644 exampleSite/static/logo.png create mode 100644 images/highlight.png create mode 100644 layouts/partials/custom/above-footer.html create mode 100644 layouts/partials/custom/above-header.html create mode 100644 layouts/partials/custom/below-footer.html create mode 100644 layouts/partials/custom/below-header.html create mode 100644 layouts/partials/custom/meta.html create mode 100644 static/favicon.png create mode 100644 static/sw.js diff --git a/README.md b/README.md index 786de79..ba6a6e2 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ -# cState -![Screnshot](https://raw.githubusercontent.com/mistermantas/cstate/master/images/screenshot.png) +
+ +![cState](https://raw.githubusercontent.com/mistermantas/cstate/master/images/highlight.png) [![GitHub release](https://img.shields.io/github/release/mistermantas/cstate.svg?style=flat-square)](https://github.com/mistermantas/cstate/releases) [![GitHub last commit](https://img.shields.io/github/last-commit/mistermantas/cstate.svg?style=flat-square)](https://github.com/mistermantas/cstate/commits/master) [![GitHub repo size in bytes](https://img.shields.io/github/repo-size/mistermantas/cstate.svg?style=flat-square)](https://github.com/mistermantas/cstate/tree/master/) [![Gitter](https://img.shields.io/badge/chat-gitter-ed1965.svg?style=flat-square)](https://gitter.im/cState/Lobby) [![Twitter](https://img.shields.io/twitter/follow/mistermantas.svg?style=social&label=Follow)](https://twitter.com/mistermantas) +
+ > Über fast, backwards compatible (IE8+), tiny, and simple status page built with Hugo. Compatible with Netlify & GitHub Pages. *This release is a developer preview.* -[**Live demo**](https://cstate.netlify.com) +[**Live demo**](https://themes.gohugo.io/theme/cstate/) ## Contents @@ -131,18 +134,6 @@ Time to break that down. `Affected`. Add the items that were present in the config file which should alter the status of each individual system (component). *(array, required)* `Section`. This must be `issue`, so that Hugo treats it as one. *(required)* -### Is there an admin panel or some easy way to change the state of each issue? - -If you use [Netlify](https://www.netlify.com), you can expect to see Netlify CMS integration very soon. Otherwise, you could fall back to [prose.io](http://prose.io) or something similar. - -### How do I make this work on GitHub Pages? - -Compile locally (using production instructions), commit changes, and push them out. Using [Netlify](https://www.netlify.com) is recommended as it simplifies the process. - -### My question was not answered! - -This part of the documentation still needs to finished. [Questions](https://github.com/mistermantas/cstate/issues) are more than welcome and you should get a pretty fast response as well. - ## Contribute + Glance over the [Code of Conduct](/CODE_OF_CONDUCT.md). diff --git a/archetypes/default.md b/archetypes/default.md index 4908b8a..96949b9 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -3,6 +3,7 @@ Title: Date: Resolved: ResolvedWhen: +# down, disrupted, notice Severity: Affected: Section: issue diff --git a/exampleSite/config.yml b/exampleSite/config.yml index f731012..c75c9b6 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -37,7 +37,7 @@ # What is your status page called? # Shows up in the browser bar and meta tags -title: Example Chat App Status +title: Example Status # What language is this page in? # Only alters the html[lang] attribute @@ -58,52 +58,71 @@ baseURL: / # +------------------------------------------------------+ # ############################################################ -# Should posts, which have a publish date -# from the future, be built? Useful for -# sharing upcoming maintenance, etc. -# -# We recommend to keep this at `true`. -# BOOLEAN; `true`, `false` -buildFuture: true - params: # These are your systems. Change them to # change the amount of components. + # + # For help, see the wiki: + # https://github.com/mistermantas/cstate/wiki/Customization systems: - #- - # name: Client Area - # codename: panel - #- - # name: Minecraft - # codename: mc - #- - # name: Web Hosting - # codename: web - - Gateway - - API - - Media Proxy + - + name: Gateway + - + name: API + description: The guts of the application. + - + name: Media Proxy + description: This is the service responsible for serving images, audio, and video. It is reliant on Fastly. + # partial: custom/metrics # What header design should we use? + # # Default: true # BOOLEAN; `true`, `false` useLargeHeaderDesign: false # Should we show the logo or the title # of the status page? - useLogo: false + # + # Default: false + # BOOLEAN; `true`, `false` + useLogo: true # Where is the logo located, if one is # present at all? # - # Recommended: png or jpg for best - # browser support! - # logo: /logo.png + # Recommended: png is best used for + # images like logos. + # + # Recommended: png, bmp, jpg, or gif + # for best browser support! + logo: /logo.png # This is the description that is shown # in the footer and meta tags. + # + # Default: We continuously monitor the status of our services and if there are any interruptions, a note will be posted here. description: We continuously monitor the status of our services and if there are any interruptions, a note will be posted here. - # Cplors throughout cState + # Tabs on homepage + # Uncomment to enable. + # + # Format: + # customTabs: + # - + # name: Name + # link: https://example.com + + # Uptime statistics tab + # + # Shows link to /stats + # (uptime stats) + # + # Default: true + # BOOLEAN; `true`, `false` + showUptime: true + + # Colors throughout cState # # Defaults: # @@ -117,8 +136,6 @@ params: disrupted: FF8C00 down: DC143C notice: 708090 - border: dfdfdf - faded: ccc # If the status page shows that # there are disruptions or outages @@ -131,37 +148,20 @@ params: # BOOLEAN; `true`, `false` alwaysKeepBrandColor: true -############################################################ -# +------------------------------------------------------+ # -# | Developer | # -# +------------------------------------------------------+ # -############################################################ - - # Custom CSS file - # If you want to add any - # custom styling, you may - # link to one file with all - # your modifications here. - # - # This has *intentionally* - # been left uncommented, - # as it is not an advanced - # feature for developers. + # Google Analytics tracking code # - # customCSS: /custom.css - - # Custom JavaScript file - # If you want to add any - # custom scripting, you may - # link to one file with all - # your modifications here. + # By default, cState does not use + # Google Analytics. If you choose + # to use it, you may change the + # placeholder code below to your + # own and thereby enable the + # tracking service. # - # This has *intentionally* - # been left uncommented, - # as it is not an advanced - # feature for developers. + # To disable the analytics, change + # the value to the default: # - # customJS: /custom.js + # Default: UA-00000000-1 + googleAnalytics: UA-00000000-1 ############################################################ # +------------------------------------------------------+ # @@ -169,13 +169,21 @@ params: # +------------------------------------------------------+ # ############################################################ +# Should posts, which have a publish date +# from the future, be built? Useful for +# sharing upcoming maintenance, etc. +# +# We recommend to keep this at `true`. +# BOOLEAN; `true`, `false` +buildFuture: true + # These options affect the core of cState. # Please do not change them if you do not # know what you are doing. -theme: cstate +theme: cstate-dev # If you are developing locally and want # to contribute to the cState Git repo, # please uncomment this option but do not # forget to re-comment it when -# themesDir: ../.. +themesDir: ../.. diff --git a/exampleSite/content/api.html b/exampleSite/content/api.html new file mode 100644 index 0000000..bf2b338 --- /dev/null +++ b/exampleSite/content/api.html @@ -0,0 +1,6 @@ +--- +--- + + diff --git a/exampleSite/content/stats.html b/exampleSite/content/stats.html index d4dd1aa..bee2349 100644 --- a/exampleSite/content/stats.html +++ b/exampleSite/content/stats.html @@ -1,4 +1,9 @@ --- title: Uptime +description: This page has some information analyzing the downtime that has been reported on this status page. type: uptime --- + + diff --git a/exampleSite/layouts/README.md b/exampleSite/layouts/README.md new file mode 100644 index 0000000..61e8a98 --- /dev/null +++ b/exampleSite/layouts/README.md @@ -0,0 +1,3 @@ +This folder can be used to overwrite or add any layouts to your status page. + +For more, please [read the documentation](https://github.com/mistermantas/cstate/wiki/Customization). diff --git a/exampleSite/netlify.toml b/exampleSite/netlify.toml new file mode 100644 index 0000000..3ef9150 --- /dev/null +++ b/exampleSite/netlify.toml @@ -0,0 +1,14 @@ +[build] + command = "hugo" + publish = "public" + functions = "functions" + +[build.environment] + HUGO_VERSION = "0.41" + +[context.production.environment] + HUGO_ENV = "production" + NODE_ENV = "production" + +[context.deploy-preview] + command = "hugo" diff --git a/exampleSite/static/README.md b/exampleSite/static/README.md new file mode 100644 index 0000000..7541621 --- /dev/null +++ b/exampleSite/static/README.md @@ -0,0 +1,9 @@ +This folder can be used to store any static content that you may want to link to on your status page. + +You may replace the default favicons by creating icons with these names: + +- favicon-16x16.png +- favicon-32x32.png +- favicon.ico + +You may also replace the Netlify CMS configuration by creating an `admin` folder and placing your own `config.yml` or `index.html` file by following the project's given instructions. diff --git a/exampleSite/static/logo.png b/exampleSite/static/logo.png new file mode 100644 index 0000000..851d104 Binary files /dev/null and b/exampleSite/static/logo.png differ diff --git a/images/highlight.png b/images/highlight.png new file mode 100644 index 0000000..19dc9b2 Binary files /dev/null and b/images/highlight.png differ diff --git a/images/screenshot.png b/images/screenshot.png index 70bd28c..9f4b673 100644 Binary files a/images/screenshot.png and b/images/screenshot.png differ diff --git a/images/tn.png b/images/tn.png index 604e341..5c59fc4 100644 Binary files a/images/tn.png and b/images/tn.png differ diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c0a9070..8463204 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,4 +7,8 @@ {{ .Render "post" }} -{{ partial "footer" . }} + + {{ partial "js" . }} + {{ partial "footer" . }} +