diff --git a/docs/README.md b/docs/README.md index 7a5ee3f8a9..fce7f238fb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -39,4 +39,36 @@ Notes * The index.html and gettingstarted.html files are copied from the source dir to the output dir without modification. So changes to those pages should be made directly in html * For the template the css is compiled from less. When changes are needed they can be compiled using -lessc ``lessc main.less`` or watched using watch-lessc ``watch-lessc -i main.less -o main.css`` \ No newline at end of file +lessc ``lessc main.less`` or watched using watch-lessc ``watch-lessc -i main.less -o main.css`` + + +Guides on using sphinx +---------------------- +* To make links to certain pages create a link target like so: + + ``` + .. _hello_world: + + Hello world + =========== + + This is.. (etc.) + ``` + + The ``_hello_world:`` will make it possible to link to this position (page and marker) from all other pages. + +* Notes, warnings and alarms + + ``` + # a note (use when something is important) + .. note:: + + # a warning (orange) + .. warning:: + + # danger (red, use sparsely) + .. danger:: + +* Code examples + + Start without $, so it's easy to copy and paste. \ No newline at end of file diff --git a/docs/sources/examples/example_header.inc b/docs/sources/examples/example_header.inc index e7fbc42fc3..607421fc13 100644 --- a/docs/sources/examples/example_header.inc +++ b/docs/sources/examples/example_header.inc @@ -1,4 +1,4 @@ -.. warning:: +.. note:: - This example assumes that you have Docker running in daemon mode. For more information please see :ref:`running_examples` \ No newline at end of file + This example assumes you have Docker running in daemon mode. For more information please see :ref:`running_examples` diff --git a/docs/sources/examples/hello_world.rst b/docs/sources/examples/hello_world.rst index 0156aa958b..1d391f5fb1 100644 --- a/docs/sources/examples/hello_world.rst +++ b/docs/sources/examples/hello_world.rst @@ -9,7 +9,7 @@ Hello World .. include:: example_header.inc -This is the most basic example available for using Docker. The example assumes you have Docker installed. +This is the most basic example available for using Docker. Download the base container diff --git a/docs/sources/examples/running_examples.rst b/docs/sources/examples/running_examples.rst index 222c22982d..4042add487 100644 --- a/docs/sources/examples/running_examples.rst +++ b/docs/sources/examples/running_examples.rst @@ -7,26 +7,27 @@ Running The Examples -------------------- -There are two ways to run docker, daemon and standalone mode. +There are two ways to run docker, daemon mode and standalone mode. -When you run the docker command it will first check to see if there is already a docker daemon running in the background it can connect too, and if so, it will use that daemon to run all of the commands. +When you run the docker command it will first check if there is a docker daemon running in the background it can connect to. -If there is no daemon then docker will run in standalone mode. +* If it exists it will use that daemon to run all of the commands. +* If it does not exist docker will run in standalone mode (docker will exit after each command). -Docker needs to be run from a privileged account (root). Depending on which mode you are using, will determine how you need to execute docker. +Docker needs to be run from a privileged account (root). -1. The most common way is to run a docker daemon as root in the background, and then connect to it from the docker client from any account. +1. The most common (and recommended) way is to run a docker daemon as root in the background, and then connect to it from the docker client from any account. - .. code-block:: bash + .. code-block:: bash - # starting docker daemon in the background - $ sudo docker -d & - - # now you can run docker commands from any account. - $ docker + # starting docker daemon in the background + sudo docker -d & + + # now you can run docker commands from any account. + docker 2. Standalone: You need to run every command as root, or using sudo - .. code-block:: bash + .. code-block:: bash - $ sudo docker + sudo docker diff --git a/docs/theme/docker/static/css/main.css b/docs/theme/docker/static/css/main.css index 1e37fd06c9..a6ef9451ad 100755 --- a/docs/theme/docker/static/css/main.css +++ b/docs/theme/docker/static/css/main.css @@ -82,7 +82,7 @@ h4 { .btn-custom { background-color: #292929 !important; background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr="#515151", endColorstr="#282828"); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#515151", endColorstr="#282828"); background-image: -khtml-gradient(linear, left top, left bottom, from(#515151), to(#282828)); background-image: -moz-linear-gradient(top, #515151, #282828); background-image: -ms-linear-gradient(top, #515151, #282828); @@ -131,6 +131,27 @@ section.header { margin: 15px 15px 15px 0; border: 2px solid gray; } +.admonition { + padding: 10px; + border: 1px solid grey; + margin-bottom: 10px; + margin-top: 10px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.admonition .admonition-title { + font-weight: bold; +} +.admonition.note { + background-color: #f1ebba; +} +.admonition.warning { + background-color: #eed9af; +} +.admonition.danger { + background-color: #e9bcab; +} /* =================== left navigation ===================== */ diff --git a/docs/theme/docker/static/css/main.less b/docs/theme/docker/static/css/main.less index 100f7b418d..69f53f9e1b 100644 --- a/docs/theme/docker/static/css/main.less +++ b/docs/theme/docker/static/css/main.less @@ -179,7 +179,33 @@ section.header { border: 2px solid gray; } +.admonition { + padding: 10px; + border: 1px solid grey; + margin-bottom: 10px; + margin-top: 10px; + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.admonition .admonition-title { + font-weight: bold; +} + +.admonition.note { + background-color: rgb(241, 235, 186); +} + +.admonition.warning { + background-color: rgb(238, 217, 175); +} + +.admonition.danger { + background-color: rgb(233, 188, 171); +} /* =================== left navigation