Skip to content

Commit

Permalink
Finalize blog access links and media.
Browse files Browse the repository at this point in the history
  • Loading branch information
altostratous committed Feb 1, 2018
1 parent ee37e25 commit 8a61ff5
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 89 deletions.
5 changes: 5 additions & 0 deletions aic_site/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls import url, include
from django.contrib.auth import views as auth_views
from django.contrib import admin
Expand All @@ -37,3 +38,7 @@
url(r'^game/', include(game_urls)),
url(r'^articles/comments/', include('django_comments.urls')),
]

if settings.DEBUG:
from django.conf.urls.static import static
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
2 changes: 1 addition & 1 deletion apps/accounts/locale/fa/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 12:49+0000\n"
"POT-Creation-Date: 2018-02-01 14:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 12:49+0000\n"
"POT-Creation-Date: 2018-02-01 14:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion apps/game/locale/fa/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 12:49+0000\n"
"POT-Creation-Date: 2018-02-01 14:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion apps/intro/locale/fa/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 12:49+0000\n"
"POT-Creation-Date: 2018-02-01 14:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 2 additions & 0 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
- 443:443
volumes:
- ./static/root:/static/root/static
- ../media/root:/static/root/media
- /var/log/aic_site:/var/log/aic_site
- ./config/nginx/sites-enabled:/etc/nginx/sites-enabled
- ./config/nginx/sites-available:/etc/nginx/sites-available
Expand All @@ -28,6 +29,7 @@ services:
# cp /patches/zinnia_migrations.py /usr/local/lib/python3.5/dist-packages/zinnia/migrations/0003_publication_date.py &&
volumes:
- ./static/root:/root/aic_site/static/root
- ../media/root:/root/aic_site/media
- ./patches:/patches
depends_on:
- aic_db
Expand Down
2 changes: 2 additions & 0 deletions deploy/docker-compose_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
- 2016:2016
volumes:
- ./static/root:/static/root/static
- ../media_test/root:/static/root/media
- /var/log/aic_test_site:/var/log/aic_test_site
- ./config/nginx/sites-enabled:/etc/nginx/sites-enabled
- ./config/nginx/sites-available:/etc/nginx/sites-available
Expand All @@ -26,6 +27,7 @@ services:
# cp /patches/zinnia_migrations.py /usr/local/lib/python3.5/dist-packages/zinnia/migrations/0003_publication_date.py &&
volumes:
- ./static/root:/root/aic_site/static/root
- ../media_test/root:/root/aic_site/media
depends_on:
- aic_test_db
expose:
Expand Down
12 changes: 5 additions & 7 deletions locale/fa/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 12:49+0000\n"
"POT-Creation-Date: 2018-02-01 14:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -59,7 +59,7 @@ msgstr "بلاگ"
msgid "Game"
msgstr "بازی"

#: aic_site/context_processors.py:39
#: aic_site/context_processors.py:39 templates/base/navbar.html:23
msgid "Panel"
msgstr "پنل"

Expand Down Expand Up @@ -140,10 +140,6 @@ msgstr ""
"تمامی حقوق برای <a href=\"http://ssc.ce.sharif.edu\">انجمن علمی دانشکده "
"مهندسی کامپیوتر</a> دانشگاه صنعتی شریف محفوظ است. "

#: templates/base/navbar.html:23
msgid "Competition Area"
msgstr "محیط مسابقه"

#: templates/base/navbar.html:47 templates/zinnia/login.html:34
msgid "Login"
msgstr "ورود"
Expand Down Expand Up @@ -640,7 +636,6 @@ msgid "RSS feed of trackbacks on %(object)s"
msgstr ""

#: templates/zinnia/entry_detail_base.html:67
#| msgid "Comment as"
msgid "Comments and Q&A"
msgstr "پرسش و پاسخ و نظرات"

Expand Down Expand Up @@ -1011,6 +1006,9 @@ msgid "%(entry_count)s entry tagged by %(tag)s"
msgid_plural "%(entry_count)s entries tagged by %(tag)s"
msgstr[0] "%(entry_count)s تا پست با تگ %(tag)s"

#~ msgid "Competition Area"
#~ msgstr "محیط مسابقه"

