Skip to content

Commit

Permalink
Fix layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Posselt committed Jun 25, 2016
1 parent 007e192 commit 7810eda
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 69 deletions.
25 changes: 25 additions & 0 deletions nextcloudappstore/core/templates/app/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends 'base.html' %}
{% load i18n %}
{% load staticfiles %}

{% block content %}
<div class="row">
<div class="col-sm-3">
{% 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 %}
</div>
<div class="col-sm-9">
{% block apps %}{% endblock apps %}
</div>
</div>
{% endblock content %}
6 changes: 3 additions & 3 deletions nextcloudappstore/core/templates/app/detail.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% extends 'app/base.html' %}
{% load i18n %}

{% block content %}
{% block apps %}
<h1>{{ object.name }}</h1>

<ul class="nav nav-tabs">
Expand Down Expand Up @@ -220,4 +220,4 @@ <h3>{{ screenshot.name }}</h3>
</div><!-- tab content -->
</div>
</div>
{% endblock content %}
{% endblock apps %}
30 changes: 15 additions & 15 deletions nextcloudappstore/core/templates/app/list.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{% extends "base.html" %}
{% extends 'app/base.html' %}

{% block content %}
{% block apps %}
<div class="jumbotron">
<h1>{{ current_category.name }}</h1>
<p>{{ current_category.description }}</p>
<h1>{{ current_category.name }}</h1>
<p>{{ current_category.description }}</p>
</div>
{% for app in object_list %}
<div class="col-sm-4">
<div class="well">
<h3><a href="{%url 'app_detail' id=app.id %}">{{ app.name }}</a></h3>
{{ app.description }}
</div>
</div>
{% for app in object_list %}
<div class="col-sm-4">
<div class="well">
<h3><a href="{% url 'app_detail' id=app.id %}">{{ app.name }}</a></h3>
{{ app.description }}
</div>
</div>
{% if forloop.counter|divisibleby:4 %}
</div>
<div class="row">
<div class="row"></div>
{% endif %}
{% endfor %}
{% endblock content %}
{% endfor %}

{% endblock apps %}

67 changes: 29 additions & 38 deletions nextcloudappstore/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,46 @@
{% load i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="{% static 'assets/img/favicon.png' %}" />
<link rel="shortcut icon" href="{% static 'assets/img/favicon.png' %}"/>
<title>Nextcloud App Store{% block head-title %}{% endblock head-title %}</title>
<link rel="stylesheet" href="{% static 'vendor/bootstrap/dist/css/bootstrap.min.css' %}">
<link rel="stylesheet"
href="{% static 'vendor/bootstrap/dist/css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/style.css' %}">
<script src="{% static 'vendor/jquery/dist/jquery.min.js' %}"></script>
<script src="{% static 'vendor/bootstrap/dist/js/bootstrap.min.js' %}"></script>
<script
src="{% static 'vendor/bootstrap/dist/js/bootstrap.min.js' %}"></script>
{% block head %}{% endblock head %}
</head>
</head>

<body>
<div id="container">
{% block body %}
<body>
<div id="container">
{% block navbar %}{% include 'nav.html' %}{% endblock navbar %}
<div class="container" id="body">
<div class="row">
<div class="col-sm-3">
{% block sidebar %}
{% 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>
{% if messages %}
<div class="messages">
{% for message in messages %}
<div{% if message.tags %} class="alert alert-{{ message.tags }}"{% endif %}>
{{ message }}
</div>
{% endfor %}
</div>
{% endif %}
{% block content %}{% endblock content %}
</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>
<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>
16 changes: 3 additions & 13 deletions nextcloudappstore/core/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
{% extends "base.html" %}
{% extends 'app/base.html' %}
{% load i18n %}

{% block content %}
{% if messages %}
<div class="messages">
{% for message in messages %}
<div{% if message.tags %} class="alert alert-{{ message.tags }}"{% endif %}>
{{ message }}
</div>
{% endfor %}
</div>
{% endif %}

{% block apps %}
<div class="jumbotron">
<h1>{% trans 'All Apps' %}</h1>
<p>{% trans 'All available apps' %}</p>
Expand All @@ -31,4 +21,4 @@ <h3><a href="{%url 'app_detail' id=app.id %}">{{ app.name }}</a></h3>
{% endif %}
{% endfor %}
</div>
{% endblock content %}
{% endblock apps %}

0 comments on commit 7810eda

Please sign in to comment.