Skip to content

Commit

Permalink
Update the main page, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
naspeh committed Jul 9, 2024
1 parent fbee205 commit 3e3fe74
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 58 deletions.
25 changes: 5 additions & 20 deletions data/_theme/base.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% from '_theme/macros.tpl' import show_meta %}
<!DOCTYPE HTML>
{% set EN = p.params.lang == 'en' or p.parent.params.lang == 'en' %}
{% set EN = p.params.lang != 'ru' and p.parent.params.lang != 'ru' %}
<head>
{% block head %}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Expand All @@ -14,24 +14,21 @@
{% if EN %}
<div class="header">
<ul class="nav logo">
<li class="link-logo"><a href="/" title="Russian part">pust<b>o.o</b>rg</a></li>
<li><a href="/en/">en</a></li>
<li class="link-logo"><a href="/">pust<b>o.o</b>rg</a></li>
</ul>
<ul class="nav">
<li><a href="/mailur/" title="Lightweight webmail inspired by Gmail">Mailur</a></li>
<li><a href="/en/resume/">Résumé</a></li>
<li><a href="/">Articles (Ru)</a></li>
<li><a href="/trip/" title="Our trips">Trips (Ru)</a></li>
<li><a href="/resume/">Résumé</a></li>
</ul>
</div>
{% else %}
<div class="header">
<ul class="nav logo">
<li class="link-logo"><a href="/" title="Russian part">pust<b>o.o</b>rg</a></li>
<li><a href="/en/" title="English part">en</a></li>
<li class="link-logo"><a href="/">pust<b>o.o</b>rg</a></li>
</ul>
<ul class="nav">
<li><a href="/mailur/" title="Lightweight webmail inspired by Gmail">Mailur</a></li>
<li><a href="/post/">Статьи</a></li>
<li><a href="/trip/">Наши поездки</a></li>
<li><a href="/naspeh/">Об авторе</a></li>
</ul>
Expand Down Expand Up @@ -69,16 +66,4 @@
{% block js %}
<script src="/all.js?{{ p.pages['/all.js'].mtime }}"></script>
{% endblock %}

<!-- Hotjar Tracking Code for https://pusto.org -->
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:3130552,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
</body>
4 changes: 1 addition & 3 deletions data/_theme/macros.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
{% macro show_meta(c, back_url=False, EN=None) %}
<ul class="meta">
{% if back_url %}
{% if c.parent.url == '/post/' %}
<li><a href="/">{{ c.parent.title|striptags }}</a></li>
{% elif c.parent and c.parent.title and c.parent.url != '/' %}
{% if c.parent and c.parent.title and c.parent.url != '/' %}
<li><a href="{{ c.parent.url }}">{{ c.parent.title|striptags }}</a></li>
{% endif %}
{% endif %}
Expand Down
Binary file removed data/en/resume/print.pdf
Binary file not shown.
10 changes: 6 additions & 4 deletions data/en/index.md → data/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
params:
lang: en
modified: 2020-10-06 11:00
modified: 2024-07-09 11:00
---
# Grisha aka naspeh, Pythonista
# Hrisha aka naspeh, Pythonista
<img class="align-right" src="/_img/ava200.jpg" />

I use [archlinux], [vim], [zsh], [i3] every day and [I like to optimize it for myself.][gh-dotfiles]
Expand All @@ -19,10 +19,12 @@ The best way to contact me is by email naspeh[at]gmail.com.
## My projects
[Mailur](/mailur/) – a lightweight webmail inspired by Gmail.

