diff --git a/content/blog/2023-09-26_which-which-is-which.rst b/content/blog/2023-09-26_which-which-is-which.rst index a696027..db88835 100644 --- a/content/blog/2023-09-26_which-which-is-which.rst +++ b/content/blog/2023-09-26_which-which-is-which.rst @@ -13,14 +13,16 @@ I was talking to a `friend `_ about updating from ``exa`` to I did this by showing the following picture: -.. figure:: {static}/images/2023/09/26_which.png - :alt: Screnshot of shell text saying "Which LS" and then the line under it saying "/usr/bin/ls" +.. code:: shell + + $ which ls + /usr/bin/ls Because I expected it to show me which alias was being pointed to by ``ls``. My friend pointed out that "Which doesn't show aliases, it only points to files" to which I replied along the lines of "What? No way, I've used ``which`` to show me aliases and functions loads of times." -And promptly sent a screenshot of my system NOT showing that for other aliases I have set up. Things then got conversational and be being confused, to the point of me questioning if "Had I ever successfully done that? Maybe my macbook is set up differrently" and went and grabbed that. +And promptly sent a screenshot of my system NOT showing that for other aliases I have set up. Things then got conversational and me being confused, to the point of me questioning if "Had I ever successfully done that? Maybe my macbook is set up differrently" and went and grabbed that. Friend then looked at the man page for which, and noticed that there's the ``--read-alias`` and ``--read-functions`` flags on ``which``, and I didn't have those set. I then swapped over to bash "Maybe it's a bash thing only? I'm using Fish". @@ -32,6 +34,7 @@ It turns out that ZSH's ``which`` is equivalent to the ZSH shell built-in ``when After running ``/usr/bin/zsh`` and sourcing my aliases (I don't have a zshrc file anymore, I need to set that back up), I was able to settle my fears and prove to myself that I wasn't making things up. There is a which which shows you which aliases you have set up, which is default for ZSH. -.. figure:: {static}/images/2023/09/26_ls.png - :alt: Screnshot of shell text saying "Which LS" and then the line under it saying "/usr/bin/ls" +.. code:: shell + $ which ls + ls: aliased to exa -lhFgxUm --git --time-style long-iso --group-directories-first diff --git a/content/pages/blogroll.rst b/content/pages/blogroll.rst index b119712..42e7c93 100644 --- a/content/pages/blogroll.rst +++ b/content/pages/blogroll.rst @@ -4,7 +4,7 @@ Blogroll :author: tyrel :category: Blogroll :slug: blogroll -:status: published +:status: draft * Blogs I Read diff --git a/content/pages/references.rst b/content/pages/references.rst index 223e8c7..75bdd65 100644 --- a/content/pages/references.rst +++ b/content/pages/references.rst @@ -4,7 +4,7 @@ References :author: tyrel :category: References :slug: references -:status: published +:status: draft Blog Citations ~~~~~~~~~~~~~~ diff --git a/pelicanconf.py b/pelicanconf.py index 087e8be..f8be4a9 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -43,7 +43,7 @@ FEED_ALL_ATOM = 'tyrel-dev.all.xml' PLUGINS = ["webassets"] -DEFAULT_PAGINATION = False +DEFAULT_PAGINATION = True DISPLAY_CATEGORIES_ON_MENU = False DELETE_OUTPUT_DIRECTORY = True @@ -71,4 +71,5 @@ SOCIAL = () DISPLAY_PAGES_ON_MENU=True LANDING_PAGE_ABOUT=True THEME = pwd / "themes" / "solarized" -#THEME = pwd / "themes" / "waterspill-en" +THEME = pwd / "themes" / "waterspill-en" +THEME = pwd / "themes" / "blue-penguin-dark" diff --git a/themes/blue-penguin-dark/.github/workflows/screenshot.yml b/themes/blue-penguin-dark/.github/workflows/screenshot.yml new file mode 100644 index 0000000..1218248 --- /dev/null +++ b/themes/blue-penguin-dark/.github/workflows/screenshot.yml @@ -0,0 +1,38 @@ +name: Create-Screenshot + +on: + release: + types: [ created ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + - name: Install pelican + run: | + python -m pip install --upgrade pip + python -m pip install "pelican[markdown]" + - name: Setup Node + uses: actions/setup-node@v3 + - run: | + mkdir dist + npm install --global capture-website-cli + pelican sample/content -s sample/settings.py -t . + pelican --listen & + - run: capture-website "http://127.0.0.1:8000" --dark-mode --output "dist/out.png" + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: screenshot + path: dist/out.png + - name: Upload screenshot + uses: genietim/ftp-action@releases/v2 + with: + host: ${{ secrets.FTP_SERVER }} + user: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + localdir: "dist" + remoteDir: "/" diff --git a/themes/blue-penguin-dark/CONTRIBUTORS.md b/themes/blue-penguin-dark/CONTRIBUTORS.md new file mode 100644 index 0000000..de4e6ac --- /dev/null +++ b/themes/blue-penguin-dark/CONTRIBUTORS.md @@ -0,0 +1,20 @@ +# Contributors + +* [Nevan Scott](https://github.com/nevanscott/Mockingbird) (original author) +* [wrl](https://github.com/wrl/pelican-mockingbird) (port to pelican, pelican-mockingbird) +* [Jody Frankowski](http://github.com/jody-frankowski) (Blue Penguin) +* [Grimbox](https://github.com/Grimbox) +* [ix5](https://github.com/ix5) +* [dn0](https://github.com/dn0) +* [anhtuann](https://github.com/anhtuann) +* [aperep](https://github.com/aperep) +* [iranzo](https://github.com/iranzo) +* [thetlk](https://github.com/thetlk) +* [SnorlaxYum](https://github.com/SnorlaxYum) +* [guikcd](https://github.com/guikcd) +* [jorgesumle](https://github.com/jorgesumle) +* [crxxn](https://github.com/crxxn) +* [gavinzbq](https://github.com/gavinzbq) +* [sylvainmetayer](https://github.com/sylvainmetayer) +* [wbob](https://github.com/wbob) +* [Tyler Carr](https://github.com/tcarwash) diff --git a/themes/blue-penguin-dark/LICENSE.md b/themes/blue-penguin-dark/LICENSE.md new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/themes/blue-penguin-dark/LICENSE.md @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/themes/blue-penguin-dark/README.md b/themes/blue-penguin-dark/README.md new file mode 100644 index 0000000..7c71e43 --- /dev/null +++ b/themes/blue-penguin-dark/README.md @@ -0,0 +1,70 @@ +![screenshot](https://tyler-carr.com/images/ftp/out.png) + +# Blue Penguin Dark for pelican +A simple dark theme for pelican, with light/dark mode support using media queries available. Solarized pygments. Feeds support. + +This theme has been adapted from the original [Blue Penguin Theme](https://github.com/jody-frankowski/blue-penguin) for use on [my website](https://tyler-carr.com), all changes are generic and this theme can be used interchangeably with the original. + +## Settings +```python +# all the following settings are *optional* + +# HTML metadata +SITEDESCRIPTION = '' + +# all defaults to True. +DISPLAY_HEADER = True +DISPLAY_FOOTER = True +DISPLAY_HOME = True +DISPLAY_MENU = True +DARK_LIGHT_SWITCHING_OFF = True + +# provided as examples, they make ‘clean’ urls. used by MENU_INTERNAL_PAGES. +TAGS_URL = 'tags' +TAGS_SAVE_AS = 'tags/index.html' +AUTHORS_URL = 'authors' +AUTHORS_SAVE_AS = 'authors/index.html' +CATEGORIES_URL = 'categories' +CATEGORIES_SAVE_AS = 'categories/index.html' +ARCHIVES_URL = 'archives' +ARCHIVES_SAVE_AS = 'archives/index.html' + +# use those if you want pelican standard pages to appear in your menu +MENU_INTERNAL_PAGES = ( + ('Tags', TAGS_URL, TAGS_SAVE_AS), + ('Authors', AUTHORS_URL, AUTHORS_SAVE_AS), + ('Categories', CATEGORIES_URL, CATEGORIES_SAVE_AS), + ('Archives', ARCHIVES_URL, ARCHIVES_SAVE_AS), +) +# additional menu items +MENUITEMS = ( + ('GitHub', 'https://github.com/'), + ('Linux Kernel', 'https://www.kernel.org/'), +) + +# example pagination pattern +PAGINATION_PATTERNS = ( + (1, '{url}', '{save_as}'), + (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'), +) + +``` + +Dark/Light switching is disabled by default, but can be enabled in the config file by adding: + +``` +DARK_LIGHT_SWITCHING_OFF = FALSE +``` + + +## How to contribute +Contributions are very welcome. Keep in mind that this theme goal is to be +minimalistic/simple. Contributions will be accepted through Github Pull +Requests. If you don’t have a Github account you can suggest me your +changes by email. + +## Contributors +See [CONTRIBUTORS.md](CONTRIBUTORS.md). + +## License +Public domain. diff --git a/themes/blue-penguin-dark/sample/content/code.md b/themes/blue-penguin-dark/sample/content/code.md new file mode 100644 index 0000000..e01dac9 --- /dev/null +++ b/themes/blue-penguin-dark/sample/content/code.md @@ -0,0 +1,11 @@ +Title: Solarized Pygments +Date: 2022-6-28 12:00 +Category: Python +Tags: pelican, publishing +Authors: Alexis Metaireau, Conan Doyle +Summary: Short version for index and feeds + +``` +while True: + print("Pelican is neat!") +``` diff --git a/themes/blue-penguin-dark/sample/content/post.md b/themes/blue-penguin-dark/sample/content/post.md new file mode 100644 index 0000000..19c44c2 --- /dev/null +++ b/themes/blue-penguin-dark/sample/content/post.md @@ -0,0 +1,8 @@ +Title: Blue Penguin Dark +Date: 2022-6-28 13:00 +Category: Python +Tags: pelican, publishing +Authors: Alexis Metaireau, Conan Doyle +Summary: Short version for index and feeds + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. diff --git a/themes/blue-penguin-dark/sample/settings.py b/themes/blue-penguin-dark/sample/settings.py new file mode 100644 index 0000000..0c7bf28 --- /dev/null +++ b/themes/blue-penguin-dark/sample/settings.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # + +AUTHOR = 'Tyler Carr' +SITENAME = 'Blue Penguin Dark' +SITEURL = 'http://localhost:8000' +SITELOGO = 'https://www.gravatar.com/avatar/de3ba847c89c8cab9dd7080abebf9df1' +DEFAULT_METADATE = { + 'status': 'draft', + } + + +PATH = 'content' + +TIMEZONE = 'America/Los_Angeles' + +DEFAULT_LANG = 'en' + + +MENUITEMS = ( + ('About', '/'), + ) diff --git a/themes/blue-penguin-dark/screenshot.png b/themes/blue-penguin-dark/screenshot.png new file mode 100644 index 0000000..ee4afb7 Binary files /dev/null and b/themes/blue-penguin-dark/screenshot.png differ diff --git a/themes/blue-penguin-dark/static/css/main.css b/themes/blue-penguin-dark/static/css/main.css new file mode 100644 index 0000000..e13e955 --- /dev/null +++ b/themes/blue-penguin-dark/static/css/main.css @@ -0,0 +1,465 @@ +/* http://meyerweb.com/eric/tools/css/reset/ +v2.0 | 20110126 +License: none (public domain) + */ +/* Mockingbird Theme by Nevan Scott nevanscott.com */ +/* Modified by Jody Frankowski */ +/* Modified by ix5 */ +/* Modified by Tyler Carr */ + +:root { + --main-bg-color: #1c2833; + --code-bg-color: #17202a; + --accent-color: #C7254E; + --tab-bg-hover: var(--code-bg-color); + --info-bg-color: var(--code-gb-color); +} + + + +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, 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; + color: #BBB; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +em { + font-style: italic; +} +strong { + font-weight: bold; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; + background-color: var(--main-bg-color); +} +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; +} + +body { + font-family: Georgia, serif; + font-size: 16px; + line-height: 1.5em; +} + +header, #wrapper { + padding: 0 10px; + max-width: 910px; + margin: auto; + clear:both; +} + +a { + text-decoration: none; + color: #15A9DB; +} + +ul { + list-style: outside disc; +} + +ol { + list-style: outside decimal; +} + +h1, h2, h3, h4, h5, h6 { + font-family: sans-serif; + font-weight: bold; +} +h1, h2, h3 { + font-size: 1.5em; + line-height: 1em; + margin: 1em 0; +} + +img, p, .post > .highlight, .highlighttable, h4, h5, h6 { + margin-top: 1.2em; +} +img + em { + font-size: .8em; +} + +blockquote { + margin: 1.5em 1.5em 1.5em .75em; + padding-left: .75em; + border-left: 1px solid #EEE; +} + +table { + width: 100%; + margin: 1em 0; +} +thead { + border-bottom: 1px solid black; +} + +.avatar { + border-radius: 50%; + -mox-border-radius: 50%; + -webkit-border-radius: 50%; + position: relative; + bottom: 0; + top: 0; + margin: auto; + display: inline; + padding-right: 5px; +} + +.date { + color: #CCC; + float: left; + clear: both; + width: 130px; + font-size: 1.5em; + line-height: 1em; + margin: 0 20px 1em 0; +} + +.info { + margin-top: 1.3em; + font-family: sans-serif; + text-align: right; + color: #BBB; +} +.info a { + color: inherit; +} +.info a.tags { + background: var(--info-bg-color); + color: #FFF; + display: inline-block; + padding: 0 .3em; + border: 1px transparent solid; + border-radius: 5px; + margin: 0 0 0.3em 0; +} +.info a.tags:hover { + background: inherit; + color: inherit; +} +.info a.tags.selected { + border: 1px #999 solid; +} + +.post { + margin: 0 0 4.5em 150px; +} +.post.archives { + margin-bottom: 1.5em; + margin-left: 160px; +} +.post p { + text-align: justify; +} + +.page { + margin: 0 90px; +} + +.highlight { + border-radius: 3px; +} +.code > .highlight { + border-radius: 0px 3px 3px 0px; + background-color: var(--code-bg-color); +} +.linenos { + border-radius: 3px 0px 0px 3px; + background-color: var(--code-bg-color); + border-right: 1px solid #00232C; + color: #586E75; + text-shadow: 0px -1px #021014; + font-size: 12.6px; +} +td.code { + width: 100%; + max-width: 100px; +} +.linenos a { + color: #586E75; +} + +img { + box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.15); + border-radius: 0.3em; + max-width: 100%; + display: block; + margin-left: auto; + margin-right: auto; +} + +/*sub and sup stolen from Twitter bootstrap.*/ +sub, sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +.post pre, .page pre{ + padding: .8em; + font-size: 12.6px; + font-family: Monaco,Menlo,Consolas,"Courier New",monospace; + line-height: 18px; + overflow: auto; + background-color: var(--code-bg-color); +} + +.literal { + padding: .5em; + overflow: pre-line; + font-size: 12.6px; + font-family: Monaco,Menlo,Consolas,"Courier New",monospace; + background-color: var(--code-bg-color); +} + +form.inline_edit { + clear: both; + margin: 4.5em 0; + background-color: #DDD; + color: #000; + padding: 20px; + border-radius: 5px; +} +.inline_edit .sub { + color: #888; + white-space: nowrap; +} +.inline_edit label { + float: left; + clear: both; + width: 140px; + margin-right: 20px; +} +.inline_edit .buttons { + display: block; + text-align: right; +} + +nav ul { + float: right; + list-style: none; + margin: 0 0 0 3em; + padding: 0; +} +nav li { + float: left; +} +nav a { + display: block; + padding: 1.5em 10px 10px 10px; +} +nav a:hover { + background-color: var(--tab-bg-hover); + color: var(--accent-color); +} +nav li.selected a { + background-color: #15A9DB; + color: #FFF; +} + +header .header_box { + padding-top: 1.5em; + text-align: justify; + -moz-text-align-last: justify; + text-align-last: justify; + +} +.site_title { + color: #15A9DB; + display: inline-block; + margin:0; +} +.site_subtitle { + display: inline-block; + margin: 0; + +} +header h1 { + font-size: 1.5em; + line-height: 1em; + margin: 0; +} +header h2 { + font-size: 1em; + margin: .3em 0; + color: #DDD; +} + +#content { + margin-top: 3em; +} + +.pages { + font-family: sans-serif; + line-height: 2.5em; + margin: 4.5em 0 3em; + background-color: #2e4053; + border-radius: 5px; +} +.pages a.next_page { + float: right; + width: 140px; + text-align: center; + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + background-color: #EEE; +} +.pages a.prev_page { + float: left; + width: 140px; + text-align: center; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; + background-color: #EEE; +} +.pages a { + color: inherit; + border: none; +} +.pages a:hover { + background-color: #DDD; +} +.pages span { + display: block; + margin: 0 160px; + text-align: center; +} + +code { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + box-sizing: border-box; + background-color: #17202a; + color: #C7254E; + font-family: Monaco,Menlo,Consolas,"Courier New",monospace; + font-size: 12.6px; + line-height: 18px; + padding-bottom: 2px; + padding-left: 0px; + padding-right: 4px; + padding-top: 2px; +} + +footer { + font-family: sans-serif; + line-height: 2.5em; + text-align: center; + color: #BBB; + margin: 3em 0; + border: 1px solid #EEE; + border-radius: 5px; +} +footer p { margin: 0; } + +.right { float: right; } + +.clear { clear: both; } + +@media screen and (max-width: 1024px) { + #wrapper { + margin-left: 2.6em; + padding:1em; + } +} + +@media screen and (max-width: 800px), print { + #wrapper { + margin: 0; + padding: 1em; + } + .date { + width: 100%; + margin: 0 0 .5em 0; + } + .post { + margin: 0 0 4.5em 0; + } + .post pre, + .post code { + white-space: pre-wrap; + } + .archives { + margin: 0 0 1.5em 0 !important; + } + nav ul { + margin: 0 0 1em 0; + } +} +@media print { + * { + background: #fff; + } + #wrapper, #content { + margin: 0; + padding: 0; + } + header, footer, nav { + display: none; + } + img { + break-inside: avoid; + } + p, table, pre { + widows: 3; + orphans: 3; + } + h1, h2, h3, h4, h5, h6 { + break-after: avoid; + } + h1, h2 { + font-size: 14pt; + } + h3, h4, h4.date { + font-size: 12pt; + } + .post p, .post ul li, .post ol li, .post table { + font-size: 11pt; + } +} +@page { + margin: 1.5cm; +} diff --git a/themes/blue-penguin-dark/static/css/pygments.css b/themes/blue-penguin-dark/static/css/pygments.css new file mode 100644 index 0000000..cb38d12 --- /dev/null +++ b/themes/blue-penguin-dark/static/css/pygments.css @@ -0,0 +1,87 @@ +/* Solarized Dark + +For use with Jekyll and Pygments + +http://ethanschoonover.com/solarized + +SOLARIZED HEX ROLE +--------- -------- ------------------------------------------ +base03 #002b36 background +base01 #586e75 comments / secondary content +base1 #93a1a1 body text / default code / primary content +orange #cb4b16 constants +red #dc322f regex, special keywords +blue #268bd2 reserved keywords +cyan #2aa198 strings, numbers +green #859900 operators, other keywords +*/ + +.highlight { color: #93a1a1; background-color: #17202a;} +.highlight .c { color: #586e75 } /* Comment */ +.highlight .err { color: #93a1a1 } /* Error */ +.highlight .g { color: #93a1a1 } /* Generic */ +.highlight .k { color: #859900 } /* Keyword */ +.highlight .l { color: #93a1a1 } /* Literal */ +.highlight .n { color: #93a1a1 } /* Name */ +.highlight .o { color: #859900 } /* Operator */ +.highlight .x { color: #cb4b16 } /* Other */ +.highlight .p { color: #93a1a1 } /* Punctuation */ +.highlight .cm { color: #586e75 } /* Comment.Multiline */ +.highlight .cp { color: #859900 } /* Comment.Preproc */ +.highlight .c1 { color: #586e75 } /* Comment.Single */ +.highlight .cs { color: #859900 } /* Comment.Special */ +.highlight .gd { color: #2aa198 } /* Generic.Deleted */ +.highlight .ge { color: #93a1a1; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #dc322f } /* Generic.Error */ +.highlight .gh { color: #cb4b16 } /* Generic.Heading */ +.highlight .gi { color: #859900 } /* Generic.Inserted */ +.highlight .go { color: #93a1a1 } /* Generic.Output */ +.highlight .gp { color: #93a1a1 } /* Generic.Prompt */ +.highlight .gs { color: #93a1a1; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #cb4b16 } /* Generic.Subheading */ +.highlight .gt { color: #93a1a1 } /* Generic.Traceback */ +.highlight .kc { color: #cb4b16 } /* Keyword.Constant */ +.highlight .kd { color: #268bd2 } /* Keyword.Declaration */ +.highlight .kn { color: #859900 } /* Keyword.Namespace */ +.highlight .kp { color: #859900 } /* Keyword.Pseudo */ +.highlight .kr { color: #268bd2 } /* Keyword.Reserved */ +.highlight .kt { color: #dc322f } /* Keyword.Type */ +.highlight .ld { color: #93a1a1 } /* Literal.Date */ +.highlight .m { color: #2aa198 } /* Literal.Number */ +.highlight .s { color: #2aa198 } /* Literal.String */ +.highlight .na { color: #93a1a1 } /* Name.Attribute */ +.highlight .nb { color: #B58900 } /* Name.Builtin */ +.highlight .nc { color: #268bd2 } /* Name.Class */ +.highlight .no { color: #cb4b16 } /* Name.Constant */ +.highlight .nd { color: #268bd2 } /* Name.Decorator */ +.highlight .ni { color: #cb4b16 } /* Name.Entity */ +.highlight .ne { color: #cb4b16 } /* Name.Exception */ +.highlight .nf { color: #268bd2 } /* Name.Function */ +.highlight .nl { color: #93a1a1 } /* Name.Label */ +.highlight .nn { color: #93a1a1 } /* Name.Namespace */ +.highlight .nx { color: #93a1a1 } /* Name.Other */ +.highlight .py { color: #93a1a1 } /* Name.Property */ +.highlight .nt { color: #268bd2 } /* Name.Tag */ +.highlight .nv { color: #268bd2 } /* Name.Variable */ +.highlight .ow { color: #859900 } /* Operator.Word */ +.highlight .w { color: #93a1a1 } /* Text.Whitespace */ +.highlight .mf { color: #2aa198 } /* Literal.Number.Float */ +.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ +.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ +.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ +.highlight .sb { color: #586e75 } /* Literal.String.Backtick */ +.highlight .sc { color: #2aa198 } /* Literal.String.Char */ +.highlight .sd { color: #93a1a1 } /* Literal.String.Doc */ +.highlight .s2 { color: #2aa198 } /* Literal.String.Double */ +.highlight .se { color: #cb4b16 } /* Literal.String.Escape */ +.highlight .sh { color: #93a1a1 } /* Literal.String.Heredoc */ +.highlight .si { color: #2aa198 } /* Literal.String.Interpol */ +.highlight .sx { color: #2aa198 } /* Literal.String.Other */ +.highlight .sr { color: #dc322f } /* Literal.String.Regex */ +.highlight .s1 { color: #2aa198 } /* Literal.String.Single */ +.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ +.highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #268bd2 } /* Name.Variable.Class */ +.highlight .vg { color: #268bd2 } /* Name.Variable.Global */ +.highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ +.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ diff --git a/themes/blue-penguin-dark/templates/analytics.html b/themes/blue-penguin-dark/templates/analytics.html new file mode 100644 index 0000000..f349491 --- /dev/null +++ b/themes/blue-penguin-dark/templates/analytics.html @@ -0,0 +1,11 @@ +{% if GOOGLE_ANALYTICS %} + + + +{% endif %} diff --git a/themes/blue-penguin-dark/templates/archives.html b/themes/blue-penguin-dark/templates/archives.html new file mode 100644 index 0000000..73c53ba --- /dev/null +++ b/themes/blue-penguin-dark/templates/archives.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} | Archives{% endblock %} +{% block content %} + +

