diff --git a/.gitignore b/.gitignore index deb6c96d..e24938c0 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,7 @@ lib64 pip-log.txt .DS_Store .travis-solo +Icon +# Documentation +_build diff --git a/CHANGELOG.md b/CHANGELOG.md index 143dc87b..ade34b5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,171 +1,115 @@ Changelog ========= -#### 1.6.2 - -* [Improved] Starring entries now works for plain-text journals too! - -#### 1.6.1 - -* [Improved] Attempts to fix broken config files automatically - -#### 1.6.0 - -* [Improved] Passwords are now saved in the key-chain. The `password` field in `.jrnl_config` is soft-deprecated. - -#### 1.5.7 - -* [Improved] The `~` in journal config paths will now expand properly to e.g. `/Users/maebert` - -#### 1.5.6 - -* [Fixed] Fixed a bug where on OS X, the timezone could only be accessed on administrator accounts. - -#### 1.5.5 - -* [Fixed] Detects DayOne journals stored in `~/Library/Mobile Data` as well. - -#### 1.5.4 - -* [New] DayOne journals can now handle tags - -#### 1.5.3 - -* [Fixed] DayOne integration with older DayOne Journals - -#### 1.5.2 - -* [Improved] Soft-deprecated `-to` for filtering by time and introduces `-until` instead. - -#### 1.5.1 - -* [Fixed] Fixed a bug introduced in 1.5.0 that caused the entire journal to be printed after composing an entry - -### 1.5.0 - -* [Improved] Exporting, encrypting and displaying tags now takes your filter options into account. So you could export everything before May 2012: `jrnl -to 'may 2012' --export json`. Or encrypt all entries tagged with `@work` into a new journal: `jrnl @work --encrypt work_journal.txt`. Or display all tags of posts where Bob is also tagged: `jrnl @bob --tags` - -#### 1.4.2 - -* [Fixed] Tagging works again -* Meta-info for PyPi updated - -### 1.4.0 - -* [Improved] Unifies encryption between Python 2 and 3. If you have problems reading encrypted journals afterwards, first decrypt your journal with the __old__ jrnl version (install with `pip install jrnl==1.3.1`, then `jrnl --decrypt`), upgrade jrnl (`pip install jrnl --upgrade`) and encrypt it again (`jrnl --encrypt`). - -#### 1.3.2 - -* [Improved] Everything that is not direct output of jrnl will be written stderr to improve integration - -### 1.3.0 - -* [New] Export to multiple files -* [New] Feature to export to given output file - -#### 1.1.2 - -* [Fixed] Timezone support for DayOne - -#### 1.1.1 - -* [Fixed] Unicode and Python3 issues resolved. - -### 1.1.0 - -* [New] JSON export exports tags as well. -* [Improved] Nicer error message when there is a syntactical error in your config file. -* [Improved] Unicode support - -#### 1.0.5 - -* [Improved] Backwards compatibility with `parsedatetime` 0.8.7 - -#### 1.0.4 - -* [Improved] Python 2.6 compatibility -* [Improved] Better utf-8 support -* [New] Python 3 compatibility -* [New] Respects the `XDG_CONFIG_HOME` environment variable for storing your configuration file (Thanks [evaryont](https://github.com/evaryont)) - -#### 1.0.3 (April 17, 2013) - -* [Improved] Removed clint in favour of colorama -* [Fixed] Fixed a bug where showing tags failed when no tags are defined. -* [Fixed] Improvements to config parsing (Thanks [alapolloni](https://github.com/alapolloni)) -* [Fixed] Fixes readline support on Windows -* [Fixed] Smaller fixes and typos - -#### 1.0.1 (March 12, 2013) - -* [Fixed] Requires parsedatetime 1.1.2 or newer - -### 1.0.0 (March 4, 2013) - -* [New] Integrates seamlessly with DayOne -* [Improved] Each journal can have individual settings -* [Fixed] A bug where jrnl would not go into compose mode -* [Fixed] A bug where jrnl would not add entries without timestamp -* [Fixed] Support for parsedatetime 1.x - -#### 0.3.2 (July 5, 2012) - -* [Improved] Converts `\n` to new lines (if using directly on a command line, make sure to wrap your entry with quotes). - -#### 0.3.1 (June 16, 2012) - -* [Improved] Supports deleting of last entry. -* [Fixed] Fixes a bug where --encrypt or --decrypt without a target file would not work. -* [Improved] Supports a config option for setting word wrap. -* [Improved] Supports multiple journal files. - -### 0.3.0 (May 24, 2012) - -* [Fixed] Dates such as "May 3" will now be interpreted as being in the past if the current day is at least 28 days in the future -* [Fixed] Bug where composed entry is lost when the journal file fails to load -* Changed directory structure and install scripts (removing the necessity to make an alias from `jrnl` to `jrnl.py`) - -#### 0.2.4 (May 21, 2012) - -* [Fixed] Parsing of new lines in journal files and entries -* [Improved] Adds support for encrypting and decrypting into new files - -#### 0.2.3 (May 3, 2012) - -* [Improved] Adds a `-short` option that will only display the titles of entries (or, when filtering by tags, the context of the tag) -* [Improved] Adds tag export -* [Improved] Adds coloured highlight of tags (by default, highlights all tags - when filtering by tags, only highlights search tags) -* [Improved] `.jrnl_config` will get automatically updated when updating jrnl to a new version - -#### 0.2.2 (April 17, 2012) - -* [Improved] Adds --encrypt and --decrypt to encrypt / decrypt existing journal files -* [Improved] Adds markdown export (kudos to dedan) - -#### 0.2.1 (April 17, 2012) - -* [Improved] Submitted to [PyPi](http://pypi.python.org/pypi/jrnl/0.2.1). - -### 0.2.0 (April 16, 2012) - -* [Improved] Encrypts using CBC -* [Fixed] `key` has been renamed to `password` in config to avoid confusion. (The key use to encrypt and decrypt a journal is the SHA256-hash of the password.) - -#### 0.1.1 (April 15, 2012) - -* [Fixed] Removed unnecessary print commands -* [Improved] Created the documentation - -### 0.1.0 (April 13, 2012) - -* [Improved] Supports encrypted journals using AES encryption -* [Improved] Support external editors for composing entries - -#### 0.0.2 (April 5, 2012) - -* [Improved] Filtering by tags and dates -* [Fixed] Now using dedicated classes for Journals and entries - -#### 0.0.1 (March 29, 2012) - -* Composing entries works. That's pretty much it. +### 1.6 (November 5, 2013) + +* __1.6.3__ New, pretty, _useful_ documentation! +* __1.6.2__ Starring entries now works for plain-text journals too! +* __1.6.1__ Attempts to fix broken config files automatically +* __1.6.0__ Passwords are now saved in the key-chain. The `password` field in `.jrnl_config` is soft-deprecated. + +### 1.5 (August 6, 2013) + +* __1.5.7__ The `~` in journal config paths will now expand properly to e.g. `/Users/maebert` +* __1.5.6__ Fixed: Fixed a bug where on OS X, the timezone could only be accessed on administrator accounts. +* __1.5.5__ Fixed: Detects DayOne journals stored in `~/Library/Mobile Data` as well. +* __1.5.4__ DayOne journals can now handle tags +* __1.5.3__ Fixed: DayOne integration with older DayOne Journals +* __1.5.2__ Soft-deprecated `-to` for filtering by time and introduces `-until` instead. +* __1.5.1__ Fixed: Fixed a bug introduced in 1.5.0 that caused the entire journal to be printed after composing an entry +* __1.5.0__ Exporting, encrypting and displaying tags now takes your filter options into account. So you could export everything before May 2012: `jrnl -to 'may 2012' --export json`. Or encrypt all entries tagged with `@work` into a new journal: `jrnl @work --encrypt work_journal.txt`. Or display all tags of posts where Bob is also tagged: `jrnl @bob --tags` + +### 1.4 (July 22, 2013) + +* __1.4.2__ Fixed: Tagging works again +* __1.4.0__ Unifies encryption between Python 2 and 3. If you have problems reading encrypted journals afterwards, first decrypt your journal with the __old__ jrnl version (install with `pip install jrnl==1.3.1`, then `jrnl --decrypt`), upgrade jrnl (`pip install jrnl --upgrade`) and encrypt it again (`jrnl --encrypt`). + +### 1.3 (July 17, 2013) + +* __1.3.2__ Everything that is not direct output of jrnl will be written stderr to improve integration +* __1.3.0__ Export to multiple files +* __1.3.0__ Feature to export to given output file + +### 1.2 (July 15, 2013) + +* __1.2.0__ Fixed: Timezone support for DayOne + + +### 1.1 (June 9, 2013) + +* __1.1.1__ Fixed: Unicode and Python3 issues resolved. +* __1.1.0__ + * JSON export exports tags as well. + * Nicer error message when there is a syntactical error in your config file. + * Unicode support + +### 1.0 (March 4, 2013) + +* __1.0.5__ Backwards compatibility with `parsedatetime` 0.8.7 +* __1.0.4__ + * Python 2.6 compatibility + * Better utf-8 support + * Python 3 compatibility + * Respects the `XDG_CONFIG_HOME` environment variable for storing your configuration file (Thanks [evaryont](https://github.com/evaryont)) + +* __1.0.3__ + * Removed clint in favour of colorama + * Fixed: Fixed a bug where showing tags failed when no tags are defined. + * Fixed: Improvements to config parsing (Thanks [alapolloni](https://github.com/alapolloni)) + * Fixed: Fixes readline support on Windows + * Fixed: Smaller fixes and typos +* __1.0.1__ (March 12, 2013) Fixed: Requires parsedatetime 1.1.2 or newer +* __1.0.0__ + * Integrates seamlessly with DayOne + * Each journal can have individual settings + * Fixed: A bug where jrnl would not go into compose mode + * Fixed: A bug where jrnl would not add entries without timestamp + * Fixed: Support for parsedatetime 1.x + +### 0.3 (May 24, 2012) + +* __0.3.2__ Converts `\n` to new lines (if using directly on a command line, make sure to wrap your entry with quotes). +* __0.3.1__ + * Supports deleting of last entry. + * Fixed: Fixes a bug where --encrypt or --decrypt without a target file would not work. + * Supports a config option for setting word wrap. + * Supports multiple journal files. +* __0.3.0__ + * Fixed: Dates such as "May 3" will now be interpreted as being in the past if the current day is at least 28 days in the future + * Fixed: Bug where composed entry is lost when the journal file fails to load + * Changed directory structure and install scripts (removing the necessity to make an alias from `jrnl` to `jrnl.py`) + +### 0.2 (April 16, 2012) + +* __0.2.4__ + * Fixed: Parsing of new lines in journal files and entries + * Adds support for encrypting and decrypting into new files +* __0.2.3__ + * Adds a `-short` option that will only display the titles of entries (or, when filtering by tags, the context of the tag) + * Adds tag export + * Adds coloured highlight of tags (by default, highlights all tags - when filtering by tags, only highlights search tags) + * `.jrnl_config` will get automatically updated when updating jrnl to a new version +* __0.2.2__ + * Adds --encrypt and --decrypt to encrypt / decrypt existing journal files + * Adds markdown export (kudos to dedan) +* __0.2.1__ Submitted to [PyPi](http://pypi.python.org/pypi/jrnl/0.2.1). +* __0.2.0__ + * Encrypts using CBC + * Fixed: `key` has been renamed to `password` in config to avoid confusion. (The key use to encrypt and decrypt a journal is the SHA256-hash of the password.) + +### 0.1 (April 13, 2012) + + +* __0.1.1__ + * Fixed: Removed unnecessary print commands + * Created the documentation +* __0.1.0__ + * Supports encrypted journals using AES encryption + * Support external editors for composing entries +* __0.0.2__ + * Filtering by tags and dates + * Fixed: Now using dedicated classes for Journals and entries + +### 0.0 (March 29, 2012) + +* __0.0.1__ Composing entries works. That's pretty much it. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f4c240d8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,30 @@ +Contributing +============ + +If you use jrnl, you can totally make my day by just saying "thanks for the code" or by [tweeting about jrnl](https://twitter.com/intent/tweet?text=Write+your+memoirs+on+the+command+line.+Like+a+boss.+%23jrnl&url=http%3A%2F%2Fmaebert.github.io%2Fjrnl&via=maebert). It's your change to make a programmer happy today! If you have a minute or two, let me know what you use jrnl for and how, it'll help me to make it even better. If you blog about jrnl, I'll send you a post-card! + + +Bugs +---- + +They unfortunately happen. Specifically, I don't have a Windows machine to test on, so expect a few rough spots. If you found a bug, please [open a new issue](https://www.github.com/maebert/jrnl/issues/new) and describe it as well as possible. If you're a programmer and have a little time time spare, go ahead, fork the code and fix bugs you spot, it'll be much appreciated! + + +Feature requests and ideas +-------------------------- + +So, you have an idea for a great feature? Awesome. I love you. As with bugs, first you should [open a new issue](https://www.github.com/maebert/jrnl/issues/new) on GitHub, describe the use case and what the feature should accomplish. If we agree that this feature is useful, it will sooner or later get implement it. Even sooner if you roll up your sleeves and code it yourself ;-) + +Keep in mind that the design goal of jrnl is to be _slim_. That means + +* having as few dependencies as possible +* creating as little interface as possible to boost the learning curve +* doing one thing and one thing well + +Beyond that, it should also play nice with other software and tools -- however, avoid duplicating functionality that existing tools already provide. For example, we played around with the idea of a git integrated journal so new entries would be stored in commits. However, the proposed implementation required a rather heavy git module for python as an dependency, and the same feature could be implemented with a little bit of shell scripting around jrnl. + + +A short note for new programmers and programmers new to python +-------------------------------------------------------------- + +Although jrnl grew quite a bit since I first started working on it, the overall complexity (for an end-user program) is fairly low, and I hope you'll find the code easy enough to understand -- if you have a question, don't hesitate to ask! Python is known for it's great community and openness to novice programmers. Feel free to fork the code and play around with it. If you think you created something worth sharing, create a pull request. I never expect pull requests to be perfect, idiomatic, instantly mergeable code, and we can work through it together. Go for it! diff --git a/README.md b/README.md index 77ef006f..e88c9545 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ jrnl [![Build Status](https://travis-ci.org/maebert/jrnl.png?branch=master)](https://travis-ci.org/maebert/jrnl) ==== -_For news on updates or to get help, follow [@maebert](https://twitter.com/maebert) or [submit an issue](https://github.com/maebert/jrnl/issues/new) on Github._ +_For news on updates or to get help, [read the docs](http://maebert.github.io/jrnl), follow [@maebert](https://twitter.com/maebert) or [submit an issue](https://github.com/maebert/jrnl/issues/new) on Github._ *jrnl* is a simple journal application for your command line. Journals are stored as human readable plain text files - you can put them into a Dropbox folder for instant syncing and you can be assured that your journal will still be readable in 2050, when all your fancy iPad journal applications will long be forgotten. @@ -39,230 +39,6 @@ Or, if you want the option to encrypt your journal, pip install jrnl[encrypted] -To install `pycrypto` as well (Note: this requires a `gcc` compiler. You can also [install PyCyrypto manually](https://www.dlitz.net/software/pycrypto/) first)). Alternatively, install _jrnl_ manually by cloning the repository: - - git clone git://github.com/maebert/jrnl.git - cd jrnl - python setup.py install - -The first time you run `jrnl` you will be asked where your journal file should be created and whether you wish to encrypt it. - -Usage ------ - -_jrnl_ has two modes: __composing__ and __viewing__. - -### Viewing: - - jrnl -n 10 - -will list you the ten latest entries, - - jrnl -from "last year" -until march - -everything that happened from the start of last year to the start of last march. If you only want to see the titles of your entries, use - - jrnl -short - -### Using Tags: - -Keep track of people, projects or locations, by tagging them with an `@` in your entries: - - jrnl Had a wonderful day on the @beach with @Tom and @Anna. - -You can filter your journal entries just like this: - - jrnl @pinkie @WorldDomination - -Will print all entries in which either `@pinkie` or `@WorldDomination` occurred. - - jrnl -n 5 -and @pineapple @lubricant - -the last five entries containing both `@pineapple` __and__ `@lubricant`. You can change which symbols you'd like to use for tagging in the configuration. - -> __Note:__ `jrnl @pinkie @WorldDomination` will switch to viewing mode because although _no_ command line arguments are given, all the input strings look like tags - _jrnl_ will assume you want to filter by tag. - -### Composing: - -Composing mode is entered by either starting `jrnl` without any arguments -- which will prompt you to write an entry or launch your editor -- or by just writing an entry on the prompt, such as - - jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny. - - -### Smart timestamps: - -Timestamps that work: - -* at 6am -* yesterday -* last monday -* sunday at noon -* 2 march 2012 -* 7 apr -* 5/20/1998 at 23:42 - -Import and export ------------------ - -### Tag export - -With - - jrnl --tags - -you'll get a list of all tags you used in your journal, sorted by most frequent. Tags occurring several times in the same entry are only counted as one. - -### JSON export - -Can do: - - jrnl --export json - -Why not create a beautiful [timeline](http://timeline.verite.co/) of your journal? - -### Markdown export - -Use: - - jrnl --export markdown - -or - - jrnl --export md - -Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice. - -### Text export - - jrnl --export text - -or - - jrnl --export txt - -Prettyprints your entire journal. - -### Export to files - -You can specify the output file of your exported journal using the `-o` argument: - - jrnl --export md -o journal.md - -The above command will generate a file named `journal.md`. If the `-o` argument is a directory, jrnl will export each entry into an individual file: - - jrnl --export json -o my_entries/ - -The contents of `my_entries/` will then look like this: - - my_entries/ - |- 2013_06_03_a-beautiful-day.json - |- 2013_06_07_dinner-with-gabriel.json - |- ... - -Encryption ----------- - -If you don't choose to encrypt your file when you run `jrnl` for the first time, you can encrypt your existing journal file or change its password using - - jrnl --encrypt - -If it is already encrypted, you will first be asked for the current password. You can then enter a new password and your plain journal will replaced by the encrypted file. Conversely, - - jrnl --decrypt - -will replace your encrypted journal file by a Journal in plain text. You can also specify a filename, ie. `jrnl --decrypt plain_text_copy.txt`, to leave your original file untouched. - - -Advanced usages --------------- - -The first time launched, _jrnl_ will create a file configuration file at `~/.jrnl_config` or, if the `XDG_CONFIG_HOME` environment variable is set, `$XDG_CONFIG_HOME/jrnl`. - -### .jrnl_config - -The configuration file is a simple JSON file with the following options. - -- `journals`: paths to your journal files -- `editor`: if set, executes this command to launch an external editor for writing your entries, e.g. `vim` or `subl -w` (note the `-w` flag to make sure _jrnl_ waits for Sublime Text to close the file before writing into the journal). -- `encrypt`: if `true`, encrypts your journal using AES. -- `tagsymbols`: Symbols to be interpreted as tags. (__See note below__) -- `default_hour` and `default_minute`: if you supply a date, such as `last thursday`, but no specific time, the entry will be created at this time -- `timeformat`: how to format the timestamps in your journal, see the [python docs](http://docs.python.org/library/time.html#time.strftime) for reference -- `highlight`: if `true`, tags will be highlighted in cyan. -- `linewrap`: controls the width of the output. Set to `0` or `false` if you don't want to wrap long lines. - -> __Note on `tagsymbols`:__ Although it seems intuitive to use the `#` character for tags, there's a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type -> -> jrnl Implemented endless scrolling on the #frontend of our website. -> -> your bash will chop off everything after the `#` before passing it to _jrnl_). To avoid this, wrap your input into quotation marks like this: -> -> jrnl "Implemented endless scrolling on the #frontend of our website." -> -> Or use the built-in prompt or an external editor to compose your entries. - -### DayOne Integration - -Using your DayOne journal instead of a flat text file is dead simple - instead of pointing to a text file, change your `.jrnl_conf` to point to your DayOne journal. This is a folder ending with `.dayone`, and it's located at - -* `~/Library/Application Support/Day One/` by default -* `~/Dropbox/Apps/Day One/` if you're syncing with Dropbox and -* `~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/` if you're syncing with iCloud. - -Instead of all entries being in a single file, each entry will live in a separate `plist` file. You can also star entries when you write them: - - jrnl -star yesterday: Lunch with @Arthur - -### Multiple journal files - -You can configure _jrnl_ to use with multiple journals (eg. `private` and `work`) by defining more journals in your `.jrnl_config`, for example: - - "journals": { - "default": "~/journal.txt", - "work": "~/work.txt" - }, - -The `default` journal gets created the first time you start _jrnl_. Now you can access the `work` journal by using `jrnl work` instead of `jrnl`, eg. - - jrnl work at 10am: Meeting with @Steve - jrnl work -n 3 - -will both use `~/work.txt`, while `jrnl -n 3` will display the last three entries from `~/journal.txt` (and so does `jrnl default -n 3`). - -You can also override the default options for each individual journal. If you `.jrnl_conf` looks like this: - - { - ... - "encrypt": false - "journals": { - "default": "~/journal.txt", - "work": { - "journal": "~/work.txt", - "encrypt": true - }, - "food": "~/my_recipes.txt", - } - -Your `default` and your `food` journals won't be encrypted, however your `work` journal will! You can override all options that are present at the top level of `.jrnl_conf`, just make sure that at the very least you specify a `"journal": ...` key that points to the journal file of that journal. - -### Manual decryption - -Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm. The key used for encryption is the SHA-256-hash of your password, and the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. So, to decrypt a journal file in python, run - - import hashlib, Crypto.Cipher - key = hashlib.sha256(my_password).digest() - with open("my_journal.txt") as f: - cipher = f.read() - crypto = AES.new(key, AES.MODE_CBC, iv = cipher[:16]) - plain = crypto.decrypt(cipher[16:]) - -Known Issues ------------- - -- The Windows shell prior to Windows 7 has issues with unicode encoding. If you want to use non-ascii characters, change the codepage with `chcp 1252` before using `jrnl` (Thanks to Yves Pouplard for solving this!) -- _jrnl_ relies on the `PyCrypto` package to encrypt journals, which has some known problems with installing on Windows and within virtual environments. If you have trouble installing __jrnl__, [install PyCyrypto manually](https://www.dlitz.net/software/pycrypto/) first. - - [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/maebert/jrnl/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..43b60517 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/jrnl.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/jrnl.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/jrnl" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/jrnl" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/_themes/jrnl/index.html b/docs/_themes/jrnl/index.html new file mode 100755 index 00000000..b475bf51 --- /dev/null +++ b/docs/_themes/jrnl/index.html @@ -0,0 +1,93 @@ + + + + + + + + + jrnl- The Command Line Journal + + + + + + + + + + +
+ Tell your friends +
+ +

