Permalink
Browse files

OpenGraph tagy do hlavicky

  • Loading branch information...
1 parent 0256810 commit 0b92cbc09114801199d07e5622e5379034f1af76 @msgre committed May 2, 2012
Showing with 14 additions and 0 deletions.
  1. +7 −0 hazard/news/templates/news/detail.html
  2. +3 −0 hazard/shared/templatetags/shared.py
  3. +4 −0 hazard/templates/bone2.html
View
7 hazard/news/templates/news/detail.html
@@ -4,6 +4,13 @@
{% block title %}{{ new.title }} | Zprávy | {{ block.super }}{% endblock %}
+{% block fb %}
+ <meta property="og:type" content="article">
+ <meta property="og:title" content="{{ new.title }}">
+ <meta property="og:description" content="{{ new.annotation }}">
+ <meta property="og:url" content="http://www.mapyhazardu.cz{{ request.path }}">
+{% endblock %}
+
{% block breadcrumb %}
<a href="/">Úvodní stránka</a> » <a href="{% url new-list %}">Zprávy</a> » <span>{{ new.title }}</span>
{% endblock %}
View
3 hazard/shared/templatetags/shared.py
@@ -137,6 +137,9 @@ def output(self, data):
def grammar(count, variants):
"""
Sklonovadlo.
+
+ Pouziti:
+ {{ some_count }}&nbsp;{{ some_count|grammar:"0=hernách,1=herně,?=hernách" }}
"""
variants = [[y.strip() for y in i.strip().split('=')] for i in variants.split(',')]
variants = dict([(i[0] == '?' and i[0] or int(i[0]), i[1]) for i in variants])
View
4 hazard/templates/bone2.html
@@ -6,6 +6,10 @@
{# Facebook OpenGraph #}
<meta property="og:site_name" content="MapyHazardu.cz">
+ <meta property="og:locale" content="cs_CZ">
+ <meta property="fb:admins" content="1376441740">
+ <meta property="fb:app_id" content="102954556508103">
+ {% block fb %}{% endblock %}
{% load compress %}
{% compress css %}

0 comments on commit 0b92cbc

Please sign in to comment.