{% extends "basic/layout.html" %}

{% set theme_css_files = []%}
{% if theme_bootstrap_version == "3" %}
  {% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.1.0", "theme", "" %}
  {% set bs_span_prefix = "col-md-" %}
{% else %}
  {% set bootstrap_version, bootstrap_additional_css, navbar_version = "2.3.2", "responsive", "-2" %}
  {% set bs_span_prefix = "span" %}
{% endif %}

{% if theme_bootswatch_theme %}
  {# BS2 needs "bootstrap-responsive.css". BS3 doesn't. #}
  {% if theme_bootstrap_version == "3" %}
    {% set theme_css_files = theme_css_files + [
        '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css',
        '_static/bootstrap-sphinx.css'
      ]
    %}
  {% else %}
    {% set theme_css_files = theme_css_files + [
        '_static/bootswatch-' + bootstrap_version + '/' + theme_bootswatch_theme + '/bootstrap.min.css',
        '_static/bootstrap-' + bootstrap_version + '/css/bootstrap-' + bootstrap_additional_css + '.min.css',
        '_static/bootstrap-sphinx.css'
      ]
    %}
  {% endif %}
{% else %}
  {% set theme_css_files = theme_css_files + ['_static/main.min.css', '_static/styles.css']
  %}
{% endif %}

{% if not bootswatch_css_custom %}
  {% set bootswatch_css_custom = [] %}
{% endif %}
{% set css_files = css_files + theme_css_files + bootswatch_css_custom %}

{% set script_files = script_files + [
    '_static/js/jquery-1.11.0.min.js',
    '_static/js/jquery-fix.js',
    '_static/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js',
    '_static/bootstrap-sphinx.js'
  ]
%}

{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %}

{%- set bs_content_width = render_sidebar and "9" or "12"%}

{%- block doctype -%}
<!DOCTYPE html>
{%- endblock %}

{# Sidebar: Rework into our Bootstrap nav section. #}
{% macro navBar() %}
<header class="banner navbar navbar-default navbar-static-top" role="banner">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
       <a class="brand" href="http://owncloud.org/" rel="home" title="ownCloud.org"><img class="logo" src="{{ pathto('_static/img/logo_owncloud.svg', 1) }}" itemprop="logo"></a>
    </div>

    <nav class="collapse navbar-collapse" role="navigation">
      <ul id="menu-header" class="nav navbar-nav">
        <li class="menu-news"><a href="https://owncloud.org/news/">News</a></li>
        <li class="menu-features"><a href="https://owncloud.org/features/">Features</a></li>
        <li class="menu-demo"><a target="_blank" href="https://demo.owncloud.org">Demo</a></li>
        <li class="menu-documentation top-nav-active"><a href="https://doc.owncloud.org">Documentation</a></li>
        <li class="menu-contribute"><a href="https://owncloud.org/contribute/">Contribute</a>
        <li class="menu-support"><a href="https://owncloud.org/support">Support</a></li>
        <li class="menu-commercial"><a target="_blank" href="https://owncloud.com">Enterprise Edition</a></li>
        <li class="menu-install"><a href="https://owncloud.org/install/">Download</a></li>
      </ul>
    </nav>
  </div>
</header>
{% endmacro %}

{% if theme_bootstrap_version == "3" %}
  {%- macro bsidebar() %}
      {%- if render_sidebar %}
      <div class="{{ bs_span_prefix }}3">
        <div id="sidebar" class="bs-sidenav" role="complementary">
          {%- for sidebartemplate in sidebars %}
            {%- include sidebartemplate %}
          {%- endfor %}
        </div>
      </div>
      {%- endif %}
  {%- endmacro %}
{% else %}
  {%- macro bsidebar() %}
      {%- if render_sidebar %}
      <div class="{{ bs_span_prefix }}3">
        <div id="sidebar" class="bs-sidenav well" data-spy="affix">
          {%- for sidebartemplate in sidebars %}
            {%- include sidebartemplate %}
          {%- endfor %}
        </div>
      </div>
      {%- endif %}
  {%- endmacro %}
{% endif %}

{%- block extrahead %}
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#1d2d44">
<link rel="shortcut icon" href="https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png" />
<link rel="apple-touch-icon-precomposed" href="https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png" />
{% endblock %}

{# Silence the sidebar's, relbar's #}
{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}

{%- block content %}
{{ navBar() }}
<div class="wrap container not-front">
  <div class="content row">
  <main class="main">
    <div class="row page-content-header">
      <div class="col-md-6">
        <h1><a href="{{ pathto(master_doc) }}">{{ project|e }}</a></h1>
      </div>
      <div class="col-md-5 col-md-offset-1">
      {% if theme_show_search %}
        <form class="headersearch" style="margin-bottom:-3px;" action="{{ pathto('search') }}" method="get">
        <input type="text" value="" name="q" id="q" class="form-control" /> 
        <button  class="btn btn-default" type="submit" id="searchsubmit">Search</button>
        </form>
      {% endif %}
      </div>
    </div>
    {% block sidebartoc %}
			<div class="row">
				<div class="col-md-3">
					<div class="sidebar">
							<div class="menu-support-container">
								<ul id="menu-support" class="menu">
									<ul>
										
<li><a href="{{ pathto(master_doc) }}">Table of Contents</a></li>
									</ul>
                  {{ toctree(maxdepth=3) }}
								</ul>
							</div>
					</div>
				</div>
        {% endblock %}

				<div class="col-md-9">
					<div class="page-content">
            {% include "relations.html" %}
						{% block body %}{% endblock %}
            {% include "relations.html" %}
					</div>
				</div>
			</div>
  </main>  
  </div>
</div>
{%- endblock %}

{%- block footer %}
<div class="container">
<div class="row">
    <div class="col-lg-12 footer-social-icons">
      <p class="text-center"><a target="_blank" href="https://plus.google.com/107072838776436530705/about"><img width=50 src="{{ pathto('_static/img/social/googleplus.svg', 1) }}" title="Follow us on Google Plus!" alt="Follow us on Google Plus!"></img></a>
      <a target="_blank" style="margin: 0 7px 0 14px;" href="https://www.facebook.com/ownClouders"><img width=50 src="{{ pathto('_static/img/social/facebook.svg', 1) }}" title="Like our facebook page!" alt="Like our facebook page!"></img></a>
      <a target="_blank" style="margin: 0 14px 0 7px;" href="https://twitter.com/ownClouders"><img width=50 src="{{ pathto('_static/img/social/twitter.svg', 1) }}" title="Subscribe to our twitter channel!" alt="Subscribe to our twitter channel!"></img></a>
      <a target="_blank" href="https://owncloud.org/blogfeed"><img class="img-circle" width=50 src="{{ pathto('_static/img/social/rss.svg', 1) }}" title="Subscribe to our news feed!" alt="Subscribe to our news feed!"></img></a>
      <a target="_blank" href="http://visitor.r20.constantcontact.com/d.jsp?llr=ixens9uab&amp;p=oi&amp;m=1121878184680&amp;sit=mf4qye7jb&amp;f=cc4cd13f-acdf-45d3-b132-75252542c37d"><img class="img-circle" width=50 src="{{ pathto('_static/img/social/mail.svg', 1) }}"  title="Subscribe to our newsletter!" alt="Subscribe to our newsletter!"></img></a></p>
    </div>
    <div class="text-center">
      All documentation licensed under the <a href="https://creativecommons.org/licenses/by/3.0/us/">Creative Commons Attribution 3.0 Unported license</a>.
    </div>
</div>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
   <div class="row">
     <div class="col-sm-2 col-sm-offset-1">
        <div class="footer-nav">
          <h4>About ownCloud</h4>
          <ul id="menu-about" class="menu">
            <li class="menu-contact"><a href="https://owncloud.org/contact/">People</a></li>
            <li class="menu-history"><a href="https://owncloud.org/history/">History</a></li>
            <li class="menu-events"><a href="https://owncloud.org/events/">Events</a></li>
            <li class="menu-press"><a href="https://owncloud.org/press">Press</a></li>
            <li class="menu-privacy"><a href="https://owncloud.org/privacy/">Privacy policy</a></li>
          </ul>
        </div>
     </div>
     <div class="col-sm-2 col-sm-offset-2">
        <div class="footer-nav">
          <h4>Resources</h4>
          <ul id="menu-support-and-documentation" class="menu">
            <li class="menu-faq"><a href="https://owncloud.org/faq/">FAQ</a></li>
            <li class="menu-support"><a href="https://owncloud.org/support/">Support</a></li>
            <li class="menu-admin-manual"><a href="https://doc.owncloud.org">Documentation</a></li>
            <li class="menu-security"><a href="https://owncloud.org/security/">Security</a></li>
            <li class="menu-store"><a href="http://www.cafepress.com/owncloudshop">ownCloud Store</a></li>
          </ul>
        </div>
     </div>
     <div class="col-sm-2 col-sm-offset-2">
        <div class="footer-nav">
          <h4>Interact</h4>
          <ul id="menu-interact" class="menu">
            <li class="menu-irc-channel"><a href="https://webchat.freenode.net/?channels=owncloud">IRC Channel</a></li>
            <li class="menu-mailing-list"><a href="https://mailman.owncloud.org/mailman/listinfo/">Mailing List</a></li>
            <li class="menu-forums"><a href="https://forum.owncloud.org/">Forums</a></li>
            <li class="menu-bug-tracker"><a href="https://owncloud.org/contribute">Get involved</a></li>
            <li class="menu-promote"><a href="/promote/">Spread the word</a></li>

          </ul>
        </div>
     </div>
   </div>
   <div class="row">
      <div class="col-lg-12 footer-text">
        <p>
          {%- if show_copyright %}
            {%- if hasdoc('copyright') %}
              {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
            {%- else %}
              {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}<br/>
            {%- endif %}
          {%- endif %}
          {%- if last_updated %}
            {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/>
          {%- endif %}
          {%- if show_sphinx %}
            {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br/>
          {%- endif %}
        </p>
      </div>
    </div>
  </div>
</footer>
{%- endblock %}