Collect your thoughts and notes
without leaving the command line

+
+
+
+
$ jrnl today: Started writing my memoirs. On the command line. Like a boss.
+
+
+
+ +
+
+
+ +

Human friendly.

+

jrnl has a natural-language interface so you don't have to remember cryptic shortcuts when you're writing down your thoughts.

+
+
+ +

Future-proof.

+

your journals are stored in plain-text files that will still be readable in 50 years when all your fancy iPad apps will have gone the way of the Dodo.

+
+
+ +

Secure.

+

Encrypt your journals with the military-grade AES encryption. Even the NSA won't be able to read your dirty secrets.

+
+
+
+
+ +

Accessible anywhere.

+

Sync your journals with Dropbox and capture your thoughts where ever you are

+
+
+ +

DayOne compatible.

+

Read, write and search your DayOne journal from the command line.

+
+
+ +

Free & Open Source.

+

jrnl is made by by a bunch of really nice and remarkably attractive people. Maybe even you?

+
+
+ +

For work and play.

+

Effortlessly access several journals for all parts of your life.

+
+
+ + +
+ + + + + + diff --git a/docs/_themes/jrnl/layout.html b/docs/_themes/jrnl/layout.html new file mode 100755 index 00000000..dbacf31a --- /dev/null +++ b/docs/_themes/jrnl/layout.html @@ -0,0 +1,29 @@ +{% if pagename == "index" %} + {% include "index.html" %} +{% else %} + {%- extends "basic/layout.html" %} + + {%- block extrahead %} + {{ super() }} + + + + {% endblock %} + {%- block relbar1 %}{% endblock %} + {%- block relbar2 %}{% endblock %} + + {%- block sidebar2 %} + + {% endblock %} + + {%- block footer %} + + {%- endblock %} +{% endif %} diff --git a/docs/_themes/jrnl/relations.html b/docs/_themes/jrnl/relations.html new file mode 100755 index 00000000..3bbcde85 --- /dev/null +++ b/docs/_themes/jrnl/relations.html @@ -0,0 +1,19 @@ +

Related Topics

