Provide more examples, in both raw and asciidoc, as well as the new timezone paramete...
authorRobin H. Johnson <robbat2@gentoo.org>
Fri, 29 May 2015 00:28:05 +0000 (17:28 -0700)
committerRobin H. Johnson <robbat2@gentoo.org>
Fri, 29 May 2015 00:28:05 +0000 (17:28 -0700)
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
files/20141015-ie6.txt
files/20141016-utility.txt
files/20150413-winxp.txt
files/example-asciidoc.txt [new file with mode: 0644]
files/example-markdown.txt [new file with mode: 0644]
files/example-raw.txt [new file with mode: 0644]
files/example.txt [deleted file]

index b4a926a..ed83c97 100644 (file)
@@ -2,6 +2,7 @@
 title: IE6/IE7 Support ending
 active: true
 type: maintenance
+timezone: Canada/Pacific
 created_at: 2014-10-15 00:00
 eta: 2014-10-18 08:00
 expires: 2014-10-29 00:00
index 22cda61..b64761f 100644 (file)
@@ -2,6 +2,7 @@
 title: Utility host updates
 active: true
 type: maintenance
+timezone: Canada/Pacific
 created_at: 2014-10-16 07:00
 eta: 2014-10-16 09:00
 expire_at: 2015-01-01 00:00
index 406e8d4..a5047b2 100644 (file)
@@ -2,6 +2,7 @@
 title: Internet Explorer on Windows XP support ending
 active: true
 type: maintenance
+timezone: Canada/Pacific
 created_at: 2015-04-13 00:00
 eta: 2015-06-30 23:59
 affects:
diff --git a/files/example-asciidoc.txt b/files/example-asciidoc.txt
new file mode 100644 (file)
index 0000000..dfdcd4f
--- /dev/null
@@ -0,0 +1,36 @@
+---
+title: Example Notice (asciidoc)
+active: false
+type: maintenance
+timezone: Canada/Pacific
+starts_at: 2012-02-20 10:00
+created_at: 2012-02-20 10:00
+eta: 2012-02-22 10:00
+expire_at: 2020-03-20 10:00
+affects: [overlays, forums, bugzilla]
+force_state: maintenance
+markup_language: asciidoctor
+---
+
+See the markdown example for the explaination of fields.
+
+Document title
+==============
+
+== Section
+
+Blah blah blah...
+
+=== Subsection
+
+This is a semi-seperate matter.
+
+== Another section
+
+This is a seperate matter.
+
+== Yet another section
+
+- Item 1
+- Item 2
+- Also: this item
diff --git a/files/example-markdown.txt b/files/example-markdown.txt
new file mode 100644 (file)
index 0000000..4cf9404
--- /dev/null
@@ -0,0 +1,49 @@
+---
+title: Example Notice (markdown)
+active: false
+type: maintenance
+timezone: Canada/Pacific
+starts_at: 2012-02-20 10:00 
+created_at: 2012-02-20 10:00
+eta: 2012-02-22 10:00
+expire_at: 2020-03-20 10:00
+affects: [overlays, forums, bugzilla]
+force_state: maintenance
+markup_language: markdown
+---
+
+# Markdown example
+
+Here you can add text in the markdown format.
+
+## Parameters above:
+
+* `title`: self-explanatory
+* `active`: set this to false to completely hide the notice
+* `type`: (maintenance|information|outage) sets the icon
+* `timezone`: Timezone (Olsen-style) for display and times without an offset
+* `created_at`: when the notice was created
+* `starts_at`: when to start displaying the notice
+* `expire_at`: when to hide the notice. will be indefinitely displayed if unset
+* `eta`: estimated time the service is restored (optional)
+* `affects`: array of services this notice affects (list, optional)
+* `force_state`: (maintenance|up|down) force the state of all services this notice applies to to this state (optional)
+
+### Notes
+
+For all datetime parameters: *created_at*, *starts_at*, *expire_at*, *eta*, you
+should ideally use an ISO8601 format to write the date and time.
+
+    starts_at: YYYY-MM-DD HH:MM:SS  
+    eta: 2015-05-28 17:00:00  
+
+Optionally, you can also include a numeric timezone offset.
+
+    expire_at: YYYY-MM-DD HH:MM:SS [-]HH:SS  
+    created_at: 2015-05-28 17:00:00 -07:00  
+    eta: 2015-05-28 17:00:00 02:00  
+
+The *timezone* parameter will be used to work out what timezone to display
+notices in, as well converting any datetime parameters that do NOT have an
+offset included. You should use Olsen time specifiers here, specifically the
+subset supported by [`ActiveSupport:TimeZone`](http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html).
diff --git a/files/example-raw.txt b/files/example-raw.txt
new file mode 100644 (file)
index 0000000..9205111
--- /dev/null
@@ -0,0 +1,20 @@
+---
+title: Example Notice (raw)
+active: false
+type: maintenance
+timezone: Canada/Pacific
+starts_at: 2012-02-20 10:00
+created_at: 2012-02-20 10:00
+eta: 2012-02-22 10:00
+expire_at: 2020-03-20 10:00
+affects: [overlays, forums, bugzilla]
+force_state: maintenance
+markup_language: raw
+---
+
+See the markdown example for the explaination of fields.
+
+<h3>H3 text</h3>
+
+<div>Div text <b>bold</b> <i>italic</i></div>
+
diff --git a/files/example.txt b/files/example.txt
deleted file mode 100644 (file)
index bae93fc..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
----
-title: Example Notice
-active: false
-type: maintenance
-starts_at: 2012-02-20 00:00
-created_at: 2012-02-20 10:00
-eta: 2012-02-22 10:00
-expire_at: 2012-03-20 10:00
-affects: [overlays, forums, bugzilla]
-force_state: maintenance
----
-
-Here you can add text in the markdown format.
-
-Parameters above:
-
-* title: self-explanatory
-* active: set this to false to completely hide the notice
-* type: (maintenance|information|outage) sets the icon
-* created_at: self-explanatory UTC!
-* starts_at: this is when the notice will start to be displayed, UTC!
-* expire_at: when to hide the notice. will be indefinitely displayed if unset UTC!
-* eta: estimated time the service is restored (optional)
-* affects: array of services this notice affects (TODO list, optional)
-* force_state: (maintenance|up|down) force the state of all services this notice applies to to this state (optional)
-