-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from X4BNet/upgrade-5.61
Upgrade 5.61
- Loading branch information
Showing
9 changed files
with
181 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# cState Site v5.5 | ||
|
||
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 | ||
|
||
## Are you updating? Use these commands | ||
|
||
Download your site with all the directories. `git clone --recursive <your repo link goes here>` | ||
|
||
Update the cState theme submodule. `git submodule foreach git pull origin master` | ||
|
||
In the parent directory, type `hugo serve`. Check to see if everything is working. | ||
|
||
Then do `git add -A; git commit -m "Update cState"; git push origin <branch, probably main or master>`. Your status page is now updated and uploaded. | ||
|
||
|
||
## 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` | ||
|
||
Add your changes from cstate/cstate's exampleSite folder. | ||
|
||
Update the cState theme submodule. `git submodule foreach git pull origin master` | ||
|
||
Then push `git add -A; git commit -m "Update cState vX.X.X"; git push origin master`. | ||
|
||
## License | ||
|
||
MIT © Mantas Vilčinskas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
https://status.x4b.net (powered by cState) | ||
https://status.x4b.net (powered by cState) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* | ||
Access-Control-Allow-Origin: * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>cState Admin</title> | ||
</head> | ||
<body> | ||
<!-- | ||
To easily manage your status on Netlify, | ||
much like on WordPress, you need to keep | ||
this directory. Platforms which do not | ||
support Netlify CMS do not need this | ||
/admin/ directory. | ||
--> | ||
<style> | ||
[data-slate-editor] { | ||
-webkit-user-modify: read-write !important; | ||
} | ||
</style> | ||
|
||
<script>console.log('You are using cState. The version can be looked at from the console on the homepage or incidents view. https://github.com/cstate')</script> | ||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> | ||
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script> | ||
<script> | ||
var IssuePreview = createClass({ | ||
render: function() { | ||
var entry = this.props.entry; | ||
|
||
var layoutPostDate = entry.getIn(['data', 'date']); | ||
var layoutPostDateEnd = entry.getIn(['data', 'resolvedWhen']); | ||
|
||
var resultOfStateProps = {"class": "warning"}; | ||
var resultOfState = 'This incident has not yet been resolved.'; | ||
|
||
if (entry.getIn(['data', 'resolved']) === true) { | ||
var resultOfStateProps = {"class": "green"}; | ||
var resultOfState = 'This incident has been resolved.'; | ||
} | ||
|
||
if (entry.getIn(['data', 'informational']) === true) { | ||
var resultOfStateProps = {"class": "green"}; | ||
var resultOfState = ''; | ||
} | ||
|
||
|
||
return h('div', {}, | ||
h('h1', {}, entry.getIn(['data', 'title'])), | ||
h('p', {}, | ||
h('strong', resultOfStateProps, resultOfState) | ||
), | ||
h('div', {"className": "text"}, this.props.widgetFor('body')) | ||
); | ||
} | ||
}); | ||
CMS.registerPreviewTemplate("issues", IssuePreview, { raw: true }); | ||
|
||
const previewStyles = ` | ||
html, | ||
body { | ||
padding: 16px; | ||
color: #444; | ||
background: #fff; | ||
font: 100%/1.5 BlinkMacSystemFont, -apple-system, "San Francisco Text", "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | ||
} | ||
h1 { | ||
line-height: 1; | ||
margin: 0; | ||
color: #000; | ||
font-weight: normal; | ||
font-size: 40px; | ||
font-family: "Segoe UI", BlinkMacSystemFont, -apple-system, "San Francisco Text", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | ||
} | ||
small { | ||
margin-top: 12px; | ||
color: #666; | ||
font-variant: small-caps; | ||
display: block; | ||
} | ||
.text { | ||
padding-top: 12px; | ||
border-top: 1px solid #ccc; | ||
} | ||
.green { color: #228B22; } | ||
.red { color: #DC143C; } | ||
.warning { color: #EE7600; } | ||
`; | ||
CMS.registerPreviewStyle(previewStyles, { raw: true }); | ||
</script> | ||
</body> | ||
</html> |
Submodule cstate
updated
49 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"headers": [ | ||
{ | ||
"source": "/(.*)", | ||
"headers": [ | ||
{ "key": "Access-Control-Allow-Origin", "value": "*" }, | ||
{ "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS" }, | ||
{ "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" } | ||
] | ||
} | ||
] | ||
} |