+ diff --git a/docs/_themes/jrnl/static/css/jrnl.css b/docs/_themes/jrnl/static/css/jrnl.css new file mode 100644 index 00000000..08f5fc2f --- /dev/null +++ b/docs/_themes/jrnl/static/css/jrnl.css @@ -0,0 +1 @@ +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body{font-family:"Open Sans","Helvetica Neue",sans-serif;font-weight:300;color:#333;background:#f7f8f9}body:not(.landing){padding:0 20px;padding-top:40px}body:not(.landing) h2{margin-top:40px}input{background:transparent;border:1px solid #999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:2px 5px;color:#666;font-family:"Open Sans";font-weight:300;outline:0}input:focus{background:white}div.related{background:rgba(255,200,200,0.2)}*>a.headerlink{display:none}h1,h2,h3,h4,h5,h6{font-weight:300}a:link,a:visited{color:#deaa09;text-decoration:none}a:hover,a:active{text-decoration:underline;color:#f6c324}.literal{color:#47375d;font-size:1em;background:#e8e2ee;padding:1px 2px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:inset 0 0 0 1px #c0b2d2;-moz-box-shadow:inset 0 0 0 1px #c0b2d2;-o-box-shadow:inset 0 0 0 1px #c0b2d2;box-shadow:inset 0 0 0 1px #c0b2d2}.note{background:#8c72ac;background-image:-moz-linear-gradient(top,#8c72ac 0,#6e5691 100%);background-image:-webkit-linear-gradient(top,#8c72ac 0,#6e5691 100%);background-image:-o-linear-gradient(top,#8c72ac 0,#6e5691 100%);background-image:linear-gradient(to bottom,#8c72ac 0,#6e5691 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8c72ac',endColorstr='#6e5691',GradientType=0);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 2px 3px #413155;-moz-box-shadow:0 2px 3px #413155;-o-box-shadow:0 2px 3px #413155;box-shadow:0 2px 3px #413155;padding:10px 20px 10px 70px;position:relative;color:white}.note .admonition-title{display:none}.note a{color:#fade86}.note:before{content:"";display:block;background-image:url("../img/icons.png");width:32px;height:32px;display:inline-block;font-size:40px;background-size:200px 120px;background-position:-2em -2em;position:absolute;margin:auto;top:0;bottom:0;left:20px}@media(-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:3/2),(min-resolution:1.5dppx){.note:before{background-image:url("../img/icons@2x.png")}}.note:before.secure{background-position:0 0}.note:before.future{background-position:-1em 0}.note:before.search{background-position:-2em 0}.note:before.nli{background-position:-3em 0}.note:before.share{background-position:0 -1em}.note:before.sync{background-position:0 -1em}.note:before.dayone{background-position:-1em -1em}.note:before.github{background-position:-2em -1em}.note:before.folders{background-position:-3em -1em}.note:before.cal{background-position:-4em -1em}.note:before.left{background-position:0 -2em}.note:before.right{background-position:-1em -2em}.note:before.info{background-position:-2em -2em}.note .literal,.note .highlight-note{color:white;background:#6b518a;padding:1px 3px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:inset 0 0 0 1px #8c72ac;-moz-box-shadow:inset 0 0 0 1px #8c72ac;-o-box-shadow:inset 0 0 0 1px #8c72ac;box-shadow:inset 0 0 0 1px #8c72ac}.note .highlight-note{padding:1px 10px}.note .highlight-note pre:before{content:"$ ";color:#deaa09}.highlight{background:transparent!important}.highlight-output{background:#2f1e34;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;padding:1px 20px;margin:40px auto;width:500px;-webkit-box-shadow:0 1px 8px #a0acb7;-moz-box-shadow:0 1px 8px #a0acb7;-o-box-shadow:0 1px 8px #a0acb7;box-shadow:0 1px 8px #a0acb7;position:relative;color:#f7f8f9;font-family:"Monaco","Courier New";font-size:12pt;background:#49374e}.highlight-output #args{color:#f6f7b9}.highlight-output #output{color:#9278b5}.highlight-javascript{background:#2f1e34;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;padding:1px 20px;margin:40px auto;width:500px;-webkit-box-shadow:0 1px 8px #a0acb7;-moz-box-shadow:0 1px 8px #a0acb7;-o-box-shadow:0 1px 8px #a0acb7;box-shadow:0 1px 8px #a0acb7;position:relative;color:#f7f8f9;font-family:"Monaco","Courier New";font-size:12pt;background:#49374e}.highlight-javascript #args{color:#f6f7b9}.highlight-javascript #output{color:#9278b5}.highlight-python{background:#2f1e34;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;padding:1px 20px;margin:40px auto;width:500px;-webkit-box-shadow:0 1px 8px #a0acb7;-moz-box-shadow:0 1px 8px #a0acb7;-o-box-shadow:0 1px 8px #a0acb7;box-shadow:0 1px 8px #a0acb7;position:relative;color:#f7f8f9;font-family:"Monaco","Courier New";font-size:12pt;padding:50px 20px 10px 20px}.highlight-python #args{color:#f6f7b9}.highlight-python #output{color:#9278b5}.highlight-python:before{content:"Terminal";display:block;width:100%;position:absolute;left:0;-webkit-box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;-moz-box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;-o-box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;margin-top:-50px;text-align:center;height:30px;line-height:30px;color:#777;text-shadow:0 1px 0 #ddd;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;background:#eaeaea;background-image:-moz-linear-gradient(top,#eaeaea 0,#bababa 100%);background-image:-webkit-linear-gradient(top,#eaeaea 0,#bababa 100%);background-image:-o-linear-gradient(top,#eaeaea 0,#bababa 100%);background-image:linear-gradient(to bottom,#eaeaea 0,#bababa 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eaeaea',endColorstr='#bababa',GradientType=0)}.highlight-python:after{content:"";width:48px;height:30px;position:absolute;top:0;left:10px;background:url(../img/terminal.png) no-repeat center center}.highlight-python pre{margin:0 0 10px 0}.highlight-python pre:before{content:"$ ";color:#deaa09}*:hover>a.headerlink{display:inline;color:#c0b2d2;margin-left:10px;text-decoration:none}*:hover>a.headerlink:hover{color:#725794}tt{color:#47375d;font-size:1.2em}ul li{margin-bottom:10px}div.document{max-width:900px;margin:20px auto;position:relative}div.documentwrapper{margin-left:240px;padding:0}aside{position:absolute;width:220px;top:0;color:#999}aside .logo{margin:0 auto 20px auto;display:block;width:90px;height:98px}aside h2,aside h3,aside h3 a:link,aside h3 a:visited{color:#777}aside a:link,aside a:visited{color:#999}aside a:hover,aside a:active{color:#deaa09}aside input[type=submit]{display:none}aside>ul{margin:0 4px;padding:0;list-style:none}aside>ul>li{margin-bottom:10px;font-size:18px;color:#777}aside>ul>li a:link,aside>ul>li a:visited{color:#777}aside>ul>li ul{margin:10px 0 0 0;padding-left:20px;font-size:16px;color:#999}aside>ul>li ul a:link,aside>ul>li ul a:visited{color:#999}div.footer{font-size:.8em;text-align:center;margin:40px 0;color:#999}div.footer a:link,div.footer a:visited{color:#555}@media screen and (max-width:820px){body:not(.landing){padding-top:130px}body:not(.landing) .highlight-output,body:not(.landing) .highlight-python,body:not(.landing) .highlight-javascript{width:auto;max-width:500px}body:not(.landing) .highlight-python pre{margin:-10px 0 10px 0}body:not(.landing) .highlight-python:before{height:24px!important;line-height:24px;font-size:.7em}body:not(.landing) .highlight-python:after{background:0}body:not(.landing) aside{position:static}body:not(.landing) div.documentwrapper{margin:0}body:not(.landing) h1,body:not(.landing) .section{margin:0!important}body:not(.landing) aside{background-color:#f0f0f0;width:100%;margin:5px -20px;padding:5px 20px 10px 20px}body:not(.landing) #logolink{position:absolute;top:-120px;left:50%;margin-left:-49px}}@media(-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:3/2),(min-resolution:1.5dppx){aside .logo,body#landing #upper #logo{width:90px;height:98px;content:url(../img/logo@2x.png)}}.icon{background-image:url("../img/icons.png");width:32px;height:32px;display:inline-block;font-size:40px;background-size:200px 120px}@media(-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:3/2),(min-resolution:1.5dppx){.icon{background-image:url("../img/icons@2x.png")}}.icon.secure{background-position:0 0}.icon.future{background-position:-1em 0}.icon.search{background-position:-2em 0}.icon.nli{background-position:-3em 0}.icon.share{background-position:0 -1em}.icon.sync{background-position:0 -1em}.icon.dayone{background-position:-1em -1em}.icon.github{background-position:-2em -1em}.icon.folders{background-position:-3em -1em}.icon.cal{background-position:-4em -1em}.icon.left{background-position:0 -2em}.icon.right{background-position:-1em -2em}.icon.info{background-position:-2em -2em}.pre-block{background:#2f1e34;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;padding:1px 20px;margin:40px auto;width:500px;-webkit-box-shadow:0 1px 8px #a0acb7;-moz-box-shadow:0 1px 8px #a0acb7;-o-box-shadow:0 1px 8px #a0acb7;box-shadow:0 1px 8px #a0acb7;position:relative;color:#f7f8f9;font-family:"Monaco","Courier New";font-size:12pt}.pre-block #args{color:#f6f7b9}.pre-block #output{color:#9278b5}.terminal{background:#2f1e34;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;padding:1px 20px;margin:40px auto;width:500px;-webkit-box-shadow:0 1px 8px #a0acb7;-moz-box-shadow:0 1px 8px #a0acb7;-o-box-shadow:0 1px 8px #a0acb7;box-shadow:0 1px 8px #a0acb7;position:relative;color:#f7f8f9;font-family:"Monaco","Courier New";font-size:12pt;padding:50px 20px 10px 20px}.terminal #args{color:#f6f7b9}.terminal #output{color:#9278b5}.terminal:before{content:"Terminal";display:block;width:100%;position:absolute;left:0;-webkit-box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;-moz-box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;-o-box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;box-shadow:inset 0 1px 0 #f4f4f4,inset 0 -1px 0 #888;margin-top:-50px;text-align:center;height:30px;line-height:30px;color:#777;text-shadow:0 1px 0 #ddd;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;background:#eaeaea;background-image:-moz-linear-gradient(top,#eaeaea 0,#bababa 100%);background-image:-webkit-linear-gradient(top,#eaeaea 0,#bababa 100%);background-image:-o-linear-gradient(top,#eaeaea 0,#bababa 100%);background-image:linear-gradient(to bottom,#eaeaea 0,#bababa 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eaeaea',endColorstr='#bababa',GradientType=0)}.terminal:after{content:"";width:48px;height:30px;position:absolute;top:0;left:10px;background:url(../img/terminal.png) no-repeat center center}body#landing{background-color:#47375d;font-family:"Open Sans","Helvetica Neue",sans-serif;font-weight:300}body#landing #twitter{display:block;position:absolute;top:20px;right:20px;border:1px solid #47375d;padding:5px 10px 5px 30px;color:#47375d;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;opacity:.7;filter:alpha(opacity= 70);background:url(../img/twitter.png) 8px center no-repeat transparent}body#landing #twitter:hover,body#landing #twitter:active{opacity:1;filter:alpha(opacity= 100);text-decoration:none}body#landing #title,body#landing .row3,body#landing .row4,body#landing #prompt{width:900px;margin:0 auto}body#landing #upper{*zoom:1;background:#f7f8f9;-webkit-box-shadow:inset 0 -6px 6px -3px #dadfe3;-moz-box-shadow:inset 0 -6px 6px -3px #dadfe3;-o-box-shadow:inset 0 -6px 6px -3px #dadfe3;box-shadow:inset 0 -6px 6px -3px #dadfe3}body#landing #upper:before,body#landing #upper:after{content:" ";display:table}body#landing #upper:after{clear:both}body#landing #upper #title{width:650px;margin:150px auto 75px auto}body#landing #upper img{float:left;margin-right:30px}body#landing #upper h1{color:#564371;font-weight:300}body#landing #upper #prompt{width:640px;margin:0 auto;*zoom:1}body#landing #upper #prompt:before,body#landing #upper #prompt:after{content:" ";display:table}body#landing #upper #prompt:after{clear:both}body#landing #upper .terminal{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;float:left;margin:0;width:500px;min-height:134px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}body#landing #upper .pleft,body#landing #upper .pright{text-align:center;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;padding-top:50px;width:70px}body#landing #upper .pleft i,body#landing #upper .pright i{opacity:.6;filter:alpha(opacity= 60)}body#landing #upper .pleft i:hover,body#landing #upper .pright i:hover{opacity:10;filter:alpha(opacity= 1000);cursor:pointer}body#landing #nav{background:#7c95ca;background-image:-moz-linear-gradient(top,#7c95ca 0,#5e7dc5 100%);background-image:-webkit-linear-gradient(top,#7c95ca 0,#5e7dc5 100%);background-image:-o-linear-gradient(top,#7c95ca 0,#5e7dc5 100%);background-image:linear-gradient(to bottom,#7c95ca 0,#5e7dc5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c95ca',endColorstr='#5e7dc5',GradientType=0);height:60px;-webkit-box-shadow:0 6px 6px -3px #413155;-moz-box-shadow:0 6px 6px -3px #413155;-o-box-shadow:0 6px 6px -3px #413155;box-shadow:0 6px 6px -3px #413155;text-align:center}body#landing #nav a#twitter-nav{display:none}body#landing #nav a{color:#f7f8f9;text-shadow:0 -1px 0 #253865;text-decoration:none;font-size:14pt;line-height:60px;margin:0 40px}body#landing #nav a:hover{color:#f8d055;text-shadow:0 -1px 0 #947206}body#landing #nav a.cta{background:#725794;background-image:-moz-linear-gradient(top,#725794 0,#564371 100%);background-image:-webkit-linear-gradient(top,#725794 0,#564371 100%);background-image:-o-linear-gradient(top,#725794 0,#564371 100%);background-image:linear-gradient(to bottom,#725794 0,#564371 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#725794',endColorstr='#564371',GradientType=0);-webkit-box-shadow:0 1px 0 #413155;-moz-box-shadow:0 1px 0 #413155;-o-box-shadow:0 1px 0 #413155;box-shadow:0 1px 0 #413155;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:6px 10px 5px 10px;white-space:nowrap}body#landing #nav a.cta:hover{background:#f6c324;background-image:-moz-linear-gradient(top,#f6c324 0,#c59708 100%);background-image:-webkit-linear-gradient(top,#f6c324 0,#c59708 100%);background-image:-o-linear-gradient(top,#f6c324 0,#c59708 100%);background-image:linear-gradient(to bottom,#f6c324 0,#c59708 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6c324',endColorstr='#c59708',GradientType=0);-webkit-box-shadow:0 1px 0 #947206;-moz-box-shadow:0 1px 0 #947206;-o-box-shadow:0 1px 0 #947206;box-shadow:0 1px 0 #947206;text-shadow:0 -1px 0 #947206;color:#f7f8f9}body#landing #lower{color:#f7f8f9;padding-top:40px}body#landing #lower a{color:#deaa09;text-decoration:none}body#landing #lower a:hover{color:#f8d055;text-decoration:underline}body#landing #lower .row3,body#landing #lower .row4{*zoom:1;margin-bottom:20px}body#landing #lower .row3:before,body#landing #lower .row4:before,body#landing #lower .row3:after,body#landing #lower .row4:after{content:" ";display:table}body#landing #lower .row3:after,body#landing #lower .row4:after{clear:both}body#landing #lower .row3 .col,body#landing #lower .row4 .col{position:relative;padding-left:40px;float:left;width:25%;padding-right:2%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}body#landing #lower .row3 .col i,body#landing #lower .row4 .col i{position:absolute;left:0;top:16px}body#landing #lower .row3 .col h3,body#landing #lower .row4 .col h3{font-size:12pt;margin-bottom:.5em}body#landing #lower .row3 .col p,body#landing #lower .row4 .col p{font-size:10pt;margin:0}body#landing #lower .row3 .col:last-child,body#landing #lower .row4 .col:last-child{padding-right:0}body#landing #lower .row3 .col{width:33.3333%}body#landing #lower .row4 .col{color:#d4d1da}body#landing #lower .row4 .col i{opacity:.8;filter:alpha(opacity= 80)}@media screen and (max-width:680px){body#landing #nav{height:auto;padding-bottom:10px}body#landing #nav a,body#landing #nav a#twitter-nav{display:block}body#landing #nav a.cta{margin:10px;padding:1px}body#landing #upper #twitter{display:none}body#landing #upper #title{margin:30px 0 10px 0}body#landing #upper #logo{backgound:red;display:block;float:none;margin:0 auto}body#landing #upper #title br{display:none}body#landing #upper .pleft,body#landing #upper .pright{display:none}body#landing #upper #prompt,body#landing #upper #title{width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px}body#landing #upper .terminal{width:100%}}@media screen and (max-width:900px){body#landing #lower{padding:40px 20px}body#landing #lower .row3,body#landing #lower .row4{margin:0;width:auto}body#landing #lower .row3 .col,body#landing #lower .row4 .col{float:none;width:100%;text-align:center;padding:0;margin:0 0 40px 0}body#landing #lower .row3 .col h3,body#landing #lower .row4 .col h3{font-size:1.5em}body#landing #lower .row3 .col p,body#landing #lower .row4 .col p{font-size:1em}body#landing #lower .row3 .col i,body#landing #lower .row4 .col i{position:static;margin-bottom:-20px}} \ No newline at end of file diff --git a/docs/_themes/jrnl/static/img/favicon-152.png b/docs/_themes/jrnl/static/img/favicon-152.png new file mode 100644 index 00000000..ac658d9c Binary files /dev/null and b/docs/_themes/jrnl/static/img/favicon-152.png differ diff --git a/docs/_themes/jrnl/static/img/favicon.ico b/docs/_themes/jrnl/static/img/favicon.ico new file mode 100644 index 00000000..7c9c2c1e Binary files /dev/null and b/docs/_themes/jrnl/static/img/favicon.ico differ diff --git a/docs/_themes/jrnl/static/img/icons.png b/docs/_themes/jrnl/static/img/icons.png new file mode 100644 index 00000000..bb77ca65 Binary files /dev/null and b/docs/_themes/jrnl/static/img/icons.png differ diff --git a/docs/_themes/jrnl/static/img/icons@2x.png b/docs/_themes/jrnl/static/img/icons@2x.png new file mode 100644 index 00000000..e9e920be Binary files /dev/null and b/docs/_themes/jrnl/static/img/icons@2x.png differ diff --git a/docs/_themes/jrnl/static/img/logo.png b/docs/_themes/jrnl/static/img/logo.png new file mode 100644 index 00000000..1ea79cf1 Binary files /dev/null and b/docs/_themes/jrnl/static/img/logo.png differ diff --git a/docs/_themes/jrnl/static/img/logo@2x.png b/docs/_themes/jrnl/static/img/logo@2x.png new file mode 100644 index 00000000..9cc3d76b Binary files /dev/null and b/docs/_themes/jrnl/static/img/logo@2x.png differ diff --git a/docs/_themes/jrnl/static/img/terminal.png b/docs/_themes/jrnl/static/img/terminal.png new file mode 100644 index 00000000..b813980e Binary files /dev/null and b/docs/_themes/jrnl/static/img/terminal.png differ diff --git a/docs/_themes/jrnl/static/img/twitter.png b/docs/_themes/jrnl/static/img/twitter.png new file mode 100644 index 00000000..29c5a89e Binary files /dev/null and b/docs/_themes/jrnl/static/img/twitter.png differ diff --git a/docs/_themes/jrnl/static/js/landing.js b/docs/_themes/jrnl/static/js/landing.js new file mode 100644 index 00000000..0f704aa9 --- /dev/null +++ b/docs/_themes/jrnl/static/js/landing.js @@ -0,0 +1,92 @@ +var phrases = [ + ["", "today: Started writing my memoirs. On the command line. Like a boss.", ""], + ["", "yesterday 2pm: used jrnl to keep track of accomplished tasks. The done.txt for my todo.txt", ""], + ["-from 2009 -until may", "", "(Displays all entries from January 2009 to last may)"], + ["", "A day on the beach with @beth and @frank. Taggidy-tag-tag.", ""], + ["--tags", "", "@idea 7
@beth 5"], + ["--export json", "", "(Exports your entire journal to json)"], + ["--encrypt", "", "(256 bit AES encryption. Crack this, NSA.)"] +] + +var args = document.getElementById("args"); +var input = document.getElementById("input"); +var output = document.getElementById("output"); +var right = document.getElementById("right"); +var left = document.getElementById("left"); +var current = 0 +var timer = null; + +var next = function() { + clearTimeout(timer); + reveal(++current % phrases.length); + setTimeout(next, 5000); +} +var prev = function() { + reveal(--current % phrases.length); +} + +var reveal = function(idx) { + var args_text = phrases[idx][0]; + var input_text = phrases[idx][1]; + var output_text = phrases[idx][2]; + var old_dix = idx == 0 ? phrases.length - 1 : idx - 1; + console.log(idx, old_dix, "++++++++++++") + var old_args_text = phrases[old_dix][0] + var old_input_text = phrases[old_dix][1] + var old_output_text =phrases[old_dix][2] + console.log(args_text, input_text, output_text) + console.log(old_args_text, old_input_text, old_output_text) + var s4 = function() {fadeIn(output_text, output);} + var s3 = function() {letter(input_text, input, s4);} + var s2 = function() {letter(args_text, args, s3);} + var s1 = function() {unletter(old_args_text, args, s2);} + var s0 = function() {unletter(old_input_text, input, s1);} + fadeOut(old_output_text, output, s0, 10); + // letter(input_text, input); + // output.innerHTML = output_text; +} +var fadeIn = function(text, element, next, step) { + step = step || 0 + var nx = function() { fadeIn(text, element, next, ++step); } + if (step==0) { + element.innerHTML = ""; + setTimeout(nx, 550); + return; + } + if (step==1) {element.innerHTML = text;} + if (step>10 || !text) { if (next) {next(); return;} else return;} + element.style.opacity = (step-1)/10; + element.style.filter = 'alpha(opacity=' + (step-1)*10 + ')'; + setTimeout(nx, 50); +} +var fadeOut = function(text, element, next, step) { + if (step===10) element.innerHTML = text; + if (step<0 || !text) { + element.innerHTML = ""; + if (next) {next(); return;} + else return; + } + element.style.opacity = step/10; + element.style.filter = 'alpha(opacity=' + step*10 + ')'; + var nx = function() { fadeOut(text, element, next, --step); } + setTimeout(nx, 50); +} + +var unletter = function(text, element, next, timeout, index) { + timeout = timeout||10; + if (index==null) index = text.length; + if (index==-1 || !text.length) { if (next) {next(); return;} else return;} + element.innerHTML = text.substring(0, index); + var nx = function() { unletter(text, element, next, timeout, --index); } + setTimeout(nx, timeout); +} + +var letter = function(text, element, next, timeout, index) { + timeout = timeout||35; + index = index||0; + if (index > text.length || !text.length) { if (next) {next(); return;} else return;} + element.innerHTML = text.substring(0, index); + var nx = function() { letter(text, element, next, timeout, ++index); } + setTimeout(nx, timeout); +} +setTimeout(next, 3000); diff --git a/docs/_themes/jrnl/static/landing.svg b/docs/_themes/jrnl/static/landing.svg new file mode 100644 index 00000000..cbdb9488 --- /dev/null +++ b/docs/_themes/jrnl/static/landing.svg @@ -0,0 +1,3558 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + Collect your thoughts and noteswithout leaving the command line. + + + + + + + + + + + + + + + + + + + + + + + + + + Terminal + Terminal + + $ jrnl today: Started writing my Memoirs. On the command line. Like a boss. + + + + + + + + + + + + Collect your thoughts and noteswithout leaving the command line. + Secure.Ecnrypt your Journal with military-grade AES encryption so not even the NSA can read your dirty secrets. Human friendly. jrnl has a natural language interface so you don't have to remember cryptic shortcuts while writing down your thoghts. Future-proof.Your journals are stored as plain-text files and you will still be able to open them in 50 years when all your fancy iPad apps have gone the way of the Dodo. Accessible Anywhere.Ecnrypt your Journal with military-grade AES encryption so not even the NSA can read your dirty secrets. DayOne compatible.Your journals are stored as plain-text files and you will still be able to open them in 50 years when all . Free & Open SourceYour journals are stored as plain-text files and you will still be able to open them in 50 years when all . DayOne compatible.Your journals are stored as plain-text files and you will still be able to open them in 50 years when all . + + + + + + Download + + + Download + Documentation + Documentation + Fork me on Github + Fork me on Github + + jrnl is lovingly crafter by Manuel Ebert and other great people. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_themes/jrnl/static/less/3L.less b/docs/_themes/jrnl/static/less/3L.less new file mode 100644 index 00000000..583c51f7 --- /dev/null +++ b/docs/_themes/jrnl/static/less/3L.less @@ -0,0 +1,1369 @@ +///* +// * 3L was made for YOU to help you create awesome websites +// * and fill the Internet with excessive amount of Love! ♥ +// * +// * Keep up your good work! +// * +// * Yours faithfully, +// * Mateusz Kocz -> http://radiatingstar.com +// * +// * 3L: -> http://mateuszkocz.github.com/3l +// * +// * Watch 3L on Github: -> https://github.com/mateuszkocz/3l +// * +// * Submit a bug issue: -> https://github.com/mateuszkocz/3l/issues?state=open +// * +// * +// * Licensed under the Apache License v2.0 +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Version: 1.4.0-beta (2012.12.06) +// * +// */ + +///* +// * To compile all of the code you need to use a compiler +// * that supports JavaScript code and guarder mixins. +// * WinLess meets those requirements. You can find it on winless.org +// * +// * If you're on a Mac and your compiler meets the requirements, +// * please, let me know via Twitter or GitHub! +// * +// */ + +///* ACTIVATE SUPPORTING CLASSES */ +///* Uncomment ones you want to use or put them in html or body elements in your style sheet. */ +///* For the explanation what those classes do, read further. */ + + //html { // If you want to use those classes, uncomment also the html element. + //.seo-helper; + //.box-sizing() // Put in the brackets box-model you want to use. + //} // CAUTION! If you're using any of those supporting classes, uncomment that bracket! + +///* +// * SEO & HTML Debugging +// * +// * A useful supporting class that will help a bit with your SEO +// * and usability of your website. +// * +// * Creating a website is a serious business, but sometimes you may +// * forget about some important details. This class will help you. +// * It will let you know when you haven't put an alt attribute on image +// * or kept that attribute empty, when you haven't typed a URL in anchor or when +// * anchor link has rel=nofollow attribute. It will also show you an alert +// * message if you don't have a tag and description or left them empty*. +// * +// * If any of the errors described above happens, according element will +// * get a red outline border drawing your attention and asking for some love +// * or you will get a message with the same purpose. +// * +// * *** * The <title> reminder can alert you even if you have a <title> tag. +// * *** This happens if you have a <link> tag (usually used for style sheets) +// * *** before <title> in your HTML. Just change the order of <link> and +// * *** <title> and you're cool. +// * +// * How to: +// * Place the .seo-helper class in html element. That's it! +// * +// * *** Example: html {.seo-helper} +// * +// * That way every element on your page will be affected +// * by this rule. You can also place it in any other container +// * class element in your code (body, div.wrapper, article and so on) +// * if you don't want for some reasons to check for bugs on whole page +// * but in a single area. +// * +// * Caution! Do not forget to delete this class before finishing your +// * project, unless you want to keep it in continuous project (like blog) +// * and debug every new content on your site. But then you might consider +// * restyling this class to be a bit more eye-pleasing. +// * +// * This may not work in every browser, but since you are a web +// * developer/designer you're probably already using a bleeding +// * edge nightly alpha back-door version of browser, so no problem! +// * It's probably the only class you don't need to care about how +// * your visitors will see it! +// * +// * *** Aside - How it works: +// * *** Section only for people who don't know yet what attribute +// * *** selectors and negation pseudo-class are. +// * *** +// * *** Using negation pseudo-class is like saying "target every element x +// * *** that doesn't have attribute y" or "target every element exept (but 'not') z". +// * *** You can read more about that here ->www.w3.org/TR/selectors/#negation. +// * *** +// * *** Attribute selectors are rules that target elements that have +// * *** some specified attributes (rel, alt, href etc.) and/or specified +// * *** value of this attributes. Read more on this topic here +// * *** ->www.w3.org/TR/selectors/#selectors. +// * +// * For a further explanation and a demo, refer to: +// * -> http://radiatingstar.com/how-to-improve-seo-with-css +// * +// * Why img:not([alt]), img[alt=""] and img[alt^=" "]? +// * First targets images that don't have an alt attribute, second targets +// * ones that have this attribute but it's left empty (probably left by +// * automatic completion of html editor), third is just in case - it +// * might have been left by html editor or manually "to do it later" (clearly +// * a space at the beginning of an alt can't be anything good). +// * +// * Why a[href=""]? +// * If you write an anchor text and leave href to copyPaste URL later, +// * it will reminding you about that. +// * +// * Why a[rel="nofollow"]? +// * For some reasons links on your site may have this attribute and this +// * may generate a huge SEO problem. Better fix it ASAP. (On the other hand +// * nofollow links might be useful in some situations. See here: +// * -> http://en.wikipedia.org/wiki/Nofollow#Control_internal_PageRank_flow) +// * +// * Why div:empty, span:empty, li:empty, p:empty, td:empty, th:empty? +// * It'll just check if you have some redundancy (empty elements) in you code. +// * +// */ + +.seo-helper () { + img:not([alt]), img[alt=""], img[alt^=" "], + a[href=""], a[href^=" "], a[href="#"], a[rel*="nofollow"], + div:empty, span:empty, li:empty, p:empty, td:empty, th:empty, + *[title=""], *[class=""], *[id=""] { + outline: 2px solid red !important; + outline-offset: 3px !important; + } + head, title:empty, link, meta {display: block;} + title:empty:before {content: "You've left the <title> empty!"} + link:before {content: "You don't have a <title>!"} + title ~ link {display: none;} + meta[name="description"][content=""]:before, meta[name="description"][content=" "]:before {content: "You've left description empty!";} + } + +///* +// * Helper classes from HTML5 Boilerplate +// * +// * Classes below help you create a better user experience for both users +// * of browsers and screen readers. Oh, and there's also a clearfix! +// * +// * All the classes comes from HTML5 Boilerplate (-> html5boilerplate.com). Here though, +// * they're changed so that they can be easily used in The LESS Way. +// * They're called "non-semantic" in H5B, but here they become semantic if used well. +// * (Actually they can't be used in any way than good in 3L.) +// * (Actually II they can be semantic in H5B as well, but it's a bit pain to do that.) +// * +// * Usage: +// * Just put them in your classes, id's or elements. +// * +// * Example: +// * .YOUR-AWESOME-CLASS-NAME { +// * // some rules +// * .clearfix; +// * } +// * +// */ + +// For image replacement. +.ir () {border: 0; overflow: hidden; background-color: transparent; *text-indent: -9999px; &:before {content: ""; display: block; width: 0; height: 100%;}} + +// Hide from both screenreaders and browsers: h5bp.com/u +.hidden () {display: none !important; visibility: hidden;} + +// Hide only visually, but have it available for screenreaders: h5bp.com/v +.visuallyhidden () {border: 0;clip: rect(0 0 0 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;} + +// Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p +// CAUTION! The .visuallyhidden class is included! If you want your object be both +// .visuallyhidden and .focusabe use only .focusable class. +.focusable () {.visuallyhidden;&:active,&:focus{clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto;}} + +// Hide visually and from screenreaders, but maintain layout. +.invisible () {visibility: hidden;} + +// Contain floats: h5bp.com/q +.clearfix () {*zoom:1;&:before,&:after{content:" ";display:table;}&:after{clear:both;}} + +///* +// * Some other helper classes. +// */ + +.incomplete() {outline: 3px dotted green} +.fixme() {outline: 3px dotted yellow} +.todo() {outline: 3px dotted blue} +.xxx() {outline: 3px dotted red} + +///* +// * Box-sizing +// * +// * Change the basic box-model to the one you want. +// * +// * Basic box-model defines the width and height of an object only as a size of +// * object's content area. In order to know exactly how big is the object you need +// * to add its padding and borders. This may result in many unwanted behaviours. +// * That's why you can define how you want the browser to calculate the width/height: +// * with or without padding, with or without borders. +// * +// * To use this feature just put a value you want: +// * -- content-box ("content" works too) - it's default value from basic model. +// * -- padding-box (also "padding") - width and height declarations will include paddings. +// * -- border-box (and "border") - border and padding included. +// * +// * Usage: +// * 1. .box-sizing(content-box), .box-sizing(content) and .content-box-sizing* for box-sizing: content-box. +// * 2. .box-sizing(padding-box), .box-sizing(padding) and .padding-box-sizing* for box-sizing: padding-box. +// * 3. .box-sizing(border-box), .box-sizing(padding) and .border.box-sizing* for box-sizing: border-box. +// * +// * * Beware not to use those properties without -sizing suffix thus suffixless classes are for background-clip (see this class below). +// * +// * Resources: +// * -- http://paulirish.com/2012/box-sizing-border-box-ftw/ +// * +// * Browsers support: IE8+ and every other. +// * Notable lack of support: IE7- +// * +// */ + +.content-box-sizing(){-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;} +.padding-box-sizing(){-moz-box-sizing:padding-box;-webkit-box-sizing:padding-box;box-sizing:padding-box;} +.border-box-sizing(){-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;} +.box-sizing (padding) {.padding-box-sizing;} +.box-sizing (padding-box){.padding-box-sizing;} +.box-sizing (border){.border-box-sizing;} +.box-sizing (border-box){.border-box-sizing;} +.box-sizing (content){.content-box-sizing;} +.box-sizing (content-box){.content-box-sizing;} + +///* +// * Background-clip +// * +// * Clips the object's background to the desired box according to the box-model. +// * +// * To use this class simply put into an object a .background-clip(box) class, +// * where box means the desired box (see below). You can also use a shorter class +// * .bg-clip or class that corresponds to the clipping you want to get (.content-clip, +// * .padding-clip, .border-clip). +// * +// * Arguments that comes into (box) are: +// * -- content-box or content for content clip, +// * -- padding-box or padding for padding clip, +// * -- border-box or border for border clip. +// * *** You can use values either with or without "-box" suffix. +// * +// * Browsers support: IE9+ and every other. +// * Notable lack of support: IE8- +// * +// */ + +.content-box(){-moz-background-clip:content;background-clip:content-box;} +.padding-box(){-moz-background-clip:padding;background-clip:padding-box;} +.border-box(){-moz-background-clip:border;background-clip:border-box;} +.background-clip (padding){.padding-box;} +.background-clip (padding-box){.padding-box;} +.background-clip (border){.border-box;} +.background-clip (border-box){.border-box;} +.background-clip (content){.content-box;} +.background-clip (content-box){.content-box;} +.bg-clip(@arguments){.background-clip(@arguments);} + +///* +// * Box-shadow +// * Create a shadow behind or inside the element. +// * +// * Usage: +// * In .box-shadow() brackets put arguments for every single shadow. Separate +// * each shadows' arguments with comma. You can put up to five shadows +// * by default but feel free to add a class with as many as you want. +// * Just check how it is done. +// * +// * You can use a default box-shadow which will create a shadow with +// * 0px x and 1px y offsets, 3px of blur and in black colour with 25% transparency. +// * Just place a .box-shadow class without any arguments. +// * +// * Box-shadow property takes following arguments: +// * +// * 1. inset [optional]. +// * 2. x-offset [required]. +// * 3. y-offset [required]. +// * 4. blur [optional]. +// * 5. spread [optional]. +// * 6. color [optional/required]. +// * +// * Resources: +// * -- developer.mozilla.org/en/CSS/box-shadow +// * +// * Browsers support: IE9, Fx3.5, Chrome, Opera, Safari, Opera Mobile, Android Browser +// * Notable lack of support: IE8-, Opera Mini +// * +// * Example: +// * Two box-shadows: one is 1px offset, black, second one is green with 30% opacity, inset, +// * with 5px offsets, 3px of blur and 1px spread. +// * .box-shadow(1px 1px black, inset 5px 5px 3px 1px fade(green,30%)) // fade(colour,XX%) is a LESS native function +// * // that adds alpha channel to colour. Instead of fade() +// * // you can also use rgba or hsla colours declaration. +// * Solution for multiple box-shadows in a single mixin taken from http://www.toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/ +// */ + +.box-shadow(@shadow1, @shadow2:X, ...){ + @shadows: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`; + -webkit-box-shadow: @shadows; + -moz-box-shadow: @shadows; + -o-box-shadow: @shadows; + box-shadow: @shadows; +} + +///* +// * Border-radius +// * Round the element's corners. +// * +// * Usage: +// * Border-radius property takes one to four arguments with px, em and % +// * values and round the element's corners accordingly. You can make +// * ellipticaly roundeded corners putting two sets of values separated with +// * comma using .elliptical-border-radius class. In order to round a single +// * corner use .round-corner class. This class takes two sets of arguments. +// * First one is a declaration of corner you want to round (top-left, top-right, +// * bottom-right, bottom-left), second one (separated from the first with comma), +// * is a set of values in px, em or % that round choosen corner. Second +// * declaration can have one (for circle rounding) or two values (for +// * elliptical rounding). +// * +// * For further explanation of the border-radius property, refer to the +// * resources section above. +// * +// * Resources: +// * -- developer.mozilla.org/en/CSS/border-radius +// * +// * Browsers support: IE9, Fx3.5, Chrome, Opera, Safari, Opera Mobile, Android Browser +// * Notable lack of support: IE8-, Opera Mini +// * +// * Example: +// * 1. Round every corner of the element with 10px radius. +// * .border-radius(10px) +// * 2. Round top-left and bottom-right corners by 10px, top-right +// * and bottom-left corners by 20px. +// * .border-radius(10px 20px) +// * 3 Exemplary use of the .elliptical-border-radius class. +// * .elliptical-border-radius(10px 20px 30px, 40px 50px 60px 70px) +// * 4. Round top-right corner by 10px and 20px (elliptical). +// * .round-corner(top-right, 10px 20px) +// * .border-top-right-radius(10px 20px) // Alternate method. +// * 5. Round similar corners. +// * .border-top-radius(20px 10px); // top-left + top-right (elliptical) +// * .border-left-radius(5px); // top-left + bottom-left +// * +// */ + +// If your rounded corners looks bad with borders add this class to your rounded element. +// -> http://tumble.sneak.co.nz/post/928998513/fixing-the-background-bleed +.border-radius-fix(){.background-clip(padding-box);} + +.border-radius (@radius:5px, ...) { + -webkit-border-radius: @arguments; + -moz-border-radius: @arguments; + border-radius: @arguments; +} +// Alternate name for .border-radius. +.round-corners (@radius:5px, ...) {.border-radius(@arguments);} + +.elliptical-border-radius (@radius1, @radius2) { + -webkit-border-radius: @radius1 ~"/" @radius2; + -moz-border-radius: @radius1 ~"/" @radius2; + border-radius: @radius1 ~"/" @radius2; +} +.round-corner (top-left, @radius...){ + -webkit-border-top-left-radius: @radius; + -moz-border-top-left-radius: @radius; + border-top-left-radius: @radius; +} +.round-corner (top-right, @radius...){ + -webkit-border-top-right-radius: @radius; + -moz-border-top-right-radius: @radius; + border-top-right-radius: @radius; +} +.round-corner (bottom-right, @radius...) { + -webkit-border-bottom-right-radius: @radius; + -moz-border-bottom-right-radius: @radius; + border-bottom-right-radius: @radius; +} +.round-corner (bottom-left, @radius...) { + -webkit-border-bottom-left-radius: @radius; + -moz-border-bottom-left-radius: @radius; + border-bottom-left-radius: @radius; +} +// Another methods to use corner radius. +.border-top-left-radius (...) {.round-corner(top-left,@arguments);} +.border-top-right-radius (...) {.round-corner(top-right,@arguments);} +.border-bottom-right-radius (...) {.round-corner(bottom-right,@arguments);} +.border-bottom-left-radius (...) {.round-corner(bottom-left,@arguments);} + +// Round similar corners. +.border-top-radius (...) {.round-corner(top-left,@arguments);.round-corner(top-right,@arguments);} +.border-bottom-radius (...) {.round-corner(bottom-left,@arguments);.round-corner(bottom-right,@arguments);} +.border-left-radius (...) {.round-corner(top-left,@arguments);.round-corner(bottom-left,@arguments);} +.border-right-radius (...) {.round-corner(top-right,@arguments);.round-corner(bottom-right,@arguments);} + +// Another classes for the same purpose as above. +.round-top-corners (...) {.border-top-radius(@arguments);} +.round-bottom-corners (...) {.border-bottom-radius(@arguments);} +.round-left-corners (...) {.border-left-radius(@arguments);} +.round-right-corners (...) {.border-right-radius(@arguments);} + +///* +// * Opacity +// * Make an object transparent. +// * +// * Opacity takes values between 0.0 (invisible) to 1.0 (default - full +// * visibility) but 3L lets you also use percentages and values from >1 to 100. +// * +// * If you want an element with transparency 1, .5 or 0, use these classes: +// * .not-transparent., .half-transparent, .transparent. +// * +// * Browsers support: full (IE6+) +// * Caution! According to -> caniuse.com/#search=opacity, transparency doesn't +// * work well with PNG images that are itself transparent (use alpha channel) in IE8-. +// * +// * Aside: +// * Do we need the ability to set opacity in numbers from 1 to 100 +// * and in percentages? I think we do, because: +// * 1. You need to use integer numbers in filter property for IE, +// * so there is a possibility that someone will type this kind +// * of value, instead of [0,1]. +// * 2. LESS has a fade() function that uses percentages to makes +// * colours (semi)transparent, so using percentages here will +// * result in more consistent code (same unit in similar situation). +// * 3. Percentages are more intuitive when it comes to transparency and +// * opacity since graphic editors like Photoshop and GIMP use them. +// * +// */ + +.transparent() {.opacity(0);} +.non-transparent() {.opacity(1);} +.half-transparent () {.opacity(.5);} +.opacity () {.non-transparent();} +.opacity (@value) when (isnumber(@value)) and (@value =< 1){ + opacity: @value; + filter: ~"alpha(opacity="@value*100~")"; + } +.opacity (@value) when (isnumber(@value)) and (@value > 1) and not (ispercentage(@value)){ + // INFO: for the explanation of rule "and not (ispercentage(@value))" refer to the class below. + opacity: @value/100; + filter: ~"alpha(opacity="@value~")"; + } +.opacity (@value) when (ispercentage(@value)) { + // Change the @value from percentage to integer (XX% => XX) + @integerValue: `parseInt('@{value}')`; + // Actually the @value should be a number now... but it isn't. + // LESS think of it as a string so we can't do math here. + // We'll use a feature of LESS that automatically makes + // a second value's unit in a sum to be the same as the first one. + // In our case we need a number so we can divide it by 100. + opacity: (0 + @integerValue) /100; + // We don't need a math in filter so no trick. + filter: ~"alpha(opacity="@integerValue~")"; + + // BUG: WinLESS compile this with doubled properties unless the rule + // "and not (ispercentage(@value))" is added in the class above. + // In Firebug (through the LESS native compiler) those properties + // aren't doubled, though. + } + +///* +// * Gradient +// * Create a beautiful gradient without images. +// * +// * Pick a type of a gradient you want to have and put colours in +// * brackets. You can put either two or three colours. In the first case +// * the default colour for old browsers will be the same as the first colour provided. +// * In the second case you can set that colour as a third argument. +// * +// * The default class - .gradient - is the same as .vertical-gradient. +// * +// * You can choose from four types of gradients: +// * 1. Vertical - colour will change from top to bottom. +// * 2. Horizontal - change is from left to right. +// * 3. Diagonal - from top-left to bottom-right. +// * 4. Radial - from the centre of an element to its borders. +// * +// * Gradients tend to be tricky. There's no support for this property +// * in older IE, but "filter" comes to the rescue. It can generate +// * only horizontal and vertical gradients, though. Also IE9 has some +// * strange behaviour -> css3wizardry.com/2010/10/29/css-gradients-for-ie9/. +// * To provide the best experience for your visitors you should use +// * gradient generator (refer to resources above) with "IE9 Support" option checked. +// * +// * Resources: +// * -- gradient generator with broad browsers support and some advanced options: +// * -> www.colorzilla.com/gradient-editor/ +// * -- gradient is a powerful tool - you can generate shapes as a background! +// * -> lea.verou.me/css3patterns/ +// * +// * Browsers support: almost full +// * Notable lack of support: Opera mini +// * Caution! IE6 - IE8 use filter property that can generate only vertical and +// * horizontal gradients. For the best experience in IE9 use gradient generator +// * mentioned above in the resources. +// * +// * TODO: manual for .gradient(). Mention it's still compatible with previous versions of 3L since +// * you need to provide at least 4 values to use it. Anything less will use the old .gradient(). +// * You can provide as much stop colors as you want. +// */ + +// Multi-purpose gradient is in a BETA stage! Uncomment for your own responsibility. +///* +// * FIXME: you don't need to provide the @direction value since default is "to bottom". How to make it works? +// * FIXME: simple radial-gradient should work, but what if you provide some more advanced values? +// * FIXME: does it work with "to top left" and similar or angles? +// */ +// .gradient(@gradientType, @direction, @rest...) { + // @valuesProcessed: ~`"@{rest}".replace(/[\[\]]/g, '')`; + // @directionProcessedOld: ~`"@{direction}".replace(/[\[\]]|\,/g,'').replace("to ","").replace("top","bottom").replace("bottom","top").replace("right","left").replace("left","right").replace("at ","").replace("cover", "farthest-corner")`; + // @directionProcessedNew: ~`"@{direction}".replace(/[\[\]]|\,/g,'')`; +// + // @webkit1: `"-webkit-" + "@{gradientType}" + "-gradient(" + "@{directionProcessedOld}," + "@{valuesProcessed}" + ")"`; + // @webkit2: ~`'@{webkit1}'.replace(/\"/g, '')`; + // background-image: @webkit2; +// + // @moz1: `"-moz-" + "@{gradientType}" + "-gradient(" + "@{directionProcessedOld}," + "@{valuesProcessed}" + ")"`; + // @moz2: ~`'@{moz1}'.replace(/\"/g, '')`; + // background-image: @moz2; +// + // @o1: `"-o-" + "@{gradientType}" + "-gradient(" + "@{directionProcessedOld}," + "@{valuesProcessed}" + ")"`; + // @o2: ~`'@{o1}'.replace(/\"/g, '')`; + // background-image: @o2; +// + // @w3c1: `"@{gradientType}" + "-gradient(" + "@{directionProcessedNew}," + "@{valuesProcessed}" + ")"`; + // @w3c2: ~`'@{w3c1}'.replace(/\"/g, '')`; + // background-image: @w3c2; +// } + +.gradient (@color1, @color2){ + background: @color1; + background-image: -moz-linear-gradient(top, @color1 0%, @color2 100%); + background-image: -webkit-linear-gradient(top, @color1 0%,@color2 100%); + background-image: -o-linear-gradient(top, @color1 0%,@color2 100%); + background-image: linear-gradient(to bottom, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=0 ); +} + + +.gradient (@color1, @color2, @color3){ + background: @color3; + background-image: -moz-linear-gradient(top, @color1 0%, @color2 100%); + background-image: -webkit-linear-gradient(top, @color1 0%,@color2 100%); + background-image: -o-linear-gradient(top, @color1 0%,@color2 100%); + background-image: linear-gradient(to bottom, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=0 ); +} +// .vertical-gradient = .gradient +.vertical-gradient (@color1,@color2) {.gradient(@color1,@color2)} +.vertical-gradient (@color1,@color2,@color3) {.gradient(@color1,@color2,@color3)} +.horizontal-gradient (@color1, @color2) { + background: @color1; + background-image: -moz-linear-gradient(left, @color1 0%, @color2 100%); + background-image: -webkit-linear-gradient(left, @color1 0%,@color2 100%); + background-image: -o-linear-gradient(left, @color1 0%,@color2 100%); + background-image: linear-gradient(to right, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=1 ); +} +.horizontal-gradient (@color1, @color2, @color3) { + background: @color3; + background-image: -moz-linear-gradient(left, @color1 0%, @color2 100%); + background-image: -webkit-linear-gradient(left, @color1 0%,@color2 100%); + background-image: -o-linear-gradient(left, @color1 0%,@color2 100%); + background-image: linear-gradient(to right, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=1 ); +} +.diagonal-gradient (@color1, @color2) { + background: @color1; + background-image: -moz-linear-gradient(-45deg, @color1 0%, @color2 100%); + background-image: -webkit-linear-gradient(-45deg, @color1 0%,@color2 100%); + background-image: -o-linear-gradient(-45deg, @color1 0%,@color2 100%); + background-image: linear-gradient(135deg, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=1 ); + } +.diagonal-gradient (@color1, @color2,@color3) { + background: @color3; + background-image: -moz-linear-gradient(-45deg, @color1 0%, @color2 100%); + background-image: -webkit-linear-gradient(-45deg, @color1 0%,@color2 100%); + background-image: -o-linear-gradient(-45deg, @color1 0%,@color2 100%); + background-image: linear-gradient(135deg, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=1 ); + } +.radial-gradient (@color1, @color2) { + background: @color1; + background-image: -moz-radial-gradient(center, @color1 0%, @color2 100%); + background-image: -webkit-radial-gradient(center, @color1 0%,@color2 100%); + background-image: -o-radial-gradient(center, @color1 0%,@color2 100%); + background-image: radial-gradient(at center, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=1 ); + } +.radial-gradient (@color1, @color2,@color3) { + background: @color3; + background-image: -moz-radial-gradient(center, @color1 0%, @color2 100%); + background-image: -webkit-radial-gradient(center, @color1 0%,@color2 100%); + background-image: -o-radial-gradient(center, @color1 0%,@color2 100%); + background-image: radial-gradient(at center, @color1 0%,@color2 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{color1}', endColorstr='@{color2}',GradientType=1 ); + } + +///* +// * Background-size +// * Scale (or not) your background image. +// * +// * This property takes following values: +// * -- auto [default] - it does nothing when used alone; when used with a value +// * it makes sure that image will keep its aspect ratio while being stretched +// * to the required size. (See: examples 3. and 4.) +// * -- contain - scale image to the first border it meets; +// * it may leave some area uncovered but keeps image's aspect ratio, +// * -- cover - scale image to the second border it meets; +// * cover all area but part of an image may not be shown. The image keeps its aspect ratio. +// * -- px, em, % - scale image according to declared value; +// * you can declare one value (x-size) or two values for each size. +// * Using (100%, 100%) stretch the image to cover full area but may not +// * keep its aspect ratio. When you use percentages keep in mind that XX% +// * means XX% of the element size, not XX% of the background image. +// * +// * Consider adding background-repeat property to avoid unwanted repetition of background. +// * +// * Browsers support: IE9+, Fx3.6+, Chrome, Safari, Opera, Opera Mini, Opera Mobile, Android Browser +// * Notable lack of support: IE8- +// * +// * Examples: +// * 1. .background-size(contain); +// * 2. .background-size(cover); +// * 3. .background-size(70%); // = (70% auto). Image is scaled to take 70% of width +// * // of the element and it keeps its own aspect ratio. +// * 4. .background-size(auto, 70%) // Image is scaled to take 70% of element's +// * // height and keeps aspect ratio. +// * 5. background-size(70px 7em); // Size of the background image is now 70px (width) x 7em (height). +// * 6. background-size(70px,7em); // Same as above. Comma is fine too. +// * +// */ + +.background-size (...) { + -moz-background-size: @arguments; + background-size: @arguments; + } +// A shorthand class. +.bg-size (...) {.background-size(@arguments)} + +///* +// * Columns layout +// * +// * Divide a block of text into columns as seen in newspapers. +// * +// * Basic usage: +// * Use .columns() class providing in brackets arguments for columns. +// * Non of those arguments are required, but unless you provide one, columns +// * layout won't work. Available arguments: +// * -- integer - declare a column-count. Unless declared, their width will +// * equal to division of the block's width minus column-gaps and declared integer. +// * Default value is "auto" which means that width of columns will be determined +// * by column-width value. +// * -- width - declare every column width in px, em and % (of containing block). +// * Default value is "auto" - column width will be equal to division of the +// * block's width and declared column-count +// * +// * Usage of supporting classes: +// * You can declare the gaps between columns by .column-gap() class that takes +// * width type argument. Default value is "normal" and equals to 1em. +// * +// * Declare a vertical rule between columns using .column-rule(). It's the same +// * type of declaration as in borders, that is width, style and colour. By default +// * there is no rule. +// * +// * Browsers support: IE10+, Fx, Chrome, Safari, Opera, Opera Mobile, Android Browser +// * Notable lack of support: IE9-, Opera Mini +// * +// * Example: +// * 1. .column(2, 20px) // Two columns with 20px width. +// * 2. .column(5) // Five columns layout. +// * 3. element { +// * .column(100px); // A 100px width columns +// * .column-gap(10px); // with 10px gap between +// * .column-rule(1px solid black); // and 1px thick, solid, black vertical rule. +// * } +// * +// */ + +.columns (...) { + -webkit-columns: @arguments; + -moz-columns: @arguments; + columns: @arguments; + } +.column-gap (@gap) { + -webkit-column-gap: @gap; + -moz-column-gap: @gap; + column-gap: @gap; + } +.columns-gap (@gap) {.column-gap(@gap);} +.column-rule (...) { + -webkit-column-rule: @arguments; + -moz-column-rule: @arguments; + column-rule: @arguments; + } +.columns-rule (...) {.column-rule(@arguments);} +.column-fill (@fill) { + -webkit-column-fill: @fill; + -moz-column-fill: @fill; + column-fill: @fill; +} +.columns-fill (@fill) {.column-fill(@fill);} + +///* +// * Transform +// * 2D and 3D transformation of an object. +// * +// * You can use classes dedicated to specifics transformation, but if you plan +// * to use multiple transformation on an object, use general classes .transform +// * or .transform3d instead. Otherwise the latter transform will override the former. +// * If you want to use some of the 3D transformations, use .transform3d class. It +// * has a 3D specific property transform-style included. You can put both 3D and 2D +// * transformations in .transform3D. +// * +// * Transforms don't affect an object's place in a document and its environment +// * so there's no risk of crashing a layout. +// * +// * Transformations characteristics: +// * -- Rotate takes one argument and rotate object clockwise by specified angle (in deg). +// * -- Scale takes one or two arguments (x,y). If y is not specified it is assumed that x = y. +// * Arguments in interval (0,1) shrink the object. Arguments >1 makes it bigger. +// * -- Skew takes one or two arguments (x,y). If y is not specified it is assumed that y = 0 (no y-skew). +// * Arguments must be in deg. +// * -- Translate takes one or two arguments (w,y). If y is not specified it is assumed y = 0 (no y-translate). +// * Arguments are in px or em. Translate moves the object by specified value. +// * +// * Sometimes you might want to control the point that is the relative base of transformations. +// * For that reason use .transform-origin class. That class takes one or two values. +// * First value defines horizontal position of that point, second refers to vertical position. +// * In case you provide only the first value, the second is set to 50%. Default value is (50% 50%). +// * You can use three types of values: +// * -- pixels that place origin point in position according to the top-left corner of an element +// * to its bottom-right corner. Negative values allowed - in that case position goes to the left +// * and top from the top-left corner, +// * -- percentages that are relative to object's width and height. As in px, the original position +// * is top-left corner (0% 0%), and goes to bottom-right (100% 100%). Negative values does the +// * same as in px. +// * -- keywords: left / center / right for x-axis and top / center / bottom for y-axis. +// * +// * For 3D transformations you can set a perspective using .perspective() class and putting +// * value in brackets . +// * +// * Browsers support: IE9+, Fx3,5+, Chrome, Safari, Opera, Opera Mobile, Android Browser +// * Notable lack of support: IE8-*, Opera Mini +// * * You can use some of the transformation in older IE through filter property. +// * To generate that property refer to -> css3please.com. +// * You can also emulate scale property with zoom property. +// * +// * Examples: +// * 1. .scale(2,.5) // Stretch an object two times and shrink in height by half. +// * 2. .rotate(180deg) // Rotate an object by 180deg. +// * 3. .transform(.scale(2,.5),rotate(180deg)) // Does the combined transformation from examples above. +// * 4. .transform-origin(20% top) // Place the transformation origin at the top, 20% of the object's +// * // width to the right from the top-left corner. +// */ + +.transform-origin (...) { + -webkit-transform-origin: @arguments; + -moz-transform-origin: @arguments; + -ms-transform-origin: @arguments; + -o-transform-origin: @arguments; + transform-origin: @arguments; + } +.perspective (...) { + -webkit-perspective: @arguments; + -moz-perspective: @arguments; + -o-perspective: @arguments; + perspective: @arguments; + } +.backface-visibility(@visibility){ + -webkit-backface-visibility: @visibility; + backface-visibility: @visibility; +} +.transform (...) { + -webkit-transform: @arguments; + -moz-transform: @arguments; + -ms-transform: @arguments; + -o-transform: @arguments; + transform: @arguments; + } +.transform3d (...) { + -webkit-transform: @arguments; + -webkit-transform-style: preserve-3d; + -moz-transform: @arguments; + -moz-transform-style: preserve-3d; + -o-transform: @arguments; + -o-transform-style: preserve-3d; + transform: @arguments; + transform-style: preserve-3d; +} +.rotate (@rotate) { + -webkit-transform: rotate(@rotate); + -moz-transform: rotate(@rotate); + -ms-transform: rotate(@rotate); + -o-transform: rotate(@rotate); + transform: rotate(@rotate); + } +.rotate3d (@deg1, @deg2:0, @deg3:0){ + -webkit-transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); + -webkit-transform-style: preserve-3d; + -moz-transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); + -moz-transform-style: preserve-3d; + -o-transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); + -o-transform-style: preserve-3d; + transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); + transform-style: preserve-3d; + } +.scale (@scale) { + -webkit-transform: scale(@scale); + -moz-transform: scale(@scale); + -ms-transform: scale(@scale); + -o-transform: scale(@scale); + transform: scale(@scale); + } +.scale (@scale1,@scale2) { + -webkit-transform: scale(@scale1,@scale2); + -moz-transform: scale(@scale1,@scale2); + -ms-transform: scale(@scale1,@scale2); + -o-transform: scale(@scale1,@scale2); + transform: scale(@scale1,@scale2); + } +.scaleX (@scale) { + -webkit-transform: scaleX(@scale); + -moz-transform: scaleX(@scale); + -ms-transform: scaleX(@scale); + -o-transform: scaleX(@scale); + transform: scaleX(@scale); + } +.scaleY (@scale) { + -webkit-transform: scaleY(@scale); + -moz-transform: scaleY(@scale); + -ms-transform: scaleY(@scale); + -o-transform: scaleY(@scale); + transform: scaleY(@scale); + } +.skew (@skew) { + .skewX(@skew); + } +.skew (@skew1, @skew2) { + -webkit-transform: skewX(@skew1) skewY(@skew2); + -moz-transform: skewX(@skew1) skewY(@skew2); + -ms-transform: skewX(@skew1) skewY(@skew2); + -o-transform: skewX(@skew1) skewY(@skew2); + transform: skewX(@skew1) skewY(@skew2); + } +.skewX (@skew) { + -webkit-transform: skewX(@skew); + -moz-transform: skewX(@skew); + -ms-transform: skewX(@skew); + -o-transform: skewX(@skew); + transform: skewX(@skew); + } +.skewY (@skew) { + -webkit-transform: skewY(@skew); + -moz-transform: skewY(@skew); + -ms-transform: skewY(@skew); + -o-transform: skewY(@skew); + transform: skewY(@skew); + } +.translate (@translate) { + -webkit-transform: translate(@translate); + -moz-transform: translate(@translate); + -ms-transform: translate(@translate); + -o-transform: translate(@translate); + transform: translate(@translate); + } +.translate (@translate1, @translate2) { + -webkit-transform: translate(@translate1, @translate2); + -moz-transform: translate(@translate1, @translate2); + -ms-transform: translate(@translate1, @translate2); + -o-transform: translate(@translate1, @translate2); + transform: translate(@translate1, @translate2); + } +.translateX (@translate) { + -webkit-transform: translateX(@translate); + -moz-transform: translateX(@translate); + -ms-transform: translateX(@translate); + -o-transform: translateX(@translate); + transform: translateX(@translate); + } +.translateY (@translate) { + -webkit-transform: translateY(@translate); + -moz-transform: translateY(@translate); + -ms-transform: translateY(@translate); + -o-transform: translateY(@translate); + transform: translateY(@translate); + } + +///* +// * Transition +// * Animate a change between different object states. +// * +// * You can use this class to animate change of up to 5 different properties. +// * If you need more that that (wow!) it's easy to add more of these classes. +// * +// * Transition takes 4 values: +// * -- transition-property - choose a property you want to animate (margin, colour etc.). +// * Default value is "all" which will animate every change that might happen. It's a good +// * idea to explicitly write this value if you want to animate everything, though. We can't +// * be sure if in the future default state won't change to "none", which will break the whole transition. +// * -- transition-duration - specifies how long transition animation will have to take +// * until animation is finished. Put values in s (seconds) or ms (milliseconds). +// * Required value, since default state is 0s (no animation occurs). +// * -- transition-timing-function - this value describe an acceleration function. It can +// * really affect overall experience, so it's good idea to pay attention to that. +// * Timing function takes 4 number values of keywords: linear, ease, ease-in, +// * ease-in-out, ease-out. For further explanation refer to ->developer.mozilla.org/en/CSS/timing-function +// * Default value is "ease". +// * -- transition-delay - in seconds or millisecond describes how long transition will wait +// * until it occurs after a triggering requirement was met. Default value is 0 - instant animation. +// * +// * In case you want to put a transformation property into transition effect, use +// * the .transition-transform class. This class is prepared to automatically add +// * many browsers prefixes required in that case. It is also a bit future friendly, +// * but all at all using transitions on transform is very risky. +// * -> http://radiatingstar.com/transition-with-transform-cant-be-future-proof +// * +// * Usage: +// * For .transition class, put in brackets at least a time value. If you want to animate more than one +// * property or animate everything with different functions, put up to 5 declarations separated with +// * commas. If one of the property you want to animate is "transform" _and_ you want to animate every +// * other properties (or at least not with the same functions), use .transition-transform. As a first +// * value put a time duration for transform property. Do not write this property though. It's auto-added +// * for the first set of values. Add other properties after commas. Refer to the example 3. +// * +// * Browsers support: IE10+, Fx4+, Chrome, Opera, Safari, Opera Mobile, Android Browser +// * Notable lack of support: IE9-, Fx3.6-, Opera Mini +// * *** Transition provides only a visual effects between states. It's perfectly +// * *** safe to use. Users with older browser just won't see a phase of changing. +// * +// * Examples: +// * 1. .transition (all 1s); // Animate all properties for 1 second. +// * 2. .transition (background-color 5s, margin 1s linear 5s) // Animate change of background-color for 5s +// * // and after 5s animate margin change for 1s. +// * 3. .transition-transform (2s linear, padding 3s) // Animate change of transform property (no "transform" declared!) +// * // and padding property. +// * +// * Solution for multiple transitions in a single mixin taken from http://www.toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/ +// */ + +.transition(@transition1, @transition2:X, ...){ + @transitions: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`; + -webkit-transition: @transitions; + -moz-transition: @transitions; + -o-transition: @transitions; + transition: @transitions; +} +.transition-transform (@transformArguments1, @transformArguments2:X, ...) { + @transformArguments: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`; + -webkit-transition: -webkit-transform @transformArguments; + -moz-transition: -moz-transform @transformArguments; + -o-transition: -o-transform @transformArguments; + transition: transform @transformArguments; +} +// FIXME: The specyfic properties also require the unlimited arguments feature. +.transition-property(...) { + -webkit-transition-property: @arguments; + -moz-transition-property: @arguments; + -o-transition-property: @arguments; + transition-property: @arguments; +} +.transition-duration(...) { + -webkit-transition-duration: @arguments; + -moz-transition-duration: @arguments; + -o-transition-duration: @arguments; + transition-duration: @arguments; +} +.transition-timing-function(...) { + -webkit-transition-timing-function: @arguments; + -moz-transition-timing-function: @arguments; + -o-transition-timing-function: @arguments; + transition-timing-function: @arguments; +} +.transition-delay(...) { + -webkit-transition-delay: @arguments; + -moz-transition-delay: @arguments; + -o-transition-delay: @arguments; + transition-delay: @arguments; +} + +///* +// * Animations +// * +// * Create an awesome animation! +// * +// * This class takes from two to five properties: +// * -- animation-name [required] - declare your @keyframes animation name. See below +// * for an easy way to make @keyframes! +// * -- animation-duration [required] - declare how long will it take for an animation +// * to reach end. Value in seconds (s) or milliseconds (ms). +// * -- timing-function - it's the same property as in transition. Refer to +// * that topic for further explanation. +// * -- iteration-count - how many times an animation will repeat. It takes integer +// * or "infinite" keyword (for infinite repetition). Default value is 1. +// * -- direction - indicates whether the animation should play in reverse on +// * alternate cycles. Refer to ->developer.mozilla.org/en/CSS/animation-direction +// * for better explanation. To declare a direction use normal [default value], +// * alternate, reverse or alternate-reverse keyword. +// * +// * Resources: +// * -- developer.mozilla.org/en/CSS/animation +// * +// * Creating @keyframes: +// * Write in your .less file: +// * *** @import 'animationX.less'; +// * where X stands for a number between 1 and 5. Then create a class +// * *** .animationX () {} +// * and in {} write declarations you normally write in @keyframes. +// * Then just put an .animation(animationX [other animation properties]) class in your element. +// * That's all! +// * +// * Example: +// * .toBeAnimated { +// * // Animation with every possible value declared. // +// * .animation(animation1 5s linear 3s infinite alternate); +// * } +// * // Importing prefixed @keyframes for animation1. +// * @import '3L/assets/animations/animation1'; +// * +// * // Declaring @keyframes for animation. Only once! +// * .animation1() { +// * from {margin-top: 3px;} +// * to {margin-top: 333px;} +// * } +// * +// */ + +.animation (...) { + -webkit-animation: @arguments; + -moz-animation: @arguments; + -o-animation: @arguments; + animation: @arguments; + } +.animate (...) {.animation(@arguments);} +.anime (...) {.animation(@arguments);} +// FIXME: The specyfic properties also require the unlimited arguments feature. +.animation-name(...) { + -webkit-animation-name: @arguments; + -moz-animation-name: @arguments; + -o-animation-name: @arguments; + animation-name: @arguments; +} +.animation-duration(...) { + -webkit-animation-duration: @arguments; + -moz-animation-duration: @arguments; + -o-animation-duration: @arguments; + animation-duration: @arguments; +} +.animation-timing-function(...) { + -webkit-animation-timing-function: @arguments; + -moz-animation-timing-function: @arguments; + -o-animation-timing-function: @arguments; + animation-timing-function: @arguments; +} +.animation-delay(...) { + -webkit-animation-delay: @arguments; + -moz-animation-delay: @arguments; + -o-animation-delay: @arguments; + animation-delay: @arguments; +} +.animation-iteration-count(...) { + -webkit-animation-iteration-count: @arguments; + -moz-animation-iteration-count: @arguments; + -o-animation-iteration-count: @arguments; + animation-iteration-count: @arguments; +} +.animation-direction(...) { + -webkit-animation-direction: @arguments; + -moz-animation-direction: @arguments; + -o-animation-direction: @arguments; + animation-direction: @arguments; +} +.animation-fill-mode(...) { + -webkit-animation-fill-mode: @arguments; + -moz-animation-fill-mode: @arguments; + -o-animation-fill-mode: @arguments; + animation-fill-mode: @arguments; +} + +///* +// * User-select +// * controls the selection model and granularity of an element. +// * +// * This property takes following values: +// * -- none - none of the element's content can be selected. +// * -- text [default] - the element's contents follow a standard text content selection model. +// * -- toggle - the element's contents follow a standard toggling content model. +// * -- element - one element at a time may be selected. +// * -- elements - one or more elements at a time may be selected. +// * -- all - Only the entire contents as a whole can be selected. +// * +// * Browsers support: IE10+, Fx0.6+, Chrome, Safari +// * Notable lack of support: IE9-, Opera +// * +// */ + +.user-select (...) { +-webkit-touch-callout: @arguments; +-webkit-user-select: @arguments; +-khtml-user-select: @arguments; +-moz-user-select: @arguments; +-ms-user-select: @arguments; +user-select: @arguments; +} + +///* +// * Filter +// * +// * Advanced image manipulation in your CSS! +// * +// * Note: the filter property works only in Webkit for now. Will the prefixed version for other +// * vendors be supported, is unknown, so the mixin might for now generate useles code. +// * You might want to use just the -webkit-filter property without the help of .filter() mixin. +// * +// * drop-shadow and opacity might be hardware accelerated. +// * +// * Resources: http://www.html5rocks.com/en/tutorials/filters/understanding-css/ +// * +// * TODO: requires testing +// */ +// FIXME: .filter() requires the unlimited arguments feature. +.filter(...) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.grayscale(@amount) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.sepia(@amount) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.saturate(@amount) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.hue-rotation(@angle) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.invert(@amount) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +// .opacity() already taken, hence the -filter suffix. +.opacity-filter(@amount) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.brightness(@amount) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.contrast(@amount) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.blur(@radius) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.drop-shadow(@shadow) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} +.url(@url) { + -webkit-filter: @arguments; + -moz-filter: @arguments; + -ms-filter: @arguments; + -o-filter: @arguments; + filter: @arguments; +} + +///* +// * Border image +// * +// * Browsers support: Chrome, Firefox, Safari, Opera, Chrome for Android, Android Browser, Opera Mobile, Firefox for Android +// * Notable lack of support: IE, Opera Mini +// */ +.border-image(@url, @rest...) { + -webkit-border-image:url(@url) @rest; + -o-border-image:url(@url) @rest; + border-image:url(@url) @rest; +} + +///* +// * Flexible Box Model +// * +// * Resources: https://developer.mozilla.org/en-US/docs/CSS/Using_CSS_flexible_boxes +// * +// * Browsers Support: Chrome, Firefox 18*, Opera 12.1, Opera Mini 12.1 +// * Notable lack of support: IE, Firefox 17 (stable), Safari, Chrome for Android +// */ + +.display-flex() { + display: -webkit-flex; + display: -moz-flex; + display: flex; +} +.display-inline-flex(){ + display: -webkit-inline-flex; + display: -moz-inline-flex; + display: inline-flex; +} +.flex-direction(@direction) { + -webkit-flex-direction: @direction; + -moz-flex-direction: @direction; + flex-direction: @direction; +} +.justify-content(@alignment) { + -webkit-justify-content: @alignment; + -moz-justify-content: @alignment; + justify-content: @alignment; +} +.align-content(@alignment) { + -webkit-align-content: @alignment; + -moz-align-content: @alignment; + align-content: @alignment; +} +.align-items(@alignment) { + -webkit-align-items: @alignment; + -moz-align-items: @alignment; + align-items: @alignment; +} +.align-self(@alignment) { + -webkit-align-self: @alignment; + -moz-align-self: @alignment; + align-self: @alignment; +} +.flex(@arguments){ + -webkit-flex: @arguments; + -moz-flex: @arguments; + flex: @arguments; +} +.flex-basis(@basis) { + -webkit-flex-basis: @basis; + -moz-fles-basis: @basis; + flex-basis: @basis; +} +.flex-grow(@grow) { + -webkit-flex-grow: @grow; + -moz-flex-grow: @grow; + flex-grow: @grow; +} +.flex-shrink(@shrink) { + -webkit-flex-shrink: @shrink; + -moz-flex-shrink: @shrink; + flex-shrink: @shrink; +} +.flex-flow(@arguments) { + -webkit-flex-flow: @arguments; + -moz-flex-flow: @arguments; + flex-flow: @arguments; +} +.flex-direction(@direction) { + -webkit-flex-direction: @direction; + -moz-flex-direction: @direction; + flex-direction: @direction; +} +.flex-wrap(@wrap) { + -webkit-flex-wrap: @wrap; + -moz-flex-wrap: @wrap; + flex-wrap: @wrap; +} +.order(@order) { + -webkit-order: @order; + -moz-order: @order; + order: @order; +} + +///* +// * Appearance +// */ + +.appearance (@appearance) { + -webkit-appearance: @appearance; + -moz-appearance: @appearance; +} + +///* +// * Selection +// * +// * You can use it on the root of your CSS or inside a specyfic element. +// * +// * Examples: +// * 1. .selection(red, blue); +// * 2. p{ +// * .selection(red, blue) +// * } +// */ + +.selection(@text-color, @background-color) { + &::-moz-selection {color: @text-color; background-color: @background-color;} + &::selection {color: @text-color; background-color: @background-color;} +} + +///* +// * hasLayout +// * +// * http://reference.sitepoint.com/css/haslayout +// */ + +.hasLayout() {*zoom: 1;} + +///* +// * Normalize +// */ + +.normalize(){article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}} + +///* +// * Reset +// */ + +.reset() {html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}} + +///* +// * HTML5 Boiler Plate's default stylesheets. +// */ +.h5bp() {html,button,input,select,textarea{color:#222}body{font-size:1em;line-height:1.4}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}} +.h5bp-print() {@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}.przerwa{color:#ff0000;}} + + +.ninja() { + color: black; + visibility: hidden; +} + diff --git a/docs/_themes/jrnl/static/less/docs.less b/docs/_themes/jrnl/static/less/docs.less new file mode 100644 index 00000000..3eaa34b3 --- /dev/null +++ b/docs/_themes/jrnl/static/less/docs.less @@ -0,0 +1,287 @@ +body + { + font-family: "Open Sans", "Helvetica Neue", sans-serif; + font-weight: 300; + color: #333; + background: @white; + } +body:not(.landing) + { + padding:0px 20px; + padding-top: 40px; + h2 + { + margin-top: 40px; + } + } +input + { + background: transparent; + border: 1px solid #999; + .border-radius(3px); + padding: 2px 5px; + color: #666; + font-family: "Open Sans"; + font-weight: 300; + outline: none; + &:focus + { + background: white; + } + } +div.related + { + background: rgba(255,200,200,.2); + } + +* > a.headerlink + { + display: none; + } + +h1, h2, h3, h4, h5, h6 + { + font-weight: 300; + } + +a:link, a:visited + { + color: @orange; + text-decoration: none; + } +a:hover, a:active + { + text-decoration: underline; + color: lighten(@orange, 10); + } + +.literal + { + color: @purple; + font-size: 1em; + background: lighten(@purple-light, 45); + padding: 1px 2px; + .border-radius(2px); + .box-shadow(inset 0px 0px 0px 1px lighten(@purple-light, 30)); + } + +.note + { + .gradient(lighten(@purple-light, 10), lighten(@purple-light-shade, 10)); + .border-radius(5px); + .box-shadow(0px 2px 3px @purple-shade); + padding: 10px 20px 10px 70px; + position: relative; + color: white; + .admonition-title {display: none;} + a { color: lighten(@orange, 30);} + &:before + { + content: ""; + display: block; + .icon; + .icon.info; + position: absolute; + margin: auto; + top: 0; bottom: 0; left: 20px; + } + .literal, .highlight-note + { + color: white; + background: darken(@purple-light, 3); + padding: 1px 3px; + .border-radius(2px); + .box-shadow(inset 0px 0px 0px 1px lighten(@purple-light, 10)); + } + .highlight-note + { + padding: 1px 10px; + pre:before + { + content: "$ "; + color: @orange; + } + } + } + +.highlight + { + background:transparent !important; + } +.highlight-output + { + .pre-block; + background: desaturate(lighten(@terminal,10), 10); + } +.highlight-javascript + { + .pre-block; + background: desaturate(lighten(@terminal,10), 10); + } +.highlight-python + { + .terminal; + pre + { + margin: 0 0 10px 0; + &:before + { + content: "$ "; + color: @orange; + } + } + } + +*:hover > a.headerlink + { + display: inline; + color: lighten(@purple-light, 30); + margin-left: 10px; + text-decoration: none; + &:hover { color: @purple-light; } + } + +tt + { + color: @purple; + font-size: 1.2em; + } +ul li { + margin-bottom: 10px; +} + +div.document + { + max-width: 900px; + margin: 20px auto; + position: relative; + } +div.documentwrapper + { + margin-left: 240px; + padding: 0; + } +aside + { + position: absolute; + width: 220px; + top: 0px; + .logo + { + margin: 0 auto 20px auto; + display: block; + width: 90px; + height: 98px; + } + color: #999; + h2, h3, h3 a:link, h3 a:visited + { + color: #777; + } + + a:link, a:visited + { + color: #999; + } + a:hover, a:active + { + color: @orange; + } + input[type=submit] + { + display: none; + } + &>ul + { + margin: 0 4px; + padding: 0; + list-style: none; + &>li + { + margin-bottom: 10px; + font-size: 18px; + color: #777; + a:link, a:visited {color: #777;} + ul + { + margin: 10px 0 0 0; + padding-left: 20px; + font-size: 16px; + color: #999; + a:link, a:visited {color: #999;} + } + } + } + } + +div.footer + { + font-size: .8em; + text-align: center; + margin: 40px 0; + color: #999; + a:link, a:visited {color: #555;} + } + +@media screen and (max-width: 820px) + { + body:not(.landing){ + padding-top: 130px; + .highlight-output,.highlight-python, .highlight-javascript + { + width: auto; + max-width: 500px; + } + .highlight-python + { + pre { margin: -10px 0 10px 0;} + &:before + { + height: 24px !important; + line-height: 24px; + font-size: .7em; + } + &:after + { + background: none; + } + } + aside + { + position: static; + } + div.documentwrapper + { + margin: 0px; + } + h1, .section + { + margin: 0px !important; + } + aside + { + background-color: #f0f0f0; + width: 100%; + margin: 5px -20px; + padding: 5px 20px 10px 20px; + } + #logolink + { + position: absolute; + top: -120px; + left: 50%; + margin-left: -49px; + } + } + + } +@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx) + { + aside .logo, body#landing #upper #logo + { + width: 90px; + height: 98px; + content: url(../img/logo@2x.png); + } + + } diff --git a/docs/_themes/jrnl/static/less/jrnl.less b/docs/_themes/jrnl/static/less/jrnl.less new file mode 100644 index 00000000..ce597b49 --- /dev/null +++ b/docs/_themes/jrnl/static/less/jrnl.less @@ -0,0 +1,317 @@ +@import "retina"; +@import "3L"; + +@white: #f7f8f9; +@blue: #5e7dc5; +@blue-light: #7c95ca; +@terminal: #2f1e34; +@purple: #47375d; +@purple-shade: #413155; +@purple-light: #725794; +@purple-light-shade: #564371; +@orange: #deaa09; + +.normalize(); +@import "docs.less"; + +.icon, + { + .sprite("../img/icons.png", 32px, 5, 3, 8px); + &.secure {.sprite(0, 0)}; + &.future {.sprite(1, 0)}; + &.search {.sprite(2, 0)}; + &.nli {.sprite(3, 0)}; + &.share {.sprite(0, 1)}; + &.sync {.sprite(0, 1)}; + &.dayone {.sprite(1, 1)}; + &.github {.sprite(2, 1)}; + &.folders{.sprite(3, 1)}; + &.cal {.sprite(4, 1)}; + &.left {.sprite(0, 2)}; + &.right {.sprite(1, 2)}; + &.info {.sprite(2, 2)}; + } + +.pre-block + { + background: @terminal; + .border-radius(6px); + padding: 1px 20px; + margin: 40px auto; + width: 500px; + .box-shadow(0px 1px 8px darken(@white, 30)); + position: relative; + color: @white; + font-family: "Monaco", "Courier New"; + font-size: 12pt; + #args {color: #f6f7b9} + #output {color: #9278b5} + } + +.terminal + { + .pre-block; + @p: 20px; + padding: @p + 30px @p (@p - 10px) @p; + &:before + { + content: "Terminal"; + display: block; + width: 100%; + position: absolute; + left: 0; + .box-shadow(inset 0px 1px 0px #f4f4f4, inset 0px -1px 0px #888); + margin-top: -50px; + // margin: -@p -@p 0px -@p; + text-align: center; + height: 30px; + line-height: 30px; + color: #777; + text-shadow: 0px 1px 0px #ddd; + .border-radius(5px 5px 0px 0px); + .gradient(#eaeaea, #bababa); + } + &:after + { + content: ""; + width: 48px; + height: 30px; + position: absolute; + top: 0px; + left: 10px; + background: url(../img/terminal.png) no-repeat center center; + } + } + +body#landing + { + background-color: @purple; + font-family: "Open Sans", "Helvetica Neue", sans-serif; + font-weight: 300; + #twitter + { + display: block; + position: absolute; + top: 20px; + right: 20px; + border: 1px solid @purple; + padding: 5px 10px 5px 30px; + color: @purple; + .border-radius(3px); + .opacity(.7); + background: url(../img/twitter.png) 8px center no-repeat transparent; + &:hover, &:active + { + .opacity(1); + text-decoration: none; + } + } + #title, .row3, .row4, #prompt + { + width: 900px; + margin: 0px auto; + } + #upper + { + .clearfix; + background: @white; + .box-shadow(inset 0px -6px 6px -3px darken(@white, 10)); + #title + { + width: 650px; + margin: 150px auto 75px auto; + } + img + { + float: left; + margin-right: 30px; + } + h1 + { + color: @purple-light-shade; + font-weight: 300; + } + #prompt + { + width: 640px; + margin: 0 auto; + .clearfix; + } + .terminal + { + .border-radius(6px 6px 0px 0px); + float: left; + margin: 0px; + width: 500px; + min-height: 134px; + .border-box-sizing; + } + .pleft, .pright + { + text-align: center; + .border-box-sizing; + float: left; + padding-top: 50px; + width: 70px; + i {.opacity(60);} + i:hover {.opacity(1000); cursor: pointer;} + } + } + #nav + { + .gradient(@blue-light, @blue); + height: 60px; + .box-shadow(0px 6px 6px -3px @purple-shade); + text-align: center; + a#twitter-nav {display: none;} + a + { + color: @white; + text-shadow: 0px -1px 0px darken(@blue, 30); + text-decoration: none; + font-size: 14pt; + line-height: 60px; + margin: 0 40px; + &:hover + { + color: lighten(@orange, 20); + text-shadow: 0px -1px 0px darken(@orange, 15); + } + } + a.cta + { + .gradient(@purple-light, @purple-light-shade); + .box-shadow(0px 1px 0px @purple-shade); + .border-radius(5px); + padding: 6px 10px 5px 10px; + white-space: nowrap; + &:hover + { + .gradient(lighten(@orange, 10), darken(@orange, 5)); + .box-shadow(0px 1px 0px darken(@orange, 15)); + text-shadow: 0px -1px 0px darken(@orange, 15); + color: @white; + + } + } + } + #lower + { + color: @white; + padding-top: 40px; + a + { + color: @orange; + text-decoration: none; + &:hover + { + color: lighten(@orange, 20); + text-decoration: underline; + } + } + .row3, .row4 { + .clearfix; + margin-bottom: 20px; + .col + { + position: relative; + padding-left: 40px; + i + { + position: absolute; + left: 0; + top: 16px; + } + h3 {font-size: 12pt; margin-bottom: .5em;} + p {font-size: 10pt; margin: 0;} + float: left; + width: 25%; + padding-right: 2%; + .border-box-sizing; + &:last-child {padding-right: 0;} + } + } + .row3 .col { width: 33.3333%; } + .row4 .col { color: mix(@white, @purple, 80); i {.opacity(80);}} + } + } + +@media screen and (max-width: 680px) + { + body#landing + { + #nav + { + height: auto; + padding-bottom: 10px; + a, a#twitter-nav + { + display: block; + } + a.cta + { + margin: 10px; + padding: 1px; + } + } + #upper + { + #twitter { display: none;} + #title + { + margin: 30px 0 10px 0; + } + #logo + { + backgound: red; + display: block; + float: none; + margin: 0px auto; + } + #title br {display: none;} + .pleft, .pright {display: none;} + #prompt, #title + { + width: 100%; + .border-box-sizing; + padding: 0px 20px; + } + .terminal + { + width: 100%; + } + } + } + } + +@media screen and (max-width: 900px) + { + body#landing + { + #lower + { + padding: 40px 20px; + .row3, .row4 + { + margin: 0px; + width: auto; + } + .row3 .col, .row4 .col + { + float: none; + width: 100%; + text-align: center; + padding: 0px; + margin: 0 0 40px 0; + h3 {font-size: 1.5em;} + p {font-size: 1em;} + + i + { + position: static; + margin-bottom: -20px; + } + } + } + } + } diff --git a/docs/_themes/jrnl/static/less/retina.less b/docs/_themes/jrnl/static/less/retina.less new file mode 100644 index 00000000..3c006c45 --- /dev/null +++ b/docs/_themes/jrnl/static/less/retina.less @@ -0,0 +1,35 @@ +// A helper mixin for applying high-resolution background images (http://www.retinajs.com) + +@highdpi: ~"(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)"; + +.at2x(@path, @w: auto, @h: auto) { + background-image: url(@path); + @at2x_path: ~`@{path}.replace(/\.\w+$/, function(match) { return "@2x" + match; })`; + background-size: @w @h; + + @media @highdpi { + background-image: url("@{at2x_path}"); + } +} + +// Sprite mixin, see https://coderwall.com/p/oztebw + +.sprite (@path, @size, @w, @h, @pad: 0) when (isstring(@path)) + { + background-image: url(@path); + width: @size; + height: @size; + display: inline-block; + @at2x_path: ~`@{path}.replace(/\.[\w\?=]+$/, function(match) { return "@2x" + match; })`; + font-size: @size + @pad; + background-size: (@size + @pad) * @w (@size + @pad) * @h; + @media @highdpi + { + background-image: url("@{at2x_path}"); + } + } + +.sprite(@x, @y) + { + background-position: -@x * 1em -@y * 1em; + } diff --git a/docs/_themes/jrnl/static/sprites.svg b/docs/_themes/jrnl/static/sprites.svg new file mode 100755 index 00000000..a8420b9b --- /dev/null +++ b/docs/_themes/jrnl/static/sprites.svg @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: IcoMoon.io --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1008" + height="48" + viewBox="0 0 1008 48" + data-tags="bookmark" + style="margin-left: -8px; margin-top: -8px;" + fill="#333333" + id="svg2" + version="1.1" + inkscape:version="0.48.2 r9819" + sodipodi:docname="sprites.svg"> + <metadata + id="metadata30"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs28" /> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1562" + inkscape:window-height="1153" + id="namedview26" + showgrid="true" + inkscape:zoom="2.7460317" + inkscape:cx="651.02496" + inkscape:cy="38.446605" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg2"> + <inkscape:grid + type="xygrid" + id="grid3007" /> + </sodipodi:namedview> + <path + d="M 141.818,22.909l-15.273-6.545l 6.105-4.361C 129.469,8.651, 124.985,6.545, 120,6.545 C 111.545,6.545, 104.5,12.556, 102.892,20.535L 98.819,18.849C 101.136,9.29, 109.728,2.182, 120,2.182c 6.452,0, 12.227,2.819, 16.224,7.27L 141.818,5.455L 141.818,22.909 z M 107.35,35.998C 110.529,39.349, 115.015,41.455, 120,41.455c 8.487,0, 15.552-6.057, 17.123-14.084l 4.069,1.741C 138.888,38.69, 130.287,45.818, 120,45.818 c-6.452,0-12.229-2.819-16.224-7.27L 98.182,42.545l0-17.455 l 15.273,6.545L 107.35,35.998z" + id="path6" /> + <path + d="M 224.71875 2.09375 L 224.71875 10.8125 C 224.71875 10.8125 201.34725 10.877 200.78125 36.125 C 201.12625 32.307 203.78675 17.375 224.71875 17.375 L 224.71875 23.90625 L 240 13 L 224.71875 2.09375 z M 198 7 C 194.676 7 192 9.676 192 13 L 192 40 C 192 43.324 194.676 46 198 46 L 229 46 C 232.324 46 235 43.324 235 40 L 235 23 L 232 25 L 232 40 C 232 41.662 230.662 43 229 43 L 198 43 C 196.338 43 195 41.662 195 40 L 195 13 C 195 11.338 196.338 10 198 10 L 210 10 L 217 7 L 198 7 z " + id="path8" /> + <path + d="M 318,0.007c-9.941,0-18,8.059-18,18c0,3.039, 0.76,5.899, 2.093,8.412l-12.516,12.513l 0.011,0.009 C 288.609,39.903, 288,41.235, 288,42.715c0,2.924, 2.37,5.293, 5.293,5.293c 1.478,0, 2.811-0.609, 3.772-1.588l-0.003-0.003l 12.511-12.51 c 2.514,1.337, 5.379,2.1, 8.425,2.1c 9.941,0, 18-8.059, 18-18C 336,8.067, 327.941,0.007, 318,0.007z M 295.192,44.545 c-0.483,0.501-1.152,0.815-1.899,0.815c-1.462,0-2.647-1.183-2.647-2.646c0-0.747, 0.315-1.414, 0.815-1.899l-0.013-0.012l 12.099-12.099 c 1.057,1.426, 2.317,2.686, 3.741,3.747L 295.192,44.545z M 318,33.009c-8.283,0-15-6.719-15-15c0-8.283, 6.717-15, 15-15 c 8.281,0, 15,6.717, 15,15C 333,26.291, 326.282,33.009, 318,33.009zM 318,7.508 C 318.412,7.508 318.75,7.844 318.75,8.258 C 318.75,8.671 318.412,9.008 318,9.008 C 313.029,9.008 309,13.038 309,18.008 C 309,18.422 308.664,18.758 308.25,18.758 C 307.836,18.758 307.5,18.422 307.5,18.008 C 307.5,12.208 312.2,7.508 318,7.508 Z" + id="path10" /> + <path + d="M 421.5,19.5L 421.5,13.5 c0-7.457-6.043-13.5-13.5-13.5c-7.457,0-13.5,6.043-13.5,13.5l0,6 c-2.486,0-4.5,2.014-4.5,4.5l0,4.5 l0,1.5 l0,3 l0,1.5 c0,7.457, 6.043,13.5, 13.5,13.5l 9,0 c 7.457,0, 13.5-6.043, 13.5-13.5l0-1.5 l0-3 l0-1.5 l0-4.5 C 426,21.513, 423.984,19.5, 421.5,19.5z M 397.5,13.5c0-5.799, 4.701-10.5, 10.5-10.5c 5.799,0, 10.5,4.701, 10.5,10.5l0,6 l-3,0 L 415.5,13.503 c0-4.143-3.357-7.5-7.5-7.5c-4.143,0-7.5,3.357-7.5,7.5L 400.5,19.5 L 397.5,19.5 L 397.5,13.5 z M 414,13.5l0,0.005 L 414,19.5 l-12,0 L 402,13.503 L 402,13.5 c0-3.314, 2.686-6, 6-6C 411.313,7.5, 414,10.187, 414,13.5z M 423,28.5 l0,1.5 l0,3 l0,1.5 c0,5.788-4.712,10.5-10.5,10.5l-9,0 c-5.788,0-10.5-4.712-10.5-10.5l0-1.5 l0-3 l0-1.5 l0-4.5 c0-0.828, 0.672-1.5, 1.5-1.5c 1.001,0, 1.999,0, 3,0l 21,0 c 0.999,0, 1.998,0, 3,0 c 0.827,0, 1.5,0.672, 1.5,1.5L 423,28.5 zM 408,28.5 C 409.656,28.5 411,29.843 411,31.5 C 411,32.413 410.508,34.152 410.001,35.523 C 409.591,36.63 409.173,37.497 408,37.497 C 406.922,37.497 406.409,36.621 406,35.508 C 405.5,34.14 405,32.41 405,31.5 C 405,29.843 406.344,28.5 408,28.5 Z" + id="path12" /> + <path + d="M 524.093,3.87C 521.625,1.405, 518.376,0, 515.174,0c-2.701,0-5.189,1.002-7.005,2.816l-7.3,7.356 c-0.022,0.021-0.048,0.035-0.071,0.057c-0.012,0.012-0.019,0.028-0.032,0.039l 0.003,0.003L 485.276,25.884 c-0.714,0.71-1.232,1.593-1.519,2.558l-3.524,12.762C 480.229,41.238, 480,42.24, 480,42.75C 480,45.648, 482.353,48, 485.256,48 c 0.578,0, 1.695-0.276, 1.736-0.282l 12.717-3.344c 0.966-0.286, 1.844-0.808, 2.558-1.524l 22.895-23.075 C 529.325,15.609, 528.855,8.625, 524.093,3.87z M 504.021,35.693c-0.123-1.353-0.506-2.68-1.079-3.94l 14.183-14.181 c 0.867,2.739, 0.422,5.604-1.479,7.506c-0.012,0.012-0.027,0.019-0.038,0.032l 0.021,0.019l-11.592,11.685 C 504.037,36.439, 504.055,36.073, 504.021,35.693z M 502.189,30.384c-0.559-0.919-1.196-1.808-1.983-2.594 c-0.916-0.916-1.968-1.635-3.066-2.238l 14.298-14.298c 1.122,0.498, 2.198,1.208, 3.147,2.157c 0.812,0.808, 1.438,1.715, 1.921,2.656 L 502.189,30.384z M 495.729,24.843c-1.389-0.559-2.844-0.879-4.302-0.898l 11.555-11.643c 1.768-1.725, 4.344-2.222, 6.88-1.593 L 495.729,24.843z M 486.25,44.809C 486.087,44.847, 485.579,44.976, 485.233,45C 484,44.985, 483,43.983, 483,42.75 c 0.018-0.252, 0.118-0.685, 0.153-0.843l 1.579-5.721c 1.715-0.046, 3.56,0.621, 5.010,2.075c 1.473,1.47, 2.166,3.351, 2.091,5.087 L 486.25,44.809z M 493.311,42.956c-0.036-2.013-0.855-4.107-2.508-5.757C 489.24,35.634, 487.194,34.731, 485.154,34.65l 1.494-5.411 c 0.108-0.36, 0.323-0.716, 0.587-1.026c 3.009-2.154, 7.636-1.518, 10.851,1.7c 3.401,3.399, 3.925,8.379, 1.306,11.352 c-0.174,0.091-0.35,0.178-0.538,0.234L 493.311,42.956z M 523.036,17.658l-2.526,2.546c0-0.339, 0.041-0.664, 0.009-1.011 c-0.264-2.902-1.617-5.709-3.815-7.904c-2.444-2.445-5.684-3.848-8.892-3.857l 2.484-2.505C 511.541,3.687, 513.276,3, 515.174,3 c 2.413,0, 4.893,1.092, 6.8,2.993c 1.79,1.787, 2.856,4.006, 3.009,6.252C 525.123,14.34, 524.431,16.261, 523.036,17.658z" + id="path14" /> + <path + d="M 600,10.5 C 600.414,10.5 600.75,10.836 600.75,11.25 C 600.75,11.664 600.412,12 600,12 C 592.009,12 585,16.206 585,21 C 585,21.414 584.664,21.75 584.25,21.75 C 583.836,21.75 583.5,21.414 583.5,21 C 583.5,15.309 591.056,10.5 600,10.5 ZM 600,3C 586.745,3, 576,11.059, 576,21c0,6.191, 4.168,11.649, 10.512,14.889 C 586.512,35.929, 586.5,35.956, 586.5,36c0,2.689-2.008,5.585-2.892,7.104c 0.002,0, 0.003,0, 0.003,0C 583.54,43.269, 583.5,43.45, 583.5,43.641 C 583.5,44.391, 584.107,45, 584.859,45C 585,45, 585.248,44.963, 585.241,44.979c 4.688-0.768, 9.104-5.075, 10.13-6.322C 596.87,38.877, 598.415,39, 600,39 c 13.253,0, 24-8.059, 24-18C 624,11.059, 613.254,3, 600,3z M 600,36c-1.376,0-2.787-0.105-4.194-0.31c-0.146-0.024-0.291-0.032-0.435-0.032 c-0.891,0-1.744,0.396-2.319,1.095c-0.642,0.782-2.469,2.526-4.627,3.809c 0.585-1.343, 1.042-2.847, 1.074-4.398 c 0.009-0.096, 0.013-0.194, 0.013-0.276c0-1.128-0.631-2.159-1.635-2.671C 582.318,30.378, 579,25.811, 579,21C 579,12.729, 588.42,6, 600,6 c 11.577,0, 21,6.729, 21,15C 621,29.271, 611.579,36, 600,36z" + id="path16" /> + <path + d="M 774 0 L 771 26.84375 L 773.96875 27.15625 L 776.65625 3 L 807.34375 3 L 810.03125 27.15625 L 813 26.84375 L 810 0 L 774 0 z M 780 6 L 780 9 L 804 9 L 804 6 L 780 6 z M 780 12 L 780 15 L 804 15 L 804 12 L 780 12 z M 780 18 L 780 21 L 804 21 L 804 18 L 780 18 z M 780 24 L 780 27 L 804 27 L 804 24 L 780 24 z M 769.5 30 C 768.675 30 768.20775 30.6545 768.46875 31.4375 L 773.53125 46.5625 C 773.79225 47.3455 774.675 48 775.5 48 L 808.5 48 C 809.325 48 810.20775 47.3455 810.46875 46.5625 L 815.53125 31.4375 C 815.79325 30.6545 815.325 30 814.5 30 L 769.5 30 z M 786 33 L 798 33 L 798 36 L 786 36 L 786 33 z " + id="path20" /> + <path + d="M 888 0 C 874.745 0 864 10.745 864 24 C 864 37.255 874.745 48 888 48 C 901.255 48 912 37.255 912 24 C 912 10.745 901.255 0 888 0 z M 888 3 C 899.59798 3 909 12.402018 909 24 C 909 33.513233 902.67471 41.543499 894 44.125 L 894 43.25 L 894 41.53125 L 894 39.65625 C 894 37.76525 893.32825 36.35975 892.03125 35.46875 C 892.84425 35.39075 893.60225 35.29625 894.28125 35.15625 C 894.96025 35.01625 895.6795 34.8275 896.4375 34.5625 C 897.1955 34.2975 897.86675 33.96075 898.46875 33.59375 C 899.07075 33.22675 899.66475 32.74225 900.21875 32.15625 C 900.77275 31.57025 901.21875 30.9295 901.59375 30.1875 C 901.96875 29.4455 902.281 28.539 902.5 27.5 C 902.719 26.461 902.8125 25.3125 902.8125 24.0625 C 902.8125 21.6405 902.04675 19.579 900.46875 17.875 C 901.18775 16 901.09375 13.953 900.21875 11.75 L 899.625 11.6875 C 899.219 11.6405 898.4915 11.82775 897.4375 12.21875 C 896.3835 12.60975 895.21925 13.234 893.90625 14.125 C 892.04725 13.609 890.09375 13.375 888.09375 13.375 C 886.07775 13.375 884.17175 13.61 882.34375 14.125 C 881.51575 13.562 880.742 13.118 880 12.75 C 879.258 12.383 878.66375 12.133 878.21875 12 C 877.77375 11.867 877.35175 11.781 876.96875 11.75 C 876.58575 11.719 876.32775 11.70275 876.21875 11.71875 C 876.10975 11.73475 876.046 11.76525 876 11.78125 C 875.125 14.00025 875.031 16.016 875.75 17.875 C 874.172 19.578 873.375 21.6405 873.375 24.0625 C 873.375 25.3125 873.49975 26.461 873.71875 27.5 C 873.93775 28.539 874.21875 29.4455 874.59375 30.1875 C 874.96875 30.9295 875.445 31.57025 876 32.15625 C 876.555 32.74225 877.149 33.22575 877.75 33.59375 C 878.351 33.96175 879.02325 34.2975 879.78125 34.5625 C 880.53925 34.8275 881.0085 35.01625 881.6875 35.15625 C 882.3665 35.29625 883.1255 35.422 883.9375 35.5 C 882.6565 36.375 882 37.75025 882 39.65625 L 882 41.34375 L 882 43.3125 L 882 44.125 C 873.3253 41.543499 867 33.513233 867 24 C 867 12.402018 876.40203 3 888 3 z " + id="path22" /> + <path + d="M 978.072,25.441c-0.267,0.386-0.593,1.352-0.978,1.588c-0.386,0.235-0.821,0.401-1.304,0.492 c-0.485,0.093-0.986,0.134-1.503,0.118l0,2.29 l 3.7,0 L 977.988,39 l 2.987,0 l0-14.994 l-2.376,0 C 978.514,24.578, 978.339,25.056, 978.072,25.441z M 994.5,12l 3,0 c 0.83,0, 1.5-0.672, 1.5-1.5L 999,1.5 c0-0.828-0.67-1.5-1.5-1.5l-3,0 c-0.83,0-1.5,0.672-1.5,1.5l0,9 C 993,11.328, 993.67,12, 994.5,12z M 970.5,12l 3,0 c 0.828,0, 1.5-0.672, 1.5-1.5L 975,1.5 c0-0.828-0.672-1.5-1.5-1.5L 970.5,0 C 969.672,0, 969,0.672, 969,1.5l0,9 C 969,11.328, 969.672,12, 970.5,12z M 1005,6l-3,0 l0,7.5 c0,0.828-0.67,1.5-1.5,1.5l-9,0 c-0.83,0-1.5-0.672-1.5-1.5L 990,6 l-12,0 l0,7.5 c0,0.828-0.672,1.5-1.5,1.5L 967.5,15 c-0.828,0-1.5-0.672-1.5-1.5L 966,6 L 963,6 C 961.344,6, 960,7.344, 960,9l0,36 c0,1.656, 1.344,3, 3,3l 42,0 c 1.656,0, 3-1.344, 3-3L 1008,9 C 1008,7.344, 1006.656,6, 1005,6z M 1005,43.5c0,0.83-0.67,1.5-1.5,1.5L 964.5,45 c-0.828,0-1.5-0.67-1.5-1.5L 963,19.5 c0-0.828, 0.672-1.5, 1.5-1.5l 39,0 c 0.83,0, 1.5,0.672, 1.5,1.5L 1005,43.5 z M 983.977,26.973l 7.452,0 c-1.404,1.728-2.534,3.488-3.397,5.558c-0.862,2.071-0.957,4.227-1.123,6.468l 3.196,0 c 0.013-0.999-0.292-2.078-0.076-3.234c 0.219-1.157, 0.528-2.298, 0.925-3.428c 0.401-1.128, 0.897-2.192, 1.494-3.19 c 0.594-1.001, 1.28-1.844, 2.050-2.529l0-2.613 l-10.522,0 L 983.976,26.973 z" + id="path24" /> + <path + style="fill:#333333;fill-opacity:1;stroke:none" + d="M 9.46875,0 C 6.437316,0 4,2.4373158 4,5.46875 l 0,37.0625 C 4,45.562684 6.437316,48 9.46875,48 l 29.0625,0 C 41.562684,48 44,45.562684 44,42.53125 L 44,5.46875 C 44,2.4373158 41.562684,0 38.53125,0 z M 11,3 l 2,0 0,42 -2,0 C 8.784,45 7,43.216 7,41 L 7,7 C 7,4.784 8.784,3 11,3 z m 5,0 11,0 0,13 4,-3 4,3 0,-13 2,0 c 2.216,0 4,1.784 4,4 l 0,34 c 0,2.216 -1.784,4 -4,4 l -21,0 z" + id="rect3009" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ssssssssssccssssccccccsssscc" /> + <path + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#333333;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" + d="M 697 -1 C 696.25371 -1 695.55642 -0.73689699 695 -0.28125 C 694.44358 0.17439699 694 0.87583597 694 1.71875 L 694 3 L 693 3 L 693 4 L 687.5 4 C 687.448 3.99729 687.39579 3.99729 687.34375 4 C 686.61183 4.0767148 685.99606 4.7640806 686 5.5 L 686 6 L 684.5 6 C 683.71462 6.0000785 683.00008 6.7146233 683 7.5 L 683 8.09375 C 682.42224 8.2980557 682.0033 8.8871877 682 9.5 L 682 12.5 C 682.00008 13.285377 682.71462 13.999921 683.5 14 L 686 14 L 686 39 L 684.75 40.1875 C 684.29266 40.451552 683.9953 40.971929 684 41.5 L 684 44.5 C 684.00008 45.285377 684.71462 45.999921 685.5 46 L 693.40625 46 L 700.5 46 L 700.65625 46 L 708.5 46 C 709.28538 45.999921 709.99992 45.285377 710 44.5 L 710 41.5 C 710.005 40.971929 709.70734 40.451552 709.25 40.1875 L 708 39 L 708 14 L 710.5 14 C 711.28538 13.999921 711.99992 13.285377 712 12.5 L 712 9.5 C 711.997 8.8871877 711.57776 8.2980557 711 8.09375 L 711 7.5 C 710.99992 6.7146233 710.28538 6.0000785 709.5 6 L 708 6 L 708 5.5 C 707.99992 4.7146233 707.28538 4.0000785 706.5 4 L 701 4 L 701 3 L 700 3 L 700 1.71875 C 700 0.87583597 699.55642 0.17439702 699 -0.28125 C 698.44358 -0.73689702 697.74629 -1 697 -1 z M 697 1 C 697.20585 1 697.5132 1.1129297 697.71875 1.28125 C 697.9243 1.4495703 698 1.6095221 698 1.71875 L 698 3 L 696 3 L 696 1.71875 C 696 1.6095221 696.0757 1.4495702 696.28125 1.28125 C 696.4868 1.1129298 696.79415 1 697 1 z M 688 7 L 706 7 L 706 8 L 708 8 C 707.9472 8.7370898 708.11489 9.2632977 709 9.0625 L 709 12 L 705 12 L 689 12 L 685 12 L 685 9.15625 C 685.81891 9.2047089 685.94068 8.6267293 686 8 L 688 8 L 688 7 z M 689 14 L 705 14 L 705 41 L 707 42.375 L 707 43 L 687 43 L 687 42.375 L 689 41 L 689 14 z M 691 16 L 691 20 L 693 20 L 693 16 L 691 16 z M 694 16 L 694 20 L 696 20 L 696 16 L 694 16 z M 698 16 L 698 20 L 700 20 L 700 16 L 698 16 z M 701 16 L 701 20 L 703 20 L 703 16 L 701 16 z M 691 21 L 691 25 L 693 25 L 693 21 L 691 21 z M 694 21 L 694 25 L 696 25 L 696 21 L 694 21 z M 698 21 L 698 25 L 700 25 L 700 21 L 698 21 z M 701 21 L 701 25 L 703 25 L 703 21 L 701 21 z M 699.375 29.625 C 698.61451 29.625 698 30.239511 698 31 C 698 31.760489 698.61451 32.375 699.375 32.375 C 700.13549 32.375 700.75 31.760489 700.75 31 C 700.75 30.239511 700.13549 29.625 699.375 29.625 z " + id="path3858" /> +</svg> diff --git a/docs/_themes/jrnl/theme.conf b/docs/_themes/jrnl/theme.conf new file mode 100755 index 00000000..fc3d3735 --- /dev/null +++ b/docs/_themes/jrnl/theme.conf @@ -0,0 +1,7 @@ +[theme] +inherit = basic +stylesheet = css/jrnl.css +pygments_style = flask_theme_support.FlaskyStyle + +[options] +touch_icon = diff --git a/docs/advanced.rst b/docs/advanced.rst new file mode 100644 index 00000000..10c204b7 --- /dev/null +++ b/docs/advanced.rst @@ -0,0 +1,100 @@ +.. _advanced: + +Advanced Usage +============== + +Configuration File +------------------- + +The configuration file is a simple JSON file with the following options. + +- ``journals`` + paths to your journal files +- ``editor`` + if set, executes this command to launch an external editor for writing your entries, e.g. ``vim`` or ``subl -w`` (note the ``-w`` flag to make sure _jrnl_ waits for Sublime Text to close the file before writing into the journal. If you're using MacVim, that would be ``mvim -f``). +- ``encrypt`` + if ``true``, encrypts your journal using AES. +- ``tagsymbols`` + Symbols to be interpreted as tags. (__See note below__) +- ``default_hour`` and ``default_minute`` + if you supply a date, such as ``last thursday``, but no specific time, the entry will be created at this time +- ``timeformat`` + how to format the timestamps in your journal, see the [python docs](http://docs.python.org/library/time.html#time.strftime) for reference +- ``highlight`` + if ``true``, tags will be highlighted in cyan. +- ``linewrap`` + controls the width of the output. Set to ``false`` if you don't want to wrap long lines. + +.. note:: + + Although it seems intuitive to use the `#` character for tags, there's a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type + + .. code-block:: note + + jrnl Implemented endless scrolling on the #frontend of our website. + + your bash will chop off everything after the ``#`` before passing it to _jrnl_). To avoid this, wrap your input into quotation marks like this: + + .. code-block:: note + + jrnl "Implemented endless scrolling on the #frontend of our website." + + Or use the built-in prompt or an external editor to compose your entries. + +DayOne Integration +------------------ + +Using your DayOne journal instead of a flat text file is dead simple - instead of pointing to a text file, change your `.jrnl_conf` to point to your DayOne journal. This is a folder ending with `.dayone`, and it's located at + +* ``~/Library/Application Support/Day One/`` by default +* ``~/Dropbox/Apps/Day One/`` if you're syncing with Dropbox and +* ``~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/`` if you're syncing with iCloud. + +Instead of all entries being in a single file, each entry will live in a separate `plist` file. You can also star entries when you write them: + + jrnl -star yesterday: Lunch with @Arthur + +Multiple journal files +---------------------- + +You can configure _jrnl_ to use with multiple journals (eg. ``private`` and ``work``) by defining more journals in your ``.jrnl_config``, for example: + +.. code-block:: javascript + + { + ... + "journals": { + "default": "~/journal.txt", + "work": "~/work.txt" + } + } + +The ``default`` journal gets created the first time you start _jrnl_. Now you can access the ``work`` journal by using ``jrnl work`` instead of ``jrnl``, eg. :: + + jrnl work at 10am: Meeting with @Steve + jrnl work -n 3 + +will both use ``~/work.txt``, while ``jrnl -n 3`` will display the last three entries from ``~/journal.txt`` (and so does ``jrnl default -n 3``). + +You can also override the default options for each individual journal. If you ``.jrnl_conf`` looks like this: + +.. code-block:: javascript + + { + ... + "encrypt": false + "journals": { + "default": "~/journal.txt", + "work": { + "journal": "~/work.txt", + "encrypt": true + }, + "food": "~/my_recipes.txt", + } + +Your ``default`` and your ``food`` journals won't be encrypted, however your ``work`` journal will! You can override all options that are present at the top level of ``.jrnl_conf``, just make sure that at the very least you specify a ``"journal": ...`` key that points to the journal file of that journal. + +.. note:: + + Changing ``encrypt`` to a different value will not encrypt or decrypt your journal file, it merely says whether or not your journal `is` encrypted. Hence manually changing this option will most likely result in your journal file being impossible to load. + diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..5ac4da07 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,254 @@ +# -*- coding: utf-8 -*- +# +# jrnl documentation build configuration file, created by +# sphinx-quickstart on Wed Aug 7 13:22:51 2013. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os +sys.path.insert(0, os.path.abspath('..')) +import jrnl +from jrnl import __version__ + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'jrnl' +copyright = u'Journal is made with love by <a href="http://www.1450.me">Manuel Ebert</a> and <a href="https://github.com/maebert/jrnl/graphs/contributors" title="Contributtors">other fabulous people</a>. If you need help, tweet to <a href="https://twitter.com/maebert" title="Follow @maebert on twitter">@maebert</a> or <a href="https://github.com/maebert/jrnl/issues/new" title="Open a new issue on Github">submit an issue</a> on Github.' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = __version__ +# The full version, including alpha/beta/rc tags. +release = version + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'native' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'jrnl' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# "<project> v<release> documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = False + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a <link> tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'jrnldoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'jrnl.tex', u'jrnl Documentation', + u'Manuel Ebert', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'jrnl', u'jrnl Documentation', + [u'Manuel Ebert'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'jrnl', u'jrnl Documentation', + u'Manuel Ebert', 'jrnl', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False +sys.path.append(os.path.abspath('_themes')) +html_theme_path = ['_themes'] +html_theme = 'jrnl' diff --git a/docs/encryption.rst b/docs/encryption.rst new file mode 100644 index 00000000..ebb54865 --- /dev/null +++ b/docs/encryption.rst @@ -0,0 +1,39 @@ +.. _encryption: + +Encryption +========== + +Encrypting and decrypting +------------------------- + + +If you don't choose to encrypt your file when you run `jrnl` for the first time, you can encrypt your existing journal file or change its password using :: + + jrnl --encrypt + +If it is already encrypted, you will first be asked for the current password. You can then enter a new password and your plain journal will replaced by the encrypted file. Conversely, :: + + jrnl --decrypt + +will replace your encrypted journal file by a Journal in plain text. You can also specify a filename, ie. `jrnl --decrypt plain_text_copy.txt`, to leave your original file untouched. + + +Storing passwords in your keychain +---------------------------------- + +Whenever you encrypt your journal, you are asked whether you want to store the encryption password in your keychain. If you do this, you won't have to enter your password every time you want to write or read your journal. + +If you don't initially store the password in the keychain but decide to do so at a later point -- or maybe want to store it on one computer but not on another -- you can simply run `jrnl --encrypt` on an encrypted journal and use the same password again. + + +Manual decryption +----------------- + +Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm. The key used for encryption is the SHA-256-hash of your password, and the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. So, to decrypt a journal file in python, run:: + + import hashlib, Crypto.Cipher + key = hashlib.sha256(my_password).digest() + with open("my_journal.txt") as f: + cipher = f.read() + crypto = AES.new(key, AES.MODE_CBC, iv = cipher[:16]) + plain = crypto.decrypt(cipher[16:]) diff --git a/docs/export.rst b/docs/export.rst new file mode 100644 index 00000000..4a040b09 --- /dev/null +++ b/docs/export.rst @@ -0,0 +1,67 @@ +.. _export: + +Import and Export +================= + +Tag export +---------- + +With:: + + jrnl --tags + +you'll get a list of all tags you used in your journal, sorted by most frequent. Tags occurring several times in the same entry are only counted as one. + +List of all entries +------------------- + + jrnl --short + +Will only display the date and title of each entry. + +JSON export +----------- + +Can do:: + + jrnl --export json + +Why not create a `beautiful timeline <http://timeline.verite.co/>`_ of your journal? + +Markdown export +--------------- + +Use:: + + jrnl --export markdown + +Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice. + +Text export +----------- + +:: + + jrnl --export text + +Pretty-prints your entire journal. + +Export to files +--------------- + +You can specify the output file of your exported journal using the `-o` argument:: + + jrnl --export md -o journal.md + +The above command will generate a file named `journal.md`. If the `-o` argument is a directory, jrnl will export each entry into an individual file:: + + jrnl --export json -o my_entries/ + +The contents of `my_entries/` will then look like this: + +.. code-block:: output + + my_entries/ + |- 2013_06_03_a-beautiful-day.json + |- 2013_06_07_dinner-with-gabriel.json + |- ... diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..c7d7119b --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +.. jrnl documentation master file, created by + sphinx-quickstart on Wed Aug 7 13:22:51 2013. + +jrnl: The command-line journal +============================== + +Release v\ |version|. + +Contents: + +.. toctree:: + :maxdepth: 3 + + overview + installation + usage + encryption + export + advanced + recipes diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 00000000..709eb9c3 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,41 @@ +.. _download: + +Getting started +=============== + +Installation +------------ + +Install *jrnl* using pip :: + + pip install jrnl + +Or, if you want the option to encrypt your journal, :: + + pip install jrnl[encrypted] + +to install the dependencies for encrypting journals as well. + +.. note:: + + Installing the encryption library, `pycrypto`, requires a `gcc` compiler. For this reason, jrnl will not install `pycrypto` unless explicitly told so like this. You can `install PyCyrypto manually <https://www.dlitz.net/software/pycrypto/>`_ first or install it with ``pip install pycrypto`` if you have a `gcc` compiler. + +The first time you run ``jrnl`` you will be asked where your journal file should be created and whether you wish to encrypt it. + + +Quickstart +---------- + +to make a new entry, just type:: + + jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book. + +and hit return. ``yesterday:`` will be interpreted as a time stamp. Everything until the first sentence mark (``.?!:``) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this: + +.. code-block:: output + + 2012-03-29 09:00 Called in sick. + Used the time to clean the house and spent 4h on writing my book. + +If you just call ``jrnl``, you will be prompted to compose your entry - but you can also configure *jrnl* to use your external editor. + diff --git a/docs/overview.rst b/docs/overview.rst new file mode 100644 index 00000000..532fde36 --- /dev/null +++ b/docs/overview.rst @@ -0,0 +1,19 @@ +.. _overview: + +Overview +=============== + +What is jrnl? +------------- + +`jrnl` is a simple journal application for your command line. Journals are stored as human readable plain text files - you can put them into a Dropbox folder for instant syncing and you can be assured that your journal will still be readable in 2050, when all your fancy iPad journal applications will long be forgotten. + +`jrnl` also plays nice with the fabulous `DayOne <http://dayoneapp.com>`_ and can read and write directly from and to DayOne Journals. + +Optionally, your journal can be encrypted using the `256-bit AES <http://en.wikipedia.org/wiki/Advanced_Encryption_Standard>`_. + +Why keep a journal? +------------------- + +Journals aren't only for 13-year old girls and people who have too much time on their summer vacation. A journal helps you to keep track of the things you get done and how you did them. Your imagination may be limitless, but your memory isn't. For personal use, make it a good habit to write at least 20 words a day. Just to reflect what made this day special, why you haven't wasted it. For professional use, consider a text-based journal to be the perfect complement to your GTD todo list - a documentation of what and how you've done it. + diff --git a/docs/recipes.rst b/docs/recipes.rst new file mode 100644 index 00000000..9ae55a86 --- /dev/null +++ b/docs/recipes.rst @@ -0,0 +1,31 @@ +.. _recipes: + +FAQ +=== + +Recipes +------- + +Co-occurrence of tags +~~~~~~~~~~~~~~~~~~~~~ + +If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run :: + + jrnl @alberto --tags | grep @melo + +And will get something like ``@melo: 9``, meaning there are 9 entries where both ``@alberto`` and ``@melo`` are tagged. How does this work? First, ``jrnl @alberto`` will filter the journal to only entries containing the tag ``@alberto``, and then the ``--tags`` option will print out how often each tag occurred in this `filtered` journal. Finally, we pipe this to ``grep`` which will only display the line containing ``@melo``. + +Combining filters +~~~~~~~~~~~~~~~~~ + +You can do things like :: + + jrnl @fixed -starred -n 10 -until "jan 2013" --short + +To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with ``@fixed``. + +Known Issues +------------ + +- The Windows shell prior to Windows 7 has issues with unicode encoding. If you want to use non-ascii characters, change the codepage with ``chcp 1252`` before using `jrnl` (Thanks to Yves Pouplard for solving this!) +- _jrnl_ relies on the `PyCrypto` package to encrypt journals, which has some known problems with installing on Windows and within virtual environments. diff --git a/docs/usage.rst b/docs/usage.rst new file mode 100644 index 00000000..c17bd761 --- /dev/null +++ b/docs/usage.rst @@ -0,0 +1,84 @@ +.. _usage: + +Basic Usage +=========== + +*jrnl* has two modes: **composing** and **viewing**. Basically, whenever you `don't` supply any arguments that start with a dash or double-dash, you're in composing mode, meaning you can write your entry on the command line or an editor of your choice. + +We intentionally break a convention on command line arguments: all arguments starting with a `single dash` will `filter` your journal before viewing it, and can be combined arbitrarily. Arguments with a `double dash` will control how your journal is displayed or exported and are mutually exclusive (ie. you can only specify one way to display or export your journal at a time). + + +Composing Entries +----------------- + +Composing mode is entered by either starting ``jrnl`` without any arguments -- which will prompt you to write an entry or launch your editor -- or by just writing an entry on the prompt, such as:: + + jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny. + + +Smart timestamps +~~~~~~~~~~~~~~~~ + +Timestamps that work: + +* at 6am +* yesterday +* last monday +* sunday at noon +* 2 march 2012 +* 7 apr +* 5/20/1998 at 23:42 + +Starring entries +~~~~~~~~~~~~~~~~ + +To mark an entry as a favourite, simply "star" it:: + + jrnl last sunday *: Best day of my life. + +If you don't want to add a date (ie. your entry will be dated as now), The following options are equivalent: + +* ``jrnl *: Best day of my life.`` +* ``jrnl *Best day of my life.`` +* ``jrnl Best day of my life.*`` + +.. note:: + + Just make sure that the asterisk sign is **not** surrounded by whitespaces, e.g. ``jrnl Best day of my life! *`` will **not** work (the reason being that the ``*`` sign has a special meaning on most shells). + +Viewing +------- + +:: + + jrnl -n 10 + +will list you the ten latest entries, :: + + jrnl -from "last year" -until march + +everything that happened from the start of last year to the start of last march. To only see your favourite entries, use :: + + jrnl -starred + +Using Tags +---------- + +Keep track of people, projects or locations, by tagging them with an ``@`` in your entries :: + + jrnl Had a wonderful day on the @beach with @Tom and @Anna. + +You can filter your journal entries just like this: :: + + jrnl @pinkie @WorldDomination + +Will print all entries in which either ``@pinkie`` or ``@WorldDomination`` occurred. :: + + jrnl -n 5 -and @pineapple @lubricant + +the last five entries containing both ``@pineapple`` **and** ``@lubricant``. You can change which symbols you'd like to use for tagging in the configuration. + +.. note:: + + ``jrnl @pinkie @WorldDomination`` will switch to viewing mode because although _no_ command line arguments are given, all the input strings look like tags - *jrnl* will assume you want to filter by tag. + diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 71f1e397..9f922509 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -28,7 +28,6 @@ except ImportError: import plistlib import pytz import uuid -from functools import partial class Journal(object): def __init__(self, name='default', **kwargs): @@ -99,7 +98,6 @@ class Journal(object): Entries have the form (date, title, body).""" filename = filename or self.config['journal'] - if self.config['encrypt']: with open(filename, "rb") as f: journal_encrypted = f.read() @@ -254,7 +252,7 @@ class Journal(object): date, flag = self.dateparse.parse(date_str) if not flag: # Oops, unparsable. - try: # Try and parse this as a single year + try: # Try and parse this as a single year year = int(date_str) return datetime(year, 1, 1) except ValueError: @@ -293,7 +291,7 @@ class Journal(object): starred = False if not date: if title.find(":") > 0: - starred = "*" in title[:title.find(":")] + starred = "*" in title[:title.find(":")] date = self.parse_date(title[:title.find(":")]) if date or starred: # Parsed successfully, strip that from the raw text title = title[title.find(":")+1:].strip() diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 409b3969..14112f4d 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line. """ __title__ = 'jrnl' -__version__ = '1.6.2-dev' +__version__ = '1.6.3' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 Manuel Ebert'