From 04c716e212b9bdc578f204bafe38f4649af076ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Thu, 22 Jan 2015 23:37:23 +0100 Subject: [PATCH] Migrated to Pelican Now tags have pages, and all other visual goodies :) --- .gitignore | 4 + Makefile | 110 ++++++++++++++++ _config.yml | 4 - _layouts/post.html | 18 --- .../.2013-08-17-creating-my-web.markdown.swo | Bin 12288 -> 0 bytes _posts/2013-08-17-creating-my-web.markdown | 31 ----- ...22-Remove-git-files-with-globbing.markdown | 11 -- .../2014-03-27-updating-eurolovemap.markdown | 94 -------------- _posts/2014-09-23-publishing-in-pypi.markdown | 106 --------------- _posts/2014-10-09-proxies.markdown | 67 ---------- _posts/2014-12-09-zotero.markdown | 78 ----------- .../static/css}/cv-desktop.css | 0 .../static/css}/cv-medium.css | 0 {css => balkiantheme/static/css}/cv.css | 0 .../static/css}/main-desktop.bakup | 0 .../static/css}/main-desktop.css | 98 +++++++------- .../static/css}/main-medium.css | 44 ------- {css => balkiantheme/static/css}/main-xs.css | 15 ++- {css => balkiantheme/static/css}/main.css | 88 ++++++++++++- balkiantheme/static/css/solarized-dark.css | 1 + balkiantheme/static/css/solarized.css | 69 ++++++++++ {css => balkiantheme/static/css}/syntax.css | 0 .../font-awesome}/css/font-awesome-ie7.css | 0 .../css/font-awesome-ie7.min.css | 0 .../static/font-awesome}/css/font-awesome.css | 0 .../font-awesome}/css/font-awesome.min.css | 0 .../static/font-awesome}/font/FontAwesome.otf | Bin .../font/fontawesome-webfont.eot | Bin .../font/fontawesome-webfont.svg | 0 .../font/fontawesome-webfont.ttf | Bin .../font/fontawesome-webfont.woff | Bin .../static/font-awesome}/less/bootstrap.less | 0 .../static/font-awesome}/less/core.less | 0 .../static/font-awesome}/less/extras.less | 0 .../font-awesome}/less/font-awesome-ie7.less | 0 .../font-awesome}/less/font-awesome.less | 0 .../static/font-awesome}/less/icons.less | 0 .../static/font-awesome}/less/mixins.less | 0 .../static/font-awesome}/less/path.less | 0 .../static/font-awesome}/less/variables.less | 0 .../static/font-awesome}/scss/_bootstrap.scss | 0 .../static/font-awesome}/scss/_core.scss | 0 .../static/font-awesome}/scss/_extras.scss | 0 .../static/font-awesome}/scss/_icons.scss | 0 .../static/font-awesome}/scss/_mixins.scss | 0 .../static/font-awesome}/scss/_path.scss | 0 .../static/font-awesome}/scss/_variables.scss | 0 .../font-awesome}/scss/font-awesome-ie7.scss | 0 .../font-awesome}/scss/font-awesome.scss | 0 .../static/img}/favicon-balkian.xcf | Bin {img => balkiantheme/static/img}/favicon.ico | Bin {img => balkiantheme/static/img}/favicon.png | Bin {img => balkiantheme/static/img}/favicon.xcf | Bin {img => balkiantheme/static/img}/favicon2.ico | Bin {img => balkiantheme/static/img}/favicon2.xcf | Bin {img => balkiantheme/static/img}/favicon3.ico | Bin {img => balkiantheme/static/img}/me.jpg | Bin {img => balkiantheme/static/img}/me.png | Bin {img => balkiantheme/static/img}/noise.jpg | Bin {img => balkiantheme/static/img}/noise2.png | Bin {img => balkiantheme/static/img}/noise3.png | Bin {img => balkiantheme/static/img}/noise4.png | Bin .../static/js}/jquery-2.0.2.min.js | 0 balkiantheme/templates/article.html | 22 ++++ .../templates/base.html | 46 ++++--- balkiantheme/templates/index.html | 52 ++++++++ balkiantheme/templates/page.html | 4 + balkiantheme/templates/tag.html | 5 + content/2013-08-17-creating-my-web.rst | 44 +++++++ ...3-08-22-Remove-git-files-with-globbing.rst | 12 ++ content/2014-03-27-updating-eurolovemap.rst | 121 ++++++++++++++++++ content/2014-09-23-publishing-in-pypi.rst | 106 +++++++++++++++ content/2014-10-09-proxies.rst | 72 +++++++++++ content/2014-12-09-zotero.rst | 105 +++++++++++++++ CNAME => content/extra/CNAME | 0 favicon.ico => content/extra/favicon.ico | Bin .../fonts}/glyphiconshalflings-regular.eot | Bin .../fonts}/glyphiconshalflings-regular.otf | Bin .../fonts}/glyphiconshalflings-regular.svg | 0 .../fonts}/glyphiconshalflings-regular.ttf | Bin .../fonts}/glyphiconshalflings-regular.woff | Bin about/index.html => content/pages/about.md | 7 +- content/pages/cv.md | 103 +++++++++++++++ .../pages/projects.md | 4 +- todo/index.html => content/pages/todo.md | 6 +- cv/index.html | 109 ---------------- develop_server.sh | 103 +++++++++++++++ fabfile.py | 73 +++++++++++ index.html | 52 -------- pelicanconf.py | 56 ++++++++ plugins/neighbors.py | 59 +++++++++ publishconf.py | 24 ++++ 92 files changed, 1320 insertions(+), 703 deletions(-) create mode 100644 Makefile delete mode 100644 _config.yml delete mode 100644 _layouts/post.html delete mode 100644 _posts/.2013-08-17-creating-my-web.markdown.swo delete mode 100644 _posts/2013-08-17-creating-my-web.markdown delete mode 100644 _posts/2013-08-22-Remove-git-files-with-globbing.markdown delete mode 100644 _posts/2014-03-27-updating-eurolovemap.markdown delete mode 100644 _posts/2014-09-23-publishing-in-pypi.markdown delete mode 100644 _posts/2014-10-09-proxies.markdown delete mode 100644 _posts/2014-12-09-zotero.markdown rename {css => balkiantheme/static/css}/cv-desktop.css (100%) rename {css => balkiantheme/static/css}/cv-medium.css (100%) rename {css => balkiantheme/static/css}/cv.css (100%) rename {css => balkiantheme/static/css}/main-desktop.bakup (100%) rename {css => balkiantheme/static/css}/main-desktop.css (88%) rename {css => balkiantheme/static/css}/main-medium.css (91%) rename {css => balkiantheme/static/css}/main-xs.css (95%) rename {css => balkiantheme/static/css}/main.css (56%) create mode 100644 balkiantheme/static/css/solarized-dark.css create mode 100644 balkiantheme/static/css/solarized.css rename {css => balkiantheme/static/css}/syntax.css (100%) rename {font-awesome => balkiantheme/static/font-awesome}/css/font-awesome-ie7.css (100%) rename {font-awesome => balkiantheme/static/font-awesome}/css/font-awesome-ie7.min.css (100%) rename {font-awesome => balkiantheme/static/font-awesome}/css/font-awesome.css (100%) rename {font-awesome => balkiantheme/static/font-awesome}/css/font-awesome.min.css (100%) rename {font-awesome => balkiantheme/static/font-awesome}/font/FontAwesome.otf (100%) rename {font-awesome => balkiantheme/static/font-awesome}/font/fontawesome-webfont.eot (100%) rename {font-awesome => balkiantheme/static/font-awesome}/font/fontawesome-webfont.svg (100%) rename {font-awesome => balkiantheme/static/font-awesome}/font/fontawesome-webfont.ttf (100%) rename {font-awesome => balkiantheme/static/font-awesome}/font/fontawesome-webfont.woff (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/bootstrap.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/core.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/extras.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/font-awesome-ie7.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/font-awesome.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/icons.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/mixins.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/path.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/less/variables.less (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/_bootstrap.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/_core.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/_extras.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/_icons.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/_mixins.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/_path.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/_variables.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/font-awesome-ie7.scss (100%) rename {font-awesome => balkiantheme/static/font-awesome}/scss/font-awesome.scss (100%) rename {img => balkiantheme/static/img}/favicon-balkian.xcf (100%) rename {img => balkiantheme/static/img}/favicon.ico (100%) rename {img => balkiantheme/static/img}/favicon.png (100%) rename {img => balkiantheme/static/img}/favicon.xcf (100%) rename {img => balkiantheme/static/img}/favicon2.ico (100%) rename {img => balkiantheme/static/img}/favicon2.xcf (100%) rename {img => balkiantheme/static/img}/favicon3.ico (100%) rename {img => balkiantheme/static/img}/me.jpg (100%) rename {img => balkiantheme/static/img}/me.png (100%) rename {img => balkiantheme/static/img}/noise.jpg (100%) rename {img => balkiantheme/static/img}/noise2.png (100%) rename {img => balkiantheme/static/img}/noise3.png (100%) rename {img => balkiantheme/static/img}/noise4.png (100%) rename {js => balkiantheme/static/js}/jquery-2.0.2.min.js (100%) create mode 100644 balkiantheme/templates/article.html rename _layouts/default.html => balkiantheme/templates/base.html (67%) create mode 100644 balkiantheme/templates/index.html create mode 100644 balkiantheme/templates/page.html create mode 100644 balkiantheme/templates/tag.html create mode 100644 content/2013-08-17-creating-my-web.rst create mode 100644 content/2013-08-22-Remove-git-files-with-globbing.rst create mode 100644 content/2014-03-27-updating-eurolovemap.rst create mode 100644 content/2014-09-23-publishing-in-pypi.rst create mode 100644 content/2014-10-09-proxies.rst create mode 100644 content/2014-12-09-zotero.rst rename CNAME => content/extra/CNAME (100%) rename favicon.ico => content/extra/favicon.ico (100%) rename {fonts => content/fonts}/glyphiconshalflings-regular.eot (100%) rename {fonts => content/fonts}/glyphiconshalflings-regular.otf (100%) rename {fonts => content/fonts}/glyphiconshalflings-regular.svg (100%) rename {fonts => content/fonts}/glyphiconshalflings-regular.ttf (100%) rename {fonts => content/fonts}/glyphiconshalflings-regular.woff (100%) rename about/index.html => content/pages/about.md (94%) create mode 100644 content/pages/cv.md rename projects/index.markdown => content/pages/projects.md (98%) rename todo/index.html => content/pages/todo.md (96%) delete mode 100644 cv/index.html create mode 100755 develop_server.sh create mode 100644 fabfile.py delete mode 100644 index.html create mode 100644 pelicanconf.py create mode 100644 plugins/neighbors.py create mode 100644 publishconf.py diff --git a/.gitignore b/.gitignore index be6b1d7..9976312 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ _site *.swp +cache +output +*.pid +*.pyc diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b082525 --- /dev/null +++ b/Makefile @@ -0,0 +1,110 @@ +PY?=python +PELICAN?=pelican +PELICANOPTS= + +BASEDIR=$(CURDIR) +INPUTDIR=$(BASEDIR)/content +OUTPUTDIR=$(BASEDIR)/output +CONFFILE=$(BASEDIR)/pelicanconf.py +PUBLISHCONF=$(BASEDIR)/publishconf.py + +FTP_HOST=localhost +FTP_USER=anonymous +FTP_TARGET_DIR=/ + +SSH_HOST=localhost +SSH_PORT=22 +SSH_USER=root +SSH_TARGET_DIR=/var/www + +S3_BUCKET=my_s3_bucket + +CLOUDFILES_USERNAME=my_rackspace_username +CLOUDFILES_API_KEY=my_rackspace_api_key +CLOUDFILES_CONTAINER=my_cloudfiles_container + +DROPBOX_DIR=~/Dropbox/Public/ + +GITHUB_PAGES_BRANCH=master + +DEBUG ?= 0 +ifeq ($(DEBUG), 1) + PELICANOPTS += -D +endif + +help: + @echo 'Makefile for a pelican Web site ' + @echo ' ' + @echo 'Usage: ' + @echo ' make html (re)generate the web site ' + @echo ' make clean remove the generated files ' + @echo ' make regenerate regenerate files upon modification ' + @echo ' make publish generate using production settings ' + @echo ' make serve [PORT=8000] serve site at http://localhost:8000' + @echo ' make devserver [PORT=8000] start/restart develop_server.sh ' + @echo ' make stopserver stop local server ' + @echo ' make ssh_upload upload the web site via SSH ' + @echo ' make rsync_upload upload the web site via rsync+ssh ' + @echo ' make dropbox_upload upload the web site via Dropbox ' + @echo ' make ftp_upload upload the web site via FTP ' + @echo ' make s3_upload upload the web site via S3 ' + @echo ' make cf_upload upload the web site via Cloud Files' + @echo ' make github upload the web site via gh-pages ' + @echo ' ' + @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html' + @echo ' ' + +html: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +clean: + [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) + +regenerate: + $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +serve: +ifdef PORT + cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT) +else + cd $(OUTPUTDIR) && $(PY) -m pelican.server +endif + +devserver: +ifdef PORT + $(BASEDIR)/develop_server.sh restart $(PORT) +else + $(BASEDIR)/develop_server.sh restart +endif + +stopserver: + kill -9 `cat pelican.pid` + kill -9 `cat srv.pid` + @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' + +publish: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) + +ssh_upload: publish + scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + +rsync_upload: publish + rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude + +dropbox_upload: publish + cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR) + +ftp_upload: publish + lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit" + +s3_upload: publish + s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed --guess-mime-type + +cf_upload: publish + cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) . + +github: publish + ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR) + git push origin $(GITHUB_PAGES_BRANCH) + +.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github diff --git a/_config.yml b/_config.yml deleted file mode 100644 index ba6d9b6..0000000 --- a/_config.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: Balkian's Log -pygments: true -paginate: 5 -markdown: kramdown diff --git a/_layouts/post.html b/_layouts/post.html deleted file mode 100644 index 41b4dec..0000000 --- a/_layouts/post.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: default ---- -
- {{ page.previous.title }} - {{ page.next.title }} -
-
-

