Skip to content

Commit

Permalink
projects/project_tile_userprofile; rm template, apps/userdashboard: u…
Browse files Browse the repository at this point in the history
…pdate carousel and tiles and no project shown for desktop and mobile, fixes #72"
  • Loading branch information
philli-m committed Apr 14, 2021
1 parent 7ca7ae6 commit 61c1968
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 89 deletions.
16 changes: 5 additions & 11 deletions adhocracy-plus/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,21 @@ function init () {
focusOnSelect: false,
centerMode: false,
dots: false,
arrows: true,
arrows: false,
centerPadding: 30,
mobileFirst: true,
infinite: false,
variableWidth: false,
slidesToShow: 1,
slidesToShow: 1.2,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3
}
},
{
breakpoint: 550,
settings: {
slidesToShow: 2
slidesToShow: 2,
arrows: true
}
}
],
slidesToScroll: 1
]
})

if ($.fn.select2) {
Expand Down
15 changes: 15 additions & 0 deletions adhocracy-plus/assets/scss/components/_project_tile_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
position: relative;
margin: $spacer 0.75*$spacer;

// overwrites for tiles in carousel
.tile.organisation__tile {
height: 430px;
margin: 0;
display: flex !important;
}

.tile__image {
min-height: 12rem;
}

//slick overwrites - nested for specificity
.slick-list {
margin: 0 -0.5*$spacer;
Expand Down Expand Up @@ -57,6 +68,10 @@
@media screen and (min-width: $breakpoint-md) {
.project-tile-carousel {
margin: $spacer 0;

.tile.organisation__tile {
height: 570px;
}
}

.project-tile-carousel__wrapper {
Expand Down
4 changes: 0 additions & 4 deletions adhocracy-plus/assets/scss/components/_tile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ $svg-colour: #2a3cd4;
width: 100%;
}

.userdashboard__tile {
height: 320px;
}

.tile__head {
position: relative;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<span>{% trans 'Back to overview' %}</span>
</a>
<h3 class="mt-2">{% trans 'Following' %}</h3>
<div class="row">
{% for project in view.projects %}
<div class="col-sm-6 col-lg-4">
{% include 'a4_candy_projects/includes/project_tile_userprofile.html' with project=project orientation='vertical' %}
</div>
{% endfor %}
</div>
<ul class="l-tiles-2">
{% for project in view.projects %}
{% include 'a4_candy_projects/includes/project_list_tile.html' with project=project orientation='vertical' %}
{% endfor %}
</ul>


{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
{% block dashboard_content %}

<h3 class="mt-sm-0 d-inline-block">{% trans 'Following' %}</h3>
{% if view.projects.count > 3 %}
{% if view.projects.count > 2 %}
<a class="btn btn--none float-right pr-0" href="{% url 'userdashboard-following' %}">{% trans 'View more' %}</a>
{% endif %}

{% if view.projects_carousel %}
<div class="project-tile-carousel">
{% for project in view.projects_carousel %}
{% include 'a4_candy_projects/includes/project_tile_userprofile.html' with project=project orientation='vertical' %}
{% include 'a4_candy_projects/includes/project_list_tile.html' with project=project orientation='vertical' %}
{% endfor %}
</div>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion apps/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def projects_carousel(self):
sorted_active_projects, sorted_future_projects, sorted_past_projects =\
self.object.get_projects_follow_list(exclude_private_projects=True)
return (list(sorted_active_projects) +
list(sorted_future_projects))[:9]
list(sorted_future_projects))[:6]

@property
def organisations(self):
Expand Down

0 comments on commit 61c1968

Please sign in to comment.