diff --git a/static/css/base.css b/static/css/base.css index 825e77f5..2fa9f07e 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -74,4 +74,8 @@ body { .dialog-body { margin: 24px 0; +} + +pre { + border: 0; } \ No newline at end of file diff --git a/static/css/docs.css b/static/css/docs.css index c50fc5dd..ff2188e0 100644 --- a/static/css/docs.css +++ b/static/css/docs.css @@ -55,11 +55,8 @@ a.section:hover { .page-docs code { padding: 2px 4px; font-size: 90%; - color: #427d5e; - background-color: #f2f9f6; + color: #333; + background-color: #f5f5f5; border-radius: 4px; } -.snippet pre { - border: 1px solid #cccccc; -} diff --git a/static/css/icomoon.css b/static/css/icomoon.css index a62470b5..287b9c92 100644 --- a/static/css/icomoon.css +++ b/static/css/icomoon.css @@ -1,10 +1,10 @@ @font-face { font-family: 'icomoon'; - src: url('../fonts/icomoon.eot?j2asdo'); - src: url('../fonts/icomoon.eot?j2asdo#iefix') format('embedded-opentype'), - url('../fonts/icomoon.ttf?j2asdo') format('truetype'), - url('../fonts/icomoon.woff?j2asdo') format('woff'), - url('../fonts/icomoon.svg?j2asdo#icomoon') format('svg'); + src: url('../fonts/icomoon.eot?cxijqz'); + src: url('../fonts/icomoon.eot?cxijqz#iefix') format('embedded-opentype'), + url('../fonts/icomoon.ttf?cxijqz') format('truetype'), + url('../fonts/icomoon.woff?cxijqz') format('woff'), + url('../fonts/icomoon.svg?cxijqz#icomoon') format('svg'); font-weight: normal; font-style: normal; } @@ -24,6 +24,9 @@ -moz-osx-font-smoothing: grayscale; } +.icon-clippy:before { + content: "\e900"; +} .icon-cancel:before { content: "\e5c9"; } diff --git a/static/css/my_checks.css b/static/css/my_checks.css index c9f5924d..89344664 100644 --- a/static/css/my_checks.css +++ b/static/css/my_checks.css @@ -63,20 +63,20 @@ font-style: normal; } - #show-usage-modal .modal-dialog { width: 1100px; - } - - #show-usage-modal .tab-content { - margin-top: 15px; - } +} - .tab-pane { - border: none; +#show-usage-modal .modal-body { padding: 0; - } +} + +#show-usage-modal pre { + margin: 0; + padding: 15px; +} + +#show-usage-modal .highlight:nth-child(n+2) { + border-top: 1px solid #ddd; +} - .snippet { - margin-bottom: 15px; - } diff --git a/static/css/snippet-copy.css b/static/css/snippet-copy.css index 2e53acfc..315aa3fb 100644 --- a/static/css/snippet-copy.css +++ b/static/css/snippet-copy.css @@ -1,44 +1,15 @@ -.snippet { - position: relative; - margin-bottom: 3px; +.highlight { + position: relative; } -.snippet:last-child { - margin-bottom: 0; -} - -.snippet pre { - border: none; - background: #F6F6F6 !important; - margin: 0; -} - -.snippet:hover .copy-snippet-link { - opacity: 1 -} - -button.copy-snippet-link { +.highlight button { position: absolute; - top: 0; - right: 0; - margin-top: -1px; - margin-right: -1px; - z-index: 10; - display: block; - padding: 5px 8px !important; - font-size: 12px; - cursor: pointer; - border-radius: 0 0 0 4px; + top: 4px; + right: 4px; opacity: 0; - background: none!important; - border: none; - outline: none; - font-family: "Open Sans", Arial, sans-serif; - color: #0091ea; - cursor :pointer; transition: opacity 0.1s linear; } -button.copy-snippet-link:hover { - text-decoration: underline; +.highlight:hover button { + opacity: 1 } diff --git a/static/css/welcome.css b/static/css/welcome.css index 7834726d..625483e3 100644 --- a/static/css/welcome.css +++ b/static/css/welcome.css @@ -50,26 +50,6 @@ margin-bottom: 0; } -.page-welcome .highlight pre { - background: #FFF; - border-top: 0; - border-radius: 0; - border-color: #dddddd; -} - -#email .instructions { - background: #FFF; - border: 1px solid #dddddd; - border-top: 0; - padding: 10px; -} - -#email .email-address { - font-size: 18px; - padding-top: 10px; -} - - #get-started { margin-top: 4em; } @@ -88,11 +68,24 @@ height: 22px; } -.tab-pane { - border-left: 1px solid #DDD; - border-right: 1px solid #DDD; - border-bottom: 1px solid #DDD; - padding: 3px; +.page-welcome .tab-content { + border: 1px solid #ddd; + border-top: 0; +} + +.tab-pane p { + padding: 15px; + margin: 0; +} + +.page-welcome .highlight:nth-child(n+2) { + border-top: 1px solid #ddd; +} + +.page-welcome .tab-pane pre { + margin-bottom: 0; + background: transparent; + padding: 15px; } .tab-pane.tab-pane-email { diff --git a/static/fonts/icomoon.eot b/static/fonts/icomoon.eot index 2d318da4..87082976 100644 Binary files a/static/fonts/icomoon.eot and b/static/fonts/icomoon.eot differ diff --git a/static/fonts/icomoon.svg b/static/fonts/icomoon.svg index 2aa4f133..7b548958 100644 --- a/static/fonts/icomoon.svg +++ b/static/fonts/icomoon.svg @@ -19,4 +19,5 @@ + \ No newline at end of file diff --git a/static/fonts/icomoon.ttf b/static/fonts/icomoon.ttf index 21cc60cc..cea03cff 100644 Binary files a/static/fonts/icomoon.ttf and b/static/fonts/icomoon.ttf differ diff --git a/static/fonts/icomoon.woff b/static/fonts/icomoon.woff index 642be6a5..8c57375e 100644 Binary files a/static/fonts/icomoon.woff and b/static/fonts/icomoon.woff differ diff --git a/static/js/snippet-copy.js b/static/js/snippet-copy.js index cc8225c2..7f5efb9c 100644 --- a/static/js/snippet-copy.js +++ b/static/js/snippet-copy.js @@ -1,11 +1,24 @@ $(function() { + if (/Mac/i.test(navigator.userAgent)) { + // No support for Safari :( + return; + } + + var markup = ''; + + + + $(".highlight").append(markup); + var reBlankLines = new RegExp("^\\s*[\\r\\n]", "gm"); var reTrailingWhitespace = new RegExp("\\s+$"); - var clipboard = new Clipboard("button.copy-snippet-link", { + var clipboard = new Clipboard(".highlight button", { text: function (trigger) { - var snippetElement = $(trigger).next(".highlight").children().clone(); + var snippetElement = $(trigger).parent().children().clone(); /* remove pygmentize comment elements */ snippetElement.find(".c, .cm, .cp, .c1, .cs").remove(); /* remove blank lines and trailing whitespace */ @@ -14,13 +27,15 @@ $(function() { }); clipboard.on("success", function(e) { - e.trigger.textContent = "copied!"; - e.clearSelection(); + $(e.trigger) + .tooltip({title: "Copied!", trigger: "hover"}) + .tooltip("show") + .on("hidden.bs.tooltip", function(){ + $(this).tooltip("destroy"); + }) }); - $("button.copy-snippet-link").mouseout(function(e) { - setTimeout(function() { - e.target.textContent = "copy"; - }, 300); - }) + clipboard.on("error", function(e) { + prompt("Press Ctrl+C to select:", e.text) + }); }); diff --git a/templates/front/docs.html b/templates/front/docs.html index 7380450a..02e17114 100644 --- a/templates/front/docs.html +++ b/templates/front/docs.html @@ -44,10 +44,7 @@ and your command runs. If it completes successfully (exit code 0), curl or wget runs a HTTP GET call to the ping URL.

-
- - {% include "front/snippets/crontab.html" %} -
+{% include "front/snippets/crontab.html" %}

With this simple modification, you monitor several failure scenarios:

@@ -113,41 +110,21 @@ thing: they fire off a HTTP GET method.

Ubuntu, for example, does not have curl installed out of the box.

-
- - {% include "front/snippets/bash_curl.html" %} -
- -
- - {% include "front/snippets/bash_wget.html" %} -
+{% include "front/snippets/bash_curl.html" %} +{% include "front/snippets/bash_wget.html" %}

Python

-
- - {% include "front/snippets/python_urllib2.html" %} -
-
- - {% include "front/snippets/python_requests.html" %} -
+{% include "front/snippets/python_urllib2.html" %} +{% include "front/snippets/python_requests.html" %}

Node

-
- - {% include "front/snippets/node.html" %} -
- +{% include "front/snippets/node.html" %}

PHP

-
- - {% include "front/snippets/php.html" %} -
+{% include "front/snippets/php.html" %}

Browser

@@ -156,10 +133,7 @@ thing: they fire off a HTTP GET method.

CORS header in its ping responses, so cross-domain AJAX requests should work.

-
- - {% include "front/snippets/browser.html" %} -
+{% include "front/snippets/browser.html" %}

PowerShell

@@ -173,20 +147,14 @@ When scheduled to run with Task Scheduler, it will essentially just send regular "I'm alive" messages. You can of course extend it to do more things.

-
- - {% include "front/snippets/powershell.html" %} -
+{% include "front/snippets/powershell.html" %}

Save the above to e.g. C:\Scripts\healthchecks.ps1. Then use the following command in a Scheduled Task to run the script:

-
- -
-
powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
-
+
+
powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
@@ -284,6 +252,7 @@ the following command in a Scheduled Task to run the script: {% block scripts %} {% compress js %} + {% endcompress %} diff --git a/templates/front/docs_api.html b/templates/front/docs_api.html index 9c61f2e1..4c823814 100644 --- a/templates/front/docs_api.html +++ b/templates/front/docs_api.html @@ -64,10 +64,7 @@ The response may contain a JSON document with additional data. a JSON document with all checks in user's account.

Example Request

-
- - {% include "front/snippets/list_checks_request.html" %} -
+{% include "front/snippets/list_checks_request.html" %}

Example Response

{% include "front/snippets/list_checks_response.html" %} @@ -170,16 +167,10 @@ The response may contain a JSON document with additional data.

Example Request

-
- - {% include "front/snippets/create_check_request_a.html" %} -
+{% include "front/snippets/create_check_request_a.html" %}

Or, alternatively:

-
- - {% include "front/snippets/create_check_request_b.html" %} -
+{% include "front/snippets/create_check_request_b.html" %}

Example Response

@@ -208,10 +199,7 @@ The response may contain a JSON document with additional data.

Example Request

-
- - {% include "front/snippets/pause_check_request.html" %} -
+{% include "front/snippets/pause_check_request.html" %}

Example Response

{% include "front/snippets/pause_check_response.html" %} @@ -222,6 +210,7 @@ The response may contain a JSON document with additional data. {% block scripts %} {% compress js %} + {% endcompress %} diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html index 8da40727..072f6c2e 100644 --- a/templates/front/my_checks.html +++ b/templates/front/my_checks.html @@ -230,67 +230,37 @@