{{ page.title }}

- {{ page.date | date_to_string }} - {% for c in page.tags %} - {{ c }} - {% endfor %} -
- -
-{{ content }} -
diff --git a/_posts/.2013-08-17-creating-my-web.markdown.swo b/_posts/.2013-08-17-creating-my-web.markdown.swo deleted file mode 100644 index 7ce3b2b92be4428c3031ef1183a6b7208abce728..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&x;&I6vrzPkwl|GStOobW(kvp?VjD8Kx9BcvS<_*K{p8@#GU?8-CaA~Rc%*w z#vw${deD=9gI+zU_$PRZAc*2c@svaU0S|twd&UKkcneWqvmd&r>Q%j}Pfx)v`{J#u zukX>ta4c}07Gmv%({J5fdq<2<3UQdpMn^g|zV88-ty`zn>;Vyd*ZY4?ILeh9#Zfs^ zkq+@(v~if2%0G_c(&VFq+E`~tJ6qf1VC%(T`(ltZGIC1iLA40xG7hV#nWbi~|1m2E zumLvE8#pD#JKJ0Sd3|t}o_qERi(vz7fDNz#Hoykh02^QfY~X)nz}3gZ2iWgp%RQf2 z-jDs|zWm5HHoykh02^QfY=8~00XDz}*Z><~18m@5Xdp_3h@TST7vTT@zxw>&PZ+pyC})eZyg4CUg>&^}H0qn0u9i|P1A@Fjj1RDgII6WARp!uCu~`lh;!+`# z8JX6RD! zQrzZtl%a~V#RQFfx0NXIq{yvu4K2N<+~qb#XKhwV{rW>8Zl5Em(?aD%2^^ifBi3Jf znd(MqOftNzHfi5fL%*1}_jljCvLA}B@1RiUhrVY+V7wqgt*WJgk6*v7qe|Wxh*W0% zL_XNJZTNIYxtca!_=IBVBq}X7pP@R|Qf=n4$=Z@^Ti2#>oub5~lB`yBEuEbRv2Q3! zQ_^ydcx-x;tg7mA(X~dDc|%Hf-lu)#>y%Q}$i$gufo3?$Oj(+_?P3z6Z%OTx(G$9k zE7;o$c6S56^1x()PZ7%ZTqv%ab_nsA(kTWizgoN>WLlWEp}$ELkW7_-m8)1(|Ke=~ zajVLd&g1Pjt)@8&cDsd4gZY#!J|@M6H*clvr%sAU=hB|V@9se$lE}&2G)meDSr;|V zi#v>NMK) requirements.txt -{% endhighlight %} - -Publishing personal emails --------------------------- -There are really sophisticated and effective ways to obfuscate personal emails so that spammers cannot easily grab yours. -However, this time I needed something really simple to hide our emails from the simplest form of crawlers. -Most of the team are in academia somehow, so in the end all our emails are available in sites like Google Scholar. -Anyway, nobody likes getting spammed so I settled for a custom [Caesar cipher](http://en.wikipedia.org/wiki/Caesar_cipher). -Please, don't use it for any serious application if you are concerned about being spammed. - -{% highlight python %} -def blur_email(email): - return "".join([chr(ord(i)+5) for i in email]) -{% endhighlight %} - -And this is the client side: - -{% highlight javascript %} -window.onload = function(){ - elems = document.getElementsByClassName('profile-email'); - for(var e in elems){ - var blur = elems[e].innerHTML; - var email = ""; - for(var s in blur){ - var a = blur.charCodeAt(s) - email = email+String.fromCharCode(a-5); - } - elems[e].innerHTML = email; - } -} -{% endhighlight %} - -Unfortunately, this approach does not hide your email from anyone using [PhantomJS](http://phantomjs.org/), [ZombieJS](http://zombie.labnotes.org/) or similar. -For that, other approaches like generating a picture with the address would be necessary. -Nevertheless, it is overkill for a really simple ad-hoc application with custom formatting and just a bunch of emails that would easily be grabbed manually. - -Generation of fake data ------------------------ -To test the contact section of the site, I wanted to populate it with fake data. -[Fake-Factory](https://github.com/joke2k/faker) is an amazing library that can generate fake data of almost any kind: emails, association names, acronyms... -It even lets you localise the results (get Spanish names, for instance) and generate factories for certain classes (à la Django). - -But I also wanted pictures, enter [Lorem Pixel](http://lorempixel.com/). -With its API you can generate pictures of almost any size, for different topics (e.g. nightlife, people) and with a custom text. -You can even use an index, so it will always show the same picture. - -For instance, the picture below is served through Lorem Pixel. - -![This picture is generated with LoremIpsum](http://lorempixel.com/400/200/nightlife/) - -By the way, if you only want cat pictures, take a look at [Placekitten](http://placekitten.com/). -And for NSFW text, there's the [Samuel L. Jackson Ipsum](http://slipsum.com/) diff --git a/_posts/2014-09-23-publishing-in-pypi.markdown b/_posts/2014-09-23-publishing-in-pypi.markdown deleted file mode 100644 index 366f81f..0000000 --- a/_posts/2014-09-23-publishing-in-pypi.markdown +++ /dev/null @@ -1,106 +0,0 @@ ---- -layout: post -title: "Publishing in PyPi" -date: 2014-09-27 10:00:00 -tags: github python pypi ---- - -Developing a python module and publishing it on Github is cool, but most of the times you want others to download and use it easily. -That is the role of PyPi, the python package repository. -In this post I show you how to publish your package in less than 10 minutes. - -## Choose a fancy name - -If you haven't done so yet, take a minute or two to think about this. -To publish on PyPi you need a name for your package that isn't taken. -What's more, a catchy and unique name will help people remember your module and feel more inclined to at least try it. - -The package name should hint what your module does, but that's not always the case. -That's your call. -I personally put uniqueness and memorability over describing the functionality. - -## Create a .pypirc configuration file -{% highlight cfg %} -[distutils] # this tells distutils what package indexes you can push to -index-servers = - pypi # the live PyPI - pypitest # test PyPI - -[pypi] # authentication details for live PyPI -repository = https://pypi.python.org/pypi -username = { your_username } -password = { your_password } # not necessary - -[pypitest] # authentication details for test PyPI -repository = https://testpypi.python.org/pypi -username = { your_username } -{% endhighlight %} - -As you can see, you need to register both in the [main pypi repository](https://pypi.python.org/pypi?%3Aaction=register_form) and the [testing server](https://testpypi.python.org/pypi?%3Aaction=register_form). -The usernames and passwords might be different, that is up to you! - -## Prepare your package - -{% highlight raw %} -root-dir/ # Any name you want - setup.py - setup.cfg - LICENSE.txt - README.md - mypackage/ - __init__.py - foo.py - bar.py - baz.py -{% endhighlight %} - -### setup.cfg - -{% highlight cfg %} -[metadata] -description-file = README.md -{% endhighlight %} - -The markdown README is the _de facto_ standard in Github, but you can also use rST (reStructuredText), the standard in the python community. - -### setup.py - -{% highlight python %} -from distutils.core import setup -setup( - name = 'mypackage', - packages = ['mypackage'], # this must be the same as the name above - version = '{ version }', - description = '{ description }', - author = '{ name }', - author_email = '{ email }', - url = 'https://github.com/{user}/{package}', # URL to the github repo - download_url = 'https://github.com/{user}/{repo}/tarball/{version}', - keywords = ['websockets', 'display', 'd3'], # list of keywords that represent your package - classifiers = [], - ) -{% endhighlight %} - -You might notice that the download_url points to a Github URL. -We could host our package anywhere, but Github is a convenient option. -To create the tarball and the zip packages, you only need to tag a tag in your repository and push it to github: - -``` -git tag {version} -m "{ Description of this tag/version}" -git push --tags origin master -``` - -## Push to the testing/main pypi server - -It is advisable that you try your package on the test repository and fix any problems first. -The process is simple: -``` -python setup.py register -r {pypitest/pypi} -python setup.py sdist upload -r {pypitest/pypi} -``` - -If everything went as expected, you can now install your package through pip and browse your package's page. -For instance, check my senpy package: [https://pypi.python.org/pypi/senpy](https://pypi.python.org/pypi/senpy) -``` -pip install senpy -``` diff --git a/_posts/2014-10-09-proxies.markdown b/_posts/2014-10-09-proxies.markdown deleted file mode 100644 index 5a3f81e..0000000 --- a/_posts/2014-10-09-proxies.markdown +++ /dev/null @@ -1,67 +0,0 @@ ---- -layout: post -title: "Proxies with Apache and python" -date: 2014-10-09 10:00:00 -tags: python apache proxy gunicorn uwsgi ---- - -This is a quick note on proxying a local python application (e.g. flask) to a subdirectory in Apache. -This assumes that the file wsgi.py contains a WSGI application with the name *application*. Hence, wsgi:application. - -## Gunicorn -{% highlight apache %} - - ProxyPass http://127.0.0.1:8888/myapp/ - ProxyPassReverse http://127.0.0.1:8888/myapp/ - RequestHeader set SCRIPT_NAME "/myapp/" - -{% endhighlight %} - -**Important**: *SCRIPT_NAME* and the end of *ProxyPass* URL **MUST BE THE SAME**. Otherwise, Gunicorn will fail miserably. - -Try it with: -{% highlight bash %} -venv/bin/gunicorn -w 4 -b 127.0.0.1:8888 --log-file - --access-logfile - wsgi:application -{% endhighlight %} - - -## UWSGI -This is a very simple configuration. I will try to upload one with more options for uwsgi (in a .ini file). - -{% highlight apache %} - - SetHandler uwsgi_handler - uWSGISocker 127.0.0.1:8888 - -{% endhighlight %} - -Try it with: - -{% highlight bash %} -uwsgi --socket 127.0.0.1:8888 -w wsgi:application -{% endhighlight %} - -### Extra: Supervisor -If everything went as expected, you can wrap your command in a supervisor config file and let it handle the server for you. -{% highlight ini %} -[unix_http_server] -file=/tmp/myapp.sock ; path to your socket file - -[supervisord] -logfile = %(here)s/logs/supervisor.log -childlogdir = %(here)s/logs/ - -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -logfile = %(here)s/logs/supervisorctl.log -serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket - - -[program:myapp] -command = venv/bin/gunicorn -w 4 -b 0.0.0.0:5000 --log-file %(here)s/logs/gunicorn.log --access-logfile - wsgi:application -directory = %(here)s -environment = PATH=%(here)s/venv/bin/ -logfile = %(here)s/logs/myapp.log -{% endhighlight %} diff --git a/_posts/2014-12-09-zotero.markdown b/_posts/2014-12-09-zotero.markdown deleted file mode 100644 index 0dd05bb..0000000 --- a/_posts/2014-12-09-zotero.markdown +++ /dev/null @@ -1,78 +0,0 @@ ---- -layout: post -title: "Zotero" -date: 2014-12-09 12:12:12 -tags: zotero webdav nginx apache ---- -[Zotero](https://www.zotero.org/) is an Open Source tool that lets you organise your bibliography, syncing it with the cloud. -Unlike other alternatives such as [Mendeley](http://www.mendeley.com), Zotero can upload the attachments and data to a private cloud via WebDav. - -If you use nginx as your web server, know that even though it provides partial support for webdav, Zotero needs more than that. -Hence, you will need another webdav server, and optionally let nginx proxy to it. -This short post provides the basics to get that set-up working under Debian/Ubuntu. - -## Setting up Apache - -First we need to install Apache: - - sudo apt-get install apache2 - -Change the head of "/etc/apache2/sites-enabled/000-default" to: - - - -Then, create a file /etc/apache2/sites-available/webdav: - - Alias /dav /home/webdav/dav - - Dav on - Order Allow,Deny - Allow from all - Dav On - Options +Indexes - AuthType Basic - AuthName DAV - AuthBasicProvider file - AuthUserFile /home/webdav/.htpasswd - Require valid-user - - -Ideally, you want your webdav folders to be private, adding authentication to them. -So you need to create the webdav and zotero users and add the passwords to an htpasswd file. -Even though you could use a single user, since you will be configuring several clients with your credentials I encourage you to create the zotero user as well. -This way you can always change the password for zotero without affecting any other application using webdav. - - sudo adduser webdav - sudo htpasswd -c /home/webdav/.htpasswd webdav - sudo htpasswd /home/webdav/.htpasswd zotero - sudo mkdir -p /home/webdav/dav/zotero - -Enable the site and restart apache: - - sudo a2enmod webdav - sudo a2enmod dav_fs - sudo a2ensite webdav - sudo service apache2 restart - -At this point everything should be working at http://\:880/dav/zotero - -## Setting up NGINX -After the Apache side is working, we can use nginx as a proxy to get cleaner URIs. -In your desired site/location, add this: - - location /dav { - client_max_body_size 20M; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:880; - } - -Now just reload nginx: - - sudo service nginx force-reload - -## Extras - -* [Zotero Reader](http://zoteroreader.com/) - HTML5 client -* [Zandy](https://github.com/ajlyon/zandy) - Android Open Source client diff --git a/css/cv-desktop.css b/balkiantheme/static/css/cv-desktop.css similarity index 100% rename from css/cv-desktop.css rename to balkiantheme/static/css/cv-desktop.css diff --git a/css/cv-medium.css b/balkiantheme/static/css/cv-medium.css similarity index 100% rename from css/cv-medium.css rename to balkiantheme/static/css/cv-medium.css diff --git a/css/cv.css b/balkiantheme/static/css/cv.css similarity index 100% rename from css/cv.css rename to balkiantheme/static/css/cv.css diff --git a/css/main-desktop.bakup b/balkiantheme/static/css/main-desktop.bakup similarity index 100% rename from css/main-desktop.bakup rename to balkiantheme/static/css/main-desktop.bakup diff --git a/css/main-desktop.css b/balkiantheme/static/css/main-desktop.css similarity index 88% rename from css/main-desktop.css rename to balkiantheme/static/css/main-desktop.css index a884142..27e2490 100755 --- a/css/main-desktop.css +++ b/balkiantheme/static/css/main-desktop.css @@ -221,31 +221,6 @@ header { padding: 0; } -#headline { - margin: 0em; - font-size: 4em; - padding-left: 300px; - padding-top: 5px; - font-family: comfortaa; -} - -#headline a { - color: black; - padding: 0; - margin: 0; -} - -#headline a:hover { - color: white; - text-shadow: 1px 1px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; -} - - -#social { - margin: 0 auto; - padding: 0; -} - /*#social:after {*/ /*content: ".";*/ /*display: block;*/ @@ -283,16 +258,6 @@ header { z-index: 100; } -.entries dt { - font-weight: bold; - clear: both; - border-top: dashed 1px #CCC; -} -.entries dd { - float: right; - margin: 2px; -} - #navbar { font-size: 1.2em; padding-left: 300px; @@ -354,11 +319,6 @@ a { text-decoration: none; } -a:hover { - color: #FFF; - text-shadow: 1px 1px #069, -1px -1px 0 #069, 1px -1px 0 #069, -1px 1px 0 #069; -} - .label { font-family: comfortaa; border-radius: 10px 0px 0px 10px; @@ -397,7 +357,6 @@ a:hover { display:inline; width: 33.333%; } - @-webkit-keyframes toright { from { padding-left: 0px; @@ -420,6 +379,28 @@ a:hover { } } +@-webkit-keyframes toleft { + to { + left: -10px; + opacity: 1; + } + from { + left: 300px; + opacity: 0; + } +} + +@keyframes toleft { + to { + left: -10px; + opacity: 1; + } + from { + left: 300px; + opacity: 0; + } +} + @-webkit-keyframes appear{ to { opacity: 1; @@ -438,27 +419,46 @@ a:hover { } } +@-webkit-keyframes disappear{ + to { + opacity: 0 ; + } + from { + opacity: 1; + } +} + +@keyframes disappear{ + to { + opacity: 0; + } + from { + opacity: 1; + } +} + #subheadline { - -webkit-animation-name: toright; - -webkit-animation-duration: 4s; + position: absolute; + -webkit-animation-name: toleft; + -webkit-animation-duration: 3s; -webkit-animation-iteration-count: 1; -webkit-animation-timing-function: linear; -webkit-animation-fill-mode: forwards; - animation-name: toright; - animation-duration: 4s; + animation-name: toleft; + animation-duration: 3s; animation-iteration-count: 1; animation-timing-function: linear; animation-fill-mode: forwards; } .disappear { - -webkit-animation-name: appear; - -webkit-animation-duration: 4s; + -webkit-animation-name: disappear; + -webkit-animation-duration: 3s; -webkit-animation-timing-function: linear; -webkit-animation-iteration-count: 1; -webkit-animation-fill-mode: forwards; - animation-name: appear; - animation-duration: 4s; + animation-name: disappear; + animation-duration: 3s; animation-iteration-count: 1; animation-timing-function: linear; animation-fill-mode: forwards; diff --git a/css/main-medium.css b/balkiantheme/static/css/main-medium.css similarity index 91% rename from css/main-medium.css rename to balkiantheme/static/css/main-medium.css index 073d374..dac0314 100644 --- a/css/main-medium.css +++ b/balkiantheme/static/css/main-medium.css @@ -217,39 +217,9 @@ header { } #headline { - margin: 0em; - font-size: 4em; padding-left: 20%;; - padding-top: 5px; - font-family: comfortaa; } -#headline a { - color: black; - padding: 0; - margin: 0; -} - -#headline a:hover { - color: white; - text-shadow: 2px 2px #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000; -} - - -#social { - margin: 0 auto; - padding: 0; -} - -/*#social:after {*/ - /*content: ".";*/ - /*display: block;*/ - /*clear: both;*/ - /*visibility: hidden;*/ - /*line-height: 0;*/ - /*height: 0;*/ -/*}*/ - #social li { position: relative; list-style-type: none; @@ -278,15 +248,6 @@ header { z-index: 100; } -.entries dt { - font-weight: bold; - clear: both; - border-top: dashed 1px #CCC; -} -.entries dd { - float: right; - margin: 2px; -} #navbar { font-size: 1em; @@ -349,11 +310,6 @@ a { text-decoration: none; } -a:hover { - color: #FFF; - text-shadow: 1px 1px #069, -1px -1px 0 #069, 1px -1px 0 #069, -1px 1px 0 #069; -} - .label { font-family: comfortaa; border-radius: 10px 0px 0px 10px; diff --git a/css/main-xs.css b/balkiantheme/static/css/main-xs.css similarity index 95% rename from css/main-xs.css rename to balkiantheme/static/css/main-xs.css index d07881c..e2452f2 100644 --- a/css/main-xs.css +++ b/balkiantheme/static/css/main-xs.css @@ -10,7 +10,11 @@ #headline { position: relative; width: 100%; - margin: 0.5em; + font-size: 2em; + padding: 0.1em; + margin: 0.1em; + font-family: comfortaa; + overflow: auto; } #headline a { @@ -104,11 +108,6 @@ a { text-decoration: none; } -a:hover { - color: #FFF; - text-shadow: 1px 1px #069, -1px -1px 0 #069, 1px -1px 0 #069, -1px 1px 0 #069; -} - .navbar li.active a:hover { color: #c00; } @@ -182,3 +181,7 @@ footer { /*top: -50px;*/ z-index: 100; } + +.highlighttable { + width: 100%; +} diff --git a/css/main.css b/balkiantheme/static/css/main.css similarity index 56% rename from css/main.css rename to balkiantheme/static/css/main.css index 246553a..96fdcc1 100755 --- a/css/main.css +++ b/balkiantheme/static/css/main.css @@ -61,13 +61,14 @@ body { padding-left: 0.5em; } -code { +.highlighttable { display: block; overflow: auto; + position: relative; background-color: #EEE; margin: 0 auto; width: 80%; - padding: 1.5em 2em; + padding: 0; border: dashed 1px #AAA; border-radius: 5px 0px 5px 5px; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ @@ -75,6 +76,25 @@ code { box-sizing: border-box; /* Opera/IE 8+ */ } +.highlight { + /*background-color: #EEE;*/ + overflow: auto; + margin: 0; + padding: 0.5em; + position: relative; + overflow: auto; +} + +.code { + width: 100%; +} + +.linenos { + color: #AAA; + padding-right: 0.5em; + border-right: solid 1px #DDD; +} + #navbar { position: relative; padding: 0.5em; @@ -122,3 +142,67 @@ code { margin-left: auto; margin-right: auto } + +#headline { + position: relative; + margin: 0em; + font-size: 4em; + padding-left: 300px; + padding-top: 5px; + font-family: comfortaa; +} + +#headline a { + color: black; + padding: 0; + margin: 0; +} + +#headline a.inv { + font-size: 0.8em; + color: white; + text-shadow: 1px 1px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; +} + +#headline a:hover { + color: white; + text-shadow: 1px 1px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; +} + +#social { + margin: 0 auto; + padding: 0; +} + +.entries dt { + font-weight: bold; + clear: both; + border-top: dashed 1px #CCC; +} +.entries dd { + float: right; + margin: 2px; +} + +a:hover { + text-shadow: 0.5px 0.5px #CCC, -0.5px -0.5px 0 #CCC, 0.5px -0.5px 0 #CCC, -0.5px 0.5px 0 #CCC; +} + +.tag:hover * { + -webkit-transform: rotate(-4deg); + -moz-transform: rotate(-4deg); + transform: rotate(-4deg); + color: black; + text-shadow: none ; + transform-origin: 95% 50%; + -moz-transform-origin: 95% 50%; + -webkit-transform-origin: 95% 50%; +} + +.tag * { + display: inline-block; +} + +.hll { + background: yellow; +} diff --git a/balkiantheme/static/css/solarized-dark.css b/balkiantheme/static/css/solarized-dark.css new file mode 100644 index 0000000..20e3a35 --- /dev/null +++ b/balkiantheme/static/css/solarized-dark.css @@ -0,0 +1 @@ +.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e75 !important}.highlight .gi{color:#93a1a1 !important;background-color:#1a412b !important;display:inline-block}.highlight .gi .x{color:#93a1a1 !important;background-color:#355720 !important;display:inline-block}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{color:#93a1a1 !important;font-weight:bold !important}.highlight .gu{color:#6c71c4 !important}.highlight .gt{color:#aa0000}.highlight .kc{color:#859900 !important;font-weight:bold !important}.highlight .kd{color:#268bd2 !important}.highlight .kp{color:#cb4b16 !important;font-weight:bold !important}.highlight .kr{color:#d33682 !important;font-weight:bold !important}.highlight .kt{color:#2aa198 !important}.highlight .n{color:#268bd2 !important}.highlight .na{color:#268bd2 !important}.highlight .nb{color:#859900 !important}.highlight .nc{color:#d33682 !important}.highlight .no{color:#b58900 !important}.highlight .ni{color:#800080}.highlight .nl{color:#859900 !important}.highlight .ne{color:#268bd2 !important;font-weight:bold !important}.highlight .nf{color:#268bd2 !important;font-weight:bold !important}.highlight .nn{color:#b58900 !important}.highlight .nt{color:#268bd2 !important;font-weight:bold !important}.highlight .nx{color:#b58900 !important}.highlight .bp{color:#999999}.highlight .vc{color:#008080}.highlight .vg{color:#268bd2 !important}.highlight .vi{color:#268bd2 !important}.highlight .nv{color:#268bd2 !important}.highlight .w{color:#bbbbbb}.highlight .mf{color:#2aa198 !important}.highlight .m{color:#2aa198 !important}.highlight .mh{color:#2aa198 !important}.highlight .mi{color:#2aa198 !important}.highlight .mo{color:#009999}.highlight .s{color:#2aa198 !important}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#2aa198 !important}.highlight .s2{color:#2aa198 !important}.highlight .se{color:#dc322f !important}.highlight .sh{color:#d14}.highlight .si{color:#268bd2 !important}.highlight .sx{color:#d14}.highlight .sr{color:#2aa198 !important}.highlight .s1{color:#2aa198 !important}.highlight .ss{color:#990073}.highlight .il{color:#009999}.highlight div .gd,.highlight div .gd .x,.highlight div .gi,.highlight div .gi .x{display:inline-block;width:100%} diff --git a/balkiantheme/static/css/solarized.css b/balkiantheme/static/css/solarized.css new file mode 100644 index 0000000..d93ef6e --- /dev/null +++ b/balkiantheme/static/css/solarized.css @@ -0,0 +1,69 @@ +.hll { background-color: #ffffcc } +.c { color: #586E75 } /* Comment */ +.err { color: #93A1A1 } /* Error */ +.g { color: #93A1A1 } /* Generic */ +.k { color: #859900 } /* Keyword */ +.l { color: #93A1A1 } /* Literal */ +.n { color: #93A1A1 } /* Name */ +.o { color: #859900 } /* Operator */ +.x { color: #CB4B16 } /* Other */ +.p { color: #93A1A1 } /* Punctuation */ +.cm { color: #586E75 } /* Comment.Multiline */ +.cp { color: #859900 } /* Comment.Preproc */ +.c1 { color: #586E75 } /* Comment.Single */ +.cs { color: #859900 } /* Comment.Special */ +.gd { color: #2AA198 } /* Generic.Deleted */ +.ge { color: #93A1A1; font-style: italic } /* Generic.Emph */ +.gr { color: #DC322F } /* Generic.Error */ +.gh { color: #CB4B16 } /* Generic.Heading */ +.gi { color: #859900 } /* Generic.Inserted */ +.go { color: #93A1A1 } /* Generic.Output */ +.gp { color: #93A1A1 } /* Generic.Prompt */ +.gs { color: #93A1A1; font-weight: bold } /* Generic.Strong */ +.gu { color: #CB4B16 } /* Generic.Subheading */ +.gt { color: #93A1A1 } /* Generic.Traceback */ +.kc { color: #CB4B16 } /* Keyword.Constant */ +.kd { color: #268BD2 } /* Keyword.Declaration */ +.kn { color: #859900 } /* Keyword.Namespace */ +.kp { color: #859900 } /* Keyword.Pseudo */ +.kr { color: #268BD2 } /* Keyword.Reserved */ +.kt { color: #DC322F } /* Keyword.Type */ +.ld { color: #93A1A1 } /* Literal.Date */ +.m { color: #2AA198 } /* Literal.Number */ +.s { color: #2AA198 } /* Literal.String */ +.na { color: #93A1A1 } /* Name.Attribute */ +.nb { color: #B58900 } /* Name.Builtin */ +.nc { color: #268BD2 } /* Name.Class */ +.no { color: #CB4B16 } /* Name.Constant */ +.nd { color: #268BD2 } /* Name.Decorator */ +.ni { color: #CB4B16 } /* Name.Entity */ +.ne { color: #CB4B16 } /* Name.Exception */ +.nf { color: #268BD2 } /* Name.Function */ +.nl { color: #93A1A1 } /* Name.Label */ +.nn { color: #93A1A1 } /* Name.Namespace */ +.nx { color: #93A1A1 } /* Name.Other */ +.py { color: #93A1A1 } /* Name.Property */ +.nt { color: #268BD2 } /* Name.Tag */ +.nv { color: #268BD2 } /* Name.Variable */ +.ow { color: #859900 } /* Operator.Word */ +.w { color: #93A1A1 } /* Text.Whitespace */ +.mf { color: #2AA198 } /* Literal.Number.Float */ +.mh { color: #2AA198 } /* Literal.Number.Hex */ +.mi { color: #2AA198 } /* Literal.Number.Integer */ +.mo { color: #2AA198 } /* Literal.Number.Oct */ +.sb { color: #586E75 } /* Literal.String.Backtick */ +.sc { color: #2AA198 } /* Literal.String.Char */ +.sd { color: #93A1A1 } /* Literal.String.Doc */ +.s2 { color: #2AA198 } /* Literal.String.Double */ +.se { color: #CB4B16 } /* Literal.String.Escape */ +.sh { color: #93A1A1 } /* Literal.String.Heredoc */ +.si { color: #2AA198 } /* Literal.String.Interpol */ +.sx { color: #2AA198 } /* Literal.String.Other */ +.sr { color: #DC322F } /* Literal.String.Regex */ +.s1 { color: #2AA198 } /* Literal.String.Single */ +.ss { color: #2AA198 } /* Literal.String.Symbol */ +.bp { color: #268BD2 } /* Name.Builtin.Pseudo */ +.vc { color: #268BD2 } /* Name.Variable.Class */ +.vg { color: #268BD2 } /* Name.Variable.Global */ +.vi { color: #268BD2 } /* Name.Variable.Instance */ +.il { color: #2AA198 } /* Literal.Number.Integer.Long */ diff --git a/css/syntax.css b/balkiantheme/static/css/syntax.css similarity index 100% rename from css/syntax.css rename to balkiantheme/static/css/syntax.css diff --git a/font-awesome/css/font-awesome-ie7.css b/balkiantheme/static/font-awesome/css/font-awesome-ie7.css similarity index 100% rename from font-awesome/css/font-awesome-ie7.css rename to balkiantheme/static/font-awesome/css/font-awesome-ie7.css diff --git a/font-awesome/css/font-awesome-ie7.min.css b/balkiantheme/static/font-awesome/css/font-awesome-ie7.min.css similarity index 100% rename from font-awesome/css/font-awesome-ie7.min.css rename to balkiantheme/static/font-awesome/css/font-awesome-ie7.min.css diff --git a/font-awesome/css/font-awesome.css b/balkiantheme/static/font-awesome/css/font-awesome.css similarity index 100% rename from font-awesome/css/font-awesome.css rename to balkiantheme/static/font-awesome/css/font-awesome.css diff --git a/font-awesome/css/font-awesome.min.css b/balkiantheme/static/font-awesome/css/font-awesome.min.css similarity index 100% rename from font-awesome/css/font-awesome.min.css rename to balkiantheme/static/font-awesome/css/font-awesome.min.css diff --git a/font-awesome/font/FontAwesome.otf b/balkiantheme/static/font-awesome/font/FontAwesome.otf similarity index 100% rename from font-awesome/font/FontAwesome.otf rename to balkiantheme/static/font-awesome/font/FontAwesome.otf diff --git a/font-awesome/font/fontawesome-webfont.eot b/balkiantheme/static/font-awesome/font/fontawesome-webfont.eot similarity index 100% rename from font-awesome/font/fontawesome-webfont.eot rename to balkiantheme/static/font-awesome/font/fontawesome-webfont.eot diff --git a/font-awesome/font/fontawesome-webfont.svg b/balkiantheme/static/font-awesome/font/fontawesome-webfont.svg similarity index 100% rename from font-awesome/font/fontawesome-webfont.svg rename to balkiantheme/static/font-awesome/font/fontawesome-webfont.svg diff --git a/font-awesome/font/fontawesome-webfont.ttf b/balkiantheme/static/font-awesome/font/fontawesome-webfont.ttf similarity index 100% rename from font-awesome/font/fontawesome-webfont.ttf rename to balkiantheme/static/font-awesome/font/fontawesome-webfont.ttf diff --git a/font-awesome/font/fontawesome-webfont.woff b/balkiantheme/static/font-awesome/font/fontawesome-webfont.woff similarity index 100% rename from font-awesome/font/fontawesome-webfont.woff rename to balkiantheme/static/font-awesome/font/fontawesome-webfont.woff diff --git a/font-awesome/less/bootstrap.less b/balkiantheme/static/font-awesome/less/bootstrap.less similarity index 100% rename from font-awesome/less/bootstrap.less rename to balkiantheme/static/font-awesome/less/bootstrap.less diff --git a/font-awesome/less/core.less b/balkiantheme/static/font-awesome/less/core.less similarity index 100% rename from font-awesome/less/core.less rename to balkiantheme/static/font-awesome/less/core.less diff --git a/font-awesome/less/extras.less b/balkiantheme/static/font-awesome/less/extras.less similarity index 100% rename from font-awesome/less/extras.less rename to balkiantheme/static/font-awesome/less/extras.less diff --git a/font-awesome/less/font-awesome-ie7.less b/balkiantheme/static/font-awesome/less/font-awesome-ie7.less similarity index 100% rename from font-awesome/less/font-awesome-ie7.less rename to balkiantheme/static/font-awesome/less/font-awesome-ie7.less diff --git a/font-awesome/less/font-awesome.less b/balkiantheme/static/font-awesome/less/font-awesome.less similarity index 100% rename from font-awesome/less/font-awesome.less rename to balkiantheme/static/font-awesome/less/font-awesome.less diff --git a/font-awesome/less/icons.less b/balkiantheme/static/font-awesome/less/icons.less similarity index 100% rename from font-awesome/less/icons.less rename to balkiantheme/static/font-awesome/less/icons.less diff --git a/font-awesome/less/mixins.less b/balkiantheme/static/font-awesome/less/mixins.less similarity index 100% rename from font-awesome/less/mixins.less rename to balkiantheme/static/font-awesome/less/mixins.less diff --git a/font-awesome/less/path.less b/balkiantheme/static/font-awesome/less/path.less similarity index 100% rename from font-awesome/less/path.less rename to balkiantheme/static/font-awesome/less/path.less diff --git a/font-awesome/less/variables.less b/balkiantheme/static/font-awesome/less/variables.less similarity index 100% rename from font-awesome/less/variables.less rename to balkiantheme/static/font-awesome/less/variables.less diff --git a/font-awesome/scss/_bootstrap.scss b/balkiantheme/static/font-awesome/scss/_bootstrap.scss similarity index 100% rename from font-awesome/scss/_bootstrap.scss rename to balkiantheme/static/font-awesome/scss/_bootstrap.scss diff --git a/font-awesome/scss/_core.scss b/balkiantheme/static/font-awesome/scss/_core.scss similarity index 100% rename from font-awesome/scss/_core.scss rename to balkiantheme/static/font-awesome/scss/_core.scss diff --git a/font-awesome/scss/_extras.scss b/balkiantheme/static/font-awesome/scss/_extras.scss similarity index 100% rename from font-awesome/scss/_extras.scss rename to balkiantheme/static/font-awesome/scss/_extras.scss diff --git a/font-awesome/scss/_icons.scss b/balkiantheme/static/font-awesome/scss/_icons.scss similarity index 100% rename from font-awesome/scss/_icons.scss rename to balkiantheme/static/font-awesome/scss/_icons.scss diff --git a/font-awesome/scss/_mixins.scss b/balkiantheme/static/font-awesome/scss/_mixins.scss similarity index 100% rename from font-awesome/scss/_mixins.scss rename to balkiantheme/static/font-awesome/scss/_mixins.scss diff --git a/font-awesome/scss/_path.scss b/balkiantheme/static/font-awesome/scss/_path.scss similarity index 100% rename from font-awesome/scss/_path.scss rename to balkiantheme/static/font-awesome/scss/_path.scss diff --git a/font-awesome/scss/_variables.scss b/balkiantheme/static/font-awesome/scss/_variables.scss similarity index 100% rename from font-awesome/scss/_variables.scss rename to balkiantheme/static/font-awesome/scss/_variables.scss diff --git a/font-awesome/scss/font-awesome-ie7.scss b/balkiantheme/static/font-awesome/scss/font-awesome-ie7.scss similarity index 100% rename from font-awesome/scss/font-awesome-ie7.scss rename to balkiantheme/static/font-awesome/scss/font-awesome-ie7.scss diff --git a/font-awesome/scss/font-awesome.scss b/balkiantheme/static/font-awesome/scss/font-awesome.scss similarity index 100% rename from font-awesome/scss/font-awesome.scss rename to balkiantheme/static/font-awesome/scss/font-awesome.scss diff --git a/img/favicon-balkian.xcf b/balkiantheme/static/img/favicon-balkian.xcf similarity index 100% rename from img/favicon-balkian.xcf rename to balkiantheme/static/img/favicon-balkian.xcf diff --git a/img/favicon.ico b/balkiantheme/static/img/favicon.ico similarity index 100% rename from img/favicon.ico rename to balkiantheme/static/img/favicon.ico diff --git a/img/favicon.png b/balkiantheme/static/img/favicon.png similarity index 100% rename from img/favicon.png rename to balkiantheme/static/img/favicon.png diff --git a/img/favicon.xcf b/balkiantheme/static/img/favicon.xcf similarity index 100% rename from img/favicon.xcf rename to balkiantheme/static/img/favicon.xcf diff --git a/img/favicon2.ico b/balkiantheme/static/img/favicon2.ico similarity index 100% rename from img/favicon2.ico rename to balkiantheme/static/img/favicon2.ico diff --git a/img/favicon2.xcf b/balkiantheme/static/img/favicon2.xcf similarity index 100% rename from img/favicon2.xcf rename to balkiantheme/static/img/favicon2.xcf diff --git a/img/favicon3.ico b/balkiantheme/static/img/favicon3.ico similarity index 100% rename from img/favicon3.ico rename to balkiantheme/static/img/favicon3.ico diff --git a/img/me.jpg b/balkiantheme/static/img/me.jpg similarity index 100% rename from img/me.jpg rename to balkiantheme/static/img/me.jpg diff --git a/img/me.png b/balkiantheme/static/img/me.png similarity index 100% rename from img/me.png rename to balkiantheme/static/img/me.png diff --git a/img/noise.jpg b/balkiantheme/static/img/noise.jpg similarity index 100% rename from img/noise.jpg rename to balkiantheme/static/img/noise.jpg diff --git a/img/noise2.png b/balkiantheme/static/img/noise2.png similarity index 100% rename from img/noise2.png rename to balkiantheme/static/img/noise2.png diff --git a/img/noise3.png b/balkiantheme/static/img/noise3.png similarity index 100% rename from img/noise3.png rename to balkiantheme/static/img/noise3.png diff --git a/img/noise4.png b/balkiantheme/static/img/noise4.png similarity index 100% rename from img/noise4.png rename to balkiantheme/static/img/noise4.png diff --git a/js/jquery-2.0.2.min.js b/balkiantheme/static/js/jquery-2.0.2.min.js similarity index 100% rename from js/jquery-2.0.2.min.js rename to balkiantheme/static/js/jquery-2.0.2.min.js diff --git a/balkiantheme/templates/article.html b/balkiantheme/templates/article.html new file mode 100644 index 0000000..36a18ed --- /dev/null +++ b/balkiantheme/templates/article.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} +{% block content %} +
+ {% if article.prev_article %} + {{ article.prev_article.title }} + {% endif %} + {% if article.next_article %} + {{ article.next_article.title }} + {%endif%} +
+
+

{{ article.title }}

+ {{ article.date | date_to_string }} + {% for c in article.tags %} + {{ c }} + {% endfor %} +
+ +
+ {{ article.content }} +
+{% endblock %} diff --git a/_layouts/default.html b/balkiantheme/templates/base.html similarity index 67% rename from _layouts/default.html rename to balkiantheme/templates/base.html index 4d1c78c..bfee1f1 100644 --- a/_layouts/default.html +++ b/balkiantheme/templates/base.html @@ -3,38 +3,43 @@ - {{ page.title }} + {% block content_title %}{% endblock %} - + - + - - - - + + + +