@ -1,6 +1,6 @@ |
|||||
[submodule "plugins"] |
|
||||
path = plugins |
|
||||
url = https://github.com/getpelican/pelican-plugins.git |
|
||||
[submodule "plugins-custom"] |
[submodule "plugins-custom"] |
||||
path = plugins-custom |
path = plugins-custom |
||||
url = https://git.vvvvvvaria.org/varia/plugins-custom.git |
url = https://git.vvvvvvaria.org/varia/plugins-custom |
||||
|
[submodule "pelican-plugins"] |
||||
|
path = pelican-plugins |
||||
|
url = https://github.com/getpelican/pelican-plugins |
||||
|
@ -0,0 +1,181 @@ |
|||||
|
Title: Social Media Critique |
||||
|
Category: long-read test |
||||
|
Slug: federation |
||||
|
lang: en |
||||
|
|
||||
|
> This is in the end what Silicon Valley tries to prevent at all cost: |
||||
|
> resistance and exodus. How can such a momentum be unleashed? |
||||
|
|
||||
|
So aside from the discussion of who listens (or didn't listen) to whose |
||||
|
opinion it can be interesting to have a closer look at action and momentum. |
||||
|
|
||||
|
Three projects caught my attention and I think could be an interesting |
||||
|
case for this 'next steps' discussion: |
||||
|
|
||||
|
Mastodon (2016) en Conversations (2014) and Peertube (2015) * |
||||
|
|
||||
|
All three are projects that during the past twelve months have somehow |
||||
|
reinvigorated (the work on, attention for) their underlying protocols. |
||||
|
Protocols that have been proclaimed dead or unsuccessful for many years. |
||||
|
And probably will be for more to come. |
||||
|
|
||||
|
The first one, Mastodon (https://joinmastodon.org/), you may have read |
||||
|
about or even tried out. It is essentially a twitter clone / |
||||
|
alternative. Technically it is based on Ostatus, which is a protocol to |
||||
|
distribute |
||||
|
status updates across networks. Ostatus is the protocol that powered |
||||
|
early 'alternative 2.0 style' social networks such as Friendica and |
||||
|
Lorea. The latter was a product of and important site of organization |
||||
|
for the Spanish Indignados and 15M movements. Mastodon also supports |
||||
|
ActivityPub which is the likely successor of Ostatus as a protocol for |
||||
|
further ongoing work on so-called federated publishing. The interesting |
||||
|
thing is that Mastodon managed to attract a good chunk of the recent Twitter |
||||
|
refugees. These where mostly voices which aren't white, loud or extreme |
||||
|
right wing and for those reasons felt themselves increasingly out of |
||||
|
place on twitter. Mastodon communities managed to involve so many of |
||||
|
these people by focusing on developing tools for community moderation, |
||||
|
content warnings and the ability to block other instances in the |
||||
|
network. As a result (the english language) Mastodon became a site that |
||||
|
is predominantly populated by the queer, PoC, left and artistic, or |
||||
|
anyone that would otherwise be at risk of being on the receiving end of |
||||
|
the Gamergate-style interactions on twitter. The decentralized nature of |
||||
|
mastodon has created a culture of 'thematic mastodon servers (see |
||||
|
https://instances.social/list) that have become a large part of what |
||||
|
makes the network interesting and relevant to its several hundred |
||||
|
thausand users. |
||||
|
|
||||
|
|
||||
|
Conversations (https://conversations.im/) is a messaging application |
||||
|
that is based on the very old XMPP protocol. This is a chat protocol |
||||
|
which has at one point also been the underlying technology of both |
||||
|
Google and Facebook chat before they closed it down and made it |
||||
|
proprietary. From the onset Conversations focused on a combination of |
||||
|
user friendliness, security and ultimately visual design to be on par |
||||
|
with mobile messengers such as whatsapp and telegram. The work of |
||||
|
Conversations has reinvigorated the XMPP protocol. Partly because it |
||||
|
focused on implementing the double-ratchett encryption algorithm almost |
||||
|
immediately after it was open-sourced. This is the modern userfriendly |
||||
|
end-to-end encryption algorithm developed by Moxie Marlinspike for |
||||
|
Signal and licensed to companies like Whatsapp. Another effect of the |
||||
|
work of Conversations is that the decades old protocol has been updated |
||||
|
in the span of a few years to work very well for mobile usage. For me |
||||
|
one of the interesting aspects of the development of Conversations is |
||||
|
the role that modern thinking on UIs, design and user friendliness |
||||
|
played in its popularity. This especially becomes apparent in the very |
||||
|
technical and awkward world of XMPP software. The developer has |
||||
|
mentioned multiple times that he 'bases' his design on that of his GAFA |
||||
|
'competitors'. Apropos tactical media, this project's appropriation of |
||||
|
corporate design, yet very clear and |
||||
|
solid political stance (see https://gultsch.de/objection.html) leading |
||||
|
to an increase in popularity and community involvement is an interesting |
||||
|
development. |
||||
|
|
||||
|
|
||||
|
Lastly, Peertube (https://github.com/Chocobozzz/PeerTube) is an attempt |
||||
|
at making the hosting of video content accessible to small |
||||
|
organizations. The sheer amount of infrastructure and thus capital |
||||
|
required to set up an alternative to the monopoly position of Youtube, |
||||
|
forces any project trying to replace Youtube to use peer-to-peer |
||||
|
technologies. Peertube does so by trying to implement WebTorrents. Like |
||||
|
the older 'BitTorrent' protocol it is based on, WebTorrent tries to |
||||
|
mitigate the sheer amount of data and bandwith involved with exchanging |
||||
|
online media, by making sure these are streamed from many sources at |
||||
|
once. Unlike torrents, which need separate applications, WebTorrents run |
||||
|
in familiar web browsers. One could say the conceptual forbearer of this |
||||
|
approach was a project called Popcorn Time (2014). An app that convinced |
||||
|
many with its good UI and design to do 'Netflix-like' streaming on top |
||||
|
of the torrent network. Again this is something that lead to a |
||||
|
reinvigoration of the decaying (use-wise) torrenting protocol. (I'd also |
||||
|
argue though, that Popcorn Time was simultaneously the nail in the |
||||
|
coffin for torrenting because of the individualistic streaming mentality |
||||
|
built into it. This also meant the definite end of what remained of |
||||
|
-collectivist?- seeding/sharing culture on public trackers.) |
||||
|
|
||||
|
The position of the Peertube as a viable alternative or successful |
||||
|
project is the most tenuous of the three. However, one might argue that |
||||
|
our definition of success in this context should also be readjusted - |
||||
|
away from the Silicon Valley, venture capitalist sense of success using |
||||
|
metrics like usage counts, market cap, patent value etc. By nature of |
||||
|
being built upon open, compatible and federative technologies, |
||||
|
developments happening in all three projects could, and probably will, |
||||
|
end up supporting one another. They do so to the extent that one project |
||||
|
could even become an integral part of the other. As an example both |
||||
|
Mastodon and Peertube use the same underlying ActivityPub, allowing one |
||||
|
to become the underlying video delivery function of the other. As was |
||||
|
the case with Friendica, Lorea and Mastodon, projects might stop but |
||||
|
then become stepping stones and inspirations for newer generations of |
||||
|
projects. In this sense definitions of success should consider the |
||||
|
quality of longer term technological ecosystems within larger |
||||
|
socio-political contexts. |
||||
|
|
||||
|
So the striking things for me to take away from these projects are: |
||||
|
|
||||
|
All three projects have managed to reinvigorate 'decaying' protocols in |
||||
|
large part through their focus on UX, language and interestingly design. |
||||
|
Which seems to me a huge opportunity for the arts which has been left |
||||
|
largely unused in the first round of social media critique. Perhaps the |
||||
|
model of artistic production in this domain should move away from the |
||||
|
artists being on the forefront, sensing out emerging tendencies and |
||||
|
taking the spotlight by creating mostly harmless critical and |
||||
|
speculative works |
||||
|
around these tendencies. Next steps for artistic social media critique |
||||
|
should instead take a much more humble and supportive role contributing |
||||
|
expertise, time and exposure to people working in and with these ecosystems. |
||||
|
|
||||
|
All three projects are based on federation. Which is the idea that |
||||
|
various actors making up a network decide to cooperate in a collective |
||||
|
fashion. Distributing responsibility and power as they do so. The future |
||||
|
of social media has to be federated or there won't be any (for those |
||||
|
privileged enough to retreat..). I think the case of Mastodon, where |
||||
|
servers in the Ostatus federation are experimenting with blocking |
||||
|
hostile content altogether from other servers in the federation (while |
||||
|
still maintaining technical compatibility) are interesting experiments. |
||||
|
For one, the debates over on-line harassment and fake news show that the |
||||
|
grand 'electronic agoras', where one can find anyone and everyone |
||||
|
clearly aren't conducive to productive interchange of ideas. Perhaps |
||||
|
smallish, self caring communities are a good answer to the profit driven |
||||
|
model of infinite interconnectedness. |
||||
|
|
||||
|
Lastly, I think it is no coincidence that two out of three of the |
||||
|
projects have Germans leading development and all three are European |
||||
|
based projects. I guess the following is anecdotal and partial evidence. |
||||
|
Yet, I've not seen Google and Facebook run full page advertorials in |
||||
|
leading daily newspapers except in the German ones. Ostensibly, part of |
||||
|
an attempt on their side to prevent mass user exodus out of discomfort |
||||
|
with the platform. It is in part German historical sensibility that |
||||
|
leads to this kind of sensitivity on the issues of privacy, but it is |
||||
|
also a sensitivity that is actively nurtured in public discourse. No |
||||
|
Silicon Valley apologies are required for there to be scepsis. At the |
||||
|
same time the European context apparently provides good enough living |
||||
|
conditions for people to risk investing time in this kind of work. Risk |
||||
|
which is also partly mitigated by initiatives such as German Prototype |
||||
|
Fund and other European funding streams. However, testament to the fact |
||||
|
that these projects have healthy communities and are part of wider |
||||
|
ecosystems of support is that all projects finance themselves from |
||||
|
diverse revenue streams, user contributions being the main one. |
||||
|
|
||||
|
So I'd say next steps for a social media critique would be to be more |
||||
|
involved in (and involve more) these communities. To use positions of |
||||
|
power to create opportunities for people working on these projects. |
||||
|
While the center of development of these projects is Western-Europe they |
||||
|
have many contributors outside of Europe as well, that could benefit |
||||
|
even more from such opportunities. At the same time, doing close |
||||
|
readings of the technical underpinnings of these media will also improve |
||||
|
understanding of what is (not) going on. Now obviously all this was a |
||||
|
news flash from within a very specific filter bubble, but actually from |
||||
|
there 2017 was a very promising year for alternative media. |
||||
|
|
||||
|
> I still believe in vital methods to mass delete Facebook accounts. |
||||
|
I'd say start doing so, but help your friends. Use your network effect |
||||
|
to transition together to different kind of media. This is slow and |
||||
|
laborious so mutual support is important. The time is always right, but |
||||
|
now more than ever. |
||||
|
|
||||
|
* these are the dates of the project's source code first appearing in |
||||
|
public, they are still actively updated and used. |
||||
|
|
||||
|
greetings, |
||||
|
|
||||
|
Roel |
||||
|
|
||||
|
|
@ -1,11 +0,0 @@ |
|||||
*~ |
|
||||
._* |
|
||||
.*.swp |
|
||||
.*.swo |
|
||||
*.pyc |
|
||||
*.log |
|
||||
.DS_Store |
|
||||
.directory |
|
||||
.idea |
|
||||
.project |
|
||||
.pydevproject |
|
@ -1,138 +0,0 @@ |
|||||
[submodule "pelican-fontawesome"] |
|
||||
path = pelican-fontawesome |
|
||||
url = https://github.com/kura/pelican-fontawesome.git |
|
||||
[submodule "pelican_youtube"] |
|
||||
path = pelican_youtube |
|
||||
url = https://github.com/kura/pelican_youtube.git |
|
||||
[submodule "pelican_vimeo"] |
|
||||
path = pelican_vimeo |
|
||||
url = https://github.com/kura/pelican_vimeo.git |
|
||||
[submodule "cjk-auto-spacing"] |
|
||||
path = cjk-auto-spacing |
|
||||
url = https://github.com/yuex/cjk-auto-spacing.git |
|
||||
[submodule "pelican-gist"] |
|
||||
path = pelican-gist |
|
||||
url = https://github.com/streeter/pelican-gist.git |
|
||||
[submodule "pelicanfly"] |
|
||||
path = pelicanfly |
|
||||
url = https://github.com/bmcorser/pelicanfly.git |
|
||||
[submodule "pelican-flickr"] |
|
||||
path = pelican-flickr |
|
||||
url = https://github.com/La0/pelican-flickr.git |
|
||||
[submodule "better_code_samples"] |
|
||||
path = better_code_samples |
|
||||
url = https://github.com/ChrislS/better_code_samples.git |
|
||||
[submodule "pin_to_top"] |
|
||||
path = pin_to_top |
|
||||
url = https://github.com/Shaked/pin_to_top.git |
|
||||
[submodule "pelican-githubprojects"] |
|
||||
path = pelican-githubprojects |
|
||||
url = https://github.com/kura/pelican-githubprojects.git |
|
||||
[submodule "pelicanthemes-generator"] |
|
||||
path = pelicanthemes-generator |
|
||||
url = https://github.com/badele/pelicanthemes-generator |
|
||||
[submodule "pelican-page-order"] |
|
||||
path = pelican-page-order |
|
||||
url = https://github.com/akhayyat/pelican-page-order.git |
|
||||
[submodule "pelican-page-hierarchy"] |
|
||||
path = pelican-page-hierarchy |
|
||||
url = https://github.com/akhayyat/pelican-page-hierarchy.git |
|
||||
[submodule "multi_neighbors"] |
|
||||
path = multi_neighbors |
|
||||
url = https://github.com/davidlesieur/multi_neighbors.git |
|
||||
[submodule "pelican-langcategory"] |
|
||||
path = pelican-langcategory |
|
||||
url = https://github.com/CNBorn/pelican-langcategory.git |
|
||||
[submodule "pandoc_reader"] |
|
||||
path = pandoc_reader |
|
||||
url = https://github.com/liob/pandoc_reader.git |
|
||||
[submodule "bootstrapify"] |
|
||||
path = bootstrapify |
|
||||
url = https://github.com/ingwinlu/pelican-bootstrapify.git |
|
||||
[submodule "pelican-jinja2content"] |
|
||||
path = pelican-jinja2content |
|
||||
url = https://github.com/joachimneu/pelican-jinja2content.git |
|
||||
[submodule "panorama"] |
|
||||
path = panorama |
|
||||
url = https://github.com/romainx/panorama.git |
|
||||
[submodule "pelican-genealogy"] |
|
||||
path = pelican-genealogy |
|
||||
url = https://github.com/zappala/pelican-genealogy |
|
||||
[submodule "image_process"] |
|
||||
path = image_process |
|
||||
url = https://github.com/whiskyechobravo/image_process |
|
||||
[submodule "pelican-open_graph"] |
|
||||
path = pelican-open_graph |
|
||||
url = https://github.com/whiskyechobravo/pelican-open_graph.git |
|
||||
[submodule "replacer"] |
|
||||
path = replacer |
|
||||
url = https://github.com/narusemotoki/replacer |
|
||||
[submodule "pelican-toc"] |
|
||||
path = pelican-toc |
|
||||
url = https://github.com/ingwinlu/pelican-toc |
|
||||
[submodule "multimarkdown_reader"] |
|
||||
path = multimarkdown_reader |
|
||||
url = https://github.com/dames57/multimarkdown_reader.git |
|
||||
[submodule "pelican_javascript"] |
|
||||
path = pelican_javascript |
|
||||
url = https://github.com/mortada/pelican_javascript.git |
|
||||
[submodule "loadcsv"] |
|
||||
path = loadcsv |
|
||||
url = https://github.com/e9t/pelican-loadcsv |
|
||||
[submodule "org_pandoc_reader"] |
|
||||
path = org_pandoc_reader |
|
||||
url = https://github.com/jo-tham/org_pandoc_reader.git |
|
||||
[submodule "pdf-img"] |
|
||||
path = pdf-img |
|
||||
url = https://github.com/cmacmackin/pdf-img.git |
|
||||
[submodule "pelican-cite"] |
|
||||
path = pelican-cite |
|
||||
url = https://github.com/cmacmackin/pelican-cite.git |
|
||||
[submodule "figure-ref"] |
|
||||
path = figure-ref |
|
||||
url = https://github.com/cmacmackin/figure-ref |
|
||||
[submodule "encrypt-content"] |
|
||||
path = encrypt-content |
|
||||
url = https://github.com/mindcruzer/pelican-encrypt-content |
|
||||
[submodule "md-metayaml"] |
|
||||
path = md-metayaml |
|
||||
url = https://github.com/joachimneu/pelican-md-metayaml |
|
||||
[submodule "backreftranslate"] |
|
||||
path = backreftranslate |
|
||||
url = https://github.com/daltonmatos/pelican-plugin-backref-translate |
|
||||
[submodule "category_order"] |
|
||||
path = category_order |
|
||||
url = https://github.com/jhshi/pelican.plugins.category_order.git |
|
||||
[submodule "ga_page_view"] |
|
||||
path = ga_page_view |
|
||||
url = https://github.com/jhshi/pelican.plugins.ga_page_view.git |
|
||||
[submodule "post_revision"] |
|
||||
path = post_revision |
|
||||
url = https://github.com/jhshi/pelican.plugins.post_revision |
|
||||
[submodule "linkclass"] |
|
||||
path = pelican-linkclass |
|
||||
url = https://github.com/rlaboiss/pelican-linkclass |
|
||||
[submodule "just_table"] |
|
||||
path = just_table |
|
||||
url = https://github.com/burakkose/just_table |
|
||||
[submodule "ace_editor"] |
|
||||
path = ace_editor |
|
||||
url = https://github.com/mothsART/ace_editor.git |
|
||||
[submodule "mboxreader"] |
|
||||
path = pelican-mboxreader |
|
||||
url = https://github.com/TC01/pelican-mboxreader |
|
||||
[submodule "pelican-version"] |
|
||||
path = pelican-version |
|
||||
url = https://github.com/Shaked/pelican-version |
|
||||
[submodule "lightbox"] |
|
||||
path = lightbox |
|
||||
url = https://github.com/kura/lightbox |
|
||||
[submodule "pelican-ipynb"] |
|
||||
path = pelican-ipynb |
|
||||
url = https://github.com/danielfrg/pelican-ipynb |
|
||||
[submodule "deadlinks"] |
|
||||
path = deadlinks |
|
||||
url = https://github.com/silentlamb/pelican-deadlinks.git |
|
||||
[submodule "pelican-ert"] |
|
||||
path = pelican-ert |
|
||||
url = https://github.com/nogaems/pelican-ert.git |
|
@ -1,13 +0,0 @@ |
|||||
language: python |
|
||||
python: |
|
||||
- "2.7" |
|
||||
- "3.2" |
|
||||
before_install: |
|
||||
- sudo apt-get update -qq |
|
||||
- sudo apt-get install -qq --no-install-recommends ruby-sass |
|
||||
install: |
|
||||
- pip install nose |
|
||||
- pip install -e git://github.com/getpelican/pelican.git#egg=pelican |
|
||||
- pip install --use-mirrors Markdown |
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install --use-mirrors webassets cssmin; fi |
|
||||
script: nosetests |
|
@ -1,39 +0,0 @@ |
|||||
Contributing a plugin |
|
||||
===================== |
|
||||
|
|
||||
Details regarding how to write a plugin are explained in the Pelican `docs`_. |
|
||||
|
|
||||
If you want to contribute, **please be sure** to read our general contributing |
|
||||
`guidelines`_ first. Then you can fork this repository, create a new branch, |
|
||||
make your changes, squash your commits, and issue your pull request from your |
|
||||
new branch (i.e., **not** the ``master`` branch). |
|
||||
|
|
||||
Make sure that your plugin follows the structure below:: |
|
||||
|
|
||||
my_plugin |
|
||||
├── __init__.py |
|
||||
├── my_plugin.py |
|
||||
├── test_my_plugin.py |
|
||||
└── ReadMe.rst / ReadMe.md |
|
||||
|
|
||||
``my_plugin.py`` is the actual plugin implementation. Include a brief |
|
||||
explanation of what the plugin does as a module docstring. Put any further |
|
||||
explanations and usage details into the ``ReadMe`` file. |
|
||||
|
|
||||
``__init__.py`` should contain a single line with ``from .my_plugin import *``. |
|
||||
|
|
||||
Place tests for your plugin in the same folder inside ``test_my_plugin.py``. |
|
||||
If you need content or templates in your tests, you can use the main |
|
||||
``test_data`` folder for that purpose. |
|
||||
|
|
||||
**Note:** Each plugin can contain a LICENSE file stating the license it's |
|
||||
released under. If there is an absence of LICENSE then it defaults to the |
|
||||
*GNU AFFERO GENERAL PUBLIC LICENSE Version 3*. Please refer to the ``LICENSE`` |
|
||||
file for the full text of the license. |
|
||||
|
|
||||
Before making your initial commit, please be sure to add an entry to the repo's |
|
||||
top-level ``ReadMe`` file, adding your plugin to the list (in alphabetical |
|
||||
order) and providing a brief description. |
|
||||
|
|
||||
.. _guidelines: http://docs.getpelican.com/en/latest/contribute.html#using-git-and-github |
|
||||
.. _docs: http://docs.getpelican.com/en/latest/plugins.html#how-to-create-plugins |
|
@ -1,665 +0,0 @@ |
|||||
Unless the folder itself contains a LICENSE stating otherwise, all the files |
|
||||
distributed here are released under the GNU AFFERO GENERAL PUBLIC LICENSE. |
|
||||
|
|
||||
|
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE |
|
||||
Version 3, 19 November 2007 |
|
||||
|
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
|
||||
Everyone is permitted to copy and distribute verbatim copies |
|
||||
of this license document, but changing it is not allowed. |
|
||||
|
|
||||
Preamble |
|
||||
|
|
||||
The GNU Affero General Public License is a free, copyleft license for |
|
||||
software and other kinds of works, specifically designed to ensure |
|
||||
cooperation with the community in the case of network server software. |
|
||||
|
|
||||
The licenses for most software and other practical works are designed |
|
||||
to take away your freedom to share and change the works. By contrast, |
|
||||
our General Public Licenses are intended to guarantee your freedom to |
|
||||
share and change all versions of a program--to make sure it remains free |
|
||||
software for all its users. |
|
||||
|
|
||||
When we speak of free software, we are referring to freedom, not |
|
||||
price. Our General Public Licenses are designed to make sure that you |
|
||||
have the freedom to distribute copies of free software (and charge for |
|
||||
them if you wish), that you receive source code or can get it if you |
|
||||
want it, that you can change the software or use pieces of it in new |
|
||||
free programs, and that you know you can do these things. |
|
||||
|
|
||||
Developers that use our General Public Licenses protect your rights |
|
||||
with two steps: (1) assert copyright on the software, and (2) offer |
|
||||
you this License which gives you legal permission to copy, distribute |
|
||||
and/or modify the software. |
|
||||
|
|
||||
A secondary benefit of defending all users' freedom is that |
|
||||
improvements made in alternate versions of the program, if they |
|
||||
receive widespread use, become available for other developers to |
|
||||
incorporate. Many developers of free software are heartened and |
|
||||
encouraged by the resulting cooperation. However, in the case of |
|
||||
software used on network servers, this result may fail to come about. |
|
||||
The GNU General Public License permits making a modified version and |
|
||||
letting the public access it on a server without ever releasing its |
|
||||
source code to the public. |
|
||||
|
|
||||
The GNU Affero General Public License is designed specifically to |
|
||||
ensure that, in such cases, the modified source code becomes available |
|
||||
to the community. It requires the operator of a network server to |
|
||||
provide the source code of the modified version running there to the |
|
||||
users of that server. Therefore, public use of a modified version, on |
|
||||
a publicly accessible server, gives the public access to the source |
|
||||
code of the modified version. |
|
||||
|
|
||||
An older license, called the Affero General Public License and |
|
||||
published by Affero, was designed to accomplish similar goals. This is |
|
||||
a different license, not a version of the Affero GPL, but Affero has |
|
||||
released a new version of the Affero GPL which permits relicensing under |
|
||||
this license. |
|
||||
|
|
||||
The precise terms and conditions for copying, distribution and |
|
||||
modification follow. |
|
||||
|
|
||||
TERMS AND CONDITIONS |
|
||||
|
|
||||
0. Definitions. |
|
||||
|
|
||||
"This License" refers to version 3 of the GNU Affero General Public License. |
|
||||
|
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of |
|
||||
works, such as semiconductor masks. |
|
||||
|
|
||||
"The Program" refers to any copyrightable work licensed under this |
|
||||
License. Each licensee is addressed as "you". "Licensees" and |
|
||||
"recipients" may be individuals or organizations. |
|
||||
|
|
||||
To "modify" a work means to copy from or adapt all or part of the work |
|
||||
in a fashion requiring copyright permission, other than the making of an |
|
||||
exact copy. The resulting work is called a "modified version" of the |
|
||||
earlier work or a work "based on" the earlier work. |
|
||||
|
|
||||
A "covered work" means either the unmodified Program or a work based |
|
||||
on the Program. |
|
||||
|
|
||||
To "propagate" a work means to do anything with it that, without |
|
||||
permission, would make you directly or secondarily liable for |
|
||||
infringement under applicable copyright law, except executing it on a |
|
||||
computer or modifying a private copy. Propagation includes copying, |
|
||||
distribution (with or without modification), making available to the |
|
||||
public, and in some countries other activities as well. |
|
||||
|
|
||||
To "convey" a work means any kind of propagation that enables other |
|
||||
parties to make or receive copies. Mere interaction with a user through |
|
||||
a computer network, with no transfer of a copy, is not conveying. |
|
||||
|
|
||||
An interactive user interface displays "Appropriate Legal Notices" |
|
||||
to the extent that it includes a convenient and prominently visible |
|
||||
feature that (1) displays an appropriate copyright notice, and (2) |
|
||||
tells the user that there is no warranty for the work (except to the |
|
||||
extent that warranties are provided), that licensees may convey the |
|
||||
work under this License, and how to view a copy of this License. If |
|
||||
the interface presents a list of user commands or options, such as a |
|
||||
menu, a prominent item in the list meets this criterion. |
|
||||
|
|
||||
1. Source Code. |
|
||||
|
|
||||
The "source code" for a work means the preferred form of the work |
|
||||
for making modifications to it. "Object code" means any non-source |
|
||||
form of a work. |
|
||||
|
|
||||
A "Standard Interface" means an interface that either is an official |
|
||||
standard defined by a recognized standards body, or, in the case of |
|
||||
interfaces specified for a particular programming language, one that |
|
||||
is widely used among developers working in that language. |
|
||||
|
|
||||
The "System Libraries" of an executable work include anything, other |
|
||||
than the work as a whole, that (a) is included in the normal form of |
|
||||
packaging a Major Component, but which is not part of that Major |
|
||||
Component, and (b) serves only to enable use of the work with that |
|
||||
Major Component, or to implement a Standard Interface for which an |
|
||||
implementation is available to the public in source code form. A |
|
||||
"Major Component", in this context, means a major essential component |
|
||||
(kernel, window system, and so on) of the specific operating system |
|
||||
(if any) on which the executable work runs, or a compiler used to |
|
||||
produce the work, or an object code interpreter used to run it. |
|
||||
|
|
||||
The "Corresponding Source" for a work in object code form means all |
|
||||
the source code needed to generate, install, and (for an executable |
|
||||
work) run the object code and to modify the work, including scripts to |
|
||||
control those activities. However, it does not include the work's |
|
||||
System Libraries, or general-purpose tools or generally available free |
|
||||
programs which are used unmodified in performing those activities but |
|
||||
which are not part of the work. For example, Corresponding Source |
|
||||
includes interface definition files associated with source files for |
|
||||
the work, and the source code for shared libraries and dynamically |
|
||||
linked subprograms that the work is specifically designed to require, |
|
||||
such as by intimate data communication or control flow between those |
|
||||
subprograms and other parts of the work. |
|
||||
|
|
||||
The Corresponding Source need not include anything that users |
|
||||
can regenerate automatically from other parts of the Corresponding |
|
||||
Source. |
|
||||
|
|
||||
The Corresponding Source for a work in source code form is that |
|
||||
same work. |
|
||||
|
|
||||
2. Basic Permissions. |
|
||||
|
|
||||
All rights granted under this License are granted for the term of |
|
||||
copyright on the Program, and are irrevocable provided the stated |
|
||||
conditions are met. This License explicitly affirms your unlimited |
|
||||
permission to run the unmodified Program. The output from running a |
|
||||
covered work is covered by this License only if the output, given its |
|
||||
content, constitutes a covered work. This License acknowledges your |
|
||||
rights of fair use or other equivalent, as provided by copyright law. |
|
||||
|
|
||||
You may make, run and propagate covered works that you do not |
|
||||
convey, without conditions so long as your license otherwise remains |
|
||||
in force. You may convey covered works to others for the sole purpose |
|
||||
of having them make modifications exclusively for you, or provide you |
|
||||
with facilities for running those works, provided that you comply with |
|
||||
the terms of this License in conveying all material for which you do |
|
||||
not control copyright. Those thus making or running the covered works |
|
||||
for you must do so exclusively on your behalf, under your direction |
|
||||
and control, on terms that prohibit them from making any copies of |
|
||||
your copyrighted material outside their relationship with you. |
|
||||
|
|
||||
Conveying under any other circumstances is permitted solely under |
|
||||
the conditions stated below. Sublicensing is not allowed; section 10 |
|
||||
makes it unnecessary. |
|
||||
|
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
|
||||
|
|
||||
No covered work shall be deemed part of an effective technological |
|
||||
measure under any applicable law fulfilling obligations under article |
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or |
|
||||
similar laws prohibiting or restricting circumvention of such |
|
||||
measures. |
|
||||
|
|
||||
When you convey a covered work, you waive any legal power to forbid |
|
||||
circumvention of technological measures to the extent such circumvention |
|
||||
is effected by exercising rights under this License with respect to |
|
||||
the covered work, and you disclaim any intention to limit operation or |
|
||||
modification of the work as a means of enforcing, against the work's |
|
||||
users, your or third parties' legal rights to forbid circumvention of |
|
||||
technological measures. |
|
||||
|
|
||||
4. Conveying Verbatim Copies. |
|
||||
|
|
||||
You may convey verbatim copies of the Program's source code as you |
|
||||
receive it, in any medium, provided that you conspicuously and |
|
||||
appropriately publish on each copy an appropriate copyright notice; |
|
||||
keep intact all notices stating that this License and any |
|
||||
non-permissive terms added in accord with section 7 apply to the code; |
|
||||
keep intact all notices of the absence of any warranty; and give all |
|
||||
recipients a copy of this License along with the Program. |
|
||||
|
|
||||
You may charge any price or no price for each copy that you convey, |
|
||||
and you may offer support or warranty protection for a fee. |
|
||||
|
|
||||
5. Conveying Modified Source Versions. |
|
||||
|
|
||||
You may convey a work based on the Program, or the modifications to |
|
||||
produce it from the Program, in the form of source code under the |
|
||||
terms of section 4, provided that you also meet all of these conditions: |
|
||||
|
|
||||
a) The work must carry prominent notices stating that you modified |
|
||||
it, and giving a relevant date. |
|
||||
|
|
||||
b) The work must carry prominent notices stating that it is |
|
||||
released under this License and any conditions added under section |
|
||||
7. This requirement modifies the requirement in section 4 to |
|
||||
"keep intact all notices". |
|
||||
|
|
||||
c) You must license the entire work, as a whole, under this |
|
||||
License to anyone who comes into possession of a copy. This |
|
||||
License will therefore apply, along with any applicable section 7 |
|
||||
additional terms, to the whole of the work, and all its parts, |
|
||||
regardless of how they are packaged. This License gives no |
|
||||
permission to license the work in any other way, but it does not |
|
||||
invalidate such permission if you have separately received it. |
|
||||
|
|
||||
d) If the work has interactive user interfaces, each must display |
|
||||
Appropriate Legal Notices; however, if the Program has interactive |
|
||||
interfaces that do not display Appropriate Legal Notices, your |
|
||||
work need not make them do so. |
|
||||
|
|
||||
A compilation of a covered work with other separate and independent |
|
||||
works, which are not by their nature extensions of the covered work, |
|
||||
and which are not combined with it such as to form a larger program, |
|
||||
in or on a volume of a storage or distribution medium, is called an |
|
||||
"aggregate" if the compilation and its resulting copyright are not |
|
||||
used to limit the access or legal rights of the compilation's users |
|
||||
beyond what the individual works permit. Inclusion of a covered work |
|
||||
in an aggregate does not cause this License to apply to the other |
|
||||
parts of the aggregate. |
|
||||
|
|
||||
6. Conveying Non-Source Forms. |
|
||||
|
|
||||
You may convey a covered work in object code form under the terms |
|
||||
of sections 4 and 5, provided that you also convey the |
|
||||
machine-readable Corresponding Source under the terms of this License, |
|
||||
in one of these ways: |
|
||||
|
|
||||
a) Convey the object code in, or embodied in, a physical product |
|
||||
(including a physical distribution medium), accompanied by the |
|
||||
Corresponding Source fixed on a durable physical medium |
|
||||
customarily used for software interchange. |
|
||||
|
|
||||
b) Convey the object code in, or embodied in, a physical product |
|
||||
(including a physical distribution medium), accompanied by a |
|
||||
written offer, valid for at least three years and valid for as |
|
||||
long as you offer spare parts or customer support for that product |
|
||||
model, to give anyone who possesses the object code either (1) a |
|
||||
copy of the Corresponding Source for all the software in the |
|
||||
product that is covered by this License, on a durable physical |
|
||||
medium customarily used for software interchange, for a price no |
|
||||
more than your reasonable cost of physically performing this |
|
||||
conveying of source, or (2) access to copy the |
|
||||
Corresponding Source from a network server at no charge. |
|
||||
|
|
||||
c) Convey individual copies of the object code with a copy of the |
|
||||
written offer to provide the Corresponding Source. This |
|
||||
alternative is allowed only occasionally and noncommercially, and |
|
||||
only if you received the object code with such an offer, in accord |
|
||||
with subsection 6b. |
|
||||
|
|
||||
d) Convey the object code by offering access from a designated |
|
||||
place (gratis or for a charge), and offer equivalent access to the |
|
||||
Corresponding Source in the same way through the same place at no |
|
||||
further charge. You need not require recipients to copy the |
|
||||
Corresponding Source along with the object code. If the place to |
|
||||
copy the object code is a network server, the Corresponding Source |
|
||||
may be on a different server (operated by you or a third party) |
|
||||
that supports equivalent copying facilities, provided you maintain |
|
||||
clear directions next to the object code saying where to find the |
|
||||
Corresponding Source. Regardless of what server hosts the |
|
||||
Corresponding Source, you remain obligated to ensure that it is |
|
||||
available for as long as needed to satisfy these requirements. |
|
||||
|
|
||||
e) Convey the object code using peer-to-peer transmission, provided |
|
||||
you inform other peers where the object code and Corresponding |
|
||||
Source of the work are being offered to the general public at no |
|
||||
charge under subsection 6d. |
|
||||
|
|
||||
A separable portion of the object code, whose source code is excluded |
|
||||
from the Corresponding Source as a System Library, need not be |
|
||||
included in conveying the object code work. |
|
||||
|
|
||||
A "User Product" is either (1) a "consumer product", which means any |
|
||||
tangible personal property which is normally used for personal, family, |
|
||||
or household purposes, or (2) anything designed or sold for incorporation |
|
||||
into a dwelling. In determining whether a product is a consumer product, |
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular |
|
||||
product received by a particular user, "normally used" refers to a |
|
||||
typical or common use of that class of product, regardless of the status |
|
||||
of the particular user or of the way in which the particular user |
|
||||
actually uses, or expects or is expected to use, the product. A product |
|
||||
is a consumer product regardless of whether the product has substantial |
|
||||
commercial, industrial or non-consumer uses, unless such uses represent |
|
||||
the only significant mode of use of the product. |
|
||||
|
|
||||
"Installation Information" for a User Product means any methods, |
|
||||
procedures, authorization keys, or other information required to install |
|
||||
and execute modified versions of a covered work in that User Product from |
|
||||
a modified version of its Corresponding Source. The information must |
|
||||
suffice to ensure that the continued functioning of the modified object |
|
||||
code is in no case prevented or interfered with solely because |
|
||||
modification has been made. |
|
||||
|
|
||||
If you convey an object code work under this section in, or with, or |
|
||||
specifically for use in, a User Product, and the conveying occurs as |
|
||||
part of a transaction in which the right of possession and use of the |
|
||||
User Product is transferred to the recipient in perpetuity or for a |
|
||||
fixed term (regardless of how the transaction is characterized), the |
|
||||
Corresponding Source conveyed under this section must be accompanied |
|
||||
by the Installation Information. But this requirement does not apply |
|
||||
if neither you nor any third party retains the ability to install |
|
||||
modified object code on the User Product (for example, the work has |
|
||||
been installed in ROM). |
|
||||
|
|
||||
The requirement to provide Installation Information does not include a |
|
||||
requirement to continue to provide support service, warranty, or updates |
|
||||
for a work that has been modified or installed by the recipient, or for |
|
||||
the User Product in which it has been modified or installed. Access to a |
|
||||
network may be denied when the modification itself materially and |
|
||||
adversely affects the operation of the network or violates the rules and |
|
||||
protocols for communication across the network. |
|
||||
|
|
||||
Corresponding Source conveyed, and Installation Information provided, |
|
||||
in accord with this section must be in a format that is publicly |
|
||||
documented (and with an implementation available to the public in |
|
||||
source code form), and must require no special password or key for |
|
||||
unpacking, reading or copying. |
|
||||
|
|
||||
7. Additional Terms. |
|
||||
|
|
||||
"Additional permissions" are terms that supplement the terms of this |
|
||||
License by making exceptions from one or more of its conditions. |
|
||||
Additional permissions that are applicable to the entire Program shall |
|
||||
be treated as though they were included in this License, to the extent |
|
||||
that they are valid under applicable law. If additional permissions |
|
||||
apply only to part of the Program, that part may be used separately |
|
||||
under those permissions, but the entire Program remains governed by |
|
||||
this License without regard to the additional permissions. |
|
||||
|
|
||||
When you convey a copy of a covered work, you may at your option |
|
||||
remove any additional permissions from that copy, or from any part of |
|
||||
it. (Additional permissions may be written to require their own |
|
||||
removal in certain cases when you modify the work.) You may place |
|
||||
additional permissions on material, added by you to a covered work, |
|
||||
for which you have or can give appropriate copyright permission. |
|
||||
|
|
||||
Notwithstanding any other provision of this License, for material you |
|
||||
add to a covered work, you may (if authorized by the copyright holders of |
|
||||
that material) supplement the terms of this License with terms: |
|
||||
|
|
||||
a) Disclaiming warranty or limiting liability differently from the |
|
||||
terms of sections 15 and 16 of this License; or |
|
||||
|
|
||||
b) Requiring preservation of specified reasonable legal notices or |
|
||||
author attributions in that material or in the Appropriate Legal |
|
||||
Notices displayed by works containing it; or |
|
||||
|
|
||||
c) Prohibiting misrepresentation of the origin of that material, or |
|
||||
requiring that modified versions of such material be marked in |
|
||||
reasonable ways as different from the original version; or |
|
||||
|
|
||||
d) Limiting the use for publicity purposes of names of licensors or |
|
||||
authors of the material; or |
|
||||
|
|
||||
e) Declining to grant rights under trademark law for use of some |
|
||||
trade names, trademarks, or service marks; or |
|
||||
|
|
||||
f) Requiring indemnification of licensors and authors of that |
|
||||
material by anyone who conveys the material (or modified versions of |
|
||||
it) with contractual assumptions of liability to the recipient, for |
|
||||
any liability that these contractual assumptions directly impose on |
|
||||
those licensors and authors. |
|
||||
|
|
||||
All other non-permissive additional terms are considered "further |
|
||||
restrictions" within the meaning of section 10. If the Program as you |
|
||||
received it, or any part of it, contains a notice stating that it is |
|
||||
governed by this License along with a term that is a further |
|
||||
restriction, you may remove that term. If a license document contains |
|
||||
a further restriction but permits relicensing or conveying under this |
|
||||
License, you may add to a covered work material governed by the terms |
|
||||
of that license document, provided that the further restriction does |
|
||||
not survive such relicensing or conveying. |
|
||||
|
|
||||
If you add terms to a covered work in accord with this section, you |
|
||||
must place, in the relevant source files, a statement of the |
|
||||
additional terms that apply to those files, or a notice indicating |
|
||||
where to find the applicable terms. |
|
||||
|
|
||||
Additional terms, permissive or non-permissive, may be stated in the |
|
||||
form of a separately written license, or stated as exceptions; |
|
||||
the above requirements apply either way. |
|
||||
|
|
||||
8. Termination. |
|
||||
|
|
||||
You may not propagate or modify a covered work except as expressly |
|
||||
provided under this License. Any attempt otherwise to propagate or |
|
||||
modify it is void, and will automatically terminate your rights under |
|
||||
this License (including any patent licenses granted under the third |
|
||||
paragraph of section 11). |
|
||||
|
|
||||
However, if you cease all violation of this License, then your |
|
||||
license from a particular copyright holder is reinstated (a) |
|
||||
provisionally, unless and until the copyright holder explicitly and |
|
||||
finally terminates your license, and (b) permanently, if the copyright |
|
||||
holder fails to notify you of the violation by some reasonable means |
|
||||
prior to 60 days after the cessation. |
|
||||
|
|
||||
Moreover, your license from a particular copyright holder is |
|
||||
reinstated permanently if the copyright holder notifies you of the |
|
||||
violation by some reasonable means, this is the first time you have |
|
||||
received notice of violation of this License (for any work) from that |
|
||||
copyright holder, and you cure the violation prior to 30 days after |
|
||||
your receipt of the notice. |
|
||||
|
|
||||
Termination of your rights under this section does not terminate the |
|
||||
licenses of parties who have received copies or rights from you under |
|
||||
this License. If your rights have been terminated and not permanently |
|
||||
reinstated, you do not qualify to receive new licenses for the same |
|
||||
material under section 10. |
|
||||
|
|
||||
9. Acceptance Not Required for Having Copies. |
|
||||
|
|
||||
You are not required to accept this License in order to receive or |
|
||||
run a copy of the Program. Ancillary propagation of a covered work |
|
||||
occurring solely as a consequence of using peer-to-peer transmission |
|
||||
to receive a copy likewise does not require acceptance. However, |
|
||||
nothing other than this License grants you permission to propagate or |
|
||||
modify any covered work. These actions infringe copyright if you do |
|
||||
not accept this License. Therefore, by modifying or propagating a |
|
||||
covered work, you indicate your acceptance of this License to do so. |
|
||||
|
|
||||
10. Automatic Licensing of Downstream Recipients. |
|
||||
|
|
||||
Each time you convey a covered work, the recipient automatically |
|
||||
receives a license from the original licensors, to run, modify and |
|
||||
propagate that work, subject to this License. You are not responsible |
|
||||
for enforcing compliance by third parties with this License. |
|
||||
|
|
||||
An "entity transaction" is a transaction transferring control of an |
|
||||
organization, or substantially all assets of one, or subdividing an |
|
||||
organization, or merging organizations. If propagation of a covered |
|
||||
work results from an entity transaction, each party to that |
|
||||
transaction who receives a copy of the work also receives whatever |
|
||||
licenses to the work the party's predecessor in interest had or could |
|
||||
give under the previous paragraph, plus a right to possession of the |
|
||||
Corresponding Source of the work from the predecessor in interest, if |
|
||||
the predecessor has it or can get it with reasonable efforts. |
|
||||
|
|
||||
You may not impose any further restrictions on the exercise of the |
|
||||
rights granted or affirmed under this License. For example, you may |
|
||||
not impose a license fee, royalty, or other charge for exercise of |
|
||||
rights granted under this License, and you may not initiate litigation |
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that |
|
||||
any patent claim is infringed by making, using, selling, offering for |
|
||||
sale, or importing the Program or any portion of it. |
|
||||
|
|
||||
11. Patents. |
|
||||
|
|
||||
A "contributor" is a copyright holder who authorizes use under this |
|
||||
License of the Program or a work on which the Program is based. The |
|
||||
work thus licensed is called the contributor's "contributor version". |
|
||||
|
|
||||
A contributor's "essential patent claims" are all patent claims |
|
||||
owned or controlled by the contributor, whether already acquired or |
|
||||
hereafter acquired, that would be infringed by some manner, permitted |
|
||||
by this License, of making, using, or selling its contributor version, |
|
||||
but do not include claims that would be infringed only as a |
|
||||
consequence of further modification of the contributor version. For |
|
||||
purposes of this definition, "control" includes the right to grant |
|
||||
patent sublicenses in a manner consistent with the requirements of |
|
||||
this License. |
|
||||
|
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free |
|
||||
patent license under the contributor's essential patent claims, to |
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and |
|
||||
propagate the contents of its contributor version. |
|
||||
|
|
||||
In the following three paragraphs, a "patent license" is any express |
|
||||
agreement or commitment, however denominated, not to enforce a patent |
|
||||
(such as an express permission to practice a patent or covenant not to |
|
||||
sue for patent infringement). To "grant" such a patent license to a |
|
||||
party means to make such an agreement or commitment not to enforce a |
|
||||
patent against the party. |
|
||||
|
|
||||
If you convey a covered work, knowingly relying on a patent license, |
|
||||
and the Corresponding Source of the work is not available for anyone |
|
||||
to copy, free of charge and under the terms of this License, through a |
|
||||
publicly available network server or other readily accessible means, |
|
||||
then you must either (1) cause the Corresponding Source to be so |
|
||||
available, or (2) arrange to deprive yourself of the benefit of the |
|
||||
patent license for this particular work, or (3) arrange, in a manner |
|
||||
consistent with the requirements of this License, to extend the patent |
|
||||
license to downstream recipients. "Knowingly relying" means you have |
|
||||
actual knowledge that, but for the patent license, your conveying the |
|
||||
covered work in a country, or your recipient's use of the covered work |
|
||||
in a country, would infringe one or more identifiable patents in that |
|
||||
country that you have reason to believe are valid. |
|
||||
|
|
||||
If, pursuant to or in connection with a single transaction or |
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a |
|
||||
covered work, and grant a patent license to some of the parties |
|
||||
receiving the covered work authorizing them to use, propagate, modify |
|
||||
or convey a specific copy of the covered work, then the patent license |
|
||||
you grant is automatically extended to all recipients of the covered |
|
||||
work and works based on it. |
|
||||
|
|
||||
A patent license is "discriminatory" if it does not include within |
|
||||
the scope of its coverage, prohibits the exercise of, or is |
|
||||
conditioned on the non-exercise of one or more of the rights that are |
|
||||
specifically granted under this License. You may not convey a covered |
|
||||
work if you are a party to an arrangement with a third party that is |
|
||||
in the business of distributing software, under which you make payment |
|
||||
to the third party based on the extent of your activity of conveying |
|
||||
the work, and under which the third party grants, to any of the |
|
||||
parties who would receive the covered work from you, a discriminatory |
|
||||
patent license (a) in connection with copies of the covered work |
|
||||
conveyed by you (or copies made from those copies), or (b) primarily |
|
||||
for and in connection with specific products or compilations that |
|
||||
contain the covered work, unless you entered into that arrangement, |
|
||||
or that patent license was granted, prior to 28 March 2007. |
|
||||
|
|
||||
Nothing in this License shall be construed as excluding or limiting |
|
||||
any implied license or other defenses to infringement that may |
|
||||
otherwise be available to you under applicable patent law. |
|
||||
|
|
||||
12. No Surrender of Others' Freedom. |
|
||||
|
|
||||
If conditions are imposed on you (whether by court order, agreement or |
|
||||
otherwise) that contradict the conditions of this License, they do not |
|
||||
excuse you from the conditions of this License. If you cannot convey a |
|
||||
covered work so as to satisfy simultaneously your obligations under this |
|
||||
License and any other pertinent obligations, then as a consequence you may |
|
||||
not convey it at all. For example, if you agree to terms that obligate you |
|
||||
to collect a royalty for further conveying from those to whom you convey |
|
||||
the Program, the only way you could satisfy both those terms and this |
|
||||
License would be to refrain entirely from conveying the Program. |
|
||||
|
|
||||
13. Remote Network Interaction; Use with the GNU General Public License. |
|
||||
|
|
||||
Notwithstanding any other provision of this License, if you modify the |
|
||||
Program, your modified version must prominently offer all users |
|
||||
interacting with it remotely through a computer network (if your version |
|
||||
supports such interaction) an opportunity to receive the Corresponding |
|
||||
Source of your version by providing access to the Corresponding Source |
|
||||
from a network server at no charge, through some standard or customary |
|
||||
means of facilitating copying of software. This Corresponding Source |
|
||||
shall include the Corresponding Source for any work covered by version 3 |
|
||||
of the GNU General Public License that is incorporated pursuant to the |
|
||||
following paragraph. |
|
||||
|
|
||||
Notwithstanding any other provision of this License, you have |
|
||||
permission to link or combine any covered work with a work licensed |
|
||||
under version 3 of the GNU General Public License into a single |
|
||||
combined work, and to convey the resulting work. The terms of this |
|
||||
License will continue to apply to the part which is the covered work, |
|
||||
but the work with which it is combined will remain governed by version |
|
||||
3 of the GNU General Public License. |
|
||||
|
|
||||
14. Revised Versions of this License. |
|
||||
|
|
||||
The Free Software Foundation may publish revised and/or new versions of |
|
||||
the GNU Affero General Public License from time to time. Such new versions |
|
||||
will be similar in spirit to the present version, but may differ in detail to |
|
||||
address new problems or concerns. |
|
||||
|
|
||||
Each version is given a distinguishing version number. If the |
|
||||
Program specifies that a certain numbered version of the GNU Affero General |
|
||||
Public License "or any later version" applies to it, you have the |
|
||||
option of following the terms and conditions either of that numbered |
|
||||
version or of any later version published by the Free Software |
|
||||
Foundation. If the Program does not specify a version number of the |
|
||||
GNU Affero General Public License, you may choose any version ever published |
|
||||
by the Free Software Foundation. |
|
||||
|
|
||||
If the Program specifies that a proxy can decide which future |
|
||||
versions of the GNU Affero General Public License can be used, that proxy's |
|
||||
public statement of acceptance of a version permanently authorizes you |
|
||||
to choose that version for the Program. |
|
||||
|
|
||||
Later license versions may give you additional or different |
|
||||
permissions. However, no additional obligations are imposed on any |
|
||||
author or copyright holder as a result of your choosing to follow a |
|
||||
later version. |
|
||||
|
|
||||
15. Disclaimer of Warranty. |
|
||||
|
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
|
||||
|
|
||||
16. Limitation of Liability. |
|
||||
|
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
|
||||
SUCH DAMAGES. |
|
||||
|
|
||||
17. Interpretation of Sections 15 and 16. |
|
||||
|
|
||||
If the disclaimer of warranty and limitation of liability provided |
|
||||
above cannot be given local legal effect according to their terms, |
|
||||
reviewing courts shall apply local law that most closely approximates |
|
||||
an absolute waiver of all civil liability in connection with the |
|
||||
Program, unless a warranty or assumption of liability accompanies a |
|
||||
copy of the Program in return for a fee. |
|
||||
|
|
||||
END OF TERMS AND CONDITIONS |
|
||||
|
|
||||
How to Apply These Terms to Your New Programs |
|
||||
|
|
||||
If you develop a new program, and you want it to be of the greatest |
|
||||
possible use to the public, the best way to achieve this is to make it |
|
||||
free software which everyone can redistribute and change under these terms. |
|
||||
|
|
||||
To do so, attach the following notices to the program. It is safest |
|
||||
to attach them to the start of each source file to most effectively |
|
||||
state the exclusion of warranty; and each file should have at least |
|
||||
the "copyright" line and a pointer to where the full notice is found. |
|
||||
|
|
||||
<one line to give the program's name and a brief idea of what it does.> |
|
||||
Copyright (C) <year> <name of author> |
|
||||
|
|
||||
This program is free software: you can redistribute it and/or modify |
|
||||
it under the terms of the GNU Affero General Public License as published by |
|
||||
the Free Software Foundation, either version 3 of the License, or |
|
||||
(at your option) any later version. |
|
||||
|
|
||||
This program is distributed in the hope that it will be useful, |
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
GNU Affero General Public License for more details. |
|
||||
|
|
||||
You should have received a copy of the GNU Affero General Public License |
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
|
|
||||
Also add information on how to contact you by electronic and paper mail. |
|
||||
|
|
||||
If your software can interact with users remotely through a computer |
|
||||
network, you should also make sure that it provides a way for users to |
|
||||
get its source. For example, if your program is a web application, its |
|
||||
interface could display a "Source" link that leads users to an archive |
|
||||
of the code. There are many ways you could offer source, and different |
|
||||
solutions will be better for different programs; see section 13 for the |
|
||||
specific requirements. |
|
||||
|
|
||||
You should also get your employer (if you work as a programmer) or school, |
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. |
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see |
|
||||
<http://www.gnu.org/licenses/>. |
|
@ -1,288 +0,0 @@ |
|||||
Pelican Plugins |
|
||||
############### |
|
||||
|
|
||||
Beginning with version 3.0, Pelican supports plugins. Plugins are a way to add |
|
||||
features to Pelican without having to directly modify the Pelican core. Starting |
|
||||
with 3.2, all plugins (including the ones previously in the core) have been |
|
||||
moved to this repository, so this is the central place for all plugins. |
|
||||
|
|
||||
How to use plugins |
|
||||
================== |
|
||||
|
|
||||
The easiest way to install and use these plugins is to clone this repo:: |
|
||||
|
|
||||
git clone --recursive https://github.com/getpelican/pelican-plugins |
|
||||
|
|
||||
and activate the ones you want in your settings file:: |
|
||||
|
|
||||
PLUGIN_PATHS = ['path/to/pelican-plugins'] |
|
||||
PLUGINS = ['assets', 'sitemap', 'gravatar'] |
|
||||
|
|
||||
``PLUGIN_PATHS`` can be a path relative to your settings file or an absolute path. |
|
||||
|
|
||||
Alternatively, if plugins are in an importable path, you can omit ``PLUGIN_PATHS`` |
|
||||
and list them:: |
|
||||
|
|
||||
PLUGINS = ['assets', 'sitemap', 'gravatar'] |
|
||||
|
|
||||
or you can ``import`` the plugin directly and give that:: |
|
||||
|
|
||||
import my_plugin |
|
||||
PLUGINS = [my_plugin, 'assets'] |
|
||||
|
|
||||
Plugin descriptions |
|
||||
=================== |
|
||||
|
|
||||
======================== =========================================================== |
|
||||
Plugin Description |
|
||||
======================== =========================================================== |
|
||||
Ace Editor Replace default **<code>** by an Ace__ code editor with settings configure on pelicanconf.py. |
|
||||
|
|
||||
Always modified Copy created date metadata into modified date for easy "latest updates" indexes |
|
||||
|
|
||||
AsciiDoc reader Use AsciiDoc to write your posts. |
|
||||
|
|
||||
Asset management Use the Webassets module to manage assets such as CSS and JS files. |
|
||||
|
|
||||
Auto Pages Generate custom content for generated Author, Category, and Tag pages (e.g. author biography) |
|
||||
|
|
||||
Backref Translate Add a new attribute (``is_translation_of``) to every article/page (which is a translation) pointing back to the original article/page which is being translated |
|
||||
|
|
||||
Better code line numbers Allow code blocks with line numbers to wrap |
|
||||
|
|
||||
Better code samples Wraps ``table`` blocks with ``div > .hilitewrapper > .codehilitetable`` class attribute, allowing for scrollable code blocks. |
|
||||
|
|
||||
Better figures/samples Adds a ``style="width: ???px; height: auto;"`` attribute to any ``<img>`` tags in the content |
|
||||
|
|
||||
bootstrap-rst Provides most (though not all) of Bootstrap's features as rst directives |
|
||||
|
|
||||
bootstrapify Automatically add bootstraps default classes to your content |
|
||||
|
|
||||
Category Order Order categories (and tags) by the number of articles in that category (or tag). |
|
||||
|
|
||||
CJK auto spacing Inserts spaces between Chinese/Japanese/Korean characters and English words |
|
||||
|
|
||||
Clean summary Cleans your summary of excess images |
|
||||
|
|
||||
Code include Includes Pygments highlighted code in reStructuredText |
|
||||
|
|
||||
Collate content Makes categories of content available to the template as lists through a ``collations`` attribute |
|
||||
|
|
||||
Creole reader Allows you to write your posts using the wikicreole syntax |
|
||||
|
|
||||
Custom article URLs Adds support for defining different default URLs for different categories |
|
||||
|
|
||||
Dateish Treat arbitrary metadata fields as datetime objects |
|
||||
|
|
||||
Dead Links Manage dead links (website not available, errors such as 403, 404) |
|
||||
|
|
||||
Disqus static comments Adds a disqus_comments property to all articles. Comments are fetched at generation time using disqus API |
|
||||
|
|
||||
Encrypt content Password protect pages and articles |
|
||||
|
|
||||
Events Add event start, duration, and location info to post metadata to generate an iCalendar file |
|
||||
|
|
||||
Extract table of content Extracts table of contents (ToC) from ``article.content`` |
|
||||
|
|
||||
Figure References Provides a system to number and references figures |
|
||||
|
|
||||
Filetime from Git Uses Git commit to determine page date |
|
||||
|
|
||||
Filetime from Hg Uses Mercurial commit to determine page date |
|
||||
|
|
||||
Footer Insert Add standardized footer (e.g., author information) at end of every article |
|
||||
|
|
||||
GA Page View Display Google Analytics page views on individual articles and pages |
|
||||
|
|
||||
Gallery Allows an article to contain an album of pictures |
|
||||
|
|
||||
Gist directive This plugin adds a ``gist`` reStructuredText directive. |
|
||||
|
|
||||
GitHub wiki Converts a flat github wiki into a structured read only wiki on your site |
|
||||
|
|
||||
GitHub activity On the template side, you just have to iterate over the ``github_activity`` variable |
|
||||
|
|
||||
Global license Allows you to define a ``LICENSE`` setting and adds the contents of that license variable to the article's context |
|
||||
|
|
||||
Glossary Adds a variable containing definitions extracted from definition lists in articles and pages. This variable is visible to all page templates. |
|
||||
|
|
||||
Goodreads activity Lists books from your Goodreads shelves |
|
||||
|
|
||||
GooglePlus comments Adds GooglePlus comments to Pelican |
|
||||
|
|
||||
Gravatar Assigns the ``author_gravatar`` variable to the Gravatar URL and makes the variable available within the article's context |
|
||||
|
|
||||
Gzip cache Enables certain web servers (e.g., Nginx) to use a static cache of gzip-compressed files to prevent the server from compressing files during an HTTP call |
|
||||
|
|
||||
Headerid This plugin adds an anchor to each heading so you can deeplink to headers in reStructuredText articles. |
|
||||
|
|
||||
HTML entities Allows you to enter HTML entities such as ©, <, • inline in a RST document |
|
||||
|
|
||||
HTML tags for rST Allows you to use HTML tags from within reST documents |
|
||||
|
|
||||
I18N Sub-sites Extends the translations functionality by creating internationalized sub-sites for the default site |
|
||||
|
|
||||
ical Looks for and parses an ``.ics`` file if it is defined in a given page's ``calendar`` metadata. |
|
||||
|
|
||||
Image Process Automates the processing of images based on their class attributes |
|
||||
|
|
||||
Interlinks Lets you add frequently used URLs to your markup using short keywords |
|
||||
|
|
||||
Jinja2 Content Allows the use of Jinja2 template code in articles, including ``include`` and ``import`` statements. Replacement for pelican-jinja2content. |
|
||||
|
|
||||
Just table Allows you to easily create and manage tables. You can embed the tables into posts with a simple way. |
|
||||
|
|
||||
Libravatar Allows inclusion of user profile pictures from libravatar.org |
|
||||
|
|
||||
Link Class Allows the insertion of class attributes into generated <a> elements (Markdown only) |
|
||||
|
|
||||
Linker Allows the definition of custom linker commands in analogy to the builtin ``{filename}``, ``{attach}``, ``{category}``, ``{tag}``, ``{author}``, and ``{index}`` syntax |
|
||||
|
|
||||
Liquid-style tags Allows liquid-style tags to be inserted into markdown within Pelican documents |
|
||||
|
|
||||
Load CSV Adds ``csv`` Jinja tag to display the contents of a CSV file as an HTML table |
|
||||
|
|
||||
Markdown Inline Extend Enables you to add customize inline patterns to your markdown |
|
||||
|
|
||||
Markdown-metaYAML Pelican reader to enable YAML-style metadata in markdown articles |
|
||||
|
|
||||
Math Render Gives pelican the ability to render mathematics |
|
||||
|
|
||||
Mbox Reader Generate articles automatically via email, given a path to a Unix mbox |
|
||||
|
|
||||
Multi parts posts Allows you to write multi-part posts |
|
||||
|
|
||||
Neighbor articles Adds ``next_article`` (newer) and ``prev_article`` (older) variables to the article's context |
|
||||
|
|
||||
Open graph Generates Open Graph tags for your articles |
|
||||
|
|
||||
Optimize images Applies lossless compression on JPEG and PNG images |
|
||||
|
|
||||
Org Reader Create posts via Emacs Orgmode files |
|
||||
|
|
||||
Page View Pull page view count from Google Analytics. |
|
||||
|
|
||||
Panorama Creates charts from posts metadata |
|
||||
|
|
||||
PDF generator Automatically exports articles and pages as PDF files |
|
||||
|
|
||||
PDF Images If an img tag contains a PDF, EPS or PS file as a source, this plugin generates a PNG preview which will then act as a link to the original file. |
|
||||
|
|
||||
Pelican Cite Produces inline citations and a bibliography in articles and pages, using a BibTeX file. |
|
||||
|
|
||||
Pelican Comment System Allows you to add static comments to your articles |
|
||||
|
|
||||
pelican-ert Allows you to add estimated reading time of an article |
|
||||
|
|
||||
Pelican-flickr Brings your Flickr photos & sets into your static website |
|
||||
|
|
||||
Pelican Genealogy Add surnames and people so metadata and context can be accessed from within a theme to provide surname and person pages |
|
||||
|
|
||||
Pelican Gist tag Easily embed GitHub Gists in your Pelican articles |
|
||||
|
|
||||
Pelican Github Projects Embed a list of your public GitHub projects in your pages |
|
||||
|
|
||||
pelican_javascript Allows you to embed Javascript and CSS files into individual articles |
|
||||
|
|
||||
Pelican Jinja2Content Allows the use of Jinja2 template code in articles, including ``include`` and ``import`` statements |
|
||||
|
|
||||
Pelican Link Class Set class attribute of ``<a>`` elements according to whether the link is external or internal |
|
||||
|
|
||||
Pelican Page Hierarchy Creates a URL hierarchy for pages that matches the filesystem hierarchy of their sources |
|
||||
|
|
||||
Pelican Page Order Adds a ``page_order`` attribute to all pages if one is not defined. |
|
||||
|
|
||||
Pelican Themes Generator Generates theme screenshots from the Pelican Themes repository |
|
||||
|
|
||||
pelican-rdf Allows the processing of .rdf vocabularies, and the generation of a lightweight documentation. |
|
||||
|
|
||||
pelican-toc Generates a Table of Contents and make it available to the theme via article.toc |
|
||||
|
|
||||
Pelican Vimeo Enables you to embed Vimeo videos in your pages and articles |
|
||||
|
|
||||
Pelican YouTube Enables you to embed YouTube videos in your pages and articles |
|
||||
|
|
||||
pelicanfly Lets you type things like ``i ♥ :fa-coffee:`` in your Markdown documents and have it come out as little Font Awesome icons in the browser |
|
||||
|
|
||||
Photos Add a photo or a gallery of photos to an article, or include photos in the body text. Resize photos as needed. |
|
||||
|
|
||||
permalink Enables a kind of permalink using html redirects. |
|
||||
|
|
||||
Pin to top Pin Pelican's article(s) to top "Sticky article" |
|
||||
|
|
||||
PlantUML Allows you to define UML diagrams directly into rst documents using the great PlantUML tool |
|
||||
|
|
||||
Post Revision Extract article and page revision information from Git commit history |
|
||||
|
|
||||
Post statistics Calculates various statistics about a post and store them in an article.stats dictionary |
|
||||
|
|
||||
Random article Generates a html file which redirect to a random article |
|
||||
|
|
||||
Read More link Inserts an inline "read more" or "continue" link into the last html element of the object summary |
|
||||
|
|
||||
Related posts Adds the ``related_posts`` variable to the article's context |
|
||||
|
|
||||
Render Math Render mathematics in content via the MathJax Javascript engine |
|
||||
|
|
||||
Replacer Replace a text of a generated HTML |
|
||||
|
|
||||
Representative image Extracts a representative image (i.e, featured image) from the article's summary or content |
|
||||
|
|
||||
RMD Reader Create posts via knitr RMarkdown files |
|
||||
|
|
||||
Section number Adds section numbers for article headers, in the form of ``2.3.3`` |
|
||||
|
|
||||
Series Groups related articles into a series |
|
||||
|
|
||||
Share post Creates share URLs of article |
|
||||
|
|
||||
Show Source Place a link to the source text of your posts. |
|
||||
|
|
||||
Simple footnotes Adds footnotes to blog posts |
|
||||
|
|
||||
Sitemap Generates plain-text or XML sitemaps |
|
||||
|
|
||||
Slim Render theme template files via Plim, a Python port of Slim, instead of Jinja |
|
||||
|
|
||||
Static comments Allows you to add static comments to an article |
|
||||
|
|
||||
Subcategory Adds support for subcategories |
|
||||
|
|
||||
Sub parts Break a very long article in parts, without polluting the timeline with lots of small articles. |
|
||||
|
|
||||
Summary Allows easy, variable length summaries directly embedded into the body of your articles |
|
||||
|
|
||||
tag_cloud Provides a tag_cloud |
|
||||
|
|
||||
Textile Reader Adds support for Textile markup |
|
||||
|
|
||||
Thumbnailer Creates thumbnails for all of the images found under a specific directory |
|
||||
|
|
||||
Tipue Search Serializes generated HTML to JSON that can be used by jQuery plugin - Tipue Search |
|
||||
|
|
||||
Touch Does a touch on your generated files using the date metadata from the content |
|
||||
|
|
||||
Twitter Bootstrap Defines some rst directive that enable a clean usage of the twitter bootstrap CSS and Javascript components |
|
||||
|
|
||||
txt2tags_reader Reader that renders txt2tags markup in content |
|
||||
|
|
||||
Unity WebGL Easily embed Unity3d games into posts and pages |
|
||||
|
|
||||
Video Privacy Enhancer Increases user privacy by stopping YouTube, Google, et al from placing cookies via embedded video |
|
||||
|
|
||||
W3C validate Submits generated HTML content to the W3C Markup Validation Service |
|
||||
|
|
||||
Yuicompressor Minify CSS and JS files on building step |
|
||||
======================== =========================================================== |
|
||||
|
|
||||
__ https://ace.c9.io |
|
||||
|
|
||||
Please refer to the ``Readme`` file in a plugin's folder for detailed information about |
|
||||
that plugin. |
|
||||
|
|
||||
Contributing a plugin |
|
||||
===================== |
|
||||
|
|
||||
Please refer to the `Contributing`_ file. |
|
||||
|
|
||||
.. _Contributing: Contributing.rst |
|
@ -1,14 +0,0 @@ |
|||||
# Always Modified |
|
||||
|
|
||||
Say you want to sort by modified date/time in a theme template, but not all |
|
||||
your articles have modified date/timestamps explicitly defined in article |
|
||||
metadata. This plugin facilitates that sorting by assuming the modified date |
|
||||
(if undefined) is equal to the created date. |
|
||||
|
|
||||
## Usage |
|
||||
|
|
||||
1. Add `ALWAYS_MODIFIED = True` to your settings file. |
|
||||
2. Now you can sort by modified date in your templates: |
|
||||
|
|
||||
{% for article in articles|sort(reverse=True,attribute='modified') %} |
|
||||
|
|
@ -1 +0,0 @@ |
|||||
from .always_modified import * |
|
@ -1,20 +0,0 @@ |
|||||
""" |
|
||||
If "modified" date/time is not defined in article metadata, fall back to the "created" date. |
|
||||
""" |
|
||||
|
|
||||
from pelican import signals |
|
||||
from pelican.contents import Content, Article |
|
||||
|
|
||||
def add_modified(content): |
|
||||
if not isinstance(content, Article): |
|
||||
return |
|
||||
|
|
||||
if not content.settings.get('ALWAYS_MODIFIED', False): |
|
||||
return |
|
||||
|
|
||||
if hasattr(content, 'date') and not hasattr(content, 'modified'): |
|
||||
content.modified = content.date |
|
||||
content.locale_modified = content.locale_date |
|
||||
|
|
||||
def register(): |
|
||||
signals.content_object_init.connect(add_modified) |
|
@ -1,49 +0,0 @@ |
|||||
AsciiDoc Reader |
|
||||
############### |
|
||||
|
|
||||
This plugin allows you to use `AsciiDoc <http://www.methods.co.nz/asciidoc/>`_ |
|
||||
to write your posts. File extension should be ``.asc``, ``.adoc``, |
|
||||
or ``.asciidoc``. |
|
||||
|
|
||||
Dependency |
|
||||
---------- |
|
||||
|
|
||||
There are two command line utilities commonly used to render AsciiDoc: |
|
||||
``asciidoc`` and ``asciidoctor``. One of the two will need to be installed and |
|
||||
on the PATH. |
|
||||
|
|
||||
**Note**: The ``asciidoctor`` utility is recommended since the original |
|
||||
``asciidoc`` is no longer maintained. |
|
||||
|
|
||||
Settings |
|
||||
-------- |
|
||||
|
|
||||
======================================== ======================================================= |
|
||||
Setting name (followed by default value) What does it do? |
|
||||
======================================== ======================================================= |
|
||||
``ASCIIDOC_CMD = asciidoc`` Selects which utility to use for rendering. Will |
|
||||
autodetect utility if not provided. |
|
||||
``ASCIIDOC_OPTIONS = []`` A list of options to pass to AsciiDoc. See the `manpage |
|
||||
<http://www.methods.co.nz/asciidoc/manpage.html>`_. |
|
||||
======================================== ======================================================= |
|
||||
|
|
||||
Example file header |
|
||||
------------------- |
|
||||
|
|
||||
Following the `example <https://github.com/getpelican/pelican/blob/master/docs/content.rst#file-metadata>`_ in the main pelican documentation: |
|
||||
|
|
||||
.. code-block:: none |
|
||||
|
|
||||
= My super title |
|
||||
|
|
||||
:date: 2010-10-03 10:20 |
|
||||
:modified: 2010-10-04 18:40 |
|
||||
:tags: thats, awesome |
|
||||
:category: yeah |
|
||||
:slug: my-super-post |
|
||||
:authors: Alexis Metaireau, Conan Doyle |
|
||||
:summary: Short version for index and feeds |
|
||||
|
|
||||
== title level 2 |
|
||||
|
|
||||
and so on... |
|
@ -1 +0,0 @@ |
|||||
from .asciidoc_reader import * |
|
@ -1,87 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
""" |
|
||||
AsciiDoc Reader |
|
||||
=============== |
|
||||
|
|
||||
This plugin allows you to use AsciiDoc to write your posts. |
|
||||
File extension should be ``.asc``, ``.adoc``, or ``asciidoc``. |
|
||||
""" |
|
||||
|
|
||||
from pelican.readers import BaseReader |
|
||||
from pelican import signals |
|
||||
import os |
|
||||
import re |
|
||||
import subprocess |
|
||||
|
|
||||
def call(cmd): |
|
||||
"""Calls a CLI command and returns the stdout as string.""" |
|
||||
return subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()[0].decode('utf-8') |
|
||||
|
|
||||
def default(): |
|
||||
"""Attempt to find the default AsciiDoc utility.""" |
|
||||
for cmd in ALLOWED_CMDS: |
|
||||
if len(call(cmd + " --help")): |
|
||||
return cmd |
|
||||
|
|
||||
ALLOWED_CMDS = ["asciidoc", "asciidoctor"] |
|
||||
|
|
||||
ENABLED = None != default() |
|
||||
|
|
||||
class AsciiDocReader(BaseReader): |
|
||||
"""Reader for AsciiDoc files.""" |
|
||||
|
|
||||
enabled = ENABLED |
|
||||
file_extensions = ['asc', 'adoc', 'asciidoc'] |
|
||||
default_options = ['--no-header-footer'] |
|
||||
|
|
||||
def read(self, source_path): |
|
||||
"""Parse content and metadata of AsciiDoc files.""" |
|
||||
cmd = self._get_cmd() |
|
||||
content = "" |
|
||||
if cmd: |
|
||||
optlist = self.settings.get('ASCIIDOC_OPTIONS', []) + self.default_options |
|
||||
options = " ".join(optlist) |
|
||||
content = call("%s %s -o - %s" % (cmd, options, source_path)) |
|
||||
metadata = self._read_metadata(source_path) |
|
||||
return content, metadata |
|
||||
|
|
||||
def _get_cmd(self): |
|
||||
"""Returns the AsciiDoc utility command to use for rendering or None if |
|
||||
one cannot be found.""" |
|
||||
if self.settings.get('ASCIIDOC_CMD') in ALLOWED_CMDS: |
|
||||
return self.settings.get('ASCIIDOC_CMD') |
|
||||
return default() |
|
||||
|
|
||||
def _read_metadata(self, source_path): |
|
||||
"""Parses the AsciiDoc file at the given `source_path` and returns found |
|
||||
metadata.""" |
|
||||
metadata = {} |
|
||||
with open(source_path) as fi: |
|
||||
prev = "" |
|
||||
for line in fi.readlines(): |
|
||||
# Parse for doc title. |
|
||||
if 'title' not in metadata.keys(): |
|
||||
title = "" |
|
||||
if line.startswith("= "): |
|
||||
title = line[2:].strip() |
|
||||
elif line.count("=") == len(prev.strip()): |
|
||||
title = prev.strip() |
|
||||
if title: |
|
||||
metadata['title'] = self.process_metadata('title', title) |
|
||||
|
|
||||
# Parse for other metadata. |
|
||||
regexp = re.compile(r"^:[A-z]+:\s*[A-z0-9]") |
|
||||
if regexp.search(line): |
|
||||
toks = line.split(":", 2) |
|
||||
key = toks[1].strip().lower() |
|
||||
val = toks[2].strip() |
|
||||
metadata[key] = self.process_metadata(key, val) |
|
||||
prev = line |
|
||||
return metadata |
|
||||
|
|
||||
def add_reader(readers): |
|
||||
for ext in AsciiDocReader.file_extensions: |
|
||||
readers.reader_classes[ext] = AsciiDocReader |
|
||||
|
|
||||
def register(): |
|
||||
signals.readers_init.connect(add_reader) |
|
@ -1,70 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
import datetime |
|
||||
import os |
|
||||
|
|
||||
from pelican.readers import Readers |
|
||||
from pelican.tests.support import unittest, get_settings |
|
||||
|
|
||||
from .asciidoc_reader import ENABLED |
|
||||
|
|
||||
CUR_DIR = os.path.dirname(__file__) |
|
||||
CONTENT_PATH = os.path.join(CUR_DIR, 'test_data') |
|
||||
|
|
||||
@unittest.skipUnless(ENABLED, "asciidoc isn't installed") |
|
||||
class AsciiDocReaderTest(unittest.TestCase): |
|
||||
def read_file(self, path, **kwargs): |
|
||||
# Isolate from future API changes to readers.read_file |
|
||||
r = Readers(settings=get_settings(**kwargs)) |
|
||||
return r.read_file(base_path=CONTENT_PATH, path=path) |
|
||||
|
|
||||
def test_article_with_asc_extension(self): |
|
||||
# Ensure the asc extension is being processed by the correct reader |
|
||||
page = self.read_file( |
|
||||
path='article_with_asc_extension.asc') |
|
||||
expected = ('<div class="sect1">' |
|
||||
'<h2 id="_used_for_pelican_test">' |
|
||||
'Used for pelican test</h2>' |
|
||||
'<div class="sectionbody">' |
|
||||
'<div class="paragraph">' |
|
||||
'<p>The quick brown fox jumped over ' |
|
||||
'the lazy dog’s back.</p>' |
|
||||
'</div></div></div>') |
|
||||
actual = "".join(page.content.splitlines()) |
|
||||
expected = "".join(expected.splitlines()) |
|
||||
self.assertEqual(actual, expected) |
|
||||
expected = { |
|
||||
'category': 'Blog', |
|
||||
'author': 'Author O. Article', |
|
||||
'title': 'Test AsciiDoc File Header', |
|
||||
'date': datetime.datetime(2011, 9, 15, 9, 5), |
|
||||
'tags': ['Linux', 'Python', 'Pelican'], |
|
||||
} |
|
||||
for key, value in expected.items(): |
|
||||
self.assertEqual(value, page.metadata[key], ( |
|
||||
'Metadata attribute \'%s\' does not match expected value.\n' |
|
||||
'Expected: %s\n' |
|
||||
'Actual: %s') % (key, value, page.metadata[key])) |
|
||||
|
|
||||
def test_article_with_asc_options(self): |
|
||||
# test to ensure the ASCIIDOC_OPTIONS is being used |
|
||||
page = self.read_file(path='article_with_asc_options.asc', |
|
||||
ASCIIDOC_OPTIONS=["-a revision=1.0.42"]) |
|
||||
expected = ('<div class="sect1">' |
|
||||
'<h2 id="_used_for_pelican_test">' |
|
||||
'Used for pelican test</h2>' |
|
||||
'<div class="sectionbody">' |
|
||||
'<div class="paragraph">' |
|
||||
'<p>version 1.0.42</p></div>' |
|
||||
'<div class="paragraph">' |
|
||||
'<p>The quick brown fox jumped over ' |
|
||||
'the lazy dog’s back.</p>' |
|
||||
'</div></div></div>') |
|
||||
actual = "".join(page.content.splitlines()) |
|
||||
expected = "".join(expected.splitlines()) |
|
||||
self.assertEqual(actual, expected) |
|
||||
|
|
||||
|
|
||||
if __name__ == '__main__': |
|
||||
unittest.main() |
|
@ -1,11 +0,0 @@ |
|||||
Test AsciiDoc File Header |
|
||||
========================= |
|
||||
:Author: Author O. Article |
|
||||
:Email: <author@nowhere.com> |
|
||||
:Date: 2011-09-15 09:05 |
|
||||
:Category: Blog |
|
||||
:Tags: Linux, Python, Pelican |
|
||||
|
|
||||
== Used for pelican test |
|
||||
|
|
||||
The quick brown fox jumped over the lazy dog's back. |
|
@ -1,7 +0,0 @@ |
|||||
= Test AsciiDoc File Header |
|
||||
|
|
||||
== Used for pelican test |
|
||||
|
|
||||
version {revision} |
|
||||
|
|
||||
The quick brown fox jumped over the lazy dog's back. |
|
@ -1,106 +0,0 @@ |
|||||
Asset management |
|
||||
---------------- |
|
||||
|
|
||||
This plugin allows you to use the `Webassets`_ module to manage assets such as |
|
||||
CSS and JS files. The module must first be installed:: |
|
||||
|
|
||||
pip install webassets |
|
||||
|
|
||||
The Webassets module allows you to perform a number of useful asset management |
|
||||
functions, including: |
|
||||
|
|
||||
* CSS minifier (``cssmin``, ``yui_css``, ...) |
|
||||
* CSS compiler (``less``, ``sass``, ...) |
|
||||
* JS minifier (``uglifyjs``, ``yui_js``, ``closure``, ...) |
|
||||
|
|
||||
Others filters include CSS URL rewriting, integration of images in CSS via data |
|
||||
URIs, and more. Webassets can also append a version identifier to your asset |
|
||||
URL to convince browsers to download new versions of your assets when you use |
|
||||
far-future expires headers. Please refer to the `Webassets documentation`_ for |
|
||||
more information. |
|
||||
|
|
||||
When used with Pelican, Webassets is configured to process assets in the |
|
||||
``OUTPUT_PATH/theme`` directory. You can use Webassets in your templates by |
|
||||
including one or more template tags. The Jinja variable ``{{ ASSET_URL }}`` can |
|
||||
be used in templates and is relative to the ``theme/`` url. The |
|
||||
``{{ ASSET_URL }}`` variable should be used in conjunction with the |
|
||||
``{{ SITEURL }}`` variable in order to generate URLs properly. For example: |
|
||||
|
|
||||
.. code-block:: jinja |
|
||||
|
|
||||
{% assets filters="cssmin", output="css/style.min.css", "css/inuit.css", "css/pygment-monokai.css", "css/main.css" %} |
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ ASSET_URL }}"> |
|
||||
{% endassets %} |
|
||||
|
|
||||
... will produce a minified css file with a version identifier that looks like: |
|
||||
|
|
||||
.. code-block:: html |
|
||||
|
|
||||
<link href="http://{SITEURL}/theme/css/style.min.css?b3a7c807" rel="stylesheet"> |
|
||||
|
|
||||
These filters can be combined. Here is an example that uses the SASS compiler |
|
||||
and minifies the output: |
|
||||
|
|
||||
.. code-block:: jinja |
|
||||
|
|
||||
{% assets filters="sass,cssmin", output="css/style.min.css", "css/style.scss" %} |
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ ASSET_URL }}"> |
|
||||
{% endassets %} |
|
||||
|
|
||||
Another example for Javascript: |
|
||||
|
|
||||
.. code-block:: jinja |
|
||||
|
|
||||
{% assets filters="uglifyjs", output="js/packed.js", "js/jquery.js", "js/base.js", "js/widgets.js" %} |
|
||||
<script src="{{ SITEURL }}/{{ ASSET_URL }}"></script> |
|
||||
{% endassets %} |
|
||||
|
|
||||
The above will produce a minified JS file: |
|
||||
|
|
||||
.. code-block:: html |
|
||||
|
|
||||
<script src="http://{SITEURL}/theme/js/packed.js?00703b9d"></script> |
|
||||
|
|
||||
Pelican's debug mode is propagated to Webassets to disable asset packaging |
|
||||
and instead work with the uncompressed assets. |
|
||||
|
|
||||
If you need to create named bundles (for example, if you need to compile SASS |
|
||||
files before minifying with other CSS files), you can use the ``ASSET_BUNDLES`` |
|
||||
variable in your settings file. This is an ordered sequence of 3-tuples, where |
|
||||
the 3-tuple is defined as ``(name, args, kwargs)``. This tuple is passed to the |
|
||||
`environment's register() method`_. The following will compile two SCSS files |
|
||||
into a named bundle, using the ``pyscss`` filter: |
|
||||
|
|
||||
.. code-block:: python |
|
||||
|
|
||||
ASSET_BUNDLES = ( |
|
||||
('scss', ['colors.scss', 'main.scss'], {'filters': 'pyscss'}), |
|
||||
) |
|
||||
|
|
||||
Many of Webasset's available compilers have additional configuration options |
|
||||
(i.e. 'Less', 'Sass', 'Stylus', 'Closure_js'). You can pass these options to |
|
||||
Webassets using the ``ASSET_CONFIG`` in your settings file. |
|
||||
|
|
||||
The following will handle Google Closure's compilation level and locate |
|
||||
LessCSS's binary: |
|
||||
|
|
||||
.. code-block:: python |
|
||||
|
|
||||
ASSET_CONFIG = (('closure_compressor_optimization', 'WHITESPACE_ONLY'), |
|
||||
('less_bin', 'lessc.cmd'), ) |
|
||||
|
|
||||
If you wish to place your assets in locations other than the theme output |
|
||||
directory, you can use ``ASSET_SOURCE_PATHS`` in your settings file to provide |
|
||||
webassets with a list of additional directories to search, relative to the |
|
||||
theme's top-level directory: |
|
||||
|
|
||||
.. code-block:: python |
|
||||
|
|
||||
ASSET_SOURCE_PATHS = [ |
|
||||
'vendor/css', |
|
||||
'scss', |
|
||||
] |
|
||||
|
|
||||
.. _Webassets: https://github.com/miracle2k/webassets |
|
||||
.. _Webassets documentation: http://webassets.readthedocs.org/en/latest/builtin_filters.html |
|
||||
.. _environment's register() method: http://webassets.readthedocs.org/en/latest/environment.html#registering-bundles |
|
@ -1 +0,0 @@ |
|||||
from .assets import * |
|
@ -1,75 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
""" |
|
||||
Asset management plugin for Pelican |
|
||||
=================================== |
|
||||
|
|
||||
This plugin allows you to use the `webassets`_ module to manage assets such as |
|
||||
CSS and JS files. |
|
||||
|
|
||||
The ASSET_URL is set to a relative url to honor Pelican's RELATIVE_URLS |
|
||||
setting. This requires the use of SITEURL in the templates:: |
|
||||
|
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ ASSET_URL }}"> |
|
||||
|
|
||||
.. _webassets: https://webassets.readthedocs.org/ |
|
||||
|
|
||||
""" |
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
import os |
|
||||
import logging |
|
||||
|
|
||||
from pelican import signals |
|
||||
logger = logging.getLogger(__name__) |
|
||||
|
|
||||
try: |
|
||||
import webassets |
|
||||
from webassets import Environment |
|
||||
from webassets.ext.jinja2 import AssetsExtension |
|
||||
except ImportError: |
|
||||
webassets = None |
|
||||
|
|
||||
def add_jinja2_ext(pelican): |
|
||||
"""Add Webassets to Jinja2 extensions in Pelican settings.""" |
|
||||
|
|
||||
if 'JINJA_ENVIRONMENT' in pelican.settings: # pelican 3.7+ |
|
||||
pelican.settings['JINJA_ENVIRONMENT']['extensions'].append(AssetsExtension) |
|
||||
else: |
|
||||
pelican.settings['JINJA_EXTENSIONS'].append(AssetsExtension) |
|
||||
|
|
||||
|
|
||||
def create_assets_env(generator): |
|
||||
"""Define the assets environment and pass it to the generator.""" |
|
||||
|
|
||||
theme_static_dir = generator.settings['THEME_STATIC_DIR'] |
|
||||
assets_destination = os.path.join(generator.output_path, theme_static_dir) |
|
||||
generator.env.assets_environment = Environment( |
|
||||
assets_destination, theme_static_dir) |
|
||||
|
|
||||
if 'ASSET_CONFIG' in generator.settings: |
|
||||
for item in generator.settings['ASSET_CONFIG']: |
|
||||
generator.env.assets_environment.config[item[0]] = item[1] |
|
||||
|
|
||||
if 'ASSET_BUNDLES' in generator.settings: |
|
||||
for name, args, kwargs in generator.settings['ASSET_BUNDLES']: |
|
||||
generator.env.assets_environment.register(name, *args, **kwargs) |
|
||||
|
|
||||
if 'ASSET_DEBUG' in generator.settings: |
|
||||
generator.env.assets_environment.debug = generator.settings['ASSET_DEBUG'] |
|
||||
elif logging.getLevelName(logger.getEffectiveLevel()) == "DEBUG": |
|
||||
generator.env.assets_environment.debug = True |
|
||||
|
|
||||
for path in (generator.settings['THEME_STATIC_PATHS'] + |
|
||||
generator.settings.get('ASSET_SOURCE_PATHS', [])): |
|
||||
full_path = os.path.join(generator.theme, path) |
|
||||
generator.env.assets_environment.append_path(full_path) |
|
||||
|
|
||||
|
|
||||
def register(): |
|
||||
"""Plugin registration.""" |
|
||||
if webassets: |
|
||||
signals.initialized.connect(add_jinja2_ext) |
|
||||
signals.generator_init.connect(create_assets_env) |
|
||||
else: |
|
||||
logger.warning('`assets` failed to load dependency `webassets`.' |
|
||||
'`assets` plugin not loaded.') |
|
@ -1,112 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# from __future__ import unicode_literals |
|
||||
|
|
||||
import hashlib |
|
||||
import locale |
|
||||
import os |
|
||||
from codecs import open |
|
||||
from tempfile import mkdtemp |
|
||||
from shutil import rmtree |
|
||||
import unittest |
|
||||
import subprocess |
|
||||
|
|
||||
from pelican import Pelican |
|
||||
from pelican.settings import read_settings |
|
||||
from pelican.tests.support import mute, skipIfNoExecutable, module_exists |
|
||||
|
|
||||
CUR_DIR = os.path.dirname(__file__) |
|
||||
THEME_DIR = os.path.join(CUR_DIR, 'test_data') |
|
||||
CSS_REF = open(os.path.join(THEME_DIR, 'static', 'css', |
|
||||
'style.min.css')).read() |
|
||||
CSS_HASH = hashlib.md5(CSS_REF).hexdigest()[0:8] |
|
||||
|
|
||||
|
|
||||
@unittest.skipUnless(module_exists('webassets'), "webassets isn't installed") |
|
||||
@skipIfNoExecutable(['scss', '-v']) |
|
||||
@skipIfNoExecutable(['cssmin', '--version']) |
|
||||
class TestWebAssets(unittest.TestCase): |
|
||||
"""Base class for testing webassets.""" |
|
||||
|
|
||||
def setUp(self, override=None): |
|
||||
import assets |
|
||||
self.temp_path = mkdtemp(prefix='pelicantests.') |
|
||||
settings = { |
|
||||
'PATH': os.path.join(os.path.dirname(CUR_DIR), 'test_data', 'content'), |
|
||||
'OUTPUT_PATH': self.temp_path, |
|
||||
'PLUGINS': [assets], |
|
||||
'THEME': THEME_DIR, |
|
||||
'LOCALE': locale.normalize('en_US'), |
|
||||
'CACHE_CONTENT': False |
|
||||
} |
|
||||
if override: |
|
||||
settings.update(override) |
|
||||
|
|
||||
self.settings = read_settings(override=settings) |
|
||||
pelican = Pelican(settings=self.settings) |
|
||||
mute(True)(pelican.run)() |
|
||||
|
|
||||
def tearDown(self): |
|
||||
rmtree(self.temp_path) |
|
||||
|
|
||||
def check_link_tag(self, css_file, html_file): |
|
||||
"""Check the presence of `css_file` in `html_file`.""" |
|
||||
|
|
||||
link_tag = ('<link rel="stylesheet" href="{css_file}">' |
|
||||
.format(css_file=css_file)) |
|
||||
html = open(html_file).read() |
|
||||
self.assertRegexpMatches(html, link_tag) |
|
||||
|
|
||||
|
|
||||
class TestWebAssetsRelativeURLS(TestWebAssets): |
|
||||
"""Test pelican with relative urls.""" |
|
||||
|
|
||||
|
|
||||
def setUp(self): |
|
||||
TestWebAssets.setUp(self, override={'RELATIVE_URLS': True}) |
|
||||
|
|
||||
def test_jinja2_ext(self): |
|
||||
# Test that the Jinja2 extension was correctly added. |
|
||||
|
|
||||
from webassets.ext.jinja2 import AssetsExtension |
|
||||
self.assertIn(AssetsExtension, self.settings['JINJA_ENVIRONMENT']['extensions']) |
|
||||
|
|
||||
def test_compilation(self): |
|
||||
# Compare the compiled css with the reference. |
|
||||
|
|
||||
gen_file = os.path.join(self.temp_path, 'theme', 'gen', |
|
||||
'style.{0}.min.css'.format(CSS_HASH)) |
|
||||
self.assertTrue(os.path.isfile(gen_file)) |
|
||||
|
|
||||
css_new = open(gen_file).read() |
|
||||
self.assertEqual(css_new, CSS_REF) |
|
||||
|
|
||||
def test_template(self): |
|
||||
# Look in the output files for the link tag. |
|
||||
|
|
||||
css_file = './theme/gen/style.{0}.min.css'.format(CSS_HASH) |
|
||||
html_files = ['index.html', 'archives.html', |
|
||||
'this-is-a-super-article.html'] |
|
||||
for f in html_files: |
|
||||
self.check_link_tag(css_file, os.path.join(self.temp_path, f)) |
|
||||
|
|
||||
self.check_link_tag( |
|
||||
'../theme/gen/style.{0}.min.css'.format(CSS_HASH), |
|
||||
os.path.join(self.temp_path, 'category/yeah.html')) |
|
||||
|
|
||||
|
|
||||
class TestWebAssetsAbsoluteURLS(TestWebAssets): |
|
||||
"""Test pelican with absolute urls.""" |
|
||||
|
|
||||
def setUp(self): |
|
||||
TestWebAssets.setUp(self, override={'RELATIVE_URLS': False, |
|
||||
'SITEURL': 'http://localhost'}) |
|
||||
|
|
||||
def test_absolute_url(self): |
|
||||
# Look in the output files for the link tag with absolute url. |
|
||||
|
|
||||
css_file = ('http://localhost/theme/gen/style.{0}.min.css' |
|
||||
.format(CSS_HASH)) |
|
||||
html_files = ['index.html', 'archives.html', |
|
||||
'this-is-a-super-article.html'] |
|
||||
for f in html_files: |
|
||||
self.check_link_tag(css_file, os.path.join(self.temp_path, f)) |
|
@ -1 +0,0 @@ |
|||||
body{font:14px/1.5 "Droid Sans",sans-serif;background-color:#e4e4e4;color:#242424}a{color:red}a:hover{color:orange} |
|
@ -1,19 +0,0 @@ |
|||||
/* -*- scss-compile-at-save: nil -*- */ |
|
||||
|
|
||||
$baseFontFamily : "Droid Sans", sans-serif; |
|
||||
$textColor : #242424; |
|
||||
$bodyBackground : #e4e4e4; |
|
||||
|
|
||||
body { |
|
||||
font: 14px/1.5 $baseFontFamily; |
|
||||
background-color: $bodyBackground; |
|
||||
color: $textColor; |
|
||||
} |
|
||||
|
|
||||
a { |
|
||||
color: red; |
|
||||
|
|
||||
&:hover { |
|
||||
color: orange; |
|
||||
} |
|
||||
} |
|
@ -1,7 +0,0 @@ |
|||||
{% extends "!simple/base.html" %} |
|
||||
|
|
||||
{% block head %} |
|
||||
{% assets filters="scss,cssmin", output="gen/style.%(version)s.min.css", "css/style.scss" %} |
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ ASSET_URL }}"> |
|
||||
{% endassets %} |
|
||||
{% endblock %} |
|
@ -1,55 +0,0 @@ |
|||||
# author_images |
|
||||
|
|
||||
This Pelican plugin adds support for author images and avatars. You may choose |
|
||||
to display one or the other. |
|
||||
|
|
||||
## Configuration |
|
||||
|
|
||||
Add the directory to the base plugins directory to `PLUGIN_PATHS` in |
|
||||
`pelicanconf.py`, and then add `author_images` to the `PLUGINS` list. For example, |
|
||||
|
|
||||
PLUGIN_PATHS = ["../git/pelican-plugins"] |
|
||||
PLUGINS = ['author_images'] |
|
||||
|
|
||||
You can also configure the directory for the author images and avatars. Note |
|
||||
that both of these directories should exist in your theme, inside the static |
|
||||
directory. This feels like the best way to approach this. |
|
||||
|
|
||||
AUTHOR_AVATARS = 'images/author_avatars' |
|
||||
AUTHOR_IMAGES = 'images/author_images' |
|
||||
|
|
||||
### Adding images |
|
||||
|
|
||||
Now you can place images and avatars into the correct places. The location for |
|
||||
these is `THEME / THEME_STATIC_DIR / AUTHOR_AVATARS`. For instance, |
|
||||
`strudel/static/images/author_avatars` for my particular setup. Note that in |
|
||||
this case, `strudel` is my theme. |
|
||||
|
|
||||
### Naming images |
|
||||
|
|
||||
Images have to named correctly for the plugin to find them. Currently, this |
|
||||
means you need to take a `sha256` of the authors name. The extension of |
|
||||
the file can be one of `svg`, `jpg`, `jpeg` or `png`. For instance, my name is |
|
||||
William Pettersson, so I can run |
|
||||
|
|
||||
python -c 'import hashlib; print hashlib.sha256("William Pettersson").hexdigest()' |
|
||||
|
|
||||
to get the hash sum of my name. Then I just rename my images or avatars to have |
|
||||
that name, but with the appropriate extension. For simplicity, there is a |
|
||||
`generate_hashsum.py` which can also be used as follows |
|
||||
|
|
||||
python generate_hashsum.py "William Pettersson" |
|
||||
|
|
||||
which prints out |
|
||||
`a40249517dfaf4e83264ced7d802c9fe9b811c8425b1ce1b3e8b9e236b52fa3e`. This means |
|
||||
my files have to be named |
|
||||
`a40249517dfaf4e83264ced7d802c9fe9b811c8425b1ce1b3e8b9e236b52fa3e.png`, or |
|
||||
`a40249517dfaf4e83264ced7d802c9fe9b811c8425b1ce1b3e8b9e236b52fa3e.jpg` or |
|
||||
similar. |
|
||||
|
|
||||
|
|
||||
### Using in themes |
|
||||
|
|
||||
These images and avatars are made available to themes through the |
|
||||
`author.avatar` and `author.image` variables. |
|
||||
|
|
@ -1 +0,0 @@ |
|||||
from .author_images import * |
|
@ -1,47 +0,0 @@ |
|||||
""" |
|
||||
Author images plugin for Pelican |
|
||||
=========================== |
|
||||
|
|
||||
This plugin assigns the ``author.avatar`` and ``author.image`` variables to the |
|
||||
avatar and image of the author in question. Authors are identified by email |
|
||||
address, and avatars are images are stored in directories configured by |
|
||||
AUTHOR_AVATARS and AUTHOR_IMAGES. |
|
||||
""" |
|
||||
|
|
||||
from pelican import signals |
|
||||
from hashlib import sha256 |
|
||||
from os.path import exists |
|
||||
|
|
||||
EXTENSIONS = ['jpg', 'png', 'svg'] |
|
||||
|
|
||||
|
|
||||
def add_author_image(author, generator): |
|
||||
hashsum = sha256(author.name).hexdigest() |
|
||||
static = generator.settings['THEME'] + '/static/' |
|
||||
if 'AUTHOR_AVATARS' in generator.settings.keys(): |
|
||||
avatar = generator.settings['AUTHOR_AVATARS'] + '/' + hashsum |
|
||||
for ext in EXTENSIONS: |
|
||||
if exists('%s%s.%s' % (static, avatar, ext)): |
|
||||
author.avatar = '%s/%s.%s' % \ |
|
||||
(generator.settings['THEME_STATIC_DIR'], avatar, ext) |
|
||||
break |
|
||||
|
|
||||
if 'AUTHOR_IMAGES' in generator.settings.keys(): |
|
||||
image = generator.settings['AUTHOR_IMAGES'] + '/' + hashsum |
|
||||
for ext in EXTENSIONS: |
|
||||
if exists('%s%s.%s' % (static, image, ext)): |
|
||||
author.image = '%s/%s.%s' % \ |
|
||||
(generator.settings['THEME_STATIC_DIR'], image, ext) |
|
||||
break |
|
||||
|
|
||||
|
|
||||
def add_author_images(generator): |
|
||||
for article in generator.articles: |
|
||||
for author in article.authors: |
|
||||
add_author_image(author, generator) |
|
||||
for author, _ in generator.authors: |
|
||||
add_author_image(author, generator) |
|
||||
|
|
||||
|
|
||||
def register(): |
|
||||
signals.article_generator_finalized.connect(add_author_images) |
|
@ -1,7 +0,0 @@ |
|||||
#!/usr/bin/env python2 |
|
||||
|
|
||||
from __future__ import print_function |
|
||||
import hashlib |
|
||||
import sys |
|
||||
|
|
||||
print(hashlib.sha256(sys.argv[1]).hexdigest()) |
|
@ -1,28 +0,0 @@ |
|||||
Copyright (c) 2015, Magnetic Media Online, Inc. |
|
||||
All rights reserved. |
|
||||
|
|
||||
Redistribution and use in source and binary forms, with or without |
|
||||
modification, are permitted provided that the following conditions are met: |
|
||||
|
|
||||
1. Redistributions of source code must retain the above copyright notice, |
|
||||
this list of conditions and the following disclaimer. |
|
||||
|
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, |
|
||||
this list of conditions and the following disclaimer in the documentation |
|
||||
and/or other materials provided with the distribution. |
|
||||
|
|
||||
3. Neither the name of the copyright holder nor the names of its |
|
||||
contributors may be used to endorse or promote products derived from this |
|
||||
software without specific prior written permission. |
|
||||
|
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
||||
POSSIBILITY OF SUCH DAMAGE. |
|
@ -1,21 +0,0 @@ |
|||||
# Auto Pages |
|
||||
|
|
||||
This plugin adds an attribute `page` to the author, category, and tag |
|
||||
objects which can be used in templates by themes. The page is processed as |
|
||||
an ordinary Pelican page, so it can be Markdown, reStructuredText, etc. |
|
||||
|
|
||||
## Configuration |
|
||||
|
|
||||
| Setting | Default | Notes | |
|
||||
|----------------------|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
|
||||
| `AUTHOR_PAGE_PATH` | `authors` | The location, relative to the project root where author pages can be found. The filename of the author page minus the extension must match the Author's slug. | |
|
||||
| `CATEGORY_PAGE_PATH` | `categories` | The location, relative to the project root where category pages can be found. The filename of the category page minus the extension must match the Category's slug. | |
|
||||
| `TAG_PAGE_PATH` | `tags` | The location, relative to the project root where tag pages can be found. The filename of the tag page minus the extension must match the Tag's slug. | |
|
||||
|
|
||||
## Template Variables |
|
||||
|
|
||||
| Variable | Notes | |
|
||||
|-----------------|--------------------------------------------| |
|
||||
| `author.page` | The rendered content of the author page. | |
|
||||
| `category.page` | The rendered content of the category page. | |
|
||||
| `tag.page` | The rendered content of the tag page. | |
|
@ -1 +0,0 @@ |
|||||
from .autopages import * |
|
@ -1,64 +0,0 @@ |
|||||
import logging |
|
||||
import os |
|
||||
import os.path |
|
||||
|
|
||||
from pelican import signals |
|
||||
from pelican.contents import Page |
|
||||
|
|
||||
|
|
||||
logger = logging.getLogger("autopages") |
|
||||
|
|
||||
def yield_files(root): |
|
||||
root = os.path.realpath(os.path.abspath(root)) |
|
||||
for dirpath, dirnames, filenames in os.walk(root): |
|
||||
for dirname in list(dirnames): |
|
||||
try: |
|
||||
if dirname.startswith("."): |
|
||||
dirnames.remove(dirname) |
|
||||
except IndexError: |
|
||||
# duplicate already removed? |
|
||||
pass |
|
||||
for filename in filenames: |
|
||||
if filename.startswith("."): |
|
||||
continue |
|
||||
yield os.path.join(dirpath, filename) |
|
||||
|
|
||||
def make_page(readers, context, filename): |
|
||||
base_path, filename = os.path.split(filename) |
|
||||
page = readers.read_file(base_path, filename, Page, None, context) |
|
||||
slug, _ = os.path.splitext(filename) |
|
||||
return slug, page |
|
||||
|
|
||||
def make_pages(readers, context, path): |
|
||||
pages = {} |
|
||||
for filename in yield_files(path): |
|
||||
try: |
|
||||
slug, page = make_page(readers, context, filename) |
|
||||
except Exception: |
|
||||
logger.exception("Could not make autopage for %r", filename) |
|
||||
continue |
|
||||
pages[slug] = page |
|
||||
return pages |
|
||||
|
|
||||
def create_autopages(article_generator): |
|
||||
settings = article_generator.settings |
|
||||
readers = article_generator.readers |
|
||||
context = article_generator.context |
|
||||
|
|
||||
authors_path = settings.get("AUTHOR_PAGE_PATH", "authors") |
|
||||
categories_path = settings.get("CATEGORY_PAGE_PATH", "categories") |
|
||||
tags_path = settings.get("TAG_PAGE_PATH", "tags") |
|
||||
|
|
||||
author_pages = make_pages(readers, context, authors_path) |
|
||||
category_pages = make_pages(readers, context, categories_path) |
|
||||
tag_pages = make_pages(readers, context, tags_path) |
|
||||
|
|
||||
for author, _ in article_generator.authors: |
|
||||
author.page = author_pages.get(author.slug, "") |
|
||||
for category, _ in article_generator.categories: |
|
||||
category.page = category_pages.get(category.slug, "") |
|
||||
for tag in article_generator.tags: |
|
||||
tag.page = tag_pages.get(tag.slug, "") |
|
||||
|
|
||||
def register(): |
|
||||
signals.article_generator_finalized.connect(create_autopages) |
|
@ -1,125 +0,0 @@ |
|||||
# Better Code Line Numbering Plugin |
|
||||
|
|
||||
## Copyright, Contact, and Acknowledgements |
|
||||
|
|
||||
This plugin is copyright 2014 Jacob Levernier |
|
||||
It is released under the BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause). This basically means that you can do whatever you want with the code, provided that you include this copyright and license notice. |
|
||||
|
|
||||
Some of this code is modified from my YouTube Privacy Enhancer plugin for Pelican (https://github.com/getpelican/pelican-plugins/pull/183). |
|
||||
|
|
||||
|
|
||||
### To contact the author: |
|
||||
|
|
||||
* jleverni at uoregon dot edu |
|
||||
* http://AdUnumDatum.org |
|
||||
* BitBucket: https://bitbucket.org/jlev_uo/ |
|
||||
* Github: https://github.com/publicus |
|
||||
|
|
||||
This is the second plugin that I've written for Pelican, and it was intended as a training project for learning Pelican as well as Python better. I would be very happy to hear constructive feedback on the plugin and for suggestions for making it more efficient and/or expandable. Also, I've heavily annotated all of the Python code in order to make it easier to understand for others looking to learn more, like I was when I wrote the plugin. |
|
||||
|
|
||||
### Acknowledgements |
|
||||
|
|
||||
I'm grateful to the authors of the plugins in the pelican-plugins repo; being able to look over other plugins' authors' code helped me immensely in learning more about how Pelican's [signals](http://docs.getpelican.com/en/3.3.0/plugins.html#how-to-create-plugins "Pelican documentation on creating plugins") system works. |
|
||||
|
|
||||
|
|
||||
## Explanation and Rationale |
|
||||
|
|
||||
Pelican uses Python's built-in code highlighting extension when processing Markdown. This extension, called Code HiLite (https://pythonhosted.org/Markdown/extensions/code_hilite.html), can add line numbers to any code that is enclosed in triple backticks (and, by default, has a shebang as a first line), like this: |
|
||||
|
|
||||
``` |
|
||||
#!python |
|
||||
|
|
||||
code goes here |
|
||||
|
|
||||
more code goes here |
|
||||
``` |
|
||||
|
|
||||
This works well, except for one problem: If the lines of code are long (or if the page template is narrow), the code will run off of the page, requiring that the user scroll sideways to read it. This can be annoying in some circumstances (e.g., if the code block scrollbar is at the very bottom of a long block of code). The Code HiLite Python extension creates line numbers by making a table with all of the line numbers in one column (as a big line of text, not separated into different table rows) and the code in the second column, like this: |
|
||||
|
|
||||
Column 1 | Column 2 |
|
||||
--------- | ------------- |
|
||||
1 | Code line 1 goes here, and maybe is very very long. |
|
||||
2 | Code line 2 goes here. |
|
||||
|
|
||||
It is possible to use CSS to get this code to wrap, but the line numbers can become mis-matched with the code to which they're supposed to refer, like this: |
|
||||
|
|
||||
Column 1 | Column 2 |
|
||||
--------- | ------------- |
|
||||
1 | Code line 1 goes here, and |
|
||||
2 | maybe is very very long. |
|
||||
| Code line 2 goes here. |
|
||||
|
|
||||
This plugin enables the use of a CSS technique from http://bililite.com/blog/2012/08/05/line-numbering-in-pre-elements/ . All that this plugin does is wrap every individual line of a code block with <span class="code-line">...</span>. When you combine this with the CSS that's included in the setup instructions below, your code blocks will word-wrap and have nicely formatted line numbers. Since they're added with CSS, the line numbers will not be highlighted when a user wants to copy and paste the contents of the code block, making it easier for the user to benefit from what you've written. |
|
||||
|
|
||||
|
|
||||
## Usage |
|
||||
|
|
||||
**After you set up the plugin (by following the steps below), any code written in triple backticks will have line numbers added to it.** Thus, to avoid line numbers, you can use a single backtick to include code `like this`, and can add line numbers by using three backticks |
|
||||
|
|
||||
``` |
|
||||
like this |
|
||||
``` |
|
||||
|
|
||||
That's all there is to it! |
|
||||
|
|
||||
Since this plugin builds on the Code HiLite plugin, you can change syntax highlighting by using one of two methods: |
|
||||
|
|
||||
```{python} |
|
||||
This code will highlight as python |
|
||||
``` |
|
||||
|
|
||||
``` |
|
||||
#!python |
|
||||
This code will also highlight as python |
|
||||
``` |
|
||||
|
|
||||
|
|
||||
**In order for this plugin to work optimally, you need to do just a few things:** |
|
||||
|
|
||||
1. Enable the plugin in pelicanconf.py (see http://docs.getpelican.com/en/3.3.0/plugins.html for documentation): |
|
||||
PLUGIN_PATH = "/pelican-plugins" |
|
||||
PLUGINS = ["better_codeblock_line_numbering"] |
|
||||
|
|
||||
2. Add the following to your pelicanconf.py file: |
|
||||
``` |
|
||||
MD_EXTENSIONS = [ |
|
||||
'codehilite(css_class=highlight,linenums=False)', |
|
||||
'extra' |
|
||||
] |
|
||||
``` |
|
||||
This sets python's CodeHiLite Markdown extension (http://pythonhosted.org/Markdown/extensions/code_hilite.html) so that it never assigns line numbers (since we're taking care of those ourselves now), and to wrap code blocks in a div with class="highlight". As is the default for Pelican (see http://docs.getpelican.com/en/3.1.1/settings.html, under "MD_EXTENSIONS"), this also keeps the 'extra' extension (http://pythonhosted.org/Markdown/extensions/extra.html) active. |
|
||||
|
|
||||
3. Add the following code to your CSS file: |
|
||||
``` |
|
||||
/* For use with the code_line-number_word-wrap_switcher_jquery.js Pelican plugin */ |
|
||||
code { |
|
||||
overflow: auto; |
|
||||
/* This uses `white-space: pre-wrap` to get elements within <pre> tags to wrap. Python, for code chunks within three backticks (```), doesn't wordwrap code lines by default, because they're within <pre> tags, which don't wrap by default. See https://github.com/github/markup/issues/168 , which is specifically about this parsing issue, even though that link's discussion is talking about GitHub. */ |
|
||||
white-space: pre-wrap; /* css-3 */ |
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ |
|
||||
white-space: -pre-wrap; /* Opera 4-6 */ |
|
||||
white-space: -o-pre-wrap; /* Opera 7 */ |
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */ |
|
||||
} |
|
||||
|
|
||||
/* Following http://bililite.com/blog/2012/08/05/line-numbering-in-pre-elements/, use CSS to add line numbers to all spans that have the class 'code-line' */ |
|
||||
|
|
||||
.highlight pre { |
|
||||
counter-reset: linecounter; |
|
||||
padding-left: 2em; |
|
||||
} |
|
||||
.highlight pre span.code-line { |
|
||||
counter-increment: linecounter; |
|
||||
padding-left: 1em; |
|
||||
text-indent: -1em; |
|
||||
display: inline-block; |
|
||||
} |
|
||||
.highlight pre span.code-line:before { |
|
||||
content: counter(linecounter); |
|
||||
padding-right: 1em; |
|
||||
display: inline-block; |
|
||||
color: grey; |
|
||||
text-align: right; |
|
||||
} |
|
||||
``` |
|
||||
|
|
@ -1 +0,0 @@ |
|||||
from .better_codeblock_line_numbering import * |
|
@ -1,47 +0,0 @@ |
|||||
""" |
|
||||
Better Code-Block Line Numbering Plugin |
|
||||
-------------------------- |
|
||||
|
|
||||
Authored by Jacob Levernier, 2014 |
|
||||
Released under the BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) |
|
||||
|
|
||||
For more information on this plugin, please see the attached Readme.md file. |
|
||||
""" |
|
||||
|
|
||||
from pelican import signals # For making this plugin work with Pelican. |
|
||||
|
|
||||
import os.path # For checking whether files are present in the filesystem. |
|
||||
|
|
||||
import re # For using regular expressions. |
|
||||
|
|
||||
def add_line_wrappers(data_passed_from_pelican): |
|
||||
"""A function to read through each page and post as it comes through from Pelican, find all instances of triple-backtick (```...```) code blocks, and add an HTML wrapper to each line of each of those code blocks""" |
|
||||
|
|
||||
if data_passed_from_pelican._content: # If the item passed from Pelican has a "content" attribute (i.e., if it's not an image file or something else like that). NOTE: data_passed_from_pelican.content (without an underscore in front of 'content') seems to be read-only, whereas data_passed_from_pelican._content is able to be overwritten. This is somewhat explained in an IRC log from 2013-02-03 from user alexis to user webdesignhero_ at https://botbot.me/freenode/pelican/2013-02-01/?tz=America/Los_Angeles. |
|
||||
full_content_of_page_or_post = data_passed_from_pelican._content |
|
||||
else: |
|
||||
return # Exit the function, essentially passing over the (non-text) file. |
|
||||
|
|
||||
all_instances_of_pre_elements = re.findall('<pre>.*?</pre>', full_content_of_page_or_post, re.DOTALL) # Use a regular expression to find every instance of '<pre>' followed by anything up to the first matching '</pre>'. re.DOTALL puts python's regular expression engine ('re') into a mode where a dot ('.') matches absolutely anything, including newline characters. |
|
||||
|
|
||||
if(len(all_instances_of_pre_elements) > 0): # If the article/page HAS any <pre>...</pre> elements, go on. Otherwise, don't (to do so would inadvertantly wipe out the output content for that article/page). |
|
||||
updated_full_content_of_page_or_post = full_content_of_page_or_post # This just gives this an initial value before going into the loop below. |
|
||||
|
|
||||
# Go through each <pre> element instance that we found above, and parse it: |
|
||||
for pre_element_to_parse in all_instances_of_pre_elements: |
|
||||
|
|
||||
# Wrap each line of the <pre>...</pre> section with <span class=code-line>...</span>, following http://bililite.com/blog/2012/08/05/line-numbering-in-pre-elements/. We'll use these to add line numbers using CSS later. |
|
||||
# Note that below, '^' is the beginning of a string, '$' is the end of a string, and '\n' is a newline. |
|
||||
replacement_text_with_beginning_of_each_line_wrapped_in_span = re.sub(r'(<pre.*?>|\n(?!</pre>))','\\1<span class="code-line">',pre_element_to_parse) # The (?!...) here is a Negative Lookahead (cf. http://www.regular-expressions.info/lookaround.html). This full regular expression says "Give me all code snippets that start with <pre ****> or start with a newline (\n), but NOT if the newline is followed immediately with '</pre>'. Take whatever you find, and replace it with what you found (\1) followed immediately by '<span class="code-lines">'. |
|
||||
# http://stackoverflow.com/a/14625628 explains why we need to escape the backslash in the capture group reference (the '\1'). In short, python will recognize it as "\x01" if it's not escaped. |
|
||||
replacement_text_with_full_line_wrapped_in_span = re.sub(r'((?<!</pre>)$|(?<!</pre>)\n)','</span>\\1',replacement_text_with_beginning_of_each_line_wrapped_in_span) # This regular expression says "Give me all code snippets that are the end of a string or a newline (but not preceeded by "</pre>" (this is a 'negative lookahead,' '(?<)'), and replace whatever you found with '</span'> followed by whatever you found (\1). |
|
||||
|
|
||||
updated_full_content_of_page_or_post = updated_full_content_of_page_or_post.replace(pre_element_to_parse,replacement_text_with_full_line_wrapped_in_span) |
|
||||
|
|
||||
# Replace the content of the page or post with our now-updated content (having gone through all instances of <pre> elements and updated them all, exiting the loop above. |
|
||||
data_passed_from_pelican._content = updated_full_content_of_page_or_post |
|
||||
|
|
||||
|
|
||||
# Make Pelican work (see http://docs.getpelican.com/en/3.3.0/plugins.html#how-to-create-plugins): |
|
||||
def register(): |
|
||||
signals.content_object_init.connect(add_line_wrappers) |
|
@ -1,54 +0,0 @@ |
|||||
Requirements |
|
||||
------------ |
|
||||
|
|
||||
* pip install pillow beautifulsoup4 |
|
||||
|
|
||||
Summary |
|
||||
======= |
|
||||
|
|
||||
This plug-in: |
|
||||
|
|
||||
- Adds a ``style="width: ???px; height: auto;"`` attribute to any ``<img>`` tags in the content, by checking the dimensions of the image file and adding the appropriate ``style="width: ???px; height: auto;"`` to the ``<img>`` tag. |
|
||||
|
|
||||
- Also finds any ``div class="figures"`` tags in the content, that contain images and adds the same style to them too. |
|
||||
|
|
||||
- If ``RESPONSIVE_IMAGES`` setting is true, it adds ``style="width: ???px; max-width: 100%; height: auto;"`` instead. |
|
||||
|
|
||||
- Corrects Alt text: If an img ``alt`` attribute equals the image filename, it sets it to "" |
|
||||
|
|
||||
|
|
||||
Assuming that the image is 250px wide, it turns this:: |
|
||||
|
|
||||
<div class="figure"> |
|
||||
<img alt="/static/images/image.jpg" src="/static/images/image.jpg" /> |
|
||||
<p class="caption"> |
|
||||
This is the caption of the figure. |
|
||||
</p> |
|
||||
<div class="legend"> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
into this:: |
|
||||
|
|
||||
<div class="figure" style="width: 250px; height: auto;"> |
|
||||
<img style="width: 250px; height: auto;" alt="" src="/static/images/image.jpg" /> |
|
||||
<p class="caption"> |
|
||||
This is the caption of the figure. |
|
||||
</p> |
|
||||
<div class="legend"> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
or this, if ``RESPONSIVE_IMAGES = True``:: |
|
||||
|
|
||||
<div class="figure" style="width: 250px; max-width: 100%; height: auto;"> |
|
||||
<img style="width: 250px; max-width: 100%; height: auto;" alt="" src="/static/images/image.jpg" /> |
|
||||
<p class="caption"> |
|
||||
This is the caption of the figure. |
|
||||
</p> |
|
||||
<div class="legend"> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
|
||||
</div> |
|
||||
</div> |
|
@ -1 +0,0 @@ |
|||||
from .better_figures_and_images import * |
|
@ -1,123 +0,0 @@ |
|||||
""" |
|
||||
Better Figures & Images |
|
||||
------------------------ |
|
||||
|
|
||||
This plugin: |
|
||||
|
|
||||
- Adds a style="width: ???px; height: auto;" to each image in the content |
|
||||
- Also adds the width of the contained image to any parent div.figures. |
|
||||
- If RESPONSIVE_IMAGES == True, also adds style="max-width: 100%;" |
|
||||
- Corrects alt text: if alt == image filename, set alt = '' |
|
||||
|
|
||||
TODO: Need to add a test.py for this plugin. |
|
||||
|
|
||||
""" |
|
||||
|
|
||||
from __future__ import unicode_literals |
|
||||
from os import path, access, R_OK |
|
||||
import os |
|
||||
|
|
||||
from pelican import signals |
|
||||
|
|
||||
from bs4 import BeautifulSoup |
|
||||
from PIL import Image |
|
||||
import pysvg.parser |
|
||||
|
|
||||
import logging |
|
||||
logger = logging.getLogger(__name__) |
|
||||
|
|
||||
def content_object_init(instance): |
|
||||
|
|
||||
if instance._content is not None: |
|
||||
content = instance._content |
|
||||
soup = BeautifulSoup(content, 'html.parser') |
|
||||
|
|
||||
for img in soup(['img', 'object']): |
|
||||
logger.debug('Better Fig. PATH: %s', instance.settings['PATH']) |
|
||||
if img.name == 'img': |
|
||||
logger.debug('Better Fig. img.src: %s', img['src']) |
|
||||
img_path, img_filename = path.split(img['src']) |
|
||||
else: |
|
||||
logger.debug('Better Fig. img.data: %s', img['data']) |
|
||||
img_path, img_filename = path.split(img['data']) |
|
||||
logger.debug('Better Fig. img_path: %s', img_path) |
|
||||
logger.debug('Better Fig. img_fname: %s', img_filename) |
|
||||
|
|
||||
# Pelican 3.5+ supports {attach} macro for auto copy, in this use case the content does not exist in output |
|
||||
# due to the fact it has not been copied, hence we take it from the source (same as current document) |
|
||||
if img_filename.startswith('{attach}'): |
|
||||
img_path = os.path.dirname(instance.source_path) |
|
||||
img_filename = img_filename[8:] |
|
||||
src = os.path.join(img_path, img_filename) |
|
||||
else: |
|
||||
# Strip off {filename}, |filename| or /static |
|
||||
if img_path.startswith(('{filename}', '|filename|')): |
|
||||
img_path = img_path[10:] |
|
||||
elif img_path.startswith('/static'): |
|
||||
img_path = img_path[7:] |
|
||||
elif img_path.startswith('data:image'): |
|
||||
# Image is encoded in-line (not a file). |
|
||||
continue |
|
||||
else: |
|
||||
logger.warning('Better Fig. Error: img_path should start with either {filename}, |filename| or /static') |
|
||||
|
|
||||
# search src path list |
|
||||
# 1. Build the source image filename from PATH |
|
||||
# 2. Build the source image filename from STATIC_PATHS |
|
||||
|
|
||||
# if img_path start with '/', remove it. |
|
||||
img_path = os.path.sep.join([el for el in img_path.split("/") if len(el) > 0]) |
|
||||
|
|
||||
# style: {filename}/static/foo/bar.png |
|
||||
src = os.path.join(instance.settings['PATH'], img_path, img_filename) |
|
||||
src_candidates = [src] |
|
||||
|
|
||||
# style: {filename}../static/foo/bar.png |
|
||||
src_candidates += [os.path.join(instance.settings['PATH'], static_path, img_path, img_filename) for static_path in instance.settings['STATIC_PATHS']] |
|
||||
|
|
||||
src_candidates = [f for f in src_candidates if path.isfile(f) and access(f, R_OK)] |
|
||||
|
|
||||
if not src_candidates: |
|
||||
logger.error('Better Fig. Error: image not found: %s', src) |
|
||||
logger.debug('Better Fig. Skip src: %s', img_path + '/' + img_filename) |
|
||||
continue |
|
||||
|
|
||||
src = src_candidates[0] |
|
||||
logger.debug('Better Fig. src: %s', src) |
|
||||
|
|
||||
# Open the source image and query dimensions; build style string |
|
||||
try: |
|
||||
if img.name == 'img': |
|
||||
im = Image.open(src) |
|
||||
extra_style = 'width: {}px; height: auto;'.format(im.size[0]) |
|
||||
else: |
|
||||
svg = pysvg.parser.parse(src) |
|
||||
extra_style = 'width: {}px; height: auto;'.format(svg.get_width()) |
|
||||
except IOError as e: |
|
||||
logger.debug('Better Fig. Failed to open: %s', src) |
|
||||
extra_style = 'width: 100%; height: auto;' |
|
||||
|
|
||||
if 'RESPONSIVE_IMAGES' in instance.settings and instance.settings['RESPONSIVE_IMAGES']: |
|
||||
extra_style += ' max-width: 100%;' |
|
||||
|
|
||||
if img.get('style'): |
|
||||
img['style'] += extra_style |
|
||||
else: |
|
||||
img['style'] = extra_style |
|
||||
|
|
||||
if img.name == 'img': |
|
||||
if img['alt'] == img['src']: |
|
||||
img['alt'] = '' |
|
||||
|
|
||||
fig = img.find_parent('div', 'figure') |
|
||||
if fig: |
|
||||
if fig.get('style'): |
|
||||
fig['style'] += extra_style |
|
||||
else: |
|
||||
fig['style'] = extra_style |
|
||||
|
|
||||
instance._content = soup.decode() |
|
||||
|
|
||||
|
|
||||
def register(): |
|
||||
signals.content_object_init.connect(content_object_init) |
|
Before Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 2.6 KiB |
@ -1,44 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="en"> |
|
||||
<head> |
|
||||
<meta charset="utf-8"> |
|
||||
<title>Better Figures & Images Test</title> |
|
||||
</head> |
|
||||
<body> |
|
||||
<div class="figure"> |
|
||||
<img alt="map to buried treasure" src="/static/images/dummy-200x200.png"> |
|
||||
<p class="caption"> |
|
||||
This is the caption of the figure (a simple paragraph). |
|
||||
</p> |
|
||||
<div class="legend"> |
|
||||
The legend consists of all elements after the caption. In this case, the legend consists of this paragraph. |
|
||||
</div> |
|
||||
</div> |
|
||||
<p> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
</p> |
|
||||
<div class="figure align-right"> |
|
||||
<img alt="map to buried treasure 2" src="/static/images/dummy-250x300.png"> |
|
||||
<p class="caption"> |
|
||||
This is the second image caption. |
|
||||
</p> |
|
||||
<div class="legend"> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
|
||||
</div> |
|
||||
</div> |
|
||||
<p> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
</p> |
|
||||
<img alt="/static/images/dummy-200x200.png" src="/static/images/dummy-200x200.png"> |
|
||||
<p> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
</p> |
|
||||
<p> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
</p> |
|
||||
<img alt="/static/images/dummy-250x300.png" class="align-right" src="/static/images/dummy-250x300.png"> |
|
||||
<p> |
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
</p> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,75 +0,0 @@ |
|||||
:title: Images Test |
|
||||
:slug: images-test |
|
||||
:date: 2013-04-23 15:59:39 |
|
||||
:tags: images, test |
|
||||
|
|
||||
.. figure:: /static/images/dummy-800x300.png |
|
||||
|
|
||||
This is the caption of the figure (a simple paragraph). |
|
||||
|
|
||||
The legend consists of all elements after the caption. In this |
|
||||
case, the legend consists of this paragraph. |
|
||||
|
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo |
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non |
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
|
|
||||
.. figure:: /static/images/dummy-200x200.png |
|
||||
:alt: map to buried treasure |
|
||||
|
|
||||
This is the caption of the figure (a simple paragraph). |
|
||||
|
|
||||
The legend consists of all elements after the caption. In this |
|
||||
case, the legend consists of this paragraph. |
|
||||
|
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo |
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non |
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
|
|
||||
.. figure:: /static/images/dummy-250x300.png |
|
||||
:alt: map to buried treasure 2 |
|
||||
:align: right |
|
||||
|
|
||||
This is the second image caption. |
|
||||
|
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
|
||||
tempor incididunt ut labore et dolore magna aliqua. |
|
||||
|
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo |
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non |
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
|
|
||||
.. image:: /static/images/dummy-200x200.png |
|
||||
|
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo |
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non |
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
|
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo |
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non |
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
||||
|
|
||||
.. image:: /static/images/dummy-250x300.png |
|
||||
:align: right |
|
||||
|
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod |
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo |
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse |
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non |
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
|
@ -1,18 +0,0 @@ |
|||||
Copyright (c) 2015 Alex Waite |
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
of this software and associated documentation files (the "Software"), to deal |
|
||||
in the Software without restriction, including without limitation the rights |
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
copies of the Software, and to permit persons to whom the Software is |
|
||||
furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
The above copyright notice and this permission notice shall be included in |
|
||||
all copies or substantial portions of the Software. |
|
||||
|
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY |
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
||||
SOFTWARE. |
|
@ -1,38 +0,0 @@ |
|||||
# Better Tables |
|
||||
|
|
||||
This Pelican plugin removes the excess attributes and elements in the HTML |
|
||||
tables generated from reST. Trimming this fat allows them to pass HTML5 |
|
||||
validation. Hopefully `rst2html5` will be merged into Pelican at some point, but |
|
||||
until then, this hacky approach is needed. |
|
||||
|
|
||||
This approach has the advantage of restoring sanity to tables, and allows their |
|
||||
column width to flow normally. All styling is default and must be styled by CSS |
|
||||
rather than in HTML attributes. |
|
||||
|
|
||||
I make no claim that **all** HTML table crimes generated are corrected — merely |
|
||||
the ones that I have stumbled across. |
|
||||
|
|
||||
## Requirements |
|
||||
|
|
||||
* Beautiful Soup 4 |
|
||||
|
|
||||
## What does it do? |
|
||||
|
|
||||
At the moment, the following is stripped from tables (though when in doubt, |
|
||||
check the source as it may be updated and out-of-sync with this document). |
|
||||
|
|
||||
* `<colgroup>` element (and its evil `<col>` children) |
|
||||
* `table` > `border` attribute |
|
||||
* `<tbody>` and `<thead>` > `valign` attribute |
|
||||
|
|
||||
## Usage |
|
||||
|
|
||||
Enable the plugin in your pelicanconf.py: |
|
||||
|
|
||||
PLUGINS = [ |
|
||||
# ... |
|
||||
'better_tables', |
|
||||
# ... |
|
||||
] |
|
||||
|
|
||||
And that's it. Life's simple like that sometimes. |
|
@ -1,31 +0,0 @@ |
|||||
# Copyright (c) 2015 Alex Waite |
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
# of this software and associated documentation files (the "Software"), to deal |
|
||||
# in the Software without restriction, including without limitation the rights |
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
# copies of the Software, and to permit persons to whom the Software is |
|
||||
# furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
# The above copyright notice and this permission notice shall be included in |
|
||||
# all copies or substantial portions of the Software. |
|
||||
|
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY |
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
||||
# SOFTWARE. |
|
||||
|
|
||||
# -*- coding: utf-8 -*- |
|
||||
__title__ = 'better-tables' |
|
||||
__version__ = '0.1.0' |
|
||||
__author__ = 'Alex Waite' |
|
||||
__credits__ = ["Alex Waite"] |
|
||||
__maintainer__ = "Alex Waite" |
|
||||
__email__ = "Alexqw85@gmail.com" |
|
||||
__status__ = "Stable" |
|
||||
__license__ = 'MIT' |
|
||||
__copyright__ = 'Copyright 2015' |
|
||||
|
|
||||
from .better_tables import * |
|
@ -1,71 +0,0 @@ |
|||||
# Copyright (c) 2015 Alex Waite |
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
# of this software and associated documentation files (the "Software"), to deal |
|
||||
# in the Software without restriction, including without limitation the rights |
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
# copies of the Software, and to permit persons to whom the Software is |
|
||||
# furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
# The above copyright notice and this permission notice shall be included in |
|
||||
# all copies or substantial portions of the Software. |
|
||||
|
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY |
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
||||
# SOFTWARE. |
|
||||
|
|
||||
''' Better Tables: Restore sanity to rst->html tables |
|
||||
|
|
||||
This pelican plugin removes the excess attributes and elements in the HTML |
|
||||
tables generated from RST. Trimming this fat allows them to pass HTML5 |
|
||||
validation. Hopefully rst2html5 will be merged into pelican at some point, but |
|
||||
until then, this hacky approach is needed. |
|
||||
|
|
||||
This approach has the advantage of restoring sanity to tables, and allows their |
|
||||
column with to flow normally. All styling is default and must be styled by CSS |
|
||||
rather than in HTML attributes. |
|
||||
|
|
||||
I make no claim that /all/ HTML table crimes generated are corrected, merely |
|
||||
the ones which I have stumbled across. |
|
||||
|
|
||||
Usage: |
|
||||
Enable the plugin in your pelicanconf.py |
|
||||
|
|
||||
PLUGINS = [ |
|
||||
# ... |
|
||||
'better_tables', |
|
||||
# ... |
|
||||
] |
|
||||
|
|
||||
And that's it. Life's simple like that sometimes. |
|
||||
''' |
|
||||
|
|
||||
from pelican import signals, contents |
|
||||
from bs4 import BeautifulSoup |
|
||||
|
|
||||
def better_tables(content): |
|
||||
if isinstance(content, contents.Static): |
|
||||
return |
|
||||
|
|
||||
soup = BeautifulSoup(content._content, 'html.parser') |
|
||||
|
|
||||
for table in soup.findAll('table'): |
|
||||
# table's "border" is so 1996 |
|
||||
del(table['border']) |
|
||||
|
|
||||
# col widths. not only /infuriating/ it's also not in HTML5 |
|
||||
for tag in table.findAll('colgroup'): |
|
||||
tag.extract() |
|
||||
|
|
||||
# tbody and thead's valign |
|
||||
for tag in table.findAll(['tbody', 'thead']): |
|
||||
del(tag['valign']) |
|
||||
|
|
||||
soup.renderContents() |
|
||||
content._content = soup.decode() |
|
||||
|
|
||||
def register(): |
|
||||
signals.content_object_init.connect(better_tables) |
|
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.7 KiB |
@ -1,21 +0,0 @@ |
|||||
The MIT License (MIT) |
|
||||
|
|
||||
Copyright (c) 2014 Nicolas P. Rougier |
|
||||
|
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
of this software and associated documentation files (the "Software"), to deal |
|
||||
in the Software without restriction, including without limitation the rights |
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
copies of the Software, and to permit persons to whom the Software is |
|
||||
furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
The above copyright notice and this permission notice shall be included in |
|
||||
all copies or substantial portions of the Software. |
|
||||
|
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
THE SOFTWARE. |
|
@ -1,32 +0,0 @@ |
|||||
MAKE = /usr/bin/make |
|
||||
RST2HTML = ./bootstrap.py |
|
||||
STYLESHEET = |
|
||||
RST2HTML_OPTIONS = --strip-comments \
|
|
||||
--report=3 \
|
|
||||
--no-doc-title \
|
|
||||
--traceback \
|
|
||||
--compact-lists \
|
|
||||
--no-toc-backlinks \
|
|
||||
--syntax-highlight=short \
|
|
||||
--template=page.tmpl \
|
|
||||
--cloak-email-addresses \
|
|
||||
--stylesheet=$(STYLESHEET) \
|
|
||||
--link-stylesheet |
|
||||
|
|
||||
SOURCES = $(wildcard doc/*.rst) |
|
||||
TMP = $(subst .rst,.html, $(SOURCES)) |
|
||||
OBJECTS = $(subst doc/,, $(TMP)) |
|
||||
|
|
||||
all:$(OBJECTS) |
|
||||
|
|
||||
%.html: doc/%.rst |
|
||||
@echo " - $@" |
|
||||
@$(RST2HTML) $(RST2HTML_OPTIONS) $< $@ |
|
||||
|
|
||||
clean: |
|
||||
@-rm -f $(OBJECTS) |
|
||||
|
|
||||
distclean: clean |
|
||||
@-rm -f `find . -name "*~"` |
|
||||
|
|
||||
.PHONY: all clean distclean |
|
@ -1,44 +0,0 @@ |
|||||
Bootstrap RST for Pelican |
|
||||
========================= |
|
||||
|
|
||||
This plugin merely adds what little glue is needed to make bootstrap-rst play |
|
||||
nicely with Pelican. All credit goes to **Nicolas P. Rougier**. |
|
||||
|
|
||||
It is much more featureful than the 'twitter_bootstrap_rst_directives' plugin. |
|
||||
|
|
||||
Usage |
|
||||
----- |
|
||||
Enable the plugin in your `pelicanconf.py` |
|
||||
|
|
||||
PLUGINS = [ |
|
||||
'bootstrap-rst' |
|
||||
] |
|
||||
|
|
||||
And then use any of the many fine directives made available. Peruse the `doc` |
|
||||
folder for more information. |
|
||||
|
|
||||
Bootstrap RST |
|
||||
============= |
|
||||
|
|
||||
Bootstrap RST offers an easy access to the `bootstrap <http://getbootstrap.com>`_ |
|
||||
framework using the `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ |
|
||||
markup language. Bootstrap RST provides a set of new directives and roles (row, |
|
||||
column, button, list, etc.) that allow seamless integration of the bootstrap |
|
||||
framework. Have a look at the source of this page for example and see below for |
|
||||
what is available so far. |
|
||||
|
|
||||
See demo at: `http://rougier.github.io/bootstrap-rst/ <http://rougier.github.io/bootstrap-rst/>`_. |
|
||||
|
|
||||
Creators |
|
||||
======== |
|
||||
|
|
||||
**Nicolas P. Rougier** : |
|
||||
|
|
||||
* `http://www.labri.fr/perso/nrougier/ <http://www.labri.fr/perso/nrougier/>`_ |
|
||||
* `https://github.com/rougier <https://github.com/rougier>`_ |
|
||||
|
|
||||
Copyright and License |
|
||||
===================== |
|
||||
|
|
||||
Code and documentation copyright 2014 Nicolas P. Rougier. |
|
||||
Code released under the MIT license. Docs released under CC BY 3.0. |
|
@ -1,12 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
__title__ = 'bootstrap-rst' |
|
||||
__version__ = '0.1.1' |
|
||||
__author__ = 'Nicolas P. Rougier' |
|
||||
__credits__ = ['Nicolas P. Rougier', 'Alex Waite', 'Trevor Morgan'] |
|
||||
__maintainer__ = "Alex Waite" |
|
||||
__email__ = "alex@waite.eu" |
|
||||
__status__ = "Development" |
|
||||
__license__ = 'MIT' |
|
||||
__copyright__ = 'Copyright 2014' |
|
||||
|
|
||||
from .bootstrap import * |
|
@ -1,310 +0,0 @@ |
|||||
#!/usr/bin/env python |
|
||||
# -*- coding: utf-8 -*- |
|
||||
# ----------------------------------------------------------------------------- |
|
||||
# Bootstrap RST |
|
||||
# Copyright (c) 2014, Nicolas P. Rougier |
|
||||
# Distributed under the (new) BSD License. See LICENSE.txt for more info. |
|
||||
# ----------------------------------------------------------------------------- |
|
||||
import sys, os, re |
|
||||
from docutils import nodes, utils |
|
||||
from docutils.parsers.rst.directives import images |
|
||||
from docutils.transforms import TransformError, Transform, parts |
|
||||
from docutils.parsers.rst import Directive, directives, states, roles |
|
||||
from docutils.nodes import fully_normalize_name, whitespace_normalize_name |
|
||||
from docutils.parsers.rst.roles import set_classes |
|
||||
|
|
||||
from docutils.io import StringOutput |
|
||||
from docutils.core import Publisher |
|
||||
|
|
||||
from pelican import signals |
|
||||
from pelican.readers import RstReader, PelicanHTMLTranslator |
|
||||
|
|
||||
from .roles import * |
|
||||
from .directives import * |
|
||||
|
|
||||
|
|
||||
class HTMLTranslator(PelicanHTMLTranslator): |
|
||||
""" |
|
||||
This is a translator class for the docutils system. |
|
||||
""" |
|
||||
|
|
||||
def visit_h1(self, node): |
|
||||
self.body.append('<h1>%s</h1>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_h2(self, node): |
|
||||
self.body.append('<h2>%s</h2>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_h3(self, node): |
|
||||
self.body.append('<h3>%s</h3>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_h4(self, node): |
|
||||
self.body.append('<h4>%s</h4>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_h5(self, node): |
|
||||
self.body.append('<h5>%s</h5>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_h6(self, node): |
|
||||
self.body.append('<h6>%s</h6>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_label_default(self, node): |
|
||||
self.body.append( |
|
||||
'<span class="label label-default">%s</span>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_label_primary(self, node): |
|
||||
self.body.append( |
|
||||
'<span class="label label-primary">%s</span>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_label_success(self, node): |
|
||||
self.body.append( |
|
||||
'<span class="label label-success">%s</span>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_label_info(self, node): |
|
||||
self.body.append( |
|
||||
'<span class="label label-info">%s</span>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_label_warning(self, node): |
|
||||
self.body.append( |
|
||||
'<span class="label label-warning">%s</span>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_label_danger(self, node): |
|
||||
self.body.append( |
|
||||
'<span class="label label-danger">%s</span>' % node.children[0]) |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_page_row(self, node): |
|
||||
self.body.append(self.starttag(node,'div')) |
|
||||
|
|
||||
def depart_page_row(self, node): |
|
||||
self.body.append('</div>\n') |
|
||||
|
|
||||
def visit_page_column(self, node): |
|
||||
self.body.append(self.starttag(node,'div')) |
|
||||
|
|
||||
def depart_page_column(self, node): |
|
||||
self.body.append('</div>\n') |
|
||||
|
|
||||
|
|
||||
def visit_button(self, node): |
|
||||
btn_classes = { 'primary' : 'btn-primary', 'success' : 'btn-success', |
|
||||
'info' : 'btn-info', 'warning' : 'btn-warning', |
|
||||
'danger' : 'btn-danger', 'link' : 'btn-link', |
|
||||
'outline' : 'btn-outline', 'tiny' : 'btn-xs', |
|
||||
'small' : 'btn-sm', 'large' : 'btn-lg', |
|
||||
'block' : 'btn-block', 'active' : 'btn-active' } |
|
||||
|
|
||||
classes = 'btn ' |
|
||||
flag = False |
|
||||
for node_class in node['classes']: |
|
||||
if node_class in ['primary', 'success', 'warning' |
|
||||
'info', 'link', 'danger', 'outline']: |
|
||||
flag = True |
|
||||
btn_class = btn_classes.get(node_class, None) |
|
||||
if btn_class: |
|
||||
classes += btn_class + ' ' |
|
||||
if flag == False: |
|
||||
classes += 'btn-default' |
|
||||
|
|
||||
target = node['target'] |
|
||||
properties = '' |
|
||||
|
|
||||
# Disabled |
|
||||
if 'disabled' in node['classes']: |
|
||||
if target: |
|
||||
properties += ' disabled="disabled"' |
|
||||
else: |
|
||||
classes += ' disabled' |
|
||||
|
|
||||
# Data toggle |
|
||||
if 'toggle' in node['classes']: |
|
||||
classes += ' dropdown-toggle ' |
|
||||
properties += ' data-toggle="dropdown"' |
|
||||
if target: |
|
||||
properties += ' role="button"' |
|
||||
anchor = '<a href="%s" class="%s" %s>' % (target,classes,properties) |
|
||||
self.body.append(anchor) |
|
||||
else: |
|
||||
properties += ' type="button"' |
|
||||
button = '<button class="%s" %s>' % (classes,properties) |
|
||||
self.body.append(button) |
|
||||
|
|
||||
def depart_button(self, node): |
|
||||
if node['target']: |
|
||||
self.body.append('</a>\n') |
|
||||
else: |
|
||||
self.body.append('</button>\n') |
|
||||
|
|
||||
|
|
||||
def visit_progress(self, node): |
|
||||
prg_classes = { 'success' : 'progress-bar-success', |
|
||||
'info' : 'progress-bar-info', |
|
||||
'warning' : 'progress-bar-warning', |
|
||||
'danger' : 'progress-bar-danger' } |
|
||||
|
|
||||
label = node['label'] |
|
||||
classes = 'progress-bar' |
|
||||
flag = False |
|
||||
for nodeclass in node['classes']: |
|
||||
flag = True |
|
||||
classes += ' ' + prg_classes.get(nodeclass, '') |
|
||||
if flag == False: |
|
||||
classes += ' progress-bar-default' |
|
||||
properties = 'role="progress-bar"' |
|
||||
properties += ' aria-valuenow="%d"' % int(node['value']) |
|
||||
properties += ' aria-valuemin="%d"' % int(node['value_min']) |
|
||||
properties += ' aria-valuemax="%d"' % int(node['value_max']) |
|
||||
properties += ' style="width: %d%%";' % int(node['value']) |
|
||||
if 'active' in node['classes']: |
|
||||
self.body.append('<div class="progress progress-striped active">') |
|
||||
elif 'striped' in node['classes']: |
|
||||
self.body.append('<div class="progress progress-striped">') |
|
||||
else: |
|
||||
self.body.append('<div class="progress">') |
|
||||
self.body.append( |
|
||||
'<div class="%s" %s>%s</div>' % (classes,properties,label)) |
|
||||
self.body.append('</div>') |
|
||||
raise nodes.SkipNode |
|
||||
|
|
||||
def visit_alert(self, node): |
|
||||
self.body.append(self.starttag(node, 'div', CLASS='alert')) |
|
||||
if node.dismissable: |
|
||||
self.body.append( |
|
||||
u"""<button type="button" class="close" data-dismiss="alert" """ |
|
||||
u"""aria-hidden="true">×</button>""") |
|
||||
|
|
||||
def depart_alert(self, node): |
|
||||
self.body.append('</div>\n') |
|
||||
|
|
||||
def visit_callout(self, node): |
|
||||
self.body.append(self.starttag(node, 'div', CLASS='bs-callout')) |
|
||||
|
|
||||
def depart_callout(self, node): |
|
||||
self.body.append('</div>\n') |
|
||||
|
|
||||
|
|
||||
|
|
||||
# overwritten |
|
||||
def visit_definition_list(self, node): |
|
||||
list_class = node.parent.get('list-class', []) |
|
||||
list_class.append('docutils') |
|
||||
list_class = ' '.join(list_class) |
|
||||
self.body.append(self.starttag(node, 'dl', CLASS=list_class)) |
|
||||
|
|
||||
# overwritten |
|
||||
def visit_sidebar(self, node): |
|
||||
self.body.append(self.starttag(node, 'div', CLASS='col-md-3 col-md-push-9')) |
|
||||
self.body.append(self.starttag(node, 'div', CLASS='bs-docs-sidebar hidden-print affix-top')) |
|
||||
self.body.append(self.starttag(node, 'div', CLASS='sidebar')) |
|
||||
self.set_first_last(node) |
|
||||
self.in_sidebar = True |
|
||||
|
|
||||
# overwritten |
|
||||
def depart_sidebar(self, node): |
|
||||
self.body.append('</div>\n') |
|
||||
self.body.append('</div>\n') |
|
||||
self.body.append('</div>\n') |
|
||||
# Opening tag for body |
|
||||
self.body.append(self.starttag(node, 'div', CLASS='col-md-9 col-md-pull-3')) |
|
||||
self.in_sidebar = False |
|
||||
|
|
||||
# overwritten : removed compact paragraph |
|
||||
# def visit_paragraph(self, node): |
|
||||
# if self.should_be_compact_paragraph(node): |
|
||||
# self.context.append('') |
|
||||
# else: |
|
||||
# self.body.append(self.starttag(node, 'p', '')) |
|
||||
# self.context.append('</p>\n') |
|
||||
|
|
||||
# overwritten: remove border=1, replace docutils/table class |
|
||||
def visit_table(self, node): |
|
||||
self.context.append(self.compact_p) |
|
||||
self.compact_p = True |
|
||||
#classes = ' '.join(['docutils', self.settings.table_style]).strip() |
|
||||
classes = ' '.join(['table', self.settings.table_style]).strip() |
|
||||
self.body.append(self.starttag(node, 'table', CLASS=classes)) |
|
||||
|
|
||||
# overwritten : removed 'container' class |
|
||||
def visit_container(self, node): |
|
||||
self.body.append(self.starttag(node, 'div', CLASS='')) |
|
||||
|
|
||||
# overwritten: get rid of <hr> tag |
|
||||
def depart_header(self, node): |
|
||||
start = self.context.pop() |
|
||||
header = [self.starttag(node, 'div', CLASS='header')] |
|
||||
header.extend(self.body[start:]) |
|
||||
header.append('\n</div>\n') |
|
||||
self.body_prefix.extend(header) |
|
||||
self.header.extend(header) |
|
||||
del self.body[start:] |
|
||||
|
|
||||
# overwritten: get rid of <hr> tag |
|
||||
def depart_footer(self, node): |
|
||||
start = self.context.pop() |
|
||||
footer = [self.starttag(node, 'div', CLASS='footer')] |
|
||||
footer.extend(self.body[start:]) |
|
||||
footer.append('\n</div>\n') |
|
||||
self.footer.extend(footer) |
|
||||
self.body_suffix[:0] = footer |
|
||||
del self.body[start:] |
|
||||
|
|
||||
# overwritten |
|
||||
def depart_document(self, node): |
|
||||
self.head_prefix.extend([self.doctype, |
|
||||
self.head_prefix_template % |
|
||||
{'lang': self.settings.language_code}]) |
|
||||
self.html_prolog.append(self.doctype) |
|
||||
self.meta.insert(0, self.content_type % self.settings.output_encoding) |
|
||||
self.head.insert(0, self.content_type % self.settings.output_encoding) |
|
||||
if self.math_header: |
|
||||
self.head.append(self.math_header) |
|
||||
# skip content-type meta tag with interpolated charset value: |
|
||||
self.html_head.extend(self.head[1:]) |
|
||||
# self.body_prefix.append(self.starttag(node, 'div', CLASS='document')) |
|
||||
self.body_prefix.append(self.starttag(node, 'div', CLASS='container')) |
|
||||
# self.body_suffix.insert(0, '</div>\n') |
|
||||
self.fragment.extend(self.body) # self.fragment is the "naked" body |
|
||||
self.html_body.extend(self.body_prefix[1:] + self.body_pre_docinfo |
|
||||
+ self.docinfo + self.body |
|
||||
+ self.body_suffix[:-1]) |
|
||||
assert not self.context, 'len(context) = %s' % len(self.context) |
|
||||
|
|
||||
|
|
||||
# ----------------------------------------------------------------------------- |
|
||||
class RSTReader(RstReader): |
|
||||
""" |
|
||||
A custom RST reader that behaves exactly like its parent class RstReader |
|
||||
with the difference that it uses our HTMLTranslator |
|
||||
""" |
|
||||
|
|
||||
def _get_publisher(self, source_path): |
|
||||
extra_params = {'initial_header_level': '2', |
|
||||
'syntax_highlight': 'short', |
|
||||
'input_encoding': 'utf-8'} |
|
||||
user_params = self.settings.get('DOCUTILS_SETTINGS') |
|
||||
if user_params: |
|
||||
extra_params.update(user_params) |
|
||||
|
|
||||
pub = Publisher(destination_class=StringOutput) |
|
||||
pub.set_components('standalone', 'restructuredtext', 'html') |
|
||||
pub.writer.translator_class = HTMLTranslator |
|
||||
pub.process_programmatic_settings(None, extra_params, None) |
|
||||
pub.set_source(source_path=source_path) |
|
||||
pub.publish() |
|
||||
return pub |
|
||||
|
|
||||
|
|
||||
def add_reader(readers): |
|
||||
readers.reader_classes['rst'] = RSTReader |
|
||||
|
|
||||
def register(): |
|
||||
signals.readers_init.connect(add_reader) |
|
@ -1,347 +0,0 @@ |
|||||
/*! |
|
||||
* Bootstrap v3.1.1 (http://getbootstrap.com) |
|
||||
* Copyright 2011-2014 Twitter, Inc. |
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) |
|
||||
*/ |
|
||||
|
|
||||
.btn-default, |
|
||||
.btn-primary, |
|
||||
.btn-success, |
|
||||
.btn-info, |
|
||||
.btn-warning, |
|
||||
.btn-danger { |
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); |
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); |
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); |
|
||||
} |
|
||||
.btn-default:active, |
|
||||
.btn-primary:active, |
|
||||
.btn-success:active, |
|
||||
.btn-info:active, |
|
||||
.btn-warning:active, |
|
||||
.btn-danger:active, |
|
||||
.btn-default.active, |
|
||||
.btn-primary.active, |
|
||||
.btn-success.active, |
|
||||
.btn-info.active, |
|
||||
.btn-warning.active, |
|
||||
.btn-danger.active { |
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); |
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); |
|
||||
} |
|
||||
.btn:active, |
|
||||
.btn.active { |
|
||||
background-image: none; |
|
||||
} |
|
||||
.btn-default { |
|
||||
text-shadow: 0 1px 0 #fff; |
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); |
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #dbdbdb; |
|
||||
border-color: #ccc; |
|
||||
} |
|
||||
.btn-default:hover, |
|
||||
.btn-default:focus { |
|
||||
background-color: #e0e0e0; |
|
||||
background-position: 0 -15px; |
|
||||
} |
|
||||
.btn-default:active, |
|
||||
.btn-default.active { |
|
||||
background-color: #e0e0e0; |
|
||||
border-color: #dbdbdb; |
|
||||
} |
|
||||
.btn-primary { |
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); |
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #2b669a; |
|
||||
} |
|
||||
.btn-primary:hover, |
|
||||
.btn-primary:focus { |
|
||||
background-color: #2d6ca2; |
|
||||
background-position: 0 -15px; |
|
||||
} |
|
||||
.btn-primary:active, |
|
||||
.btn-primary.active { |
|
||||
background-color: #2d6ca2; |
|
||||
border-color: #2b669a; |
|
||||
} |
|
||||
.btn-success { |
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); |
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #3e8f3e; |
|
||||
} |
|
||||
.btn-success:hover, |
|
||||
.btn-success:focus { |
|
||||
background-color: #419641; |
|
||||
background-position: 0 -15px; |
|
||||
} |
|
||||
.btn-success:active, |
|
||||
.btn-success.active { |
|
||||
background-color: #419641; |
|
||||
border-color: #3e8f3e; |
|
||||
} |
|
||||
.btn-info { |
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); |
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #28a4c9; |
|
||||
} |
|
||||
.btn-info:hover, |
|
||||
.btn-info:focus { |
|
||||
background-color: #2aabd2; |
|
||||
background-position: 0 -15px; |
|
||||
} |
|
||||
.btn-info:active, |
|
||||
.btn-info.active { |
|
||||
background-color: #2aabd2; |
|
||||
border-color: #28a4c9; |
|
||||
} |
|
||||
.btn-warning { |
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); |
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #e38d13; |
|
||||
} |
|
||||
.btn-warning:hover, |
|
||||
.btn-warning:focus { |
|
||||
background-color: #eb9316; |
|
||||
background-position: 0 -15px; |
|
||||
} |
|
||||
.btn-warning:active, |
|
||||
.btn-warning.active { |
|
||||
background-color: #eb9316; |
|
||||
border-color: #e38d13; |
|
||||
} |
|
||||
.btn-danger { |
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); |
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #b92c28; |
|
||||
} |
|
||||
.btn-danger:hover, |
|
||||
.btn-danger:focus { |
|
||||
background-color: #c12e2a; |
|
||||
background-position: 0 -15px; |
|
||||
} |
|
||||
.btn-danger:active, |
|
||||
.btn-danger.active { |
|
||||
background-color: #c12e2a; |
|
||||
border-color: #b92c28; |
|
||||
} |
|
||||
.thumbnail, |
|
||||
.img-thumbnail { |
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
|
||||
} |
|
||||
.dropdown-menu > li > a:hover, |
|
||||
.dropdown-menu > li > a:focus { |
|
||||
background-color: #e8e8e8; |
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); |
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.dropdown-menu > .active > a, |
|
||||
.dropdown-menu > .active > a:hover, |
|
||||
.dropdown-menu > .active > a:focus { |
|
||||
background-color: #357ebd; |
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); |
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.navbar-default { |
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); |
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
border-radius: 4px; |
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); |
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); |
|
||||
} |
|
||||
.navbar-default .navbar-nav > .active > a { |
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); |
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); |
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); |
|
||||
} |
|
||||
.navbar-brand, |
|
||||
.navbar-nav > li > a { |
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .25); |
|
||||
} |
|
||||
.navbar-inverse { |
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); |
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.navbar-inverse .navbar-nav > .active > a { |
|
||||
background-image: -webkit-linear-gradient(top, #222 0%, #282828 100%); |
|
||||
background-image: linear-gradient(to bottom, #222 0%, #282828 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); |
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); |
|
||||
} |
|
||||
.navbar-inverse .navbar-brand, |
|
||||
.navbar-inverse .navbar-nav > li > a { |
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); |
|
||||
} |
|
||||
.navbar-static-top, |
|
||||
.navbar-fixed-top, |
|
||||
.navbar-fixed-bottom { |
|
||||
border-radius: 0; |
|
||||
} |
|
||||
.alert { |
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .2); |
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); |
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); |
|
||||
} |
|
||||
.alert-success { |
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); |
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #b2dba1; |
|
||||
} |
|
||||
.alert-info { |
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); |
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #9acfea; |
|
||||
} |
|
||||
.alert-warning { |
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); |
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #f5e79e; |
|
||||
} |
|
||||
.alert-danger { |
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); |
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #dca7a7; |
|
||||
} |
|
||||
.progress { |
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); |
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.progress-bar { |
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); |
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.progress-bar-success { |
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); |
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.progress-bar-info { |
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); |
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.progress-bar-warning { |
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); |
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.progress-bar-danger { |
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); |
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.list-group { |
|
||||
border-radius: 4px; |
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
|
||||
} |
|
||||
.list-group-item.active, |
|
||||
.list-group-item.active:hover, |
|
||||
.list-group-item.active:focus { |
|
||||
text-shadow: 0 -1px 0 #3071a9; |
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); |
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #3278b3; |
|
||||
} |
|
||||
.panel { |
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); |
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .05); |
|
||||
} |
|
||||
.panel-default > .panel-heading { |
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); |
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.panel-primary > .panel-heading { |
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); |
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.panel-success > .panel-heading { |
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); |
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.panel-info > .panel-heading { |
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); |
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.panel-warning > .panel-heading { |
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); |
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.panel-danger > .panel-heading { |
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); |
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
} |
|
||||
.well { |
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); |
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); |
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); |
|
||||
background-repeat: repeat-x; |
|
||||
border-color: #dcdcdc; |
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); |
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); |
|
||||
} |
|
||||
/*# sourceMappingURL=bootstrap-theme.css.map */ |
|
Before Width: | Height: | Size: 62 KiB |
@ -1,76 +0,0 @@ |
|||||
/* Swap h2/h3 sizes */ |
|
||||
/* h2,.h2 { font-size: 24px; }*/ |
|
||||
/*h3,.h3 { font-size: 30px; }*/ |
|
||||
|
|
||||
/* sidebar title */ |
|
||||
.sidebar-title { display: none; } |
|
||||
.sidebar .topic-title { display: none; } |
|
||||
|
|
||||
/* admonition title */ |
|
||||
.admonition-title { display: none; } |
|
||||
|
|
||||
|
|
||||
/* page header h1 */ |
|
||||
.section > h1 { |
|
||||
padding-bottom: 9px; |
|
||||
margin: 40px 0 20px; |
|
||||
border-bottom: 1px solid #eee; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/* Sidebar */ |
|
||||
.sidebar ul { |
|
||||
font-size: 110%; |
|
||||
padding: 0; |
|
||||
margin: 0; |
|
||||
list-style: none; |
|
||||
/*padding-top: .5em;*/ |
|
||||
padding-bottom: 1em; |
|
||||
} |
|
||||
|
|
||||
.sidebar p { |
|
||||
padding: 0; |
|
||||
margin: 0; |
|
||||
padding-bottom: .1em; |
|
||||
} |
|
||||
|
|
||||
.sidebar ul p { |
|
||||
text-align: left; |
|
||||
padding: 0; |
|
||||
margin: 0; |
|
||||
padding-top: .25em; |
|
||||
} |
|
||||
|
|
||||
.sidebar ul ul { |
|
||||
font-size: 85%; |
|
||||
padding: 0; |
|
||||
margin: 0; |
|
||||
list-style: none; |
|
||||
margin-top: .5em; |
|
||||
margin-bottom: .5em; |
|
||||
margin-left: 10px; |
|
||||
padding-left: 10px; |
|
||||
border-left: 1px solid #eeeeff; |
|
||||
} |
|
||||
.sidebar ul ul p { |
|
||||
padding: 0; |
|
||||
margin: 0; |
|
||||
padding-top: .25em; |
|
||||
} |
|
||||
|
|
||||
/* kbd -> .kbd */ |
|
||||
.kbd { |
|
||||
font-family: monospace, monospace; |
|
||||
font-size: 1em; |
|
||||
} |
|
||||
.kbd { |
|
||||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace; |
|
||||
} |
|
||||
.kbd { |
|
||||
padding: 2px 4px; |
|
||||
font-size: 90%; |
|
||||
color: #fff; |
|
||||
background-color: #333; |
|
||||
border-radius: 3px; |
|
||||
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); |
|
||||
} |
|
@ -1,465 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# ----------------------------------------------------------------------------- |
|
||||
# Bootstrap RST |
|
||||
# Copyright (c) 2014, Nicolas P. Rougier |
|
||||
# Distributed under the (new) BSD License. See LICENSE.txt for more info. |
|
||||
# ----------------------------------------------------------------------------- |
|
||||
from docutils import nodes |
|
||||
from docutils.parsers.rst.directives.body import BasePseudoSection |
|
||||
from docutils.parsers.rst import Directive, directives, states, roles |
|
||||
from docutils.parsers.rst.roles import set_classes |
|
||||
from docutils.nodes import fully_normalize_name, whitespace_normalize_name |
|
||||
from docutils.parsers.rst.directives.tables import Table |
|
||||
from docutils.parsers.rst.roles import set_classes |
|
||||
from docutils.transforms import misc |
|
||||
|
|
||||
|
|
||||
class button(nodes.Inline, nodes.Element): pass |
|
||||
class progress(nodes.Inline, nodes.Element): pass |
|
||||
class alert(nodes.General, nodes.Element): pass |
|
||||
class callout(nodes.General, nodes.Element): pass |
|
||||
|
|
||||
|
|
||||
|
|
||||
class Alert(Directive): |
|
||||
required_arguments, optional_arguments = 0,0 |
|
||||
has_content = True |
|
||||
option_spec = {'type': directives.unchanged, |
|
||||
'dismissable': directives.flag, |
|
||||
'class': directives.class_option } |
|
||||
|
|
||||
def run(self): |
|
||||
# Raise an error if the directive does not have contents. |
|
||||
self.assert_has_content() |
|
||||
text = '\n'.join(self.content) |
|
||||
|
|
||||
# Create the node, to be populated by `nested_parse`. |
|
||||
node = alert(text, **self.options) |
|
||||
node['classes'] = ['alert'] |
|
||||
node['classes'] += self.options.get('class', []) |
|
||||
if 'type' in self.options: |
|
||||
node['classes'] += ['alert-%s' % node['type']] |
|
||||
node.dismissable = False |
|
||||
if 'dismissable' in self.options: |
|
||||
node['classes'] += ['alert-dismissable'] |
|
||||
node.dismissable = True |
|
||||
|
|
||||
# Parse the directive contents. |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
class Callout(Directive): |
|
||||
required_arguments, optional_arguments = 0,1 |
|
||||
has_content = True |
|
||||
|
|
||||
def run(self): |
|
||||
# Raise an error if the directive does not have contents. |
|
||||
self.assert_has_content() |
|
||||
text = '\n'.join(self.content) |
|
||||
|
|
||||
# Create the node, to be populated by `nested_parse`. |
|
||||
node = callout(self.block_text, **self.options) |
|
||||
node['classes'] = ['bs-callout'] |
|
||||
if len(self.arguments): |
|
||||
type = 'bs-callout-' + self.arguments[0] |
|
||||
else: |
|
||||
type = 'bs-callout-info' |
|
||||
node['classes'] += [type] |
|
||||
|
|
||||
# Parse the directive contents. |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
|
|
||||
class Container(Directive): |
|
||||
optional_arguments = 1 |
|
||||
final_argument_whitespace = True |
|
||||
option_spec = {'name': directives.unchanged} |
|
||||
has_content = True |
|
||||
default_class = None |
|
||||
|
|
||||
def run(self): |
|
||||
self.assert_has_content() |
|
||||
text = '\n'.join(self.content) |
|
||||
try: |
|
||||
if self.arguments: |
|
||||
classes = directives.class_option(self.arguments[0]) |
|
||||
else: |
|
||||
classes = self.default_class |
|
||||
except ValueError: |
|
||||
raise self.error( |
|
||||
'Invalid class attribute value for "%s" directive: "%s".' |
|
||||
% (self.name, self.arguments[0])) |
|
||||
node = nodes.container(text) |
|
||||
node['classes'].extend(classes) |
|
||||
self.add_name(node) |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
return [node] |
|
||||
|
|
||||
class Thumbnail(Container): |
|
||||
default_class = ['thumbnail'] |
|
||||
|
|
||||
class Caption(Container): |
|
||||
default_class = ['caption'] |
|
||||
|
|
||||
class Jumbotron(Container): |
|
||||
default_class = ['jumbotron'] |
|
||||
|
|
||||
class PageHeader(Container): |
|
||||
default_class = ['page-header'] |
|
||||
|
|
||||
|
|
||||
|
|
||||
class Lead(Directive): |
|
||||
required_arguments, optional_arguments = 0,0 |
|
||||
has_content = True |
|
||||
option_spec = {'class': directives.class_option } |
|
||||
def run(self): |
|
||||
self.assert_has_content() |
|
||||
text = '\n'.join(self.content) |
|
||||
node = nodes.container(text, **self.options) |
|
||||
node['classes'] = ['lead'] |
|
||||
node['classes'] += self.options.get('class', []) |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
class Paragraph(Directive): |
|
||||
required_arguments, optional_arguments = 0,0 |
|
||||
has_content = True |
|
||||
option_spec = {'class': directives.class_option } |
|
||||
|
|
||||
def run(self): |
|
||||
# Raise an error if the directive does not have contents. |
|
||||
self.assert_has_content() |
|
||||
text = '\n'.join(self.content) |
|
||||
|
|
||||
# Create the node, to be populated by `nested_parse`. |
|
||||
node = nodes.paragraph(text, **self.options) |
|
||||
node['classes'] += self.options.get('class', []) |
|
||||
|
|
||||
# Parse the directive contents. |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
class PageRow(Directive): |
|
||||
|
|
||||
""" |
|
||||
Directive to declare a container that is column-aware. |
|
||||
""" |
|
||||
|
|
||||
required_arguments, optional_arguments = 0,1 |
|
||||
final_argument_whitespace = True |
|
||||
has_content = True |
|
||||
option_spec = {'class': directives.class_option } |
|
||||
def run(self): |
|
||||
self.assert_has_content() |
|
||||
node = nodes.container(self.content) |
|
||||
node['classes'] = ['row'] |
|
||||
if self.arguments: |
|
||||
node['classes'] += [self.arguments[0]] |
|
||||
node['classes'] += self.options.get('class', []) |
|
||||
|
|
||||
self.add_name(node) |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
|
|
||||
class PageColumn(Directive): |
|
||||
|
|
||||
""" |
|
||||
Directive to declare column with width and offset. |
|
||||
""" |
|
||||
|
|
||||
required_arguments, optional_arguments = 0,0 |
|
||||
final_argument_whitespace = True |
|
||||
has_content = True |
|
||||
option_spec = {'width': directives.positive_int, |
|
||||
'offset': directives.positive_int, |
|
||||
'push': directives.positive_int, |
|
||||
'pull': directives.positive_int, |
|
||||
'size': lambda x: directives.choice(x, ('xs', 'sm', 'md', 'lg')), |
|
||||
'class': directives.class_option } |
|
||||
def run(self): |
|
||||
self.assert_has_content() |
|
||||
text = '\n'.join(self.content) |
|
||||
node = nodes.container(text) |
|
||||
width = self.options.get('width', 1) |
|
||||
size = self.options.get('size', 'md') |
|
||||
node['classes'] += ["col-%s-%d" % (size, width)] |
|
||||
|
|
||||
offset = self.options.get('offset', 0) |
|
||||
if offset > 0: |
|
||||
node['classes'] += ["col-%s-offset-%d" % (size, offset)] |
|
||||
|
|
||||
push = self.options.get('push', 0) |
|
||||
if push > 0: |
|
||||
node['classes'] += ["col-%s-push-%d" % (size, push)] |
|
||||
|
|
||||
pull = self.options.get('pull', 0) |
|
||||
if pull > 0: |
|
||||
node['classes'] += ["col-%s-pull-%d" % (size, pull)] |
|
||||
|
|
||||
node['classes'] += self.options.get('class', []) |
|
||||
|
|
||||
self.add_name(node) |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
|
|
||||
class Button(Directive): |
|
||||
|
|
||||
""" |
|
||||
Directive to declare a button |
|
||||
""" |
|
||||
|
|
||||
required_arguments, optional_arguments = 0,0 |
|
||||
final_argument_whitespace = True |
|
||||
has_content = True |
|
||||
option_spec = {'class' : directives.class_option, |
|
||||
'target' : directives.unchanged_required } |
|
||||
def run(self): |
|
||||
self.assert_has_content() |
|
||||
node = button() |
|
||||
node['target'] = self.options.get('target', None) |
|
||||
node['classes'] = self.options.get('class', []) |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
self.add_name(node) |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
|
|
||||
class Progress(Directive): |
|
||||
|
|
||||
""" |
|
||||
Directive to declare a progress bar. |
|
||||
""" |
|
||||
|
|
||||
required_arguments, optional_arguments = 0,1 |
|
||||
final_argument_whitespace = True |
|
||||
has_content = False |
|
||||
option_spec = { 'class' : directives.class_option, |
|
||||
'label' : directives.unchanged, |
|
||||
'value' : directives.unchanged_required, |
|
||||
'min' : directives.unchanged_required, |
|
||||
'max' : directives.unchanged_required } |
|
||||
def run(self): |
|
||||
node = progress() |
|
||||
node['classes'] = self.options.get('class', '') |
|
||||
node['value_min'] = self.options.get('min_value', '0') |
|
||||
node['value_max'] = self.options.get('max_value', '100') |
|
||||
node['value'] = self.options.get('value', '50') |
|
||||
node['label'] = self.options.get('label', '') |
|
||||
if self.arguments: |
|
||||
node['value'] = self.arguments[0].rstrip(' %') |
|
||||
#if 'label' not in self.options: |
|
||||
# node['label'] = self.arguments[0] |
|
||||
return [node] |
|
||||
|
|
||||
|
|
||||
|
|
||||
class Header(Directive): |
|
||||
|
|
||||
"""Contents of document header.""" |
|
||||
|
|
||||
required_arguments, optional_arguments = 0,1 |
|
||||
has_content = True |
|
||||
option_spec = {'class': directives.class_option } |
|
||||
|
|
||||
def run(self): |
|
||||
self.assert_has_content() |
|
||||
header = self.state_machine.document.get_decoration().get_header() |
|
||||
header['classes'] += self.options.get('class', []) |
|
||||
if self.arguments: |
|
||||
header['classes'] += [self.arguments[0]] |
|
||||
self.state.nested_parse(self.content, self.content_offset, header) |
|
||||
return [] |
|
||||
|
|
||||
|
|
||||
class Footer(Directive): |
|
||||
|
|
||||
"""Contents of document footer.""" |
|
||||
|
|
||||
required_arguments, optional_arguments = 0,1 |
|
||||
has_content = True |
|
||||
option_spec = {'class': directives.class_option } |
|
||||
|
|
||||
def run(self): |
|
||||
self.assert_has_content() |
|
||||
footer = self.state_machine.document.get_decoration().get_footer() |
|
||||
footer['classes'] += self.options.get('class', []) |
|
||||
if self.arguments: |
|
||||
footer['classes'] += [self.arguments[0]] |
|
||||
self.state.nested_parse(self.content, self.content_offset, footer) |
|
||||
return [] |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
# List item class |
|
||||
# ----------------------------------------------------------------------------- |
|
||||
class ItemClass(Directive): |
|
||||
|
|
||||
""" |
|
||||
Set a "list-class" attribute on the directive content or the next element. |
|
||||
When applied to the next element, a "pending" element is inserted, and a |
|
||||
transform does the work later. |
|
||||
""" |
|
||||
|
|
||||
required_arguments = 1 |
|
||||
optional_arguments = 0 |
|
||||
final_argument_whitespace = True |
|
||||
has_content = False |
|
||||
|
|
||||
def run(self): |
|
||||
try: |
|
||||
class_value = directives.class_option(self.arguments[0]) |
|
||||
except ValueError: |
|
||||
raise self.error( |
|
||||
'Invalid class attribute value for "%s" directive: "%s".' |
|
||||
% (self.name, self.arguments[0])) |
|
||||
|
|
||||
parent = self.state.parent |
|
||||
if isinstance(parent,nodes.list_item): |
|
||||
parent['classes'].extend(class_value) |
|
||||
return [] |
|
||||
|
|
||||
|
|
||||
# PATCH: Make a row inherit from the class attribute |
|
||||
# -------------------------------------------------------------- |
|
||||
class ListTable(Table): |
|
||||
|
|
||||
""" |
|
||||
Implement tables whose data is encoded as a uniform two-level bullet list. |
|
||||
For further ideas, see |
|
||||
http://docutils.sf.net/docs/dev/rst/alternatives.html#list-driven-tables |
|
||||
""" |
|
||||
|
|
||||
option_spec = {'header-rows': directives.nonnegative_int, |
|
||||
'stub-columns': directives.nonnegative_int, |
|
||||
'widths': directives.positive_int_list, |
|
||||
'class': directives.class_option, |
|
||||
'name': directives.unchanged} |
|
||||
|
|
||||
def run(self): |
|
||||
if not self.content: |
|
||||
error = self.state_machine.reporter.error( |
|
||||
'The "%s" directive is empty; content required.' % self.name, |
|
||||
nodes.literal_block(self.block_text, self.block_text), |
|
||||
line=self.lineno) |
|
||||
return [error] |
|
||||
title, messages = self.make_title() |
|
||||
node = nodes.Element() # anonymous container for parsing |
|
||||
self.state.nested_parse(self.content, self.content_offset, node) |
|
||||
try: |
|
||||
num_cols, col_widths = self.check_list_content(node) |
|
||||
table_data = [[item.children for item in row_list[0]] |
|
||||
for row_list in node[0]] |
|
||||
header_rows = self.options.get('header-rows', 0) |
|
||||
stub_columns = self.options.get('stub-columns', 0) |
|
||||
self.check_table_dimensions(table_data, header_rows, stub_columns) |
|
||||
except SystemMessagePropagation as detail: |
|
||||
return [detail.args[0]] |
|
||||
#table_node = self.build_table_from_list(table_data, col_widths, |
|
||||
# header_rows, stub_columns) |
|
||||
table_node = self.build_table_from_list(node[0], col_widths, |
|
||||
header_rows, stub_columns) |
|
||||
table_node['classes'] += self.options.get('class', []) |
|
||||
self.add_name(table_node) |
|
||||
if title: |
|
||||
table_node.insert(0, title) |
|
||||
return [table_node] + messages |
|
||||
|
|
||||
def check_list_content(self, node): |
|
||||
if len(node) != 1 or not isinstance(node[0], nodes.bullet_list): |
|
||||
error = self.state_machine.reporter.error( |
|
||||
'Error parsing content block for the "%s" directive: ' |
|
||||
'exactly one bullet list expected.' % self.name, |
|
||||
nodes.literal_block(self.block_text, self.block_text), |
|
||||
line=self.lineno) |
|
||||
raise SystemMessagePropagation(error) |
|
||||
list_node = node[0] |
|
||||
# Check for a uniform two-level bullet list: |
|
||||
for item_index in range(len(list_node)): |
|
||||
item = list_node[item_index] |
|
||||
if len(item) != 1 or not isinstance(item[0], nodes.bullet_list): |
|
||||
error = self.state_machine.reporter.error( |
|
||||
'Error parsing content block for the "%s" directive: ' |
|
||||
'two-level bullet list expected, but row %s does not ' |
|
||||
'contain a second-level bullet list.' |
|
||||
% (self.name, item_index + 1), nodes.literal_block( |
|
||||
self.block_text, self.block_text), line=self.lineno) |
|
||||
raise SystemMessagePropagation(error) |
|
||||
elif item_index: |
|
||||
# ATTN pychecker users: num_cols is guaranteed to be set in the |
|
||||
# "else" clause below for item_index==0, before this branch is |
|
||||
# triggered. |
|
||||
if len(item[0]) != num_cols: |
|
||||
error = self.state_machine.reporter.error( |
|
||||
'Error parsing content block for the "%s" directive: ' |
|
||||
'uniform two-level bullet list expected, but row %s ' |
|
||||
'does not contain the same number of items as row 1 ' |
|
||||
'(%s vs %s).' |
|
||||
% (self.name, item_index + 1, len(item[0]), num_cols), |
|
||||
nodes.literal_block(self.block_text, self.block_text), |
|
||||
line=self.lineno) |
|
||||
raise SystemMessagePropagation(error) |
|
||||
else: |
|
||||
num_cols = len(item[0]) |
|
||||
col_widths = self.get_column_widths(num_cols) |
|
||||
return num_cols, col_widths |
|
||||
|
|
||||
def build_table_from_list(Self, table_data, col_widths, header_rows, stub_columns): |
|
||||
table = nodes.table() |
|
||||
tgroup = nodes.tgroup(cols=len(col_widths)) |
|
||||
table += tgroup |
|
||||
for col_width in col_widths: |
|
||||
colspec = nodes.colspec(colwidth=col_width) |
|
||||
if stub_columns: |
|
||||
colspec.attributes['stub'] = 1 |
|
||||
stub_columns -= 1 |
|
||||
tgroup += colspec |
|
||||
rows = [] |
|
||||
for row in table_data: |
|
||||
row_node = nodes.row() |
|
||||
row_node['classes'] = row[0]['classes'] |
|
||||
for cell in row[0]: |
|
||||
cell = cell.children |
|
||||
entry = nodes.entry() |
|
||||
entry += cell |
|
||||
row_node += entry |
|
||||
rows.append(row_node) |
|
||||
if header_rows: |
|
||||
thead = nodes.thead() |
|
||||
thead.extend(rows[:header_rows]) |
|
||||
tgroup += thead |
|
||||
tbody = nodes.tbody() |
|
||||
tbody.extend(rows[header_rows:]) |
|
||||
tgroup += tbody |
|
||||
return table |
|
||||
|
|
||||
|
|
||||
|
|
||||
directives.register_directive('item-class', ItemClass) |
|
||||
directives.register_directive('list-table', ListTable) |
|
||||
directives.register_directive('thumbnail', Thumbnail) |
|
||||
directives.register_directive('caption', Caption) |
|
||||
directives.register_directive('jumbotron', Jumbotron) |
|
||||
directives.register_directive('page-header', PageHeader) |
|
||||
directives.register_directive('lead', Lead) |
|
||||
directives.register_directive('progress', Progress) |
|
||||
directives.register_directive('alert', Alert) |
|
||||
directives.register_directive('callout', Callout) |
|
||||
directives.register_directive('row', PageRow) |
|
||||
directives.register_directive('column', PageColumn) |
|
||||
directives.register_directive('button', Button) |
|
||||
directives.register_directive('footer', Footer) |
|
||||
directives.register_directive('header', Header) |
|
@ -1,185 +0,0 @@ |
|||||
Buttons |
|
||||
=============================================================================== |
|
||||
|
|
||||
Options |
|
||||
------- |
|
||||
|
|
||||
Use any of the available button classes to quickly create a styled button. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. button:: Default |
|
||||
|
|
||||
.. button:: Primary |
|
||||
:class: primary |
|
||||
|
|
||||
.. button:: Success |
|
||||
:class: success |
|
||||
|
|
||||
.. button:: Info |
|
||||
:class: info |
|
||||
|
|
||||
.. button:: Warning |
|
||||
:class: warning |
|
||||
|
|
||||
.. button:: Danger |
|
||||
:class: danger |
|
||||
|
|
||||
.. button:: Link |
|
||||
:class: link |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. button:: Default |
|
||||
:class: default |
|
||||
|
|
||||
.. button:: Primary |
|
||||
:class: primary |
|
||||
|
|
||||
.. button:: Success |
|
||||
:class: success |
|
||||
|
|
||||
.. button:: Info |
|
||||
:class: info |
|
||||
|
|
||||
.. button:: Warning |
|
||||
:class: warning |
|
||||
|
|
||||
.. button:: Danger |
|
||||
:class: danger |
|
||||
|
|
||||
.. button:: Link |
|
||||
:class: link |
|
||||
|
|
||||
|
|
||||
Sizes |
|
||||
----- |
|
||||
|
|
||||
Fancy larger or smaller buttons? Add :code:`large`, :code:`small`, or |
|
||||
:code:`tiny` for additional sizes. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. button:: Large button |
|
||||
:class: primary large |
|
||||
.. button:: Large button |
|
||||
:class: large |
|
||||
|
|
||||
| |
|
||||
|
|
||||
.. button:: Default button |
|
||||
:class: primary |
|
||||
.. button:: Default button |
|
||||
|
|
||||
| |
|
||||
|
|
||||
.. button:: Small button |
|
||||
:class: primary small |
|
||||
.. button:: Small button |
|
||||
:class: small |
|
||||
|
|
||||
| |
|
||||
|
|
||||
.. button:: Tiny button |
|
||||
:class: primary tiny |
|
||||
.. button:: Tiny button |
|
||||
:class: tiny |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. button:: Large button |
|
||||
:class: primary large |
|
||||
|
|
||||
.. button:: Large button |
|
||||
:class: large |
|
||||
|
|
||||
.. button:: Default button |
|
||||
:class: primary |
|
||||
|
|
||||
.. button:: Default button |
|
||||
|
|
||||
.. button:: Small button |
|
||||
:class: primary small |
|
||||
|
|
||||
.. button:: Small button |
|
||||
:class: small |
|
||||
|
|
||||
.. button:: Tiny button |
|
||||
:class: primary tiny |
|
||||
|
|
||||
.. button:: Tiny button |
|
||||
:class: tiny |
|
||||
|
|
||||
Create block level buttons—those that span the full width of a parent by adding |
|
||||
:code:`block`. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. container:: well |
|
||||
|
|
||||
.. button:: Block level button |
|
||||
:class: primary large block |
|
||||
|
|
||||
.. button:: Block level button |
|
||||
:class: large block |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. button:: Block level button |
|
||||
:class: primary large block |
|
||||
|
|
||||
.. button:: Block level button |
|
||||
:class: large block |
|
||||
|
|
||||
|
|
||||
Active state |
|
||||
------------ |
|
||||
Buttons will appear pressed (with a darker background, darker border, and inset |
|
||||
shadow) when :code:`active`. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. button:: Primary button |
|
||||
:class: primary large active |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: large active |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. button:: Primary button |
|
||||
:class: primary large active |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: large active |
|
||||
|
|
||||
|
|
||||
|
|
||||
Disabled state |
|
||||
-------------- |
|
||||
|
|
||||
Make buttons look unclickable by fading them back 50% using the :code:`disabled` |
|
||||
option. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. button:: Primary button |
|
||||
:class: primary large disabled |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: large disabled |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. button:: Primary button |
|
||||
:class: primary large disabled |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: large disabled |
|
@ -1,48 +0,0 @@ |
|||||
Code |
|
||||
=============================================================================== |
|
||||
|
|
||||
Inline |
|
||||
------ |
|
||||
|
|
||||
Wrap inline snippets of code with `:code:`. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
For example, `<section>` should be wrapped as inline. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
For example, :code:`<section>` should be wrapped as inline. |
|
||||
|
|
||||
User input |
|
||||
---------- |
|
||||
|
|
||||
Use the `:kbd:` to indicate input that is typically entered via keyboard. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
To switch directories, type :kbd:`cd` followed by the name of the directory. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
To switch directories, type :kbd:`cd` followed by the name of the directory. |
|
||||
|
|
||||
Basic block |
|
||||
----------- |
|
||||
|
|
||||
Use `.. code::` for multiple lines of code. Be sure to escape any angle brackets in |
|
||||
the code for proper rendering. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
Sample text here... |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
Sample text here... |
|
||||
|
|
||||
You may optionally add the pre-scrollable class, which will set a max-height |
|
||||
of 350px and provide a y-axis scrollbar. |
|
@ -1,235 +0,0 @@ |
|||||
Grid system |
|
||||
=============================================================================== |
|
||||
.. lead:: |
|
||||
|
|
||||
Bootstrap includes a responsive, mobile first fluid grid system that |
|
||||
appropriately scales up to 12 columns as the device or viewport size |
|
||||
increases. It includes predefined classes for easy layout options, as well |
|
||||
as powerful mixins for generating more semantic layouts. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
|
|
||||
Introduction |
|
||||
------------ |
|
||||
|
|
||||
Grid systems are used for creating page layouts through a series of rows and |
|
||||
columns that house your content. Here's how the Bootstrap grid system works: |
|
||||
|
|
||||
* Rows must be placed within a `.container` (fixed-width) or `.container-fluid` |
|
||||
(full-width) for proper alignment and padding. |
|
||||
* Use rows to create horizontal groups of columns. |
|
||||
* Content should be placed within columns, and only columns may be immediate children of rows. |
|
||||
* Predefined grid classes like `.row` and `.col-xs-4` are available for quickly |
|
||||
making grid layouts. Less mixins can also be used for more semantic layouts. |
|
||||
* Columns create gutters (gaps between column content) via padding. That |
|
||||
padding is offset in rows for the first and last column via negative margin |
|
||||
on `.row` s. |
|
||||
* Grid columns are created by specifying the number of twelve available columns |
|
||||
you wish to span. For example, three equal columns would use three `.col-xs-4`. |
|
||||
Look to the examples for applying these principles to your code. |
|
||||
|
|
||||
Look to the examples for applying these principles to your code. |
|
||||
|
|
||||
Media queries |
|
||||
------------- |
|
||||
|
|
||||
We use the following media queries in our Less files to create the key |
|
||||
breakpoints in our grid system. |
|
||||
|
|
||||
.. code:: css |
|
||||
:class: highlight |
|
||||
|
|
||||
/* Extra small devices (phones, less than 768px) */ |
|
||||
/* No media query since this is the default in Bootstrap */ |
|
||||
|
|
||||
/* Small devices (tablets, 768px and up) */ |
|
||||
@media (min-width: @screen-sm-min) { ... } |
|
||||
|
|
||||
/* Medium devices (desktops, 992px and up) */ |
|
||||
@media (min-width: @screen-md-min) { ... } |
|
||||
|
|
||||
/* Large devices (large desktops, 1200px and up) */ |
|
||||
@media (min-width: @screen-lg-min) { ... } |
|
||||
|
|
||||
We occasionally expand on these media queries to include a max-width to limit |
|
||||
CSS to a narrower set of devices. |
|
||||
|
|
||||
.. code:: css |
|
||||
:class: highlight |
|
||||
|
|
||||
@media (max-width: @screen-xs-max) { ... } |
|
||||
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... } |
|
||||
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { ... } |
|
||||
@media (min-width: @screen-lg-min) { ... } |
|
||||
|
|
||||
|
|
||||
Grid options |
|
||||
------------ |
|
||||
|
|
||||
See how aspects of the Bootstrap grid system work across multiple devices with |
|
||||
a handy table. |
|
||||
|
|
||||
.. table:: |
|
||||
:class: table table-bordered table-striped |
|
||||
|
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| | Extra small devices | Small devices | Medium devices | Large devices | |
|
||||
| | Phones (<768px) | Tablets (≥768px) | Desktops (≥992px) | Desktops (≥1200px) | |
|
||||
+=====================+=====================+==================+===================+====================+ |
|
||||
| **Grid Behavior** | Horizontal at all | Collapsed to start, horizontal above breakpoints | |
|
||||
| | times | | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **Container Width** | None (auto) | 750px | 970px | 1170px | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **Class Predix** | `col-xs-` | `col-sd-` | `col-md-` | `col-lg-` | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **# Columns** | 12 | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **Column Width** | :text-muted:`Auto` | 60px | 78px | 95px | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **Gutter width** | 30px (15px on each side of a column) | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **Netsable** | Yes | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **Offsets** | Yes | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
| **Column Ordering** | Yes | |
|
||||
+---------------------+---------------------+------------------+-------------------+--------------------+ |
|
||||
|
|
||||
Grid classes apply to devices with screen widths greater than or equal to the |
|
||||
breakpoint sizes, and override grid classes targeted at smaller |
|
||||
devices. Therefore, applying any `.col-md-` class to an element will not only |
|
||||
affect its styling on medium devices but also on large devices if a `.col-lg-` |
|
||||
class is not present. |
|
||||
|
|
||||
|
|
||||
Example: Stacked-to-horizontal |
|
||||
------------------------------ |
|
||||
|
|
||||
Using a single set of `.col-md-*` grid classes, you can create a basic grid |
|
||||
system that starts out stacked on mobile devices and tablet devices (the extra |
|
||||
small to small range) before becoming horizontal on desktop (medium) |
|
||||
devices. Place grid columns in any `.row`. |
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
.. column:: .col-md-1 |
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-8 |
|
||||
:width: 8 |
|
||||
.. column:: .col-md-4 |
|
||||
:width: 4 |
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-4 |
|
||||
:width: 4 |
|
||||
.. column:: .col-md-4 |
|
||||
:width: 4 |
|
||||
.. column:: .col-md-4 |
|
||||
:width: 4 |
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-6 |
|
||||
:width: 6 |
|
||||
.. column:: .col-md-6 |
|
||||
:width: 6 |
|
||||
|
|
||||
|
|
||||
Offsetting columns |
|
||||
------------------ |
|
||||
|
|
||||
Move columns to the right using `.col-md-offset-*` classes. These classes |
|
||||
increase the left margin of a column by * columns. For example, |
|
||||
`.col-md-offset-4` moves `.col-md-4` over four columns. |
|
||||
|
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-4 |
|
||||
:width: 4 |
|
||||
.. column:: .col-md-4 |
|
||||
:width: 4 |
|
||||
:offset: 4 |
|
||||
|
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-3 |
|
||||
:width: 3 |
|
||||
:offset: 3 |
|
||||
|
|
||||
.. column:: .col-md-3 |
|
||||
:width: 3 |
|
||||
:offset: 3 |
|
||||
|
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-6 |
|
||||
:width: 6 |
|
||||
:offset: 3 |
|
||||
|
|
||||
|
|
||||
Nesting columns |
|
||||
--------------- |
|
||||
|
|
||||
To nest your content with the default grid, add a new `.row` and set of |
|
||||
`.col-md-*` columns within an existing `.col-md-*` column. Nested rows should |
|
||||
include a set of columns that add up to 12 or less. |
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: Level 1: .col-md-9 |
|
||||
:width: 9 |
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: Level 2: .col-md-6 |
|
||||
:width: 6 |
|
||||
.. column:: Level 2: .col-md-6 |
|
||||
:width: 6 |
|
||||
|
|
||||
|
|
||||
Column ordering |
|
||||
--------------- |
|
||||
|
|
||||
Easily change the order of our built-in grid columns with .col-md-push-* and |
|
||||
.col-md-pull-* modifier classes. |
|
||||
|
|
||||
|
|
||||
.. row:: show-grid |
|
||||
|
|
||||
.. column:: .col-md-9 . col-push-3 |
|
||||
:width: 9 |
|
||||
:push: 3 |
|
||||
|
|
||||
.. column:: .col-md-3 . col-pull-9 |
|
||||
:width: 3 |
|
||||
:pull: 9 |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. column:: .col-md-9 . col-push-3 |
|
||||
:width: 9 |
|
||||
:push: 3 |
|
||||
|
|
||||
.. column:: .col-md-3 . col-pull-9 |
|
||||
:width: 3 |
|
||||
:pull: 9 |
|
@ -1,68 +0,0 @@ |
|||||
Helper classes |
|
||||
=============================================================================== |
|
||||
|
|
||||
Contextual colors |
|
||||
----------------- |
|
||||
Convey meaning through color with a handful of emphasis utility classes. These |
|
||||
may also be applied to links and will darken on hover just like our default |
|
||||
link styles. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
| :text-muted:`Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.` |
|
||||
| :text-primary:`Nullam id dolor id nibh ultricies vehicula ut id elit.` |
|
||||
| :text-success:`Duis mollis, est non commodo luctus, nisi erat porttitor ligula.` |
|
||||
| :text-info:`Maecenas sed diam eget risus varius blandit sit amet non magna.` |
|
||||
| :text-warning:`Etiam porta sem malesuada magna mollis euismod.` |
|
||||
| :text-danger:`Donec ullamcorper nulla non metus auctor fringilla.` |
|
||||
|
|
||||
.. code:: rst |
|
||||
:class: highlight |
|
||||
|
|
||||
:text-muted:`Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.` |
|
||||
:text-primary:`Nullam id dolor id nibh ultricies vehicula ut id elit.` |
|
||||
:text-success:`Duis mollis, est non commodo luctus, nisi erat porttitor ligula.` |
|
||||
:text-info:`Maecenas sed diam eget risus varius blandit sit amet non magna.` |
|
||||
:text-warning:`Etiam porta sem malesuada magna mollis euismod.` |
|
||||
:text-danger:`Donec ullamcorper nulla non metus auctor fringilla.` |
|
||||
|
|
||||
|
|
||||
|
|
||||
Contextual background |
|
||||
--------------------- |
|
||||
|
|
||||
Similar to the contextual text color classes, easily set the background of an |
|
||||
element to any contextual class. Anchor components will darken on hover, just |
|
||||
like the text classes. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example bs-example-bg-classes |
|
||||
|
|
||||
.. container:: bg-primary |
|
||||
|
|
||||
Nullam id dolor id nibh ultricies vehicula ut id elit. |
|
||||
|
|
||||
.. container:: bg-success |
|
||||
|
|
||||
Duis mollis, est non commodo luctus, nisi erat porttitor ligula. |
|
||||
|
|
||||
.. container:: bg-info |
|
||||
|
|
||||
Maecenas sed diam eget risus varius blandit sit amet non magna. |
|
||||
|
|
||||
.. container:: bg-warning |
|
||||
|
|
||||
Etiam porta sem malesuada magna mollis euismod. |
|
||||
|
|
||||
.. container:: bg-danger |
|
||||
|
|
||||
Donec ullamcorper nulla non metus auctor fringilla. |
|
||||
|
|
||||
.. code:: rst |
|
||||
:class: highlight |
|
||||
|
|
||||
:bg-primary:`Nullam id dolor id nibh ultricies vehicula ut id elit.` |
|
||||
:bg-success:`Duis mollis, est non commodo luctus, nisi erat porttitor ligula.` |
|
||||
:bg-info:`Maecenas sed diam eget risus varius blandit sit amet non magna.` |
|
||||
:bg-warning:`Etiam porta sem malesuada magna mollis euismod.` |
|
||||
:bg-danger:`Donec ullamcorper nulla non metus auctor fringilla.` |
|
@ -1,52 +0,0 @@ |
|||||
Images |
|
||||
=============================================================================== |
|
||||
|
|
||||
Responsive images |
|
||||
----------------- |
|
||||
|
|
||||
Images in Bootstrap 3 can be made responsive-friendly via the addition of the |
|
||||
.img-responsive class. This applies max-width: 100%; and height: auto; to the |
|
||||
image so that it scales nicely to the parent element. |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. image:: image.png |
|
||||
:class: img-responsive |
|
||||
|
|
||||
Image shapes |
|
||||
------------ |
|
||||
|
|
||||
Add classes to an `<img>` element to easily style images in any project. |
|
||||
|
|
||||
|
|
||||
.. callout:: danger |
|
||||
|
|
||||
:h4:`Cross-browser compatibility` |
|
||||
Keep in mind that Internet Explorer 8 lacks support for rounded corners. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. image:: 140x140.png |
|
||||
:class: img-rounded |
|
||||
|
|
||||
.. image:: 140x140.png |
|
||||
:class: img-circle |
|
||||
|
|
||||
.. image:: 140x140.png |
|
||||
:class: img-thumbnail |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. image:: 140x140.png |
|
||||
:class: img-rounded |
|
||||
|
|
||||
.. image:: 140x140.png |
|
||||
:class: img-circle |
|
||||
|
|
||||
.. image:: 140x140.png |
|
||||
:class: img-thumbnail |
|
@ -1,92 +0,0 @@ |
|||||
Overview |
|
||||
=============================================================================== |
|
||||
|
|
||||
.. lead:: |
|
||||
|
|
||||
Get the lowdown on the key pieces of Bootstrap's infrastructure, including |
|
||||
our approach to better, faster, stronger web development. |
|
||||
|
|
||||
|
|
||||
|
|
||||
HTML5 doctype |
|
||||
------------- |
|
||||
|
|
||||
Bootstrap makes use of certain HTML elements and CSS properties that require |
|
||||
the use of the HTML5 doctype. Include it at the beginning of all your projects. |
|
||||
|
|
||||
.. code:: html |
|
||||
:class: highlight |
|
||||
|
|
||||
<!DOCTYPE html> |
|
||||
<html lang="en"> |
|
||||
... |
|
||||
</html> |
|
||||
|
|
||||
|
|
||||
Mobile first |
|
||||
------------- |
|
||||
|
|
||||
With Bootstrap 2, we added optional mobile friendly styles for key aspects of |
|
||||
the framework. With Bootstrap 3, we've rewritten the project to be mobile |
|
||||
friendly from the start. Instead of adding on optional mobile styles, they're |
|
||||
baked right into the core. In fact, **Bootstrap is mobile first**. Mobile first |
|
||||
styles can be found throughout the entire library instead of in separate files. |
|
||||
|
|
||||
To ensure proper rendering and touch zooming, **add the viewport meta tag** to |
|
||||
your :code:`<head>`. |
|
||||
|
|
||||
.. code:: html |
|
||||
:class: highlight |
|
||||
|
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
||||
|
|
||||
You can disable zooming capabilities on mobile devices by adding |
|
||||
:code:`user-scalable=no` to the viewport meta tag. This disables zooming, |
|
||||
meaning users are only able to scroll, and results in your site feeling a bit |
|
||||
more like a native application. Overall, we don't recommend this on every site, |
|
||||
so use caution! |
|
||||
|
|
||||
.. code:: html |
|
||||
:class: highlight |
|
||||
|
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> |
|
||||
|
|
||||
Typography and links |
|
||||
-------------------- |
|
||||
|
|
||||
Bootstrap sets basic global display, typography, and link styles. Specifically, |
|
||||
we: |
|
||||
|
|
||||
* Set :code:`background-color: #fff`; on the body |
|
||||
* Use the :code:`@font-family-base`, :code:`@font-size-base`, and |
|
||||
:code:`@line-height-base` attributes as our typographic base |
|
||||
* Set the global link color via :code:`@link-color` and apply link underlines |
|
||||
only on :hover |
|
||||
|
|
||||
These styles can be found within :code:`scaffolding.less`. |
|
||||
|
|
||||
|
|
||||
Normalize.css |
|
||||
------------- |
|
||||
|
|
||||
For improved cross-browser rendering, we use `Normalize.css |
|
||||
<http://necolas.github.io/normalize.css/>`_, a project by `Nicolas Gallagher |
|
||||
<https://twitter.com/necolas>`_ and `Jonathan Neal <https://twitter.com/jon_neal>`_. |
|
||||
|
|
||||
|
|
||||
Containers |
|
||||
---------- |
|
||||
|
|
||||
Easily center a page's contents by wrapping its contents in a |
|
||||
.container. Containers set width at various media query breakpoints to match |
|
||||
our grid system. |
|
||||
|
|
||||
Note that, due to padding and fixed widths, containers are not nestable by |
|
||||
default. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. container:: |
|
||||
|
|
||||
... |
|
@ -1,292 +0,0 @@ |
|||||
Tables |
|
||||
====== |
|
||||
|
|
||||
Basic example |
|
||||
------------- |
|
||||
|
|
||||
For basic styling—light padding and only horizontal dividers—add the base class |
|
||||
.table to any `<table>`. It may seem super redundant, but given the widespread |
|
||||
use of tables for other plugins like calendars and date pickers, we've opted to |
|
||||
isolate our custom table styles. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
|
|
||||
Striped rows |
|
||||
------------ |
|
||||
|
|
||||
Use `table-striped` to add zebra-striping to any table row within the `<tbody>`. |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. callout:: danger |
|
||||
|
|
||||
:h4:`Cross-browser compatibility` |
|
||||
Striped tables are styled via the `:nth-child` CSS selector, which is not |
|
||||
available in Internet Explorer 8. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: table-striped |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: table-striped |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
Bordered table |
|
||||
-------------- |
|
||||
|
|
||||
Add `table-bordered` for borders on all sides of the table and cells. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: table-bordered table-striped |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: table-bordered table-striped |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
Hover rows |
|
||||
---------- |
|
||||
|
|
||||
Add `table-hover` to enable a hover state on table rows within a `<tbody>`. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: table-hover |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: table-hover |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
|
|
||||
Condensed table |
|
||||
--------------- |
|
||||
|
|
||||
Add `table-condensed` to make tables more compact by cutting cell padding in half. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: table-condensed |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: table-condensed |
|
||||
|
|
||||
= ========== ========= ======== |
|
||||
# First Name Last Name Username |
|
||||
= ========== ========= ======== |
|
||||
1 Mark Otto @mdo |
|
||||
2 Jacob Thornton @fat |
|
||||
3 Larry the Bird @twitter |
|
||||
= ========== ========= ======== |
|
||||
|
|
||||
Contextual classes |
|
||||
------------------ |
|
||||
|
|
||||
Use contextual classes to color table rows or individual cells. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. list-table:: |
|
||||
:widths: 10 30 30 30 |
|
||||
|
|
||||
* - # |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
|
|
||||
* .. class:: active |
|
||||
|
|
||||
- 1 |
|
||||
- Column content |
|
||||
- Column content |
|
||||
- Column content |
|
||||
|
|
||||
* - 2 |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
|
|
||||
* .. class:: success |
|
||||
|
|
||||
- 3 |
|
||||
- Column content |
|
||||
- Column content |
|
||||
- Column content |
|
||||
|
|
||||
* - 4 |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
|
|
||||
* .. class:: warning |
|
||||
|
|
||||
- 5 |
|
||||
- Column content |
|
||||
- Column content |
|
||||
- Column content |
|
||||
|
|
||||
* - 6 |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
|
|
||||
|
|
||||
* .. class:: danger |
|
||||
|
|
||||
- 7 |
|
||||
- Column content |
|
||||
- Column content |
|
||||
- Column content |
|
||||
|
|
||||
* - 8 |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
|
|
||||
|
|
||||
* .. class:: info |
|
||||
|
|
||||
- 9 |
|
||||
- Column content |
|
||||
- Column content |
|
||||
- Column content |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. list-table:: |
|
||||
:widths: 10 30 30 30 |
|
||||
|
|
||||
* - # |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
- Column heading |
|
||||
|
|
||||
* .. class:: active |
|
||||
|
|
||||
- 1 |
|
||||
- Column content |
|
||||
- Column content |
|
||||
- Column content |
|
||||
|
|
||||
|
|
||||
|
|
||||
Responsive tables |
|
||||
----------------- |
|
||||
|
|
||||
Create responsive tables by wrapping any `.table` in `.table-responsive` to |
|
||||
make them scroll horizontally up to small devices (under 768px). When viewing |
|
||||
on anything larger than 768px wide, you will not see any difference in these |
|
||||
tables. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. container:: table-responsive |
|
||||
|
|
||||
.. class:: table-bordered table-striped |
|
||||
|
|
||||
= ============= ============= ============= ============= ============= |
|
||||
# Table heading Table heading Table heading Table heading Table heading |
|
||||
= ============= ============= ============= ============= ============= |
|
||||
1 Table cell Table cell Table cell Table cell Table cell |
|
||||
2 Table cell Table cell Table cell Table cell Table cell |
|
||||
3 Table cell Table cell Table cell Table cell Table cell |
|
||||
= ============= ============= ============= ============= ============= |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. container:: table-responsive |
|
||||
|
|
||||
.. class:: table-bordered table-striped |
|
||||
|
|
||||
= ============= ============= ============= ============= ============= |
|
||||
# Table heading Table heading Table heading Table heading Table heading |
|
||||
= ============= ============= ============= ============= ============= |
|
||||
1 Table cell Table cell Table cell Table cell Table cell |
|
||||
2 Table cell Table cell Table cell Table cell Table cell |
|
||||
3 Table cell Table cell Table cell Table cell Table cell |
|
||||
= ============= ============= ============= ============= ============= |
|
@ -1,441 +0,0 @@ |
|||||
Typography |
|
||||
=============================================================================== |
|
||||
|
|
||||
Headings |
|
||||
-------- |
|
||||
|
|
||||
All HTML headings, :code:`<h1>` through :code:`<h6>`, are available. :code:`.h1` |
|
||||
through :code:`.h6` classes are also available, for when you want to match the font |
|
||||
styling of a heading but still want your text to be displayed inline. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. list-table:: |
|
||||
:widths: 75 25 |
|
||||
:class: table |
|
||||
|
|
||||
* - :h1:`h1. Bootstrap heading` |
|
||||
- **Semibold 36 px** |
|
||||
* - :h2:`h2. Bootstrap heading` |
|
||||
- **Semibold 30 px** |
|
||||
* - :h3:`h3. Bootstrap heading` |
|
||||
- **Semibold 24 px** |
|
||||
* - :h4:`h4. Bootstrap heading` |
|
||||
- **Semibold 18 px** |
|
||||
* - :h5:`h5. Bootstrap heading` |
|
||||
- **Semibold 14 px** |
|
||||
* - :h6:`h6. Bootstrap heading` |
|
||||
- **Semibold 12 px** |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
h1. Bootstrap heading |
|
||||
===================== |
|
||||
|
|
||||
h2. Bootstrap heading |
|
||||
--------------------- |
|
||||
|
|
||||
h3. Bootstrap heading |
|
||||
+++++++++++++++++++++ |
|
||||
|
|
||||
h4. Bootstrap heading |
|
||||
~~~~~~~~~~~~~~~~~~~~~ |
|
||||
|
|
||||
h5. Bootstrap heading |
|
||||
********************* |
|
||||
|
|
||||
h6. Bootstrap heading |
|
||||
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ |
|
||||
|
|
||||
Create lighter, secondary text in any heading with a generic :code:`small` tag. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. list-table:: |
|
||||
:widths: 100 |
|
||||
:class: table |
|
||||
|
|
||||
* - :h1:`h1. Bootstrap heading <small>Secondary text</small>` |
|
||||
* - :h2:`h2. Bootstrap heading <small>Secondary text</small>` |
|
||||
* - :h3:`h3. Bootstrap heading <small>Secondary text</small>` |
|
||||
* - :h4:`h4. Bootstrap heading <small>Secondary text</small>` |
|
||||
* - :h5:`h5. Bootstrap heading <small>Secondary text</small>` |
|
||||
* - :h6:`h6. Bootstrap heading <small>Secondary text</small>` |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
h1. Bootstrap heading :small:`Secondary text` |
|
||||
============================================= |
|
||||
|
|
||||
h2. Bootstrap heading :small:`Secondary text` |
|
||||
--------------------------------------------- |
|
||||
|
|
||||
h3. Bootstrap heading :small:`Secondary text` |
|
||||
+++++++++++++++++++++++++++++++++++++++++++++ |
|
||||
|
|
||||
h4. Bootstrap heading :small:`Secondary text` |
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
||||
|
|
||||
h5. Bootstrap heading :small:`Secondary text` |
|
||||
********************************************* |
|
||||
|
|
||||
h6. Bootstrap heading :small:`Secondary text` |
|
||||
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ |
|
||||
|
|
||||
|
|
||||
Body copy |
|
||||
--------- |
|
||||
|
|
||||
Bootstrap's global default `font-size` is **14px**, with a line-height of |
|
||||
**1.428**. This is applied to the `<body>` and all paragraphs. In addition, |
|
||||
`<p>` (paragraphs) receive a bottom margin of half their computed line-height |
|
||||
(10px by default). |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque |
|
||||
penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id |
|
||||
dolor id nibh ultricies vehicula. |
|
||||
|
|
||||
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur |
|
||||
ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis |
|
||||
mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia |
|
||||
odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla. |
|
||||
|
|
||||
Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id |
|
||||
elit non mi porta gravida at eget metus. Duis mollis, est non commodo |
|
||||
luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
... |
|
||||
|
|
||||
|
|
||||
Lead body copy |
|
||||
++++++++++++++ |
|
||||
|
|
||||
Make a paragraph stand out by adding lead. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. lead:: Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor |
|
||||
auctor. Duis mollis, est non commodo luctus. |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
|
|
||||
.. lead:: Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor |
|
||||
auctor. Duis mollis, est non commodo luctus. |
|
||||
|
|
||||
|
|
||||
Built with Less |
|
||||
+++++++++++++++ |
|
||||
|
|
||||
The typographic scale is based on two Less variables in **variables.less**: |
|
||||
`@font-size-base` and `@line-height-base`. The first is the base font-size used |
|
||||
throughout and the second is the base line-height. We use those variables and |
|
||||
some simple math to create the margins, paddings, and line-heights of all our |
|
||||
type and more. Customize them and Bootstrap adapts. |
|
||||
|
|
||||
|
|
||||
Emphasis |
|
||||
-------- |
|
||||
Make use of HTML's default emphasis tags with lightweight styles. |
|
||||
|
|
||||
|
|
||||
Small text |
|
||||
++++++++++ |
|
||||
|
|
||||
For de-emphasizing inline or blocks of text, use the `small` tag to set text at |
|
||||
85% the size of the parent. Heading elements receive their own font-size for |
|
||||
nested `small` elements. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
:small:`This line of text is meant to be treated as fine print.` |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
:small:`This line of text is meant to be treated as fine print.` |
|
||||
|
|
||||
|
|
||||
Bold |
|
||||
++++ |
|
||||
|
|
||||
For emphasizing a snippet of text with a heavier font-weight. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
The following snippet of text is **rendered as bold text**. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
The following snippet of text is **rendered as bold text**. |
|
||||
|
|
||||
|
|
||||
Italics |
|
||||
+++++++ |
|
||||
|
|
||||
For emphasizing a snippet of text with italics. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
The following snippet of text is *rendered as italicized text*. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
The following snippet of text is *rendered as italicized text*. |
|
||||
|
|
||||
|
|
||||
.. admonition:: :h4:`Alternate elements` |
|
||||
:class: bs-callout bs-callout-info |
|
||||
|
|
||||
Feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant to highlight words or |
|
||||
phrases without conveying additional importance while `<i>` is mostly for |
|
||||
voice, technical terms, etc. |
|
||||
|
|
||||
|
|
||||
Alignment classes |
|
||||
+++++++++++++++++ |
|
||||
|
|
||||
Easily realign text to components with text alignment classes. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: text-left |
|
||||
|
|
||||
Left aligned text. |
|
||||
|
|
||||
.. class:: text-center |
|
||||
|
|
||||
Center aligned text. |
|
||||
|
|
||||
.. class:: text-right |
|
||||
|
|
||||
Right aligned text. |
|
||||
|
|
||||
.. class:: text-justify |
|
||||
|
|
||||
Justified text. |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: text-left |
|
||||
|
|
||||
Left aligned text. |
|
||||
|
|
||||
.. class:: text-center |
|
||||
|
|
||||
Center aligned text. |
|
||||
|
|
||||
.. class:: text-right |
|
||||
|
|
||||
Right aligned text. |
|
||||
|
|
||||
.. class:: text-justify |
|
||||
|
|
||||
Justified text. |
|
||||
|
|
||||
|
|
||||
|
|
||||
Lists |
|
||||
----- |
|
||||
|
|
||||
Unordered |
|
||||
+++++++++ |
|
||||
|
|
||||
A list of items in which the order does *not* explicitly matter. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
* Lorem ipsum dolor sit amet |
|
||||
* Consectetur adipiscing elit |
|
||||
* Integer molestie lorem at massa |
|
||||
* Facilisis in pretium nisl aliquet |
|
||||
* Nulla volutpat aliquam velit |
|
||||
|
|
||||
* Phasellus iaculis neque |
|
||||
* Purus sodales ultricies |
|
||||
* Vestibulum laoreet porttitor sem |
|
||||
* Ac tristique libero volutpat at |
|
||||
|
|
||||
* Faucibus porta lacus fringilla vel |
|
||||
* Aenean sit amet erat nunc |
|
||||
* Eget porttitor lorem |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
* Lorem ipsum dolor sit amet |
|
||||
* Consectetur adipiscing elit |
|
||||
... |
|
||||
|
|
||||
|
|
||||
Ordered |
|
||||
+++++++ |
|
||||
|
|
||||
A list of items in which the order *does* matter. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
1. Lorem ipsum dolor sit amet |
|
||||
#. Consectetur adipiscing elit |
|
||||
#. Integer molestie lorem at massa |
|
||||
#. Facilisis in pretium nisl aliquet |
|
||||
#. Nulla volutpat aliquam velit |
|
||||
#. Faucibus porta lacus fringilla vel |
|
||||
#. Aenean sit amet erat nunc |
|
||||
#. Eget porttitor lorem |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
1. Lorem ipsum dolor sit amet |
|
||||
#. Consectetur adipiscing elit |
|
||||
... |
|
||||
|
|
||||
Unstyled |
|
||||
++++++++ |
|
||||
|
|
||||
Remove the default `list-style` and left margin on list items (immediate children |
|
||||
only). **This only applies to immediate children list items**, meaning you will |
|
||||
need to add the class for any nested lists as well. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: list-unstyled |
|
||||
|
|
||||
* Lorem ipsum dolor sit amet |
|
||||
* Consectetur adipiscing elit |
|
||||
* Integer molestie lorem at massa |
|
||||
* Facilisis in pretium nisl aliquet |
|
||||
* Nulla volutpat aliquam velit |
|
||||
|
|
||||
* Phasellus iaculis neque |
|
||||
* Purus sodales ultricies |
|
||||
* Vestibulum laoreet porttitor sem |
|
||||
* Ac tristique libero volutpat at |
|
||||
|
|
||||
* Faucibus porta lacus fringilla vel |
|
||||
* Aenean sit amet erat nunc |
|
||||
* Eget porttitor lorem |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: list-unstyled |
|
||||
|
|
||||
* Lorem ipsum dolor sit amet |
|
||||
* Consectetur adipiscing elit |
|
||||
... |
|
||||
|
|
||||
|
|
||||
Inline |
|
||||
++++++ |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: list-inline |
|
||||
|
|
||||
* Lorem ipsum |
|
||||
* Phasellus iaculis |
|
||||
* Nulla volutpat |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: list-inline |
|
||||
|
|
||||
* Lorem ipsum |
|
||||
* Phasellus iaculis |
|
||||
* Nulla volutpat |
|
||||
|
|
||||
|
|
||||
Description |
|
||||
+++++++++++ |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
A list of terms with their associated descriptions. |
|
||||
|
|
||||
Description lists |
|
||||
A description list is perfect for defining terms. |
|
||||
|
|
||||
Euismod |
|
||||
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit. |
|
||||
Donec id elit non mi porta gravida at eget metus. |
|
||||
|
|
||||
Malesuada porta |
|
||||
Etiam porta sem malesuada magna mollis euismod. |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
Description lists |
|
||||
A description list is perfect for defining terms. |
|
||||
|
|
||||
Euismod |
|
||||
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit. |
|
||||
Donec id elit non mi porta gravida at eget metus. |
|
||||
|
|
||||
Malesuada porta |
|
||||
Etiam porta sem malesuada magna mollis euismod. |
|
||||
|
|
||||
|
|
||||
Horizontal description |
|
||||
~~~~~~~~~~~~~~~~~~~~~~ |
|
||||
|
|
||||
Make terms and descriptions in <dl> line up side-by-side. Starts off stacked |
|
||||
like default <dl>s, but when the navbar expands, so do these. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: dl-horizontal |
|
||||
|
|
||||
Description lists |
|
||||
A description list is perfect for defining terms. |
|
||||
|
|
||||
Euismod |
|
||||
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit. |
|
||||
Donec id elit non mi porta gravida at eget metus. |
|
||||
|
|
||||
Malesuada porta |
|
||||
Etiam porta sem malesuada magna mollis euismod. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: dl-horizontal |
|
||||
|
|
||||
Description lists |
|
||||
A description list is perfect for defining terms. |
|
||||
|
|
||||
Euismod |
|
||||
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit. |
|
||||
Donec id elit non mi porta gravida at eget metus. |
|
||||
|
|
||||
Malesuada porta |
|
||||
Etiam porta sem malesuada magna mollis euismod. |
|
||||
|
|
||||
|
|
||||
.. admonition:: :h4:`Auto-truncating` |
|
||||
:class: bs-callout bs-callout-info |
|
||||
|
|
||||
Horizontal description lists will truncate terms that are too long to fit in |
|
||||
the left column with `text-overflow`. In narrower viewports, they will change |
|
||||
to the default stacked layout. |
|
@ -1,62 +0,0 @@ |
|||||
.. ---------------------------------------------------------------------------- |
|
||||
.. default-role:: code |
|
||||
.. include:: bootstrap-roles.txt |
|
||||
.. include:: bootstrap-glyphs.txt |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. header:: |
|
||||
|
|
||||
.. container:: bs-docs-header |
|
||||
|
|
||||
.. container:: container |
|
||||
|
|
||||
:h1:`Bootstrap RST` |
|
||||
|
|
||||
Overview of the project, its contents, and how to get started with a |
|
||||
simple template. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. footer:: bs-docs-footer |
|
||||
|
|
||||
Bootstrap RST - Copyright (c) 2014 Nicolas P. Rougier |
|
||||
|
|
||||
`Bootstrap <http://getbootstrap.com>`_ - Copyright (c) 2011-2014 Twitter, Inc |
|
||||
|
|
||||
Code licensed under MIT, documentation under CC BY 3.0. |
|
||||
|
|
||||
`Get page source <doc/CSS.rst>`_ |
|
||||
|
|
||||
.. class:: bs-docs-footer-links muted |
|
||||
|
|
||||
* `GitHub <https://github.com/rougier/bootstrap-rst>`_ |
|
||||
* · |
|
||||
* `Examples <examples.html>`_ |
|
||||
* · |
|
||||
* `Documentation <about.html>`_ |
|
||||
* · |
|
||||
* `About <about.html>`_ |
|
||||
* · |
|
||||
* `Issues <https://github.com/rougier/bootstrap-rst/issues>`_ |
|
||||
* · |
|
||||
* `Releases <https://github.com/rougier/bootstrap-rst/releases>`_ |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. sidebar:: sidebar |
|
||||
|
|
||||
.. contents:: content |
|
||||
:depth: 2 |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. include:: CSS-overview.txt |
|
||||
.. include:: CSS-grid-system.txt |
|
||||
.. include:: CSS-typography.txt |
|
||||
.. include:: CSS-code.txt |
|
||||
.. include:: CSS-tables.txt |
|
||||
.. include:: CSS-buttons.txt |
|
||||
.. include:: CSS-images.txt |
|
||||
.. include:: CSS-helpers.txt |
|
@ -1,805 +0,0 @@ |
|||||
.. ---------------------------------------------------------------------------- |
|
||||
.. Bootstrap RST - glyph definitions |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. role:: glyphicon-class |
|
||||
|
|
||||
.. |asterisk| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-asterisk"></span> |
|
||||
|
|
||||
.. |plus| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-plus"></span> |
|
||||
|
|
||||
.. |euro| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-euro"></span> |
|
||||
|
|
||||
.. |minus| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-minus"></span> |
|
||||
|
|
||||
.. |cloud| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cloud"></span> |
|
||||
|
|
||||
.. |envelope| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-envelope"></span> |
|
||||
|
|
||||
.. |pencil| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-pencil"></span> |
|
||||
|
|
||||
.. |glass| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-glass"></span> |
|
||||
|
|
||||
.. |music| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-music"></span> |
|
||||
|
|
||||
.. |search| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-search"></span> |
|
||||
|
|
||||
.. |heart| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-heart"></span> |
|
||||
|
|
||||
.. |star| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-star"></span> |
|
||||
|
|
||||
.. |star-empty| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-star-empty"></span> |
|
||||
|
|
||||
.. |user| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-user"></span> |
|
||||
|
|
||||
.. |film| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-film"></span> |
|
||||
|
|
||||
.. |th-large| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-th-large"></span> |
|
||||
|
|
||||
.. |th| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-th"></span> |
|
||||
|
|
||||
.. |th-list| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-th-list"></span> |
|
||||
|
|
||||
.. |ok| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ok"></span> |
|
||||
|
|
||||
.. |remove| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-remove"></span> |
|
||||
|
|
||||
.. |zoom-in| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-zoom-in"></span> |
|
||||
|
|
||||
.. |zoom-out| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-zoom-out"></span> |
|
||||
|
|
||||
.. |off| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-off"></span> |
|
||||
|
|
||||
.. |signal| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-signal"></span> |
|
||||
|
|
||||
.. |cog| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cog"></span> |
|
||||
|
|
||||
.. |trash| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-trash"></span> |
|
||||
|
|
||||
.. |home| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-home"></span> |
|
||||
|
|
||||
.. |file| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-file"></span> |
|
||||
|
|
||||
.. |time| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-time"></span> |
|
||||
|
|
||||
.. |road| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-road"></span> |
|
||||
|
|
||||
.. |download-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-download-alt"></span> |
|
||||
|
|
||||
.. |download| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-download"></span> |
|
||||
|
|
||||
.. |upload| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-upload"></span> |
|
||||
|
|
||||
.. |inbox| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-inbox"></span> |
|
||||
|
|
||||
.. |play-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-play-circle"></span> |
|
||||
|
|
||||
.. |repeat| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-repeat"></span> |
|
||||
|
|
||||
.. |refresh| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-refresh"></span> |
|
||||
|
|
||||
.. |list-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-list-alt"></span> |
|
||||
|
|
||||
.. |lock| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-lock"></span> |
|
||||
|
|
||||
.. |flag| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-flag"></span> |
|
||||
|
|
||||
.. |headphones| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-headphones"></span> |
|
||||
|
|
||||
.. |volume-off| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-volume-off"></span> |
|
||||
|
|
||||
.. |volume-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-volume-down"></span> |
|
||||
|
|
||||
.. |volume-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-volume-up"></span> |
|
||||
|
|
||||
.. |qrcode| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-qrcode"></span> |
|
||||
|
|
||||
.. |barcode| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-barcode"></span> |
|
||||
|
|
||||
.. |tag| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tag"></span> |
|
||||
|
|
||||
.. |tags| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tags"></span> |
|
||||
|
|
||||
.. |book| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-book"></span> |
|
||||
|
|
||||
.. |bookmark| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bookmark"></span> |
|
||||
|
|
||||
.. |print| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-print"></span> |
|
||||
|
|
||||
.. |camera| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-camera"></span> |
|
||||
|
|
||||
.. |font| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-font"></span> |
|
||||
|
|
||||
.. |bold| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bold"></span> |
|
||||
|
|
||||
.. |italic| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-italic"></span> |
|
||||
|
|
||||
.. |text-height| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-text-height"></span> |
|
||||
|
|
||||
.. |text-width| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-text-width"></span> |
|
||||
|
|
||||
.. |align-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-left"></span> |
|
||||
|
|
||||
.. |align-center| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-center"></span> |
|
||||
|
|
||||
.. |align-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-right"></span> |
|
||||
|
|
||||
.. |align-justify| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-justify"></span> |
|
||||
|
|
||||
.. |list| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-list"></span> |
|
||||
|
|
||||
.. |indent-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-indent-left"></span> |
|
||||
|
|
||||
.. |indent-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-indent-right"></span> |
|
||||
|
|
||||
.. |facetime-video| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-facetime-video"></span> |
|
||||
|
|
||||
.. |picture| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-picture"></span> |
|
||||
|
|
||||
.. |map-marker| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-map-marker"></span> |
|
||||
|
|
||||
.. |adjust| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-adjust"></span> |
|
||||
|
|
||||
.. |tint| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tint"></span> |
|
||||
|
|
||||
.. |edit| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-edit"></span> |
|
||||
|
|
||||
.. |share| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-share"></span> |
|
||||
|
|
||||
.. |check| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-check"></span> |
|
||||
|
|
||||
.. |move| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-move"></span> |
|
||||
|
|
||||
.. |step-backward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-step-backward"></span> |
|
||||
|
|
||||
.. |fast-backward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fast-backward"></span> |
|
||||
|
|
||||
.. |backward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-backward"></span> |
|
||||
|
|
||||
.. |play| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-play"></span> |
|
||||
|
|
||||
.. |pause| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-pause"></span> |
|
||||
|
|
||||
.. |stop| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-stop"></span> |
|
||||
|
|
||||
.. |forward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-forward"></span> |
|
||||
|
|
||||
.. |fast-forward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fast-forward"></span> |
|
||||
|
|
||||
.. |step-forward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-step-forward"></span> |
|
||||
|
|
||||
.. |eject| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-eject"></span> |
|
||||
|
|
||||
.. |chevron-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> |
|
||||
|
|
||||
.. |chevron-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> |
|
||||
|
|
||||
.. |plus-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> |
|
||||
|
|
||||
.. |minus-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-minus-sign"></span> |
|
||||
|
|
||||
.. |remove-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-remove-sign"></span> |
|
||||
|
|
||||
.. |ok-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ok-sign"></span> |
|
||||
|
|
||||
.. |question-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-question-sign"></span> |
|
||||
|
|
||||
.. |info-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-info-sign"></span> |
|
||||
|
|
||||
.. |screenshot| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-screenshot"></span> |
|
||||
|
|
||||
.. |remove-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-remove-circle"></span> |
|
||||
|
|
||||
.. |ok-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ok-circle"></span> |
|
||||
|
|
||||
.. |ban-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ban-circle"></span> |
|
||||
|
|
||||
.. |arrow-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> |
|
||||
|
|
||||
.. |arrow-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-right"></span> |
|
||||
|
|
||||
.. |arrow-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-up"></span> |
|
||||
|
|
||||
.. |arrow-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-down"></span> |
|
||||
|
|
||||
.. |share-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-share-alt"></span> |
|
||||
|
|
||||
.. |resize-full| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-full"></span> |
|
||||
|
|
||||
.. |resize-small| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-small"></span> |
|
||||
|
|
||||
.. |exclamation-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span> |
|
||||
|
|
||||
.. |gift| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-gift"></span> |
|
||||
|
|
||||
.. |leaf| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-leaf"></span> |
|
||||
|
|
||||
.. |fire| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fire"></span> |
|
||||
|
|
||||
.. |eye-open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-eye-open"></span> |
|
||||
|
|
||||
.. |eye-close| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-eye-close"></span> |
|
||||
|
|
||||
.. |warning-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-warning-sign"></span> |
|
||||
|
|
||||
.. |plane| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-plane"></span> |
|
||||
|
|
||||
.. |calendar| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-calendar"></span> |
|
||||
|
|
||||
.. |random| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-random"></span> |
|
||||
|
|
||||
.. |comment| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-comment"></span> |
|
||||
|
|
||||
.. |magnet| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-magnet"></span> |
|
||||
|
|
||||
.. |chevron-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-up"></span> |
|
||||
|
|
||||
.. |chevron-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-down"></span> |
|
||||
|
|
||||
.. |retweet| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-retweet"></span> |
|
||||
|
|
||||
.. |shopping-cart| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-shopping-cart"></span> |
|
||||
|
|
||||
.. |folder-close| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-folder-close"></span> |
|
||||
|
|
||||
.. |folder-open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-folder-open"></span> |
|
||||
|
|
||||
.. |resize-vertical| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-vertical"></span> |
|
||||
|
|
||||
.. |resize-horizontal| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-horizontal"></span> |
|
||||
|
|
||||
.. |hdd| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hdd"></span> |
|
||||
|
|
||||
.. |bullhorn| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bullhorn"></span> |
|
||||
|
|
||||
.. |bell| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bell"></span> |
|
||||
|
|
||||
.. |certificate| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-certificate"></span> |
|
||||
|
|
||||
.. |thumbs-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-thumbs-up"></span> |
|
||||
|
|
||||
.. |thumbs-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-thumbs-down"></span> |
|
||||
|
|
||||
.. |hand-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-right"></span> |
|
||||
|
|
||||
.. |hand-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-left"></span> |
|
||||
|
|
||||
.. |hand-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-up"></span> |
|
||||
|
|
||||
.. |hand-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-down"></span> |
|
||||
|
|
||||
.. |circle-arrow-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-right"></span> |
|
||||
|
|
||||
.. |circle-arrow-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-left"></span> |
|
||||
|
|
||||
.. |circle-arrow-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-up"></span> |
|
||||
|
|
||||
.. |circle-arrow-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-down"></span> |
|
||||
|
|
||||
.. |globe| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-globe"></span> |
|
||||
|
|
||||
.. |wrench| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-wrench"></span> |
|
||||
|
|
||||
.. |tasks| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tasks"></span> |
|
||||
|
|
||||
.. |filter| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-filter"></span> |
|
||||
|
|
||||
.. |briefcase| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-briefcase"></span> |
|
||||
|
|
||||
.. |fullscreen| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fullscreen"></span> |
|
||||
|
|
||||
.. |dashboard| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-dashboard"></span> |
|
||||
|
|
||||
.. |paperclip| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-paperclip"></span> |
|
||||
|
|
||||
.. |heart-empty| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-heart-empty"></span> |
|
||||
|
|
||||
.. |link| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-link"></span> |
|
||||
|
|
||||
.. |phone| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-phone"></span> |
|
||||
|
|
||||
.. |pushpin| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-pushpin"></span> |
|
||||
|
|
||||
.. |usd| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-usd"></span> |
|
||||
|
|
||||
.. |gbp| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-gbp"></span> |
|
||||
|
|
||||
.. |sort| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort"></span> |
|
||||
|
|
||||
.. |sort-by-alphabet| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-alphabet"></span> |
|
||||
|
|
||||
.. |sort-by-alphabet-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-alphabet-alt"></span> |
|
||||
|
|
||||
.. |sort-by-order| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-order"></span> |
|
||||
|
|
||||
.. |sort-by-order-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-order-alt"></span> |
|
||||
|
|
||||
.. |sort-by-attributes| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-attributes"></span> |
|
||||
|
|
||||
.. |sort-by-attributes-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> |
|
||||
|
|
||||
.. |unchecked| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-unchecked"></span> |
|
||||
|
|
||||
.. |expand| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-expand"></span> |
|
||||
|
|
||||
.. |collapse-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-collapse-down"></span> |
|
||||
|
|
||||
.. |collapse-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-collapse-up"></span> |
|
||||
|
|
||||
.. |log-in| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-log-in"></span> |
|
||||
|
|
||||
.. |flash| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-flash"></span> |
|
||||
|
|
||||
.. |log-out| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-log-out"></span> |
|
||||
|
|
||||
.. |new-window| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-new-window"></span> |
|
||||
|
|
||||
.. |record| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-record"></span> |
|
||||
|
|
||||
.. |save| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-save"></span> |
|
||||
|
|
||||
.. |open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-open"></span> |
|
||||
|
|
||||
.. |saved| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-saved"></span> |
|
||||
|
|
||||
.. |import| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-import"></span> |
|
||||
|
|
||||
.. |export| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-export"></span> |
|
||||
|
|
||||
.. |send| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-send"></span> |
|
||||
|
|
||||
.. |floppy-disk| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-disk"></span> |
|
||||
|
|
||||
.. |floppy-saved| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-saved"></span> |
|
||||
|
|
||||
.. |floppy-remove| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-remove"></span> |
|
||||
|
|
||||
.. |floppy-save| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-save"></span> |
|
||||
|
|
||||
.. |floppy-open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-open"></span> |
|
||||
|
|
||||
.. |credit-card| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-credit-card"></span> |
|
||||
|
|
||||
.. |transfer| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-transfer"></span> |
|
||||
|
|
||||
.. |cutlery| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cutlery"></span> |
|
||||
|
|
||||
.. |header| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-header"></span> |
|
||||
|
|
||||
.. |compressed| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-compressed"></span> |
|
||||
|
|
||||
.. |earphone| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-earphone"></span> |
|
||||
|
|
||||
.. |phone-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-phone-alt"></span> |
|
||||
|
|
||||
.. |tower| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tower"></span> |
|
||||
|
|
||||
.. |stats| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-stats"></span> |
|
||||
|
|
||||
.. |sd-video| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sd-video"></span> |
|
||||
|
|
||||
.. |hd-video| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hd-video"></span> |
|
||||
|
|
||||
.. |subtitles| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-subtitles"></span> |
|
||||
|
|
||||
.. |sound-stereo| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-stereo"></span> |
|
||||
|
|
||||
.. |sound-dolby| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-dolby"></span> |
|
||||
|
|
||||
.. |sound-5-1| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-5-1"></span> |
|
||||
|
|
||||
.. |sound-6-1| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-6-1"></span> |
|
||||
|
|
||||
.. |sound-7-1| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-7-1"></span> |
|
||||
|
|
||||
.. |copyright-mark| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-copyright-mark"></span> |
|
||||
|
|
||||
.. |registration-mark| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-registration-mark"></span> |
|
||||
|
|
||||
.. |cloud-download| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cloud-download"></span> |
|
||||
|
|
||||
.. |cloud-upload| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cloud-upload"></span> |
|
||||
|
|
||||
.. |tree-conifer| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tree-conifer"></span> |
|
||||
|
|
||||
.. |tree-deciduous| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tree-deciduous"></span> |
|
@ -1,21 +0,0 @@ |
|||||
.. ---------------------------------------------------------------------------- |
|
||||
.. Bootstrap RST - role definitions |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. role:: small |
|
||||
.. role:: kbd |
|
||||
.. role:: badge |
|
||||
|
|
||||
.. role:: text-muted |
|
||||
.. role:: text-primary |
|
||||
.. role:: text-success |
|
||||
.. role:: text-info |
|
||||
.. role:: text-warning |
|
||||
.. role:: text-danger |
|
||||
|
|
||||
.. role:: bg-muted |
|
||||
.. role:: bg-primary |
|
||||
.. role:: bg-success |
|
||||
.. role:: bg-info |
|
||||
.. role:: bg-warning |
|
||||
.. role:: bg-danger |
|
@ -1,70 +0,0 @@ |
|||||
Alerts |
|
||||
=============================================================================== |
|
||||
.. lead:: Provide contextual feedback messages for typical user actions with |
|
||||
the handful of available and flexible alert messages. For inline |
|
||||
dismissal, use the `alerts jQuery plugin |
|
||||
<http://getbootstrap.com/javascript/>`_. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
Examples |
|
||||
-------- |
|
||||
|
|
||||
Wrap any text and an optional dismiss button in `.alert` and one of the four |
|
||||
contextual classes (e.g., `.alert-success`) for basic alert messages. |
|
||||
|
|
||||
.. callout:: danger |
|
||||
|
|
||||
:h4:`No default class` |
|
||||
Alerts don't have default classes, only base and modifier classes. A default |
|
||||
gray alert doesn't make too much sense, so you're required to specify a type |
|
||||
via contextual class. Choose from success, info, warning, or danger. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. alert:: **Well done!** You successfully read this important alert message. |
|
||||
:type: success |
|
||||
|
|
||||
.. alert:: **Heads up!** This alert needs your attention, but it's not super important. |
|
||||
:type: info |
|
||||
|
|
||||
.. alert:: **Warning!** Better check yourself, you're not looking too good. |
|
||||
:type: warning |
|
||||
|
|
||||
.. alert:: **Oh snap!** Change a few things up and try submitting again. |
|
||||
:type: danger |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. alert:: **Well done!** You successfully read this important alert message. |
|
||||
:type: success |
|
||||
|
|
||||
.. alert:: **Heads up!** This alert needs your attention, but it's not super important. |
|
||||
:type: info |
|
||||
|
|
||||
.. alert:: **Warning!** Better check yourself, you're not looking too good. |
|
||||
:type: warning |
|
||||
|
|
||||
.. alert:: **Oh snap!** Change a few things up and try submitting again. |
|
||||
:type: danger |
|
||||
|
|
||||
|
|
||||
Dismissable alerts |
|
||||
------------------ |
|
||||
|
|
||||
Build on any alert by adding an optional `.alert-dismissable` and close button. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. alert:: **Warning!** Better check yourself, you're not looking too good. |
|
||||
:type: warning |
|
||||
:dismissable: |
|
||||
|
|
||||
|
|
||||
.. callout:: warning |
|
||||
|
|
||||
:h4:`Ensure proper behavior across all devices` |
|
||||
Be sure to use the `<button>` element with the `data-dismiss="alert"` data |
|
||||
attribute. |
|
@ -1,15 +0,0 @@ |
|||||
Badges |
|
||||
=============================================================================== |
|
||||
.. lead:: Easily highlight new or unread items by adding a <span class="badge"> |
|
||||
to links, Bootstrap navs, and more. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
`Inbox <#>`_ :badge:`42` |
|
||||
|
|
||||
|
|
||||
Self collapsing |
|
||||
|
|
||||
When there are no new or unread items, badges will simply collapse (via CSS's |
|
||||
`:empty` selector) provided no content exists within. |
|
@ -1,43 +0,0 @@ |
|||||
Breadcrumbs |
|
||||
=============================================================================== |
|
||||
.. lead:: Indicate the current page's location within a navigational hierarchy. |
|
||||
|
|
||||
|
|
||||
Separators are automatically added in CSS through `:before` and `content.` |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: breadcrumb |
|
||||
|
|
||||
* Home |
|
||||
|
|
||||
.. class:: breadcrumb |
|
||||
|
|
||||
* Home |
|
||||
* Library |
|
||||
|
|
||||
.. class:: breadcrumb |
|
||||
|
|
||||
* Home |
|
||||
* Library |
|
||||
* Data |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: breadcrumb |
|
||||
|
|
||||
* Home |
|
||||
|
|
||||
.. class:: breadcrumb |
|
||||
|
|
||||
* Home |
|
||||
* Library |
|
||||
|
|
||||
.. class:: breadcrumb |
|
||||
|
|
||||
* Home |
|
||||
* Library |
|
||||
* Data |
|
@ -1,37 +0,0 @@ |
|||||
Glyphicons |
|
||||
=============================================================================== |
|
||||
|
|
||||
Available glyphs |
|
||||
---------------- |
|
||||
|
|
||||
Includes 200 glyphs in font format from the Glyphicon Halflings |
|
||||
set. `Glyphicons <http://glyphicons.com>`_ Halflings are normally not available |
|
||||
for free, but their creator has made them available for Bootstrap free of |
|
||||
cost. As a thank you, we only ask that you include a link back to `Glyphicons |
|
||||
<http://glyphicons.com>`_ whenever possible. |
|
||||
|
|
||||
.. include:: glyphicons-list.txt |
|
||||
|
|
||||
How to use |
|
||||
---------- |
|
||||
|
|
||||
For performance reasons, all icons require a base class and individual icon |
|
||||
class. To use, place the following code just about anywhere. Be sure to leave a |
|
||||
space between the icon and text for proper padding. |
|
||||
|
|
||||
.. callout:: danger |
|
||||
|
|
||||
:h4:`Don't mix with other` |
|
||||
Icon classes cannot be directly combined with other components. They should |
|
||||
not be used along with other classes on the same element. Instead, add a |
|
||||
nested `<span>` and apply the icon classes to the `<span>`. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
|search| |star| |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
|search| |star| |
|
@ -1,45 +0,0 @@ |
|||||
Jumbotron |
|
||||
=============================================================================== |
|
||||
|
|
||||
A lightweight, flexible component that can optionally extend the entire |
|
||||
viewport to showcase key content on your site. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. jumbotron:: |
|
||||
|
|
||||
:h1:`Hello, world!` |
|
||||
|
|
||||
This is a simple hero unit, a simple jumbotron-style component for |
|
||||
calling extra attention to featured content or information. |
|
||||
|
|
||||
.. button:: Learn more |
|
||||
:class: primary large |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
|
|
||||
.. jumbotron:: |
|
||||
|
|
||||
:h1:`Hello, world!` |
|
||||
|
|
||||
This is a simple hero unit, a simple jumbotron-style component for |
|
||||
calling extra attention to featured content or information. |
|
||||
|
|
||||
.. button:: Learn more |
|
||||
:class: primary large |
|
||||
|
|
||||
|
|
||||
To make the jumbotron full width, and without rounded corners, place it outside |
|
||||
all .containers and instead add a .container within. |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
|
|
||||
.. jumbotron:: |
|
||||
|
|
||||
.. container:: |
|
||||
|
|
||||
... |
|
@ -1,64 +0,0 @@ |
|||||
Labels |
|
||||
=============================================================================== |
|
||||
|
|
||||
Examples |
|
||||
-------- |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
:h1:`Example heading <span class="label label-default">New</span>` |
|
||||
|
|
||||
:h2:`Example heading <span class="label label-default">New</span>` |
|
||||
|
|
||||
:h3:`Example heading <span class="label label-default">New</span>` |
|
||||
|
|
||||
:h4:`Example heading <span class="label label-default">New</span>` |
|
||||
|
|
||||
:h5:`Example heading <span class="label label-default">New</span>` |
|
||||
|
|
||||
:h6:`Example heading <span class="label label-default">New</span>` |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
h1. Example heading :label-default:`New` |
|
||||
======================================== |
|
||||
|
|
||||
h2. Example heading :label-default:`New` |
|
||||
---------------------------------------- |
|
||||
|
|
||||
h3. Example heading :label-default:`New` |
|
||||
++++++++++++++++++++++++++++++++++++++++ |
|
||||
|
|
||||
h4. Example heading :label-default:`New` |
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
||||
|
|
||||
h5. Example heading :label-default:`New` |
|
||||
**************************************** |
|
||||
|
|
||||
h6. Example heading :label-default:`New` |
|
||||
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ |
|
||||
|
|
||||
|
|
||||
Available variations |
|
||||
-------------------- |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
:label-default:`Default` |
|
||||
:label-primary:`Primary` |
|
||||
:label-success:`Success` |
|
||||
:label-info:`Info` |
|
||||
:label-warning:`Warning` |
|
||||
:label-danger:`Danger` |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
:label-default:`Default` |
|
||||
:label-primary:`Primary` |
|
||||
:label-success:`Success` |
|
||||
:label-info:`Info` |
|
||||
:label-warning:`Warning` |
|
||||
:label-danger:`Danger` |
|
@ -1,26 +0,0 @@ |
|||||
Page header |
|
||||
=============================================================================== |
|
||||
|
|
||||
A simple shell for an `h1` to appropriately space out and segment sections of |
|
||||
content on a page. It can utilize the `h1`'s default `small` element, as well as |
|
||||
most other components (with additional styles). |
|
||||
|
|
||||
|
|
||||
|
|
||||
.. lead:: Easily highlight new or unread items by adding a <span class="badge"> |
|
||||
to links, Bootstrap navs, and more. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. container:: page-header |
|
||||
|
|
||||
:h1:`Example page header <small>Subtext for header</small>` |
|
||||
|
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. page-header:: |
|
||||
|
|
||||
:h1:`Example page header <small>Subtext for header</small>` |
|
@ -1,210 +0,0 @@ |
|||||
Pagination |
|
||||
=============================================================================== |
|
||||
.. lead:: Provide pagination links for your site or app with the multi-page |
|
||||
pagination component, or the simpler pager alternative. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
Default pagination |
|
||||
------------------ |
|
||||
|
|
||||
Simple pagination inspired by Rdio, great for apps and search results. The |
|
||||
large block is hard to miss, easily scalable, and provides large click areas. |
|
||||
|
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: pagination |
|
||||
|
|
||||
* `« <#>`_ |
|
||||
* `1 <#>`_ |
|
||||
* `2 <#>`_ |
|
||||
* `3 <#>`_ |
|
||||
* `4 <#>`_ |
|
||||
* `5 <#>`_ |
|
||||
* `» <#>`_ |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: pagination |
|
||||
|
|
||||
* `« <#>`_ |
|
||||
* `1 <#>`_ |
|
||||
* `2 <#>`_ |
|
||||
* `3 <#>`_ |
|
||||
* `4 <#>`_ |
|
||||
* `5 <#>`_ |
|
||||
* `» <#>`_ |
|
||||
|
|
||||
|
|
||||
Disabled and active states |
|
||||
-------------------------- |
|
||||
|
|
||||
Links are customizable for different circumstances. Use `.disabled` for |
|
||||
unclickable links and `.active` to indicate the current page. |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: pagination |
|
||||
|
|
||||
* .. item-class:: disabled |
|
||||
`« <#>`_ |
|
||||
* .. item-class:: active |
|
||||
`1 <#>`_ |
|
||||
* `2 <#>`_ |
|
||||
* `3 <#>`_ |
|
||||
* `4 <#>`_ |
|
||||
* `5 <#>`_ |
|
||||
* `» <#>`_ |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: pagination |
|
||||
|
|
||||
* .. item-class:: disabled |
|
||||
`« <#>`_ |
|
||||
* .. item-class:: active |
|
||||
`1 <#>`_ |
|
||||
* `2 <#>`_ |
|
||||
* `3 <#>`_ |
|
||||
* `4 <#>`_ |
|
||||
* `5 <#>`_ |
|
||||
* `» <#>`_ |
|
||||
|
|
||||
Sizing |
|
||||
------ |
|
||||
|
|
||||
Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for |
|
||||
additional sizes. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: pagination pagination-lg |
|
||||
|
|
||||
* `« <#>`_ |
|
||||
* `1 <#>`_ |
|
||||
* `2 <#>`_ |
|
||||
* `3 <#>`_ |
|
||||
* `4 <#>`_ |
|
||||
* `5 <#>`_ |
|
||||
* `» <#>`_ |
|
||||
|
|
||||
| |
|
||||
|
|
||||
.. class:: pagination |
|
||||
|
|
||||
* `« <#>`_ |
|
||||
* `1 <#>`_ |
|
||||
* `2 <#>`_ |
|
||||
* `3 <#>`_ |
|
||||
* `4 <#>`_ |
|
||||
* `5 <#>`_ |
|
||||
* `» <#>`_ |
|
||||
|
|
||||
| |
|
||||
|
|
||||
.. class:: pagination pagination-sm |
|
||||
|
|
||||
* `« <#>`_ |
|
||||
* `1 <#>`_ |
|
||||
* `2 <#>`_ |
|
||||
* `3 <#>`_ |
|
||||
* `4 <#>`_ |
|
||||
* `5 <#>`_ |
|
||||
* `» <#>`_ |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
|
|
||||
.. class:: pagination pagination-lg |
|
||||
|
|
||||
... |
|
||||
|
|
||||
.. class:: pagination |
|
||||
|
|
||||
... |
|
||||
|
|
||||
.. class:: pagination pagination-sm |
|
||||
|
|
||||
... |
|
||||
|
|
||||
|
|
||||
Pager |
|
||||
=============================================================================== |
|
||||
|
|
||||
Quick previous and next links for simple pagination implementations with light |
|
||||
markup and styles. It's great for simple sites like blogs or magazines. |
|
||||
|
|
||||
Default example |
|
||||
--------------- |
|
||||
|
|
||||
By default, the pager centers links. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: pager |
|
||||
|
|
||||
* `Previous <#>`_ |
|
||||
* `Next <#>`_ |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: pager |
|
||||
|
|
||||
* `Previous <#>`_ |
|
||||
* `Next <#>`_ |
|
||||
|
|
||||
|
|
||||
Aligned links |
|
||||
------------- |
|
||||
|
|
||||
Alternatively, you can align each link to the sides: |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: pager |
|
||||
|
|
||||
* .. item-class:: previous |
|
||||
`← Older <#>`_ |
|
||||
* .. item-class:: next |
|
||||
`Newer → <#>`_ |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: pager |
|
||||
|
|
||||
* .. item-class:: previous |
|
||||
`← Older <#>`_ |
|
||||
* .. item-class:: next |
|
||||
`Newer → <#>`_ |
|
||||
|
|
||||
|
|
||||
Optional disabled state |
|
||||
----------------------- |
|
||||
|
|
||||
Pager links also use the general `disabled` utility class from the pagination. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: pager |
|
||||
|
|
||||
* .. item-class:: previous disabled |
|
||||
`← Older <#>`_ |
|
||||
* .. item-class:: next |
|
||||
`Newer → <#>`_ |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: pager |
|
||||
|
|
||||
* .. item-class:: previous disabled |
|
||||
`← Older <#>`_ |
|
||||
* .. item-class:: next |
|
||||
`Newer → <#>`_ |
|
@ -1,140 +0,0 @@ |
|||||
Progress bars |
|
||||
=============================================================================== |
|
||||
.. lead:: Provide up-to-date feedback on the progress of a workflow or action |
|
||||
with simple yet flexible progress bars. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. callout:: danger |
|
||||
|
|
||||
:h4:`Cross-browser compatibility` |
|
||||
Progress bars use CSS3 transitions and animations to achieve some of their |
|
||||
effects. These features are not supported in Internet Explorer 9 and below |
|
||||
or older versions of Firefox. Opera 12 does not support animations. |
|
||||
|
|
||||
|
|
||||
Basic example |
|
||||
------------- |
|
||||
|
|
||||
Default progress bar. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
|
|
||||
|
|
||||
With label |
|
||||
---------- |
|
||||
|
|
||||
Remove the `.sr-only` class from within the progress bar to show a visible |
|
||||
percentage. For low percentages, consider adding a `min-width` to ensure the |
|
||||
label's text is fully visible. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
:label: 60% |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
:label: 60% |
|
||||
|
|
||||
|
|
||||
Contextual alternatives |
|
||||
----------------------- |
|
||||
|
|
||||
Progress bars use some of the same button and alert classes for consistent |
|
||||
styles. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. progress:: 40% |
|
||||
:class: success |
|
||||
|
|
||||
.. progress:: 20% |
|
||||
:class: info |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
:class: warning |
|
||||
|
|
||||
.. progress:: 80% |
|
||||
:class: danger |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. progress:: 40% |
|
||||
:class: success |
|
||||
|
|
||||
.. progress:: 20% |
|
||||
:class: info |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
:class: warning |
|
||||
|
|
||||
.. progress:: 80% |
|
||||
:class: danger |
|
||||
|
|
||||
|
|
||||
Striped |
|
||||
------- |
|
||||
|
|
||||
Uses a gradient to create a striped effect. Not available in IE8. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. progress:: 40% |
|
||||
:class: success striped |
|
||||
|
|
||||
.. progress:: 20% |
|
||||
:class: info striped |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
:class: warning striped |
|
||||
|
|
||||
.. progress:: 80% |
|
||||
:class: danger striped |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. progress:: 40% |
|
||||
:class: success striped |
|
||||
|
|
||||
.. progress:: 20% |
|
||||
:class: info striped |
|
||||
|
|
||||
.. progress:: 60% |
|
||||
:class: warning striped |
|
||||
|
|
||||
.. progress:: 80% |
|
||||
:class: danger striped |
|
||||
|
|
||||
|
|
||||
Animated |
|
||||
-------- |
|
||||
|
|
||||
Add `.active` to `.progress-striped` to animate the stripes right to left. Not |
|
||||
available in IE9 and below. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. progress:: 45% |
|
||||
:class: active |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. progress:: 45% |
|
||||
:class: active |
|
||||
|
|
||||
Stacked |
|
||||
------- |
|
||||
|
|
||||
:text-muted:`N/A` |
|
@ -1,157 +0,0 @@ |
|||||
Thumbnails |
|
||||
=============================================================================== |
|
||||
.. lead:: Extend Bootstrap's grid system with the thumbnail component to easily |
|
||||
display grids of images, videos, text, and more. |
|
||||
|
|
||||
Default example |
|
||||
--------------- |
|
||||
|
|
||||
By default, Bootstrap's thumbnails are designed to showcase linked images with |
|
||||
minimal required markup. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. image:: 171x180.png |
|
||||
:class: thumbnail |
|
||||
|
|
||||
Custom content |
|
||||
-------------- |
|
||||
|
|
||||
With a bit of extra markup, it's possible to add any kind of HTML content like |
|
||||
headings, paragraphs, or buttons into thumbnails. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 4 |
|
||||
|
|
||||
.. thumbnail:: |
|
||||
|
|
||||
.. image:: 300x200.png |
|
||||
|
|
||||
.. caption:: |
|
||||
|
|
||||
:h3:`Thumbnail label` |
|
||||
|
|
||||
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec |
|
||||
id elit non mi porta gravida at eget metus. Nullam id dolor id nibh |
|
||||
ultricies vehicula ut id elit. |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: primary |
|
||||
|
|
||||
.. button:: Button |
|
||||
|
|
||||
|
|
||||
.. column:: |
|
||||
:width: 4 |
|
||||
|
|
||||
.. thumbnail:: |
|
||||
|
|
||||
.. image:: 300x200.png |
|
||||
|
|
||||
.. caption:: |
|
||||
|
|
||||
:h3:`Thumbnail label` |
|
||||
|
|
||||
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec |
|
||||
id elit non mi porta gravida at eget metus. Nullam id dolor id nibh |
|
||||
ultricies vehicula ut id elit. |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: primary |
|
||||
|
|
||||
.. button:: Button |
|
||||
|
|
||||
|
|
||||
.. column:: |
|
||||
:width: 4 |
|
||||
|
|
||||
.. thumbnail:: |
|
||||
|
|
||||
.. image:: 300x200.png |
|
||||
|
|
||||
.. caption:: |
|
||||
|
|
||||
:h3:`Thumbnail label` |
|
||||
|
|
||||
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec |
|
||||
id elit non mi porta gravida at eget metus. Nullam id dolor id nibh |
|
||||
ultricies vehicula ut id elit. |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: primary |
|
||||
|
|
||||
.. button:: Button |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. thumbnail:: |
|
||||
|
|
||||
.. image:: 300x200.png |
|
||||
|
|
||||
.. caption:: |
|
||||
|
|
||||
:h3:`Thumbnail label` |
|
||||
|
|
||||
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec |
|
||||
id elit non mi porta gravida at eget metus. Nullam id dolor id nibh |
|
||||
ultricies vehicula ut id elit. |
|
||||
|
|
||||
.. button:: Button |
|
||||
:class: primary |
|
||||
|
|
||||
.. button:: Button |
|
@ -1,53 +0,0 @@ |
|||||
Wells |
|
||||
=============================================================================== |
|
||||
|
|
||||
Default well |
|
||||
------------ |
|
||||
|
|
||||
Use the well as a simple effect on an element to give it an inset effect. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: well |
|
||||
|
|
||||
Look, I'm in a well! |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: well |
|
||||
|
|
||||
Look, I'm in a well! |
|
||||
|
|
||||
|
|
||||
Optional classes |
|
||||
---------------- |
|
||||
|
|
||||
Control padding and rounded corners with two optional modifier classes. |
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: well well-lg |
|
||||
|
|
||||
Look, I'm in a well! |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: well well-lg |
|
||||
|
|
||||
Look, I'm in a well! |
|
||||
|
|
||||
|
|
||||
.. container:: bs-example |
|
||||
|
|
||||
.. class:: well well-sm |
|
||||
|
|
||||
Look, I'm in a well! |
|
||||
|
|
||||
.. code:: |
|
||||
:class: highlight |
|
||||
|
|
||||
.. class:: well well-sm |
|
||||
|
|
||||
Look, I'm in a well! |
|
@ -1,65 +0,0 @@ |
|||||
.. ---------------------------------------------------------------------------- |
|
||||
.. default-role:: code |
|
||||
.. include:: bootstrap-roles.txt |
|
||||
.. include:: bootstrap-glyphs.txt |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. header:: |
|
||||
|
|
||||
.. container:: bs-docs-header |
|
||||
|
|
||||
.. container:: container |
|
||||
|
|
||||
:h1:`Components` |
|
||||
|
|
||||
Over a dozen reusable components built to provide iconography, |
|
||||
dropdowns, input groups, navigation, alerts, and much more. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. footer:: bs-docs-footer |
|
||||
|
|
||||
Bootstrap RST - Copyright (c) 2014 Nicolas P. Rougier |
|
||||
|
|
||||
`Bootstrap <http://getbootstrap.com>`_ - Copyright (c) 2011-2014 Twitter, Inc |
|
||||
|
|
||||
Code licensed under MIT, documentation under CC BY 3.0. |
|
||||
|
|
||||
`Get page source <doc/components.rst>`_ |
|
||||
|
|
||||
.. class:: bs-docs-footer-links muted |
|
||||
|
|
||||
* `GitHub <https://github.com/rougier/bootstrap-rst>`_ |
|
||||
* · |
|
||||
* `Examples <examples.html>`_ |
|
||||
* · |
|
||||
* `Documentation <about.html>`_ |
|
||||
* · |
|
||||
* `About <about.html>`_ |
|
||||
* · |
|
||||
* `Issues <https://github.com/rougier/bootstrap-rst/issues>`_ |
|
||||
* · |
|
||||
* `Releases <https://github.com/rougier/bootstrap-rst/releases>`_ |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. sidebar:: sidebar |
|
||||
|
|
||||
.. contents:: content |
|
||||
:depth: 2 |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. include:: components-glyphicons.txt |
|
||||
.. include:: components-breadcrumbs.txt |
|
||||
.. include:: components-pagination.txt |
|
||||
.. include:: components-labels.txt |
|
||||
.. include:: components-badges.txt |
|
||||
.. include:: components-jumbotron.txt |
|
||||
.. include:: components-page-header.txt |
|
||||
.. include:: components-thumbnails.txt |
|
||||
.. include:: components-alerts.txt |
|
||||
.. include:: components-progress.txt |
|
||||
.. include:: components-wells.txt |
|
@ -1,160 +0,0 @@ |
|||||
.. default-role:: code |
|
||||
.. role:: text-muted |
|
||||
.. role:: sr-only |
|
||||
|
|
||||
.. |caret| raw:: html |
|
||||
|
|
||||
<span class="caret"></span> |
|
||||
|
|
||||
.. include:: glyphicons-defs.txt |
|
||||
|
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. header:: |
|
||||
:class: bs-docs-header |
|
||||
|
|
||||
.. container:: container |
|
||||
|
|
||||
:h1:`Getting started` |
|
||||
|
|
||||
An overview of Bootstrap RST, how to download and use, basic |
|
||||
templates and examples, and more. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. footer:: |
|
||||
:class: bs-docs-footer |
|
||||
|
|
||||
Bootstrap RST - Copyright 2014 Nicolas P. Rougier |
|
||||
|
|
||||
Code licensed under MIT, documentation under CC BY 3.0. |
|
||||
|
|
||||
`Get page source <getting-started.rst>`_ |
|
||||
|
|
||||
.. class:: bs-docs-footer-links muted |
|
||||
|
|
||||
* GitHub |
|
||||
* · |
|
||||
* Examples |
|
||||
* · |
|
||||
* Documentation |
|
||||
* · |
|
||||
* About |
|
||||
* · |
|
||||
* Issues |
|
||||
* · |
|
||||
* Releases |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. sidebar:: sidebar |
|
||||
|
|
||||
.. contents:: content |
|
||||
:depth: 2 |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
Download |
|
||||
=============================================================================== |
|
||||
.. lead:: Bootstrap RST has a few easy ways to quickly get started, each one |
|
||||
appealing to a different skill level and use case. Read through to |
|
||||
see what suits your particular needs. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. row:: bs-downloads |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 4 |
|
||||
|
|
||||
:h3:`Bootstrap RST` |
|
||||
|
|
||||
Compiled and minified CSS, JavaScript, and fonts. No docs or original |
|
||||
source files are included. |
|
||||
|
|
||||
.. button:: Get Bootstrap RST |
|
||||
:class: outline large |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 4 |
|
||||
|
|
||||
:h3:`Source` |
|
||||
|
|
||||
Compiled and minified CSS, JavaScript, and fonts. No docs or original |
|
||||
source files are included. |
|
||||
|
|
||||
.. button:: Download source |
|
||||
:class: outline large |
|
||||
:target: # |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 4 |
|
||||
|
|
||||
:h3:`Bootstrap` |
|
||||
|
|
||||
Compiled and minified CSS, JavaScript, and fonts. No docs or original |
|
||||
source files are included. |
|
||||
|
|
||||
.. button:: Download Bootstrap |
|
||||
:class: outline large |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
Browser and device support |
|
||||
=============================================================================== |
|
||||
.. lead:: Bootstrap is built to work best in the latest desktop and mobile |
|
||||
browsers, meaning older browsers might display differently styled, |
|
||||
though fully functional, renderings of certain components. |
|
||||
|
|
||||
Supported browsers |
|
||||
------------------ |
|
||||
|
|
||||
Specifically, we support the latest versions of the following browsers and |
|
||||
platforms. On Windows, we support Internet Explorer 8-11. More specific support |
|
||||
information is provided below. |
|
||||
|
|
||||
.. class:: table table-bordered table-striped |
|
||||
|
|
||||
+----------+--------+-------------------+-------------------+----------+-------------------+ |
|
||||
| | Chrome | Firefox | Internet Explorer | Opera | Safari | |
|
||||
+==========+========+===================+===================+==========+===================+ |
|
||||
| Android | |ok| | |remove| | :text-muted:`N/A` | |remove| | :text-muted:`N/A` | |
|
||||
+----------+--------+-------------------+-------------------+----------+-------------------+ |
|
||||
| iOS | |ok| | :text-muted:`N/A` | :text-muted:`N/A` | |remove| | |ok| | |
|
||||
+----------+--------+-------------------+-------------------+----------+-------------------+ |
|
||||
| Mac OS X | |ok| | |ok| | :text-muted:`N/A` | |ok| | |ok| | |
|
||||
+----------+--------+-------------------+-------------------+----------+-------------------+ |
|
||||
| Windows | |ok| | |ok| | |ok| | |ok| | |remove| | |
|
||||
+----------+--------+-------------------+-------------------+----------+-------------------+ |
|
||||
|
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. container:: btn-group |
|
||||
|
|
||||
.. button:: 1 |
|
||||
.. button:: 2 |
|
||||
.. container:: btn-group |
|
||||
|
|
||||
.. button:: |caret| :sr-only:`Dropdown` |
|
||||
:class: toggle |
|
||||
|
|
||||
.. class:: dropdown-menu |
|
||||
|
|
||||
* `Drowpdown link <www.loria.fr>`_ |
|
||||
* `Drowpdown link <www.loria.fr>`_ |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. container:: btn-group |
|
||||
|
|
||||
.. button:: Default |
|
||||
.. button:: |caret| :sr-only:`Dropdown` |
|
||||
:class: toggle |
|
||||
|
|
||||
.. class:: dropdown-menu |
|
||||
|
|
||||
* `Drowpdown link <www.loria.fr>`_ |
|
||||
* `Drowpdown link <www.loria.fr>`_ |
|
||||
.. ---------------------------------------------------------------------------- |
|
@ -1,801 +0,0 @@ |
|||||
.. role:: glyphicon-class |
|
||||
|
|
||||
.. |asterisk| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-asterisk"></span> |
|
||||
|
|
||||
.. |plus| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-plus"></span> |
|
||||
|
|
||||
.. |euro| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-euro"></span> |
|
||||
|
|
||||
.. |minus| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-minus"></span> |
|
||||
|
|
||||
.. |cloud| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cloud"></span> |
|
||||
|
|
||||
.. |envelope| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-envelope"></span> |
|
||||
|
|
||||
.. |pencil| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-pencil"></span> |
|
||||
|
|
||||
.. |glass| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-glass"></span> |
|
||||
|
|
||||
.. |music| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-music"></span> |
|
||||
|
|
||||
.. |search| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-search"></span> |
|
||||
|
|
||||
.. |heart| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-heart"></span> |
|
||||
|
|
||||
.. |star| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-star"></span> |
|
||||
|
|
||||
.. |star-empty| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-star-empty"></span> |
|
||||
|
|
||||
.. |user| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-user"></span> |
|
||||
|
|
||||
.. |film| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-film"></span> |
|
||||
|
|
||||
.. |th-large| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-th-large"></span> |
|
||||
|
|
||||
.. |th| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-th"></span> |
|
||||
|
|
||||
.. |th-list| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-th-list"></span> |
|
||||
|
|
||||
.. |ok| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ok"></span> |
|
||||
|
|
||||
.. |remove| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-remove"></span> |
|
||||
|
|
||||
.. |zoom-in| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-zoom-in"></span> |
|
||||
|
|
||||
.. |zoom-out| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-zoom-out"></span> |
|
||||
|
|
||||
.. |off| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-off"></span> |
|
||||
|
|
||||
.. |signal| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-signal"></span> |
|
||||
|
|
||||
.. |cog| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cog"></span> |
|
||||
|
|
||||
.. |trash| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-trash"></span> |
|
||||
|
|
||||
.. |home| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-home"></span> |
|
||||
|
|
||||
.. |file| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-file"></span> |
|
||||
|
|
||||
.. |time| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-time"></span> |
|
||||
|
|
||||
.. |road| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-road"></span> |
|
||||
|
|
||||
.. |download-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-download-alt"></span> |
|
||||
|
|
||||
.. |download| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-download"></span> |
|
||||
|
|
||||
.. |upload| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-upload"></span> |
|
||||
|
|
||||
.. |inbox| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-inbox"></span> |
|
||||
|
|
||||
.. |play-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-play-circle"></span> |
|
||||
|
|
||||
.. |repeat| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-repeat"></span> |
|
||||
|
|
||||
.. |refresh| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-refresh"></span> |
|
||||
|
|
||||
.. |list-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-list-alt"></span> |
|
||||
|
|
||||
.. |lock| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-lock"></span> |
|
||||
|
|
||||
.. |flag| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-flag"></span> |
|
||||
|
|
||||
.. |headphones| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-headphones"></span> |
|
||||
|
|
||||
.. |volume-off| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-volume-off"></span> |
|
||||
|
|
||||
.. |volume-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-volume-down"></span> |
|
||||
|
|
||||
.. |volume-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-volume-up"></span> |
|
||||
|
|
||||
.. |qrcode| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-qrcode"></span> |
|
||||
|
|
||||
.. |barcode| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-barcode"></span> |
|
||||
|
|
||||
.. |tag| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tag"></span> |
|
||||
|
|
||||
.. |tags| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tags"></span> |
|
||||
|
|
||||
.. |book| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-book"></span> |
|
||||
|
|
||||
.. |bookmark| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bookmark"></span> |
|
||||
|
|
||||
.. |print| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-print"></span> |
|
||||
|
|
||||
.. |camera| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-camera"></span> |
|
||||
|
|
||||
.. |font| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-font"></span> |
|
||||
|
|
||||
.. |bold| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bold"></span> |
|
||||
|
|
||||
.. |italic| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-italic"></span> |
|
||||
|
|
||||
.. |text-height| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-text-height"></span> |
|
||||
|
|
||||
.. |text-width| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-text-width"></span> |
|
||||
|
|
||||
.. |align-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-left"></span> |
|
||||
|
|
||||
.. |align-center| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-center"></span> |
|
||||
|
|
||||
.. |align-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-right"></span> |
|
||||
|
|
||||
.. |align-justify| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-align-justify"></span> |
|
||||
|
|
||||
.. |list| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-list"></span> |
|
||||
|
|
||||
.. |indent-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-indent-left"></span> |
|
||||
|
|
||||
.. |indent-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-indent-right"></span> |
|
||||
|
|
||||
.. |facetime-video| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-facetime-video"></span> |
|
||||
|
|
||||
.. |picture| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-picture"></span> |
|
||||
|
|
||||
.. |map-marker| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-map-marker"></span> |
|
||||
|
|
||||
.. |adjust| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-adjust"></span> |
|
||||
|
|
||||
.. |tint| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tint"></span> |
|
||||
|
|
||||
.. |edit| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-edit"></span> |
|
||||
|
|
||||
.. |share| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-share"></span> |
|
||||
|
|
||||
.. |check| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-check"></span> |
|
||||
|
|
||||
.. |move| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-move"></span> |
|
||||
|
|
||||
.. |step-backward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-step-backward"></span> |
|
||||
|
|
||||
.. |fast-backward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fast-backward"></span> |
|
||||
|
|
||||
.. |backward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-backward"></span> |
|
||||
|
|
||||
.. |play| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-play"></span> |
|
||||
|
|
||||
.. |pause| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-pause"></span> |
|
||||
|
|
||||
.. |stop| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-stop"></span> |
|
||||
|
|
||||
.. |forward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-forward"></span> |
|
||||
|
|
||||
.. |fast-forward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fast-forward"></span> |
|
||||
|
|
||||
.. |step-forward| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-step-forward"></span> |
|
||||
|
|
||||
.. |eject| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-eject"></span> |
|
||||
|
|
||||
.. |chevron-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> |
|
||||
|
|
||||
.. |chevron-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> |
|
||||
|
|
||||
.. |plus-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> |
|
||||
|
|
||||
.. |minus-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-minus-sign"></span> |
|
||||
|
|
||||
.. |remove-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-remove-sign"></span> |
|
||||
|
|
||||
.. |ok-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ok-sign"></span> |
|
||||
|
|
||||
.. |question-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-question-sign"></span> |
|
||||
|
|
||||
.. |info-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-info-sign"></span> |
|
||||
|
|
||||
.. |screenshot| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-screenshot"></span> |
|
||||
|
|
||||
.. |remove-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-remove-circle"></span> |
|
||||
|
|
||||
.. |ok-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ok-circle"></span> |
|
||||
|
|
||||
.. |ban-circle| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-ban-circle"></span> |
|
||||
|
|
||||
.. |arrow-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> |
|
||||
|
|
||||
.. |arrow-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-right"></span> |
|
||||
|
|
||||
.. |arrow-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-up"></span> |
|
||||
|
|
||||
.. |arrow-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-arrow-down"></span> |
|
||||
|
|
||||
.. |share-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-share-alt"></span> |
|
||||
|
|
||||
.. |resize-full| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-full"></span> |
|
||||
|
|
||||
.. |resize-small| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-small"></span> |
|
||||
|
|
||||
.. |exclamation-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span> |
|
||||
|
|
||||
.. |gift| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-gift"></span> |
|
||||
|
|
||||
.. |leaf| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-leaf"></span> |
|
||||
|
|
||||
.. |fire| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fire"></span> |
|
||||
|
|
||||
.. |eye-open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-eye-open"></span> |
|
||||
|
|
||||
.. |eye-close| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-eye-close"></span> |
|
||||
|
|
||||
.. |warning-sign| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-warning-sign"></span> |
|
||||
|
|
||||
.. |plane| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-plane"></span> |
|
||||
|
|
||||
.. |calendar| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-calendar"></span> |
|
||||
|
|
||||
.. |random| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-random"></span> |
|
||||
|
|
||||
.. |comment| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-comment"></span> |
|
||||
|
|
||||
.. |magnet| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-magnet"></span> |
|
||||
|
|
||||
.. |chevron-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-up"></span> |
|
||||
|
|
||||
.. |chevron-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-chevron-down"></span> |
|
||||
|
|
||||
.. |retweet| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-retweet"></span> |
|
||||
|
|
||||
.. |shopping-cart| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-shopping-cart"></span> |
|
||||
|
|
||||
.. |folder-close| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-folder-close"></span> |
|
||||
|
|
||||
.. |folder-open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-folder-open"></span> |
|
||||
|
|
||||
.. |resize-vertical| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-vertical"></span> |
|
||||
|
|
||||
.. |resize-horizontal| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-resize-horizontal"></span> |
|
||||
|
|
||||
.. |hdd| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hdd"></span> |
|
||||
|
|
||||
.. |bullhorn| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bullhorn"></span> |
|
||||
|
|
||||
.. |bell| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-bell"></span> |
|
||||
|
|
||||
.. |certificate| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-certificate"></span> |
|
||||
|
|
||||
.. |thumbs-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-thumbs-up"></span> |
|
||||
|
|
||||
.. |thumbs-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-thumbs-down"></span> |
|
||||
|
|
||||
.. |hand-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-right"></span> |
|
||||
|
|
||||
.. |hand-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-left"></span> |
|
||||
|
|
||||
.. |hand-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-up"></span> |
|
||||
|
|
||||
.. |hand-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hand-down"></span> |
|
||||
|
|
||||
.. |circle-arrow-right| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-right"></span> |
|
||||
|
|
||||
.. |circle-arrow-left| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-left"></span> |
|
||||
|
|
||||
.. |circle-arrow-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-up"></span> |
|
||||
|
|
||||
.. |circle-arrow-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-circle-arrow-down"></span> |
|
||||
|
|
||||
.. |globe| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-globe"></span> |
|
||||
|
|
||||
.. |wrench| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-wrench"></span> |
|
||||
|
|
||||
.. |tasks| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tasks"></span> |
|
||||
|
|
||||
.. |filter| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-filter"></span> |
|
||||
|
|
||||
.. |briefcase| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-briefcase"></span> |
|
||||
|
|
||||
.. |fullscreen| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-fullscreen"></span> |
|
||||
|
|
||||
.. |dashboard| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-dashboard"></span> |
|
||||
|
|
||||
.. |paperclip| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-paperclip"></span> |
|
||||
|
|
||||
.. |heart-empty| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-heart-empty"></span> |
|
||||
|
|
||||
.. |link| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-link"></span> |
|
||||
|
|
||||
.. |phone| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-phone"></span> |
|
||||
|
|
||||
.. |pushpin| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-pushpin"></span> |
|
||||
|
|
||||
.. |usd| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-usd"></span> |
|
||||
|
|
||||
.. |gbp| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-gbp"></span> |
|
||||
|
|
||||
.. |sort| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort"></span> |
|
||||
|
|
||||
.. |sort-by-alphabet| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-alphabet"></span> |
|
||||
|
|
||||
.. |sort-by-alphabet-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-alphabet-alt"></span> |
|
||||
|
|
||||
.. |sort-by-order| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-order"></span> |
|
||||
|
|
||||
.. |sort-by-order-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-order-alt"></span> |
|
||||
|
|
||||
.. |sort-by-attributes| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-attributes"></span> |
|
||||
|
|
||||
.. |sort-by-attributes-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> |
|
||||
|
|
||||
.. |unchecked| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-unchecked"></span> |
|
||||
|
|
||||
.. |expand| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-expand"></span> |
|
||||
|
|
||||
.. |collapse-down| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-collapse-down"></span> |
|
||||
|
|
||||
.. |collapse-up| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-collapse-up"></span> |
|
||||
|
|
||||
.. |log-in| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-log-in"></span> |
|
||||
|
|
||||
.. |flash| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-flash"></span> |
|
||||
|
|
||||
.. |log-out| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-log-out"></span> |
|
||||
|
|
||||
.. |new-window| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-new-window"></span> |
|
||||
|
|
||||
.. |record| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-record"></span> |
|
||||
|
|
||||
.. |save| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-save"></span> |
|
||||
|
|
||||
.. |open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-open"></span> |
|
||||
|
|
||||
.. |saved| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-saved"></span> |
|
||||
|
|
||||
.. |import| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-import"></span> |
|
||||
|
|
||||
.. |export| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-export"></span> |
|
||||
|
|
||||
.. |send| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-send"></span> |
|
||||
|
|
||||
.. |floppy-disk| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-disk"></span> |
|
||||
|
|
||||
.. |floppy-saved| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-saved"></span> |
|
||||
|
|
||||
.. |floppy-remove| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-remove"></span> |
|
||||
|
|
||||
.. |floppy-save| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-save"></span> |
|
||||
|
|
||||
.. |floppy-open| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-floppy-open"></span> |
|
||||
|
|
||||
.. |credit-card| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-credit-card"></span> |
|
||||
|
|
||||
.. |transfer| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-transfer"></span> |
|
||||
|
|
||||
.. |cutlery| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cutlery"></span> |
|
||||
|
|
||||
.. |header| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-header"></span> |
|
||||
|
|
||||
.. |compressed| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-compressed"></span> |
|
||||
|
|
||||
.. |earphone| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-earphone"></span> |
|
||||
|
|
||||
.. |phone-alt| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-phone-alt"></span> |
|
||||
|
|
||||
.. |tower| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tower"></span> |
|
||||
|
|
||||
.. |stats| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-stats"></span> |
|
||||
|
|
||||
.. |sd-video| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sd-video"></span> |
|
||||
|
|
||||
.. |hd-video| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-hd-video"></span> |
|
||||
|
|
||||
.. |subtitles| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-subtitles"></span> |
|
||||
|
|
||||
.. |sound-stereo| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-stereo"></span> |
|
||||
|
|
||||
.. |sound-dolby| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-dolby"></span> |
|
||||
|
|
||||
.. |sound-5-1| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-5-1"></span> |
|
||||
|
|
||||
.. |sound-6-1| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-6-1"></span> |
|
||||
|
|
||||
.. |sound-7-1| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-sound-7-1"></span> |
|
||||
|
|
||||
.. |copyright-mark| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-copyright-mark"></span> |
|
||||
|
|
||||
.. |registration-mark| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-registration-mark"></span> |
|
||||
|
|
||||
.. |cloud-download| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cloud-download"></span> |
|
||||
|
|
||||
.. |cloud-upload| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-cloud-upload"></span> |
|
||||
|
|
||||
.. |tree-conifer| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tree-conifer"></span> |
|
||||
|
|
||||
.. |tree-deciduous| raw:: html |
|
||||
|
|
||||
<span class="glyphicon glyphicon-tree-deciduous"></span> |
|
@ -1,225 +0,0 @@ |
|||||
.. row:: |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. class:: list-unstyled |
|
||||
|
|
||||
* |asterisk| : asterisk |
|
||||
* |plus| : plus |
|
||||
* |euro| : euro |
|
||||
* |minus| : minus |
|
||||
* |cloud| : cloud |
|
||||
* |envelope| : envelope |
|
||||
* |pencil| : pencil |
|
||||
* |glass| : glass |
|
||||
* |music| : music |
|
||||
* |search| : search |
|
||||
* |heart| : heart |
|
||||
* |star| : star |
|
||||
* |star-empty| : star-empty |
|
||||
* |user| : user |
|
||||
* |film| : film |
|
||||
* |th-large| : th-large |
|
||||
* |th| : th |
|
||||
* |th-list| : th-list |
|
||||
* |ok| : ok |
|
||||
* |remove| : remove |
|
||||
* |zoom-in| : zoom-in |
|
||||
* |zoom-out| : zoom-out |
|
||||
* |off| : off |
|
||||
* |signal| : signal |
|
||||
* |cog| : cog |
|
||||
* |trash| : trash |
|
||||
* |home| : home |
|
||||
* |file| : file |
|
||||
* |time| : time |
|
||||
* |road| : road |
|
||||
* |download-alt| : download-alt |
|
||||
* |download| : download |
|
||||
* |upload| : upload |
|
||||
* |inbox| : inbox |
|
||||
* |play-circle| : play-circle |
|
||||
* |repeat| : repeat |
|
||||
* |refresh| : refresh |
|
||||
* |list-alt| : list-alt |
|
||||
* |lock| : lock |
|
||||
* |flag| : flag |
|
||||
* |headphones| : headphones |
|
||||
* |volume-off| : volume-off |
|
||||
* |volume-down| : volume-down |
|
||||
* |volume-up| : volume-up |
|
||||
* |qrcode| : qrcode |
|
||||
* |barcode| : barcode |
|
||||
* |tag| : tag |
|
||||
* |tags| : tags |
|
||||
* |book| : book |
|
||||
* |bookmark| : bookmark |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. class:: list-unstyled |
|
||||
|
|
||||
* |print| : print |
|
||||
* |camera| : camera |
|
||||
* |font| : font |
|
||||
* |bold| : bold |
|
||||
* |italic| : italic |
|
||||
* |text-height| : text-height |
|
||||
* |text-width| : text-width |
|
||||
* |align-left| : align-left |
|
||||
* |align-center| : align-center |
|
||||
* |align-right| : align-right |
|
||||
* |align-justify| : align-justify |
|
||||
* |list| : list |
|
||||
* |indent-left| : indent-left |
|
||||
* |indent-right| : indent-right |
|
||||
* |facetime-video| : facetime-video |
|
||||
* |picture| : picture |
|
||||
* |map-marker| : map-marker |
|
||||
* |adjust| : adjust |
|
||||
* |tint| : tint |
|
||||
* |edit| : edit |
|
||||
* |share| : share |
|
||||
* |check| : check |
|
||||
* |move| : move |
|
||||
* |step-backward| : step-backward |
|
||||
* |fast-backward| : fast-backward |
|
||||
* |backward| : backward |
|
||||
* |play| : play |
|
||||
* |pause| : pause |
|
||||
* |stop| : stop |
|
||||
* |forward| : forward |
|
||||
* |fast-forward| : fast-forward |
|
||||
* |step-forward| : step-forward |
|
||||
* |eject| : eject |
|
||||
* |chevron-left| : chevron-left |
|
||||
* |chevron-right| : chevron-right |
|
||||
* |plus-sign| : plus-sign |
|
||||
* |minus-sign| : minus-sign |
|
||||
* |remove-sign| : remove-sign |
|
||||
* |ok-sign| : ok-sign |
|
||||
* |question-sign| : question-sign |
|
||||
* |info-sign| : info-sign |
|
||||
* |screenshot| : screenshot |
|
||||
* |remove-circle| : remove-circle |
|
||||
* |ok-circle| : ok-circle |
|
||||
* |ban-circle| : ban-circle |
|
||||
* |arrow-left| : arrow-left |
|
||||
* |arrow-right| : arrow-right |
|
||||
* |arrow-up| : arrow-up |
|
||||
* |arrow-down| : arrow-down |
|
||||
* |share-alt| : share-alt |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. class:: list-unstyled |
|
||||
|
|
||||
* |resize-full| : resize-full |
|
||||
* |resize-small| : resize-small |
|
||||
* |exclamation-sign| : exclamation-sign |
|
||||
* |gift| : gift |
|
||||
* |leaf| : leaf |
|
||||
* |fire| : fire |
|
||||
* |eye-open| : eye-open |
|
||||
* |eye-close| : eye-close |
|
||||
* |warning-sign| : warning-sign |
|
||||
* |plane| : plane |
|
||||
* |calendar| : calendar |
|
||||
* |random| : random |
|
||||
* |comment| : comment |
|
||||
* |magnet| : magnet |
|
||||
* |chevron-up| : chevron-up |
|
||||
* |chevron-down| : chevron-down |
|
||||
* |retweet| : retweet |
|
||||
* |shopping-cart| : shopping-cart |
|
||||
* |folder-close| : folder-close |
|
||||
* |folder-open| : folder-open |
|
||||
* |resize-vertical| : resize-vertical |
|
||||
* |resize-horizontal| : resize-horizontal |
|
||||
* |hdd| : hdd |
|
||||
* |bullhorn| : bullhorn |
|
||||
* |bell| : bell |
|
||||
* |certificate| : certificate |
|
||||
* |thumbs-up| : thumbs-up |
|
||||
* |thumbs-down| : thumbs-down |
|
||||
* |hand-right| : hand-right |
|
||||
* |hand-left| : hand-left |
|
||||
* |hand-up| : hand-up |
|
||||
* |hand-down| : hand-down |
|
||||
* |circle-arrow-right| : circle-arrow-right |
|
||||
* |circle-arrow-left| : circle-arrow-left |
|
||||
* |circle-arrow-up| : circle-arrow-up |
|
||||
* |circle-arrow-down| : circle-arrow-down |
|
||||
* |globe| : globe |
|
||||
* |wrench| : wrench |
|
||||
* |tasks| : tasks |
|
||||
* |filter| : filter |
|
||||
* |briefcase| : briefcase |
|
||||
* |fullscreen| : fullscreen |
|
||||
* |dashboard| : dashboard |
|
||||
* |paperclip| : paperclip |
|
||||
* |heart-empty| : heart-empty |
|
||||
* |link| : link |
|
||||
* |phone| : phone |
|
||||
* |pushpin| : pushpin |
|
||||
* |usd| : usd |
|
||||
* |gbp| : gbp |
|
||||
|
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
.. class:: list-unstyled |
|
||||
|
|
||||
* |sort| : sort |
|
||||
* |sort-by-alphabet| : sort-by-alphabet |
|
||||
* |sort-by-alphabet-alt| : sort-by-alphabet-alt |
|
||||
* |sort-by-order| : sort-by-order |
|
||||
* |sort-by-order-alt| : sort-by-order-alt |
|
||||
* |sort-by-attributes| : sort-by-attributes |
|
||||
* |sort-by-attributes-alt| : sort-by-attributes-alt |
|
||||
* |unchecked| : unchecked |
|
||||
* |expand| : expand |
|
||||
* |collapse-down| : collapse-down |
|
||||
* |collapse-up| : collapse-up |
|
||||
* |log-in| : log-in |
|
||||
* |flash| : flash |
|
||||
* |log-out| : log-out |
|
||||
* |new-window| : new-window |
|
||||
* |record| : record |
|
||||
* |save| : save |
|
||||
* |open| : open |
|
||||
* |saved| : saved |
|
||||
* |import| : import |
|
||||
* |export| : export |
|
||||
* |send| : send |
|
||||
* |floppy-disk| : floppy-disk |
|
||||
* |floppy-saved| : floppy-saved |
|
||||
* |floppy-remove| : floppy-remove |
|
||||
* |floppy-save| : floppy-save |
|
||||
* |floppy-open| : floppy-open |
|
||||
* |credit-card| : credit-card |
|
||||
* |transfer| : transfer |
|
||||
* |cutlery| : cutlery |
|
||||
* |header| : header |
|
||||
* |compressed| : compressed |
|
||||
* |earphone| : earphone |
|
||||
* |phone-alt| : phone-alt |
|
||||
* |tower| : tower |
|
||||
* |stats| : stats |
|
||||
* |sd-video| : sd-video |
|
||||
* |hd-video| : hd-video |
|
||||
* |subtitles| : subtitles |
|
||||
* |sound-stereo| : sound-stereo |
|
||||
* |sound-dolby| : sound-dolby |
|
||||
* |sound-5-1| : sound-5-1 |
|
||||
* |sound-6-1| : sound-6-1 |
|
||||
* |sound-7-1| : sound-7-1 |
|
||||
* |copyright-mark| : copyright-mark |
|
||||
* |registration-mark| : registration-mark |
|
||||
* |cloud-download| : cloud-download |
|
||||
* |cloud-upload| : cloud-upload |
|
||||
* |tree-conifer| : tree-conifer |
|
||||
* |tree-deciduous| : tree-deciduous |
|
@ -1,403 +0,0 @@ |
|||||
.. default-role:: code |
|
||||
|
|
||||
.. role:: text-muted |
|
||||
.. role:: text-primary |
|
||||
.. role:: text-success |
|
||||
.. role:: text-info |
|
||||
.. role:: text-warning |
|
||||
.. role:: text-danger |
|
||||
|
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. header:: bs-docs-header |
|
||||
|
|
||||
.. container:: container |
|
||||
|
|
||||
:h1:`Bootstrap RST` |
|
||||
|
|
||||
An overview of Bootstrap RST, basic templates and examples, and more. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. footer:: bs-docs-footer |
|
||||
|
|
||||
Bootstrap RST - Copyright (c) 2014 Nicolas P. Rougier |
|
||||
|
|
||||
`Bootstrap <http://getbootstrap.com>`_ - Copyright (c) 2011-2014 Twitter, Inc |
|
||||
|
|
||||
Code licensed under MIT, documentation under CC BY 3.0. |
|
||||
|
|
||||
`Get page source <doc/index.rst>`_ |
|
||||
|
|
||||
.. class:: bs-docs-footer-links muted |
|
||||
|
|
||||
* `GitHub <https://github.com/rougier/bootstrap-rst>`_ |
|
||||
* · |
|
||||
* `Examples <examples.html>`_ |
|
||||
* · |
|
||||
* `Documentation <about.html>`_ |
|
||||
* · |
|
||||
* `About <about.html>`_ |
|
||||
* · |
|
||||
* `Issues <https://github.com/rougier/bootstrap-rst/issues>`_ |
|
||||
* · |
|
||||
* `Releases <https://github.com/rougier/bootstrap-rst/releases>`_ |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
.. sidebar:: sidebar |
|
||||
|
|
||||
.. contents:: content |
|
||||
:depth: 2 |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
Bootstrap RST |
|
||||
=============================================================================== |
|
||||
.. lead:: Bootstrap RST provides easy acces to bootstrap using the restructured |
|
||||
text markup language. |
|
||||
|
|
||||
Bootstrap RST offers an easy access to the `bootstrap |
|
||||
<http://getbootstrap.com/>`_ framework using the `restructured text`_ markup |
|
||||
language. Bootstrap RST provides a set of new directives and roles (row, |
|
||||
column, button, list, etc.) that allow seamless integration of the bootstrap |
|
||||
framework. Have a look at the `source`_ of this page for example and see below |
|
||||
for what is available so far. |
|
||||
|
|
||||
.. _Nicolas P. Rougier: http://www.loria.fr/~rougier/ |
|
||||
.. _restructured text: http://docutils.sourceforge.net/rst.html |
|
||||
.. _source: doc/index.rst |
|
||||
|
|
||||
|
|
||||
|
|
||||
Work in Progress |
|
||||
=============================================================================== |
|
||||
.. lead:: Bootstrap RST is work in progress. We report here what has been done |
|
||||
so far, what needs to be done and what is not relevant. |
|
||||
.. ---------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
CSS |
|
||||
--- |
|
||||
|
|
||||
Global CSS settings, fundamental HTML elements styled and enhanced with |
|
||||
extensible classes, and an advanced grid system. |
|
||||
|
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Grid system` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `grids <CSS.html#grid-system>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Typography` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `typography <CSS.html#typography>`_ |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Code` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `code <CSS.html#code>`_ |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Tables` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
|
|
||||
See `tables <CSS.html#tables>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Forms` |
|
||||
:text-muted:`N/A` |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Buttons` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `buttons <CSS.html#buttons>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Images` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `images <CSS.html#images>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Helper classes` |
|
||||
|
|
||||
.. progress:: 50% |
|
||||
:class: warning |
|
||||
:label: WIP |
|
||||
|
|
||||
See `helper classes <CSS.html#helper-classes>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
|
|
||||
Components |
|
||||
---------- |
|
||||
|
|
||||
Over a dozen reusable components built to provide iconography, dropdowns, input |
|
||||
groups, navigation, alerts, and much more. |
|
||||
|
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Glyphicons` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `glyphicons <components.html#glyphicons>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Dropdowns` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `dropdowns <components.html#dropdowns>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Button groups` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `button groups <components.html#button-groups>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Glyphicons` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `button dropdowns <components.html#button-dropdowns>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Input groups` |
|
||||
:text-muted:`N/A` |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Navs` |
|
||||
|
|
||||
.. progress:: 25% |
|
||||
:class: danger |
|
||||
:label: WIP |
|
||||
See `navs <components.html#navs>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Navbar` |
|
||||
|
|
||||
.. progress:: 25% |
|
||||
:class: danger |
|
||||
:label: WIP |
|
||||
See `navbar <components.html#navbar>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Breadcrumbs` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `breadcrumbs <components.html#breadcrumbs>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Pagination` |
|
||||
|
|
||||
.. progress:: 25% |
|
||||
:class: danger |
|
||||
:label: WIP |
|
||||
See `pagination <components.html#pagination>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Labels` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `labels <components.html#labels>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Badges` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `badges <components.html#badges>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Jumbotron` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `jumbotron <components.html#jumbotron>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Page header` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `page header <components.html#page-header>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Thumbnails` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `thumbnails <components.html#thumbnails>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Alerts` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `alerts <components.html#alerts>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Progress bars` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `progress bars <components.html#progress-bars>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
|
|
||||
|
|
||||
.. row:: |
|
||||
|
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Media object` |
|
||||
|
|
||||
.. progress:: 25% |
|
||||
:class: danger |
|
||||
:label: WIP |
|
||||
See `media object <components.html#media-object>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`List group` |
|
||||
|
|
||||
.. progress:: 25% |
|
||||
:class: danger |
|
||||
:label: WIP |
|
||||
See `list group <components.html#list-group>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Panels` |
|
||||
|
|
||||
.. progress:: 25% |
|
||||
:class: danger |
|
||||
:label: WIP |
|
||||
See `panels <components.html#panels>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|
||||
.. column:: |
|
||||
:width: 3 |
|
||||
|
|
||||
:h4:`Wells` |
|
||||
|
|
||||
.. progress:: 100% |
|
||||
:class: success |
|
||||
:label: Done ! |
|
||||
See `wells <components.html#wells>`_ |
|
||||
.. ------------------------------------------------------------------------- |
|