#~| msgid ""
#~| "<a href=\"%(comment_url)s\" rel=\"external nofollow\" class=\"fn url\">"
#~| "%(comment_name)s</a> on <time class=\"comment-published\" datetime="
Expand Down
2 changes: 1 addition & 1 deletion templates/base/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{% if request.user.is_authenticated %}
<a href="{% url 'accounts:panel' %}" class="ui centered button" id="panel-button">
<i class="dashboard icon"></i>
{% trans 'Competition Area' %}
{% trans 'Panel' %}
</a>
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion templates/zinnia/_entry_detail_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h2 class="entry-title" itemprop="name">
<a href="{{ object.get_absolute_url }}" title="{{ object.title }}" rel="bookmark">
{% endif %}
<figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<img src="{{ object.image.url }}"
<img style="max-width: 20vw; float: left;" src="{{ object.image.url }}"
alt="{{ object.image_caption|default:object.title }}" itemprop="contentUrl"/>
{% if object.image_caption %}
<figcaption itemprop="caption">{{ object.image_caption }}</figcaption>
Expand Down
96 changes: 20 additions & 76 deletions templates/zinnia/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,24 @@
{% endblock breadcrumbs %}

{% block sidebar %}
<div class="ui sidebar inverted vertical menu">
<!--<aside id="widget-welcome" class="widget">-->
<!--<div class="item"><div class="title">{% trans "Welcome!" %}</h3>-->
<!--<p>-->
<!--{% trans "This simple theme is the default appearance of Zinnia." %}-->
<!--</p>-->
<!--<p>-->
<!--{% trans "Don't hesitate to override the template <strong>zinnia/base.html</strong> to start <a href='http://docs.django-blog-zinnia.com/en/latest/how-to/customize_look_and_feel.html'>customizing your Weblog</a>." %}-->
<!--</p>-->
<!--</aside>-->
<!--<aside id="widget-categories" class="widget">-->
<!--<div class="item"><div class="title">-->
<!--<a href="{% url 'zinnia:category_list' %}">{% trans "Categories" %}</a>-->
<!--</h3>-->
<!--{% get_categories %}-->
<!--</aside>-->
<!--<aside id="widget-authors" class="widget">-->
<!--<div class="item"><div class="title">-->
<!--<a href="{% url 'zinnia:author_list' %}">{% trans "Authors" %}</a>-->
<!--</h3>-->
<!--{% get_authors %}-->
<!--</aside>-->
<!--<aside id="widget-calendar" class="widget">-->
<!--<div class="item"><div class="title">{% trans "Calendar" %}</h3>-->
<!--{% get_calendar_entries %}-->
<!--</aside>-->
<div id="widget-tags" class="item">
<div class="ui right sidebar inverted vertical menu">
{% for title, link in ai.sidebar.items %}
{% if not link.dropdown %}
<a href="{{ link.address }}" class="{% if link.active %}active {% endif %}item">{{ title }}</a>
{% else %}
<div class="item">
<div class="title">
<span class="text">{{ title }}</span>
</div>
<div class="content menu">
{% for dtitle, dlink in link.dropdown.items %}
<a href="{{ dlink }}" class="item">{{ dtitle }}</a>
{% endfor %}
</div>
</div>
{% endif %}
{% endfor %}
<div id="widget-tags" class="item">
<div class="item">
<div class="header">
{% trans "Tags" %}
Expand All @@ -80,53 +71,6 @@
{% get_recent_comments %}
</div>
</div>
<!--<aside id="widget-linkbacks" class="widget">-->
<!--<div class="item"><div class="title">{% trans "Recent linkbacks" %}</h3>-->
<!--{% get_recent_linkbacks %}-->
<!--</aside>-->
<!--<aside id="widget-randoms" class="widget">-->
<!--<div class="item"><div class="title">{% trans "Random entries" %}</h3>-->
<!--{% get_random_entries %}-->
<!--</aside>-->
<!--<aside id="widget-populars" class="widget">-->
<!--<div class="item"><div class="title">{% trans "Popular entries" %}</h3>-->
<!--{% get_popular_entries %}-->
<!--</aside>-->
<!--<aside id="widget-archives" class="widget">-->
<!--<div class="item"><div class="title">{% trans "Archives" %}</h3>-->
<!--{% get_archives_entries_tree %}-->
<!--</aside>-->
{# {% if user.is_authenticated %}#}
<div id="widget-tools" class="item">
<div class="item">
<div class="header">{% trans "Tools" %}</div>
</div>
<div class="content menu">
<ul>
{% if perms.zinnia %}
<li>
<a href="{% url 'admin:app_list' 'zinnia' %}" title="{% trans "Dashboard" %}">
{% trans "Dashboard" %}
</a>
</li>
{% endif %}
{% if perms.zinnia.add_entry %}
<li>
<a href="{% url 'admin:zinnia_entry_add' %}" title="{% trans "Post an entry" %}">
{% trans "Post an entry" %}
</a>
</li>
{% endif %}
{% block admin-tools %}
{% endblock admin-tools %}
<li>
<a href="{% url 'admin:logout' %}" title="{% trans "Log out" %}">
{% trans "Log out" %}
</a>
</li>
</ul>
</div>
</div>
</div>
{# {% endif %}#}

</div>
{% endblock sidebar %}

0 comments on commit 8a61ff5

Please sign in to comment.