[Tider](https://github.com/naspeh/tider) – a lightweight time tracker (GTK+). I use it to understand how much time I spend on which activities while I am working on my computer. And it also reminds me to take a break.
[Tider] – a lightweight time tracker (GTK+). I use it to understand how much time I spend on which activities while I am working on my computer. And it also reminds me to take a break.

[Timefor](https://github.com/naspeh/timefor) – a command-line time tracker with [rofi](https://github.com/davatorium/rofi) integration. New replacement for [Tider](/en/tider/)
[Timefor](https://github.com/naspeh/timefor) – a command-line time tracker with [rofi](https://github.com/davatorium/rofi) integration. New replacement for [Tider]

[Pusto](https://github.com/naspeh/pusto) – a static site generator for this site.

All code and other projects you can find [on github.](https://github.com/naspeh)

[Tider]: https://github.com/naspeh/tider
3 changes: 0 additions & 3 deletions data/index.tpl

This file was deleted.

4 changes: 2 additions & 2 deletions data/meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"aliases": [
"/post/",
"/s/"
"/s/",
"/en/"
],
"globals": {
"host": "https://pusto.org",
Expand Down
5 changes: 4 additions & 1 deletion data/naspeh/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"params": {
"lang": "ru"
},
"aliases": [
"/naspeh/detail/"
]
}
}
1 change: 1 addition & 0 deletions data/post/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"params": {
"lang": "ru",
"feed": "/post/feed.xml"
},
"template": "_theme/list.tpl"
Expand Down
4 changes: 2 additions & 2 deletions data/en/resume/index.md → data/resume/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
aliases:
- /resume/
- /en/resume/
- /resume/en/

modified: 2021-10-31 12:00
template: _theme/base-no-header.tpl
---

# Grisha Kostyuk, experienced python developer
# Hrisha Kostiuk, experienced python developer
**naspeh[at]gmail.com | [Yaremche, Ukraine][tz] | remote only**

[tz]: https://en.wikipedia.org/wiki/Time_in_Ukraine
Expand Down
2 changes: 1 addition & 1 deletion data/s/2013-ru-pycon/index.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess

subprocess.call(
'rst2s5.py --current-slide --visible-controls index.rst index.html'
'python -m docutils --writer=s5 --current-slide --visible-controls --output=index.html index.rst'
'&& cat extend.css >> ui/default/slides.css',
shell=True
)
2 changes: 1 addition & 1 deletion data/trip/2011-karpaty-spravzhnya-kazka/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
**Фото:** наши и `Димы`__ (за что ему большое спасибо)

__ http://x-trips.com/travels/2011-10-karpaty
__ http://www.tdway.com/travels/3990/

Поехать в Карпаты мы подумывали давно (с лета), наконец-то собрались. Причем отдых решили совместить с гришиной работой (дома то он тоже работает удаленно). Заодно он хотел проверить как ему будет работаться в других условиях. Неоднократно от друзей слышали положительные отзывы о турбазах в с.Подобовец "Справжня казка" и "Вершина холма". По сути это базы одних хозяев, с одной администрацией, с той разницей, что "Вершина холма" находится в уединенном месте в 5 мин хотьбы от колыбы (кафе).

Expand Down
1 change: 1 addition & 0 deletions data/trip/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"params": {
"lang": "ru",
"feed": "/trip/feed.xml"
},
"template": "_theme/list.tpl"
Expand Down
19 changes: 9 additions & 10 deletions data/urls.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"/": [
"/post/",
"/s/",
"/post",
"/s"
"/en/",
"/s",
"/en"
],
"/all.css": null,
"/all.js": null,
Expand All @@ -13,17 +13,10 @@
"/draft/my-way/": null,
"/draft/my-way/linux/": null,
"/draft/pkglist-new/": null,
"/en/": null,
"/en/napokaz/": [
"/s/napokaz/",
"/s/napokaz"
],
"/en/resume/": [
"/resume/",
"/resume/en/",
"/resume",
"/resume/en"
],
"/en/tider/": null,
"/mailur/": null,
"/mailur/alpha/": null,
Expand Down Expand Up @@ -73,6 +66,12 @@
"/post/avtozagruzka-klassov-v-prilozheniyah-na-zend-framework",
"/blog/2008/09/25/avtozagruzka-klassov-v-prilozheniyah-na-zend-framework"
],
"/resume/": [
"/en/resume/",
"/resume/en/",
"/en/resume",
"/resume/en"
],
"/s/2013-ru-pycon/": [
"/s/writing/ru-pycon-2013/",
"/s/writing/ru-pycon-2013"
Expand Down
Empty file removed data/yandex_5ad3ffab17496674.txt
Empty file.
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def process_args():
'rsync -av --delete ./build/ {0}:/opt/pusto/'
'&& rsync -av ./deploy/nginx.conf {0}:/etc/nginx/conf.d/pusto.conf'
'&& ssh {0} "nginx -s reload"'
.format('root@h1.pusto.org')
.format('root@h5.pusto.org')
))

cmd('napokaz', help='napokaz updater')\
Expand Down
2 changes: 1 addition & 1 deletion pusto.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def get_globals(src_dir, key=None, default=None):
else:
tz = utc
meta['tz'] = tz
meta['now'] = utc.localize(dt.datetime.utcnow()).astimezone(tz)
meta['now'] = dt.datetime.now(tz)

get_globals.cache = meta
if key is not None:
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
docutils==0.19
Jinja2==3.1.2
lxml==4.9.1
Markdown==3.4.1
MarkupSafe==2.1.1
Pygments==2.12.0
python-frontmatter==1.0.0
pytz==2022.2.1
PyYAML==6.0
docutils==0.21.2
Jinja2==3.1.4
lxml==5.2.2
Markdown==3.6
MarkupSafe==2.1.5
Pygments==2.18.0
python-frontmatter==1.1.0
pytz==2024.1
PyYAML==6.0.1

0 comments on commit 3e3fe74

Please sign in to comment.