Archives

+ + {# based on http://stackoverflow.com/questions/12764291/jinja2-group-by-month-year #} + + {% for year, year_group in dates|groupby('date.year')|reverse %} + {% for month, month_group in year_group|groupby('date.month')|reverse %} +

{{ (month_group|first).date|strftime('%b %Y') }}

+
+ +
+ {% endfor %} + {% endfor %} +{% endblock %} diff --git a/themes/blue-penguin-dark/templates/article.html b/themes/blue-penguin-dark/templates/article.html new file mode 100644 index 0000000..40c60b1 --- /dev/null +++ b/themes/blue-penguin-dark/templates/article.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block head %} + {{ super() }} + {% if article.tags %} + + {% endif %} + {% if article.description %} + + {% endif %} +{% endblock %} + +{% block title %}{{ SITENAME }} | {{ article.title|striptags }}{% endblock %} + +{% block content %} +{% include "article_stub.html" %} +{% endblock %} diff --git a/themes/blue-penguin-dark/templates/article_stub.html b/themes/blue-penguin-dark/templates/article_stub.html new file mode 100644 index 0000000..893ee53 --- /dev/null +++ b/themes/blue-penguin-dark/templates/article_stub.html @@ -0,0 +1,36 @@ + {% if not articles_page or first_article_of_day %} +

