Skip to content

Commit

Permalink
Only display categories if categories are present
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Posselt committed Jun 24, 2016
1 parent d084ea8 commit 007e192
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
21 changes: 21 additions & 0 deletions nextcloudappstore/core/static/assets/css/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
html,
body {
margin:0;
padding:0;
height:100%;
}
#container {
min-height:100%;
position:relative;
}
#body {
padding:10px;
padding-bottom:50px;
}
#footer {
position:absolute;
bottom:0;
width:100%;
border-top: 1px solid #e7e7e7;
}

.banner {
background-image: url('../img/home/background3.jpg');
background-repeat: no-repeat;
Expand Down
30 changes: 22 additions & 8 deletions nextcloudappstore/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,40 @@
</head>

<body>
<div id="container">
{% block body %}
{% block navbar %}{% include 'nav.html' %}{% endblock navbar %}
<div class="container">
<div class="container" id="body">
<div class="row">
<div class="col-sm-3">
{% block sidebar %}
<h2>Categories</h2>
<ul id="sidebar" class="nav nav-pills nav-stacked">
<li class="{% if cat.id == current_category.id %}active{% endif %}"><a href="{% url 'home' %}">{% trans 'All Apps' %}</a></li>
{% for cat in categories %}
<li class="{% if cat.id == current_category.id %}active{% endif %}"><a href="{% url 'category_list_category' cat.id %}">{{ cat.name }}</a></li>
{% endfor %}
</ul>
{% if categories %}
<h2>Categories</h2>
<ul id="sidebar" class="nav nav-pills nav-stacked">
<li class="{% if cat.id == current_category.id %}active{% endif %}"><a href="{% url 'home' %}">{% trans 'All Apps' %}</a></li>
{% for cat in categories %}
<li class="{% if cat.id == current_category.id %}active{% endif %}"><a href="{% url 'category_list_category' cat.id %}">{{ cat.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock sidebar %}
</div>
<div class="col-sm-9">
{% block content %}
{% endblock content %}
</div>
</div>
</div>
{% endblock body %}
<footer class="navbar-default" id="footer">
<div class="container">
<ul class="nav navbar-nav navbar-left">
<li class="nav-link">
<a href="https://github.com/nextcloud/appstore">Fork me on GitHub</a>
</li>
</ul>
</div>
</footer>
</div>
</body>
</html>
9 changes: 7 additions & 2 deletions nextcloudappstore/core/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load i18n %}

{% block content %}
{% if messages %}
Expand All @@ -11,8 +12,12 @@
</div>
{% endif %}

<h2>Applications</h2>
<div class="row">
<div class="jumbotron">
<h1>{% trans 'All Apps' %}</h1>
<p>{% trans 'All available apps' %}</p>
</div>

<div class="row">
{% for app in recommended_apps %}
<div class="col-sm-4">
<div class="well">
Expand Down

0 comments on commit 007e192

Please sign in to comment.