Unverified Commit 579f9616 authored by Mantas Vilčinskas's avatar Mantas Vilčinskas Committed by GitHub
Browse files

v5.0.3

parent a84bc7f2
...@@ -263,10 +263,12 @@ Check out [the wiki](https://github.com/cstate/cstate/wiki). ...@@ -263,10 +263,12 @@ Check out [the wiki](https://github.com/cstate/cstate/wiki).
## Contribute 💥 ## Contribute 💥
### Making a change in the code ### Making a change in the code for the cstate/cstate repo
PRs should be submitted to the `dev` branch, if it exists. Before submitting a pull request, create an issue to [discuss the implications of your proposal](https://github.com/cstate/cstate/issues). PRs should be submitted to the `dev` branch, if it exists. Before submitting a pull request, create an issue to [discuss the implications of your proposal](https://github.com/cstate/cstate/issues).
The root directory is where the theme itself is (the cState guts, basically) and the `exampleSite` folder houses all content for your specific site. Use this local setup to experiment before making a PR.
Here is a guide for how you should develop: Here is a guide for how you should develop:
1. Clone this repository in the command line: 1. Clone this repository in the command line:
...@@ -275,22 +277,18 @@ Here is a guide for how you should develop: ...@@ -275,22 +277,18 @@ Here is a guide for how you should develop:
git clone --recursive -b master https://github.com/cstate/cstate.git git clone --recursive -b master https://github.com/cstate/cstate.git
``` ```
2. Navigate to the theme directory: 2. Launch the development setup like this:
```bash
cd cstate/exampleSite
```
3. Launch the development setup like this:
```bash ```bash
# old command # old command
# navigate to the directory where your content is and start dev server from there
cd cstate/exampleSite
hugo serve --baseUrl=http://localhost/ --theme=cstate --themesDir=../.. --verbose hugo serve --baseUrl=http://localhost/ --theme=cstate --themesDir=../.. --verbose
# new command partially works for v5.0.2; does not load images from static/ # new command partially works for v5.0.2; does not load images from static/
# for this you need to be in the theme root
hugo serve --config=exampleSite/config.yml --theme=../ --contentDir=exampleSite/content hugo serve --config=exampleSite/config.yml --theme=../ --contentDir=exampleSite/content
``` ```
The main directory is the theme itself (the cState guts, basically) and the `exampleSite` folder houses all content. Use this local setup to experiment before making a PR.
### For translators ### For translators
......
# cState Example Site v5.0.2 # cState Site v5.0.3
This is the default cState status page website directory/folder. This is the default cState status page website directory/folder.
Example site repository link (you are here): https://github.com/cstate/example * Example site repository link (you are here): https://github.com/cstate/example
* Main cState source code repository: https://github.com/cstate/cstate
Main cState source code repository: https://github.com/cstate/cstate
## Are you updating? Use these commands ## Are you updating? Use these commands
...@@ -19,9 +18,11 @@ Then do `git add -A; git commit -m "Update cState"; git push origin <branch, pro ...@@ -19,9 +18,11 @@ Then do `git add -A; git commit -m "Update cState"; git push origin <branch, pro
## For maintainers (probably not for you) ## For maintainers (probably not for you)
Maintainers need to update both cstate/cstate and cstate/example for each new version.
Download this repo with all the directories. `git clone --recursive -b master https://github.com/cstate/example.git` Download this repo with all the directories. `git clone --recursive -b master https://github.com/cstate/example.git`
Make your changes. Add your changes from cstate/cstate's exampleSite folder.
Update the cState theme submodule. `git submodule foreach git pull origin master` Update the cState theme submodule. `git submodule foreach git pull origin master`
......
...@@ -12,8 +12,15 @@ ...@@ -12,8 +12,15 @@
<div class="contain center"> <div class="contain center">
<h1 class="bold">{{ T "notFound" }}</h1> <h1 class="bold">{{ T "notFound" }}</h1>
<p class="affected-text hidden">{{ T "notFoundAffected" }}</p>
<p>{{ T "notFoundText" }}</p> <p>{{ T "notFoundText" }}</p>
</div> </div>
<script>
if (window.location.pathname.includes('affected')) {
document.querySelector('.affected-text').className = "affected-text";
}
</script>
{{ partial "js" . }} {{ partial "js" . }}
{{ partial "footer" . }} {{ partial "footer" . }}
......
{{ partial "meta" . }}
{{ $incidents := where .Site.RegularPages "Params.section" "issue" }}
{{ $active := where $incidents "Params.resolved" "=" false }}
{{ $isNotice := where $active "Params.severity" "=" "notice" }}
{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }}
{{ $isDown := where $active "Params.severity" "=" "down" }}
<body class="status-homepage status-{{ if $isDown }}down{{ else }}{{ if $isDisrupted}}disrupted{{ else }}{{ if $isNotice }}notice{{ else }}ok{{ end }}{{ end }}{{ end }} {{ if not .Site.Params.alwaysKeepBrandColor }}change-header-color{{ end }}">
{{ partial "header" . }}
<div class="contain center">
<h1 class="bold">{{ T "notFoundAffected" }}</h1>
<p>{{ T "notFoundText" }}</p>
</div>
{{ partial "js" . }}
{{ partial "footer" . }}
</body>
</html>
{{ $incidents := where .Site.RegularPages "Params.section" "issue" }}{{ $active := where $incidents "Params.resolved" "=" false }}{{ $isNotice := where $active "Params.severity" "=" "notice" }}{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }}{{ $isDown := where $active "Params.severity" "=" "down" }}{ {{ $incidents := where .Site.RegularPages "Params.section" "issue" }}{{ $active := where $incidents "Params.resolved" "=" false }}{{ $isNotice := where $active "Params.severity" "=" "notice" }}{{ $isDisrupted := where $active "Params.severity" "=" "disrupted" }}{{ $isDown := where $active "Params.severity" "=" "down" }}{
"is": "index", "is": "index",
"cStateVersion": "5.0.2", "cStateVersion": "5.0.3",
"apiVersion": "2.0", "apiVersion": "2.0",
"title": "{{ .Site.Title }}", "title": "{{ .Site.Title }}",
"languageCodeHTML": "{{ .Site.LanguageCode }}", "languageCodeHTML": "{{ .Site.LanguageCode }}",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Dev toolset * Dev toolset
*/ */
console.log('cState v5.0.2 - https://github.com/cstate/cstate'); console.log('cState v5.0.3 - https://github.com/cstate/cstate');
document.getElementsByTagName('html')[0].className = 'js'; document.getElementsByTagName('html')[0].className = 'js';
/** /**
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}} {{ end -}}
<meta name="generator" content="cState v5.0.2 - https://github.com/cstate/cstate"> <meta name="generator" content="cState v5.0.3 - https://github.com/cstate/cstate">
<meta name="theme-color" content="{{ .Site.Params.brand }}"> <meta name="theme-color" content="{{ .Site.Params.brand }}">
<script> <script>
var themeBrandColor = '{{ .Site.Params.brand }}'; var themeBrandColor = '{{ .Site.Params.brand }}';
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
width: 100%; width: 100%;
height: auto; height: auto;
} }
.hidden { display: none; }
/** /**
* Classes * Classes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment