diff options
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | exampleSite/README.md | 11 | ||||
-rw-r--r-- | layouts/404.html | 7 | ||||
-rw-r--r-- | layouts/affected/404.html | 21 | ||||
-rw-r--r-- | layouts/index.json | 2 | ||||
-rw-r--r-- | layouts/partials/js.html | 2 | ||||
-rw-r--r-- | layouts/partials/meta.html | 4 |
7 files changed, 25 insertions, 38 deletions
@@ -263,10 +263,12 @@ Check out [the wiki](https://github.com/cstate/cstate/wiki). ## 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). +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: 1. Clone this repository in the command line: @@ -275,22 +277,18 @@ Here is a guide for how you should develop: git clone --recursive -b master https://github.com/cstate/cstate.git ``` -2. Navigate to the theme directory: - -```bash -cd cstate/exampleSite -``` - -3. Launch the development setup like this: +2. Launch the development setup like this: ```bash # 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 # 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 ``` -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 diff --git a/exampleSite/README.md b/exampleSite/README.md index c9d32e0..89b6971 100644 --- a/exampleSite/README.md +++ b/exampleSite/README.md @@ -1,10 +1,9 @@ -# cState Example Site v5.0.2 +# cState Site v5.0.3 This is the default cState status page website directory/folder. -Example site repository link (you are here): https://github.com/cstate/example - -Main cState source code repository: https://github.com/cstate/cstate +* Example site repository link (you are here): https://github.com/cstate/example +* Main cState source code repository: https://github.com/cstate/cstate ## 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 ## 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` -Make your changes. +Add your changes from cstate/cstate's exampleSite folder. Update the cState theme submodule. `git submodule foreach git pull origin master` diff --git a/layouts/404.html b/layouts/404.html index 64ff118..1f8d656 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -12,8 +12,15 @@ <div class="contain center"> <h1 class="bold">{{ T "notFound" }}</h1> + <p class="affected-text hidden">{{ T "notFoundAffected" }}</p> <p>{{ T "notFoundText" }}</p> </div> + + <script> + if (window.location.pathname.includes('affected')) { + document.querySelector('.affected-text').className = "affected-text"; + } + </script> {{ partial "js" . }} {{ partial "footer" . }} diff --git a/layouts/affected/404.html b/layouts/affected/404.html deleted file mode 100644 index 527c280..0000000 --- a/layouts/affected/404.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ 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> diff --git a/layouts/index.json b/layouts/index.json index c707f5c..35145d5 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -1,6 +1,6 @@ {{ $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", - "cStateVersion": "5.0.2", + "cStateVersion": "5.0.3", "apiVersion": "2.0", "title": "{{ .Site.Title }}", "languageCodeHTML": "{{ .Site.LanguageCode }}", diff --git a/layouts/partials/js.html b/layouts/partials/js.html index ef9464a..c0c044d 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -3,7 +3,7 @@ * 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'; /** diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 3fec38c..4a0e923 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -12,7 +12,7 @@ {{ range .AlternativeOutputFormats -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ 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 }}"> <script> var themeBrandColor = '{{ .Site.Params.brand }}'; @@ -80,6 +80,8 @@ width: 100%; height: auto; } + + .hidden { display: none; } /** * Classes |