{{ article.date.strftime("%b %d, %Y") }}

+ {% endif %} + +
+ {% if article.title %} +

+ {{ article.title }} +

+ {% endif %} + + {% if not articles_page %} + {% include "translations.html" %} + {% endif %} + + + {{ article.content }} +
+ +
+ {% if article.category.name != "misc" %} + + {% endif %} + {% if article.tags %} +  · · · + {% for t in article.tags %} +  {{ t }} + {% endfor %} + {% endif %} +
+ {% if articles_page and DISQUS_SITENAME %} + Click to read and post comments + {% else %} + {% include "disqus.html" %} + {% endif %} +
diff --git a/themes/blue-penguin-dark/templates/author.html b/themes/blue-penguin-dark/templates/author.html new file mode 100644 index 0000000..b9ff61e --- /dev/null +++ b/themes/blue-penguin-dark/templates/author.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} | Articles by {{ author }}{% endblock %} +{% block ephemeral_nav %} + + {{ ephemeral_nav_link(author, output_file, True) }} +{% endblock %} diff --git a/themes/blue-penguin-dark/templates/base.html b/themes/blue-penguin-dark/templates/base.html new file mode 100644 index 0000000..843a365 --- /dev/null +++ b/themes/blue-penguin-dark/templates/base.html @@ -0,0 +1,121 @@ +{% macro ephemeral_nav_link(what, where, selected=False) -%} +
  • {{what}}
  • +{%- endmacro -%} + + + + + {% block head %} + + + {% block title %}{{ SITENAME }}{% endblock title %} + {# favicon #} + + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if FEED_ALL_RSS %} + + {% endif %} + {% if FEED_ATOM %} + + {% endif %} + {% if FEED_RSS %} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + + {% endif %} + {% if TAG_FEED_ATOM and tag %} + + {% endif %} + {% if TAG_FEED_RSS and tag %} + + {% endif %} + + + {% if DARK_LIGHT_SWITCHING_OFF == False %} + + {% endif %} + + + + {% include 'analytics.html' %} + {% endblock head %} + + + {% if DISPLAY_HEADER or DISPLAY_HEADER is not defined %} +
    +
    +

    + + {{ SITENAME }} + +

    + {% if SITESUBTITLE %} +

    {{ SITESUBTITLE }}

    + {% endif %} +
    + + {% if DISPLAY_MENU or DISPLAY_MENU is not defined %} + + {% endif %} +
    + {% endif %} +
    +
    + {%- block content -%}{%- endblock %} + + {% if DISPLAY_FOOTER or DISPLAY_FOOTER is not defined %} +
    + + {% endif %} +
    +
    +
    + + diff --git a/themes/blue-penguin-dark/templates/category.html b/themes/blue-penguin-dark/templates/category.html new file mode 100644 index 0000000..6587d98 --- /dev/null +++ b/themes/blue-penguin-dark/templates/category.html @@ -0,0 +1,6 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} | articles in the "{{ category }}" category{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %} +{% block ephemeral_nav %} + + {{ ephemeral_nav_link(category, output_file, True) }} +{% endblock %} diff --git a/themes/blue-penguin-dark/templates/disqus.html b/themes/blue-penguin-dark/templates/disqus.html new file mode 100644 index 0000000..b4093e5 --- /dev/null +++ b/themes/blue-penguin-dark/templates/disqus.html @@ -0,0 +1,12 @@ +{% if DISQUS_SITENAME %} +
    + + +{% endif %} diff --git a/themes/blue-penguin-dark/templates/index.html b/themes/blue-penguin-dark/templates/index.html new file mode 100644 index 0000000..b8b40f4 --- /dev/null +++ b/themes/blue-penguin-dark/templates/index.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }}{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %} +{% block content %} +{% set date = None %} +{% for article in articles_page.object_list %} +{% if date != article.date.date() %} +{% set first_article_of_day = True %} +{% else %} +{% set first_article_of_day = False %} +{% endif %} +{% set date = article.date.date() %} +{% include "article_stub.html" %} +{% endfor %} + +{% include "pagination.html" %} +{% endblock %} diff --git a/themes/blue-penguin-dark/templates/page.html b/themes/blue-penguin-dark/templates/page.html new file mode 100644 index 0000000..c285678 --- /dev/null +++ b/themes/blue-penguin-dark/templates/page.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} | {{ page.title }}{% endblock %} + +{% block content %} + +
    +

    {{ page.title }}

    + {{ page.content }} +
    +{% endblock %} diff --git a/themes/blue-penguin-dark/templates/pagination.html b/themes/blue-penguin-dark/templates/pagination.html new file mode 100644 index 0000000..6562444 --- /dev/null +++ b/themes/blue-penguin-dark/templates/pagination.html @@ -0,0 +1,17 @@ +{# Use PAGINATION_PATTERNS or pagination may break #} +{% if DEFAULT_PAGINATION and (articles_page.has_previous() or articles_page.has_next()) %} + +
    +
    + + {% if articles_page.has_previous() %} + ← Previous + {% endif %} + + {% if articles_page.has_next() %} + Next → + {% endif %} + + Page {{ articles_page.number }} of {{ articles_paginator.num_pages }} +
    +{% endif %} diff --git a/themes/blue-penguin-dark/templates/tag.html b/themes/blue-penguin-dark/templates/tag.html new file mode 100644 index 0000000..92c3439 --- /dev/null +++ b/themes/blue-penguin-dark/templates/tag.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} | articles tagged "{{ tag }}"{% if articles_page.number != 1 %} | Page {{ articles_page.number }}{% endif %}{% endblock %} +{% block ephemeral_nav %} + {{ ephemeral_nav_link(tag, output_file, True) }} +{% endblock %} diff --git a/themes/blue-penguin-dark/templates/translations.html b/themes/blue-penguin-dark/templates/translations.html new file mode 100644 index 0000000..f0a0fa2 --- /dev/null +++ b/themes/blue-penguin-dark/templates/translations.html @@ -0,0 +1,6 @@ +{% if article.translations %} +Translations: + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} +{% endif %} \ No newline at end of file diff --git a/themes/solarized/static/css/main.css b/themes/solarized/static/css/main.css index be9406a..b2d7894 100644 --- a/themes/solarized/static/css/main.css +++ b/themes/solarized/static/css/main.css @@ -60,13 +60,9 @@ p { white-space: nowrap; } .literal { - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border: 1px solid #BCBEC0; padding: 2px; font:12px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace; - white-space: nowrap; + white-space: pre-line; background-color: #b58900; color: #000; }