Skip to content

Commit

Permalink
Added code and color for 'note' and updated the hello world note.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrp committed Apr 9, 2013
1 parent a7299a3 commit 2832ea0
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 18 deletions.
34 changes: 33 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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``
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.
4 changes: 2 additions & 2 deletions docs/sources/examples/example_header.inc
Original file line number Diff line number Diff line change
@@ -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`
This example assumes you have Docker running in daemon mode. For more information please see :ref:`running_examples`
2 changes: 1 addition & 1 deletion docs/sources/examples/hello_world.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 14 additions & 13 deletions docs/sources/examples/running_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <command>
# starting docker daemon in the background
sudo docker -d &
# now you can run docker commands from any account.
docker <command>
2. Standalone: You need to run every command as root, or using sudo

.. code-block:: bash
.. code-block:: bash
$ sudo docker <command>
sudo docker <command>
23 changes: 22 additions & 1 deletion docs/theme/docker/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
===================== */
Expand Down
26 changes: 26 additions & 0 deletions docs/theme/docker/static/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2832ea0

Please sign in to comment.