Socialify

Folder ..

Viewing home.html
121 lines (120 loc) • 6.5 KB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{% extends 'blog/partials/base.html' %} {% block content %}
{% load replace %}
<div class="main">
  <div style="position: relative; top: 40px;">
    <table style="margin: 0 auto; position: relative; top: 120px;">
      <form action="" method="get">
        <tr>
          <td>
            <p> Search &amp; Filter: &emsp;</p>
          </td>
          <td>
            <input type="text" name="search" placeholder="Search Term" value="{{ search }}" autocomplete="off">
          </td>
          <td>
            <select name="items">
              <option value="10" {% if items == 10 %}selected{% endif %}>10</option>
              <option value="25" {% if items == 25 %}selected{% endif %}>25</option>
              <option value="50" {% if items == 50 %}selected{% endif %}>50</option>
              <option value="100" {% if items == 100 %}selected{% endif %}>100</option>
            </select>
          </td>
          <td>
            <select name="sort">
              <option value="full_name" {% if sort == 'full_name' %}selected{% endif %}>Name</option>
              <option value="created" {% if sort == 'created' %}selected{% endif %}>Created</option>
              <option value="updated" {% if sort == 'updated' %}selected{% endif %}>Updated</option>
              <option value="pushed" {% if sort == 'pushed' %}selected{% endif %}>Pushed</option>
              <option value="stars" {% if sort == 'stars' %}selected{% endif %}>Stars</option>
            </select>
          </td>
          <td>
            <select name="direction">
              <option value="asc" {% if direction == 'asc' %}selected{% endif %}>Ascending</option>
              <option value="desc" {% if direction == 'desc' %}selected{% endif %}>Descending</option>
            </select>
          </td>
          <td>
            <input type="submit" value="Go" style="position: relative; top: -2px;">
          </td>
        </tr>
      </form>
    </table>
  </div>
  <div class="area">
    {% load static %}
    {% load times %}
    <div style="background-image: url({% static 'images/site/repositories.png' %}); width: 100%; height: auto; background-repeat: no-repeat; background-position: center; background-size: cover; margin-top: -20px; padding: 100px 0px;"></div>
  </div>
  <hr>
  {% comment %} Search and Filter {% endcomment %}
  
  <div class='repositories'>
    <table style="width=100%; margin: 0 auto; table-layout: fixed;">
      {% for repo in repos %}
        <tr>
          <td><a href="{% url 'dev_status:repo' repo.name %}">
              <img src="{% url 'ignis:cover_image' repo.name %}.gif" style="display: inline-block; margin-right: 10px;" class="zoom" border="0">
            </a>
          </td>
          <td>
          <p style="font-size: 14px; font-weight: bold;">
            <a href="{% url 'dev_status:repo' repo.name %}">{{ repo.name }}</a>
            {% if repo.isFork %}
              <span title="Forked Repository"><img src="{% static 'images/site/icons/isFork.png' %}" style="display: inline-block; margin-left: 5px; height: 16px; position: relative; top: 4px;" border="0"></span>
            {% endif %}
            {% if repo.isArchived %}
              <span title="Archived Repository"><img src="{% static 'images/site/icons/cabinet.gif' %}" style="display: inline-block; margin-left: 5px; height: 16px; position: relative; top: 4px;" border="0"></span>
            {% endif %}
          </p>
          <p>{{ repo.description }}</p>
          <p>
            {% if repo.homepageUrl %}
              <span><img src="{% static 'images/site/icons/a-globe.gif' %}" style="display: inline-block; margin-right: 5px; height: 16px; position: relative; top: 4px;" border="0"></span>
              <span style="margin-right: 20px;"><a href="{{ repo.homepageUrl }}" target="_blank">{{ repo.homepageUrl|replace:'https://'|replace:'http://' }}</a></span>
            {% endif %}
            <span title="Last Pushed"><b>Last Pushed:</b> <em>{{ repo.pushedAt }}</em></span>
          </p>
        <hr>
          <p>
            {% if repo.licenseInfo %}
            <span title="License"><img src="{% static 'images/site/icons/scale.gif' %}" style="display: inline-block; margin-right: 5px; height: 16px; position: relative; top: 4px;" border="0"></span>
            <span title="License" style="margin-right: 20px;">{{ repo.licenseInfo.name }}</span>
            {% endif %}
            <span title="Stargazers"><img src="{% static 'images/site/icons/anistar.gif' %}" style="display: inline-block; margin-right: 5px; height: 16px; position: relative; top: 4px;" border="0"></span>
            <span title="Stargazers" style="margin-right: 20px;">{{ repo.stargazerCount }}</span>
            <span title="Forks"><img src="{% static 'images/site/icons/isFork.png' %}" style="display: inline-block; margin-right: 5px; height: 16px; position: relative; top: 4px;" border="0"></span>
            <span title="Forks">{{ repo.forkCount }}</span>
          </p>
        </td>
        </tr>
      {% endfor %}
    </table>
  </div>
  <div class="pagination">
    <center>
    <table id="pagination">
      <tr>
        {% if page == 1 %}
          <td><a class="disabled">&laquo;</a></td>
          <td style="margin-right: 15px;"><a class="disabled">&lsaquo;</a></td>
        {% else %}
          <td><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page=1">&laquo;</a></td>
          <td style="margin-right: 15px;"><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ page|add:-1 }}">&lsaquo;</a></td>
        {% endif %}
        {% for i in num_pages|times  %}
          <td><a {% if i == page %}class="active"{% endif %} href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ i }}">{{ i }}</a></td>
        {% endfor %}
        {% if page == num_pages %}
          <td style="margin-left: 15px;"><a class="disabled">&rsaquo;</a></td>
          <td><a class="disabled">&raquo;</a></td>
        {% else %}
          <td style="margin-left: 15px;"><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ page|add:1 }}">&rsaquo;</a></td>
          <td><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ num_pages }}">&raquo;</a></td>
        {% endif %}
      </tr>
    </table>
    </center>
  </div>
 </div>
</div>
{% endblock %}