{% extends g.theme.master %}

{% block title %}{{c.project.name}} / Homepage{% endblock %}

{% block header %}Project Homepage{% endblock %}

{% block content %}
  {% if c.project.deleted %}
    <div class="notice">This project has been deleted and is not visible to non-admin users</div>
  {% endif %}
    <form method="POST" action="update_homepage" enctype="multipart/form-data">
        <label class="grid-19" for="homepage_title">Title: </label>
        <div class="grid-19">
          <input name="homepage_title" id="homepage_title" style="width: 95%" value="{{c.project.homepage_title}}" type="text">
        </div>
        <div class="grid-19">
          {{c.markdown_editor.display(name='description', value=c.project.description)}}
        </div>
        <hr class="grid-19" style="margin-top: 1em; margin-bottom: 1em">
        <div class="grid-19"><input type="submit" value="Save"></div>
    </form>
{% endblock %}

{% block extra_js %}
  <script type="text/javascript" src="{{g.forge_static('js/jquery.maxlength-min.js')}}"></script>
  <script type="text/javascript">
    $(document).ready(function(){
      $('#short_description_textarea').maxlength({maxCharacters: 250});
    });
  </script>
{% endblock %}
