app/soc/templates/soc/home_settings/public.html
changeset 445 31927f21970d
parent 426 114fe0f840c8
child 446 0b479d573a4c
equal deleted inserted replaced
444:6e50bfc6e5a7 445:31927f21970d
       
     1 {% extends "soc/base.html" %}
       
     2 {% comment %}
       
     3 Licensed under the Apache License, Version 2.0 (the "License");
       
     4 you may not use this file except in compliance with the License.
       
     5 You may obtain a copy of the License at
       
     6 
       
     7   http://www.apache.org/licenses/LICENSE-2.0
       
     8 
       
     9 Unless required by applicable law or agreed to in writing, software
       
    10 distributed under the License is distributed on an "AS IS" BASIS,
       
    11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    12 See the License for the specific language governing permissions and
       
    13 limitations under the License.
       
    14 {% endcomment %}
       
    15 
       
    16 {% block scripts %}
       
    17 {% if home_settings.feed_url %}
       
    18     <script type="text/javascript" src="http://www.google.com/jsapi"></script>
       
    19     <script type="text/javascript" src="/soc/content/js/blog-080819.js"></script>
       
    20     <script type="text/javascript">
       
    21 
       
    22     google.load("feeds", "1");
       
    23 
       
    24     function initialize() {
       
    25       var blog = new BlogPreview(document.getElementById("blog"));
       
    26       blog.show("{{ home_settings.feed_url }}");
       
    27     }
       
    28     google.setOnLoadCallback(initialize);
       
    29 
       
    30     </script>
       
    31 {% endif %}
       
    32 {% endblock %}
       
    33 
       
    34 {% block page_title %}
       
    35 {% if home_document %}
       
    36 {{ home_document.title }}
       
    37 {% else %}
       
    38 {{ page.long_name }}
       
    39 {% endif %}
       
    40 {% endblock %}
       
    41 
       
    42 {% block header_title %}
       
    43 {% if home_document %}
       
    44 {{ home_document.short_name }}
       
    45 {% else %}
       
    46 {{ page.short_name }}
       
    47 {% endif %}
       
    48 {% endblock %}
       
    49 
       
    50 {% block body %}
       
    51  {% if home_document %}
       
    52   {{ home_document.content|safe }}
       
    53   <div id="lastmodified">Last updated on: {{ home_document.modified }}</div>
       
    54  {% else %}
       
    55 {% block missing_doc %}
       
    56 This is the default home page can be edited via Settings.
       
    57 {% endblock %}
       
    58  {% endif %}
       
    59  {% if home_settings.feed_url %}
       
    60     <div id="blog"></div>
       
    61  {% endif %}
       
    62 {% endblock %}