Skip to content

Commit

Permalink
Update URL structure of image
Browse files Browse the repository at this point in the history
  • Loading branch information
aswinshenoy committed Mar 6, 2019
1 parent 2237eca commit 4ea2cbf
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 35 deletions.
26 changes: 13 additions & 13 deletions templates/activity/achievements.haml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{% for o in gsoc_orgs %}
<div class="col-lg-3 col-md-4 col-6 p-2">
<a href="/organization/{{o.id}}" class="p-3">
<img src="/{{o.icon}}" style="width: 80%">
<img src="{{o.icon.url}}" style="width: 80%">
<span>{{o.count}}</span>
</a>
</div>
Expand All @@ -55,7 +55,7 @@
{% for m in gsoc_members %}
<div class="col-lg-3 col-md-4 col-6 p-2">
<a href="/@{{m.username}}">
<img src="/{{m.avatar}}" style="width: 100%">
<img src="{{m.avatar.url}}" style="width: 100%">
<span>{{m.count}}</span>
</a>
</div>
Expand All @@ -70,16 +70,16 @@
%div{:class=>"px-3 py-2 w-100"}
%h4 {{i.title}}
<span>{{i.type}}</span>
<sub><img src="/{{i.organizer.icon}}"></sub>
<sub><img src="{{i.organizer.icon.url}}"></sub>
%h5 {{i.organizer.name}}
.bg-primary.p-2
{% if i.attendee.all|length > 1 %}
{% for m in i.attendee.all %}
<a href="/@{{m.username}}"><img src="/{{m.Profile.avatar}}" class="avatar" alt="{{m.Profile.first_name}} {{m.Profile.last_name}}"></a>
<a href="/@{{m.username}}"><img src="{{m.Profile.avatar.url}}" class="avatar" alt="{{m.Profile.first_name}} {{m.Profile.last_name}}"></a>
{% endfor %}
{% else %}
{% for m in i.attendee.all %}
<a href="/@{{m.username}}"><img src="/{{m.Profile.avatar}}" class="avatar"> {{m.Profile.first_name}} {{m.Profile.last_name}}</a>
<a href="/@{{m.username}}"><img src="{{m.Profile.avatar.url}}" class="avatar"> {{m.Profile.first_name}} {{m.Profile.last_name}}</a>
{% endfor %}
{% endif %}
{% endfor %}
Expand All @@ -94,16 +94,16 @@
%div{:class=>"achievement-card anime fadeInUp my-4"}
%div{:class=>"px-3 py-2 w-100"}
%h4 {{i.title}}
<sub><img src="/{{i.organizer.icon}}"></sub>
<sub><img src="{{i.organizer.icon.url}}"></sub>
%h5 {{i.organizer.name}}
.bg-primary.p-2
{% if i.attendee.all|length > 1 %}
{% for m in i.attendee.all %}
<a href="/@{{m.username}}"><img src="/{{m.Profile.avatar}}" class="avatar" alt="{{m.Profile.first_name}} {{m.Profile.last_name}}"></a>
<a href="/@{{m.username}}"><img src="{{m.Profile.avatar.url}}" class="avatar" alt="{{m.Profile.first_name}} {{m.Profile.last_name}}"></a>
{% endfor %}
{% else %}
{% for m in i.attendee.all %}
<a href="/@{{m.username}}"><img src="/{{m.Profile.avatar}}" class="avatar"> {{m.Profile.first_name}} {{m.Profile.last_name}}</a>
<a href="/@{{m.username}}"><img src="{{m.Profile.avatar.url}}" class="avatar"> {{m.Profile.first_name}} {{m.Profile.last_name}}</a>
{% endfor %}
{% endif %}
{% endfor %}
Expand All @@ -118,15 +118,15 @@
%div{:class=>"achievement-card anime fadeInUp my-4"}
%div{:class=>"px-4 py-2 w-100"}
%h4 {{t.title}}
<sub><img src="/{{t.organizer.icon}}"></sub>
<sub><img src="{{t.organizer.icon.url}}"></sub>
{% if t.event %}
%h5 {{t.event}}
{% else %}
%h5 {{t.organizer.name}}
{% endif %}
<span>{{t.date}}</span>
.bg-primary.p-2
<a href="/@{{t.member.username}}"><img src="/{{t.member.Profile.avatar}}" class="avatar"> {{t.member.Profile.first_name}} {{t.member.Profile.last_name}}</a>
<a href="/@{{t.member.username}}"><img src="{{t.member.Profile.avatar.url}}" class="avatar"> {{t.member.Profile.first_name}} {{t.member.Profile.last_name}}</a>
{% endfor %}
</div>
%hr
Expand All @@ -139,17 +139,17 @@
%div{:class=>"achievement-card anime fadeInUp my-4"}
%div{:class=>"px-3 py-2 w-100"}
%h4 {{p.title}}
<sub><img src="/{{p.publisher.icon}}"></sub>
<sub><img src="{{p.publisher.icon.url}}"></sub>
%h5 {{p.publisher.name}}
<span>{{p.date}}</span>
.bg-primary.p-2
{% if p.members.all|length > 1 %}
{% for m in p.members.all %}
<a href="/@{{m.username}}"><img src="/{{m.Profile.avatar}}" class="avatar" alt="{{m.Profile.first_name}} {{m.Profile.last_name}}"></a>
<a href="/@{{m.username}}"><img src="{{m.Profile.avatar.url}}" class="avatar" alt="{{m.Profile.first_name}} {{m.Profile.last_name}}"></a>
{% endfor %}
{% else %}
{% for m in p.members.all %}
<a href="/@{{m.username}}"><img src="/{{m.Profile.avatar}}" class="avatar"> {{m.Profile.first_name}} {{m.Profile.last_name}}</a>
<a href="/@{{m.username}}"><img src="{{m.Profile.avatar.url}}" class="avatar"> {{m.Profile.first_name}} {{m.Profile.last_name}}</a>
{% endfor %}
{% endif %}
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion templates/blog/list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.col-md-4.col-6.p-2
<a href="/@{{p.author.username}}/{{p.slug}}">
.section-card.bg-white.p-0.anime.zoomIn
<img src="/{{p.featured_image}}" class="cover">
<img src="{{p.featured_image.url}}" class="cover">
.content
@{{p.author.username}}
%h4 {{p.title}}
Expand Down
4 changes: 2 additions & 2 deletions templates/blog/single.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
%h1 {{post.title}}
.post-card.bg-white.py-3
.d-flex.p-2.align-items-center
<img src="/{{author.avatar}}" style="width: 40px; height: 40px; object-fit: cover;" class="rounded-circle">
<img src="{{author.avatar.url}}" style="width: 40px; height: 40px; object-fit: cover;" class="rounded-circle">
.pl-2 {{author.first_name}} {{author.last_name}}
%section.my-4.container
<img src="/{{post.featured_image}}" class="featured_image">
<img src="{{post.featured_image.url}}" class="featured_image">
.post-card.bg-white
{{post.content|safe}}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions templates/gallery/album.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%h1 {{album.title}}
.post-card.bg-white.py-3
.d-flex.p-2.align-items-center
<img src="/{{uploader.avatar}}" style="width: 40px; height: 40px; object-fit: cover;" class="rounded-circle">
<img src="{{uploader.avatar.url}}" style="width: 40px; height: 40px; object-fit: cover;" class="rounded-circle">
.pl-2 {{uploader.first_name}} {{uploader.last_name}}
.my-4
{{album.description|safe}}
Expand All @@ -21,6 +21,6 @@
{% for p in album.photos.all %}
.col-sm-3.col-md-4.col-6.p-2
.section-card.p-0
<img src="/{{p.image}}">
<img src="{{p.image.url}}">
{% endfor %}
{% endblock %}
2 changes: 1 addition & 1 deletion templates/gallery/list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.col-md-4.col-6.p-2
<a href="/gallery/{{a.slug}}">
.section-card.bg-white.p-0.anime.zoomIn
<img src="/{{a.cover.image}}" class="cover">
<img src="{{a.cover.image.url}}" class="cover">
.content
@{{a.uploader.username}}
%h4 {{a.title}}
Expand Down
2 changes: 1 addition & 1 deletion templates/home.haml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
.testimonial.text-center.w-100
.message "{{t.message}}"
%div
<img src="/{{t.avatar}}">
<img src="{{t.avatar.url}}">
%div.d-block
%span.d-block.text-left {{t.author}}
.sub {{t.credential}}
Expand Down
2 changes: 1 addition & 1 deletion templates/member/list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div member class="col-lg-3 col-md-4 col-6 p-2" tags="{{p.first_name.lower }} {{ p.last_name.lower }} {{p.user.username.lower}}">
<a href="/@{{p.user.username}}">
.section-card.bg-white.p-0.anime.zoomIn.m-1
<img src="/{{p.avatar}}" class="cover">
<img src="{{p.avatar.url}}" class="cover">
.content
%h4 {{p.first_name}} {{p.last_name}}
{% if p.tagline %}
Expand Down
22 changes: 11 additions & 11 deletions templates/member/profile.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<section id="cover"
style="background-image: {% if profile.cover %} linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/{{profile.cover}}'); {% endif %} background-position: center; background-size: cover; background-color: {{profile.accent}};">
%div.name.text-center
<img src="/{{profile.avatar}}" id="avatar" class="w-100 rounded-circle">
<img src="{{profile.avatar.url}}" id="avatar" class="w-100 rounded-circle">
%h1 {{profile.first_name}} {{profile.last_name}}
{% if profile.tagline %}
%div.tagline {{profile.tagline}}
Expand Down Expand Up @@ -130,7 +130,7 @@
.tag-list
{% for i in interests %}
%span
<img src="/{{i.icon}}">
<img src="{{i.icon.url}}">
{{i.name}}
{% endfor %}
{% endif %}
Expand All @@ -142,7 +142,7 @@
.tag-list
{% for i in expertise %}
%span
<img src="/{{i.icon}}">
<img src="{{i.icon.url}}">
{{i.name}}
{% endfor %}
{% endif %}
Expand All @@ -154,7 +154,7 @@
.section-card.bg-white
.row.m-0
.col-sm-1.col-2.p-1
<img src="/{{e.organization.icon}}">
<img src="{{e.organization.icon.url}}">
.col
%h4 {{e.position}}
%h5 {{e.organization}}
Expand All @@ -178,7 +178,7 @@
.section-card.bg-white
.row.m-0
.col-sm-1.col-2.p-1.d-flex.align-items-center
<img src="/{{e.institution.icon}}">
<img src="{{e.institution.icon.url}}">
.col
%h4 {{e.title}}
%h5 {{e.institution}}
Expand Down Expand Up @@ -210,7 +210,7 @@
%h5 {{h.title}}
%div
%span
<img src="/{{h.issuer.icon}}">
<img src="{{h.issuer.icon.url}}">
{{h.issuer.name}}
%span
%i.fa.fa-calendar.mr-2
Expand All @@ -228,7 +228,7 @@
%h5 {{p.title}}
%div
%span
<img src="/{{p.publisher.icon}}">
<img src="{{p.publisher.icon.url}}">
{{p.publisher.name}}
%span
%i.fa.fa-calendar.mr-2
Expand All @@ -246,7 +246,7 @@
%h5 {{c.title}}
%div
%span
<img src="/{{c.issuer.icon}}">
<img src="{{c.issuer.icon.url}}">
{{c.issuer.name}}
%span
%i.fa.fa-calendar.mr-2
Expand All @@ -265,7 +265,7 @@
%h6 {{t.event.title}}
%div
%span
<img src="/{{t.organizer.icon}}">
<img src="{{t.organizer.icon.url}}">
{{t.organizer.name}}

{% endfor %}
Expand All @@ -285,7 +285,7 @@
.col-lg-4.col-md-6
<a href="/project/{{p.slug}}">
.section-card.bg-white.project-card
<img src="/{{p.cover}}" class="cover">
<img src="{{p.cover.url}}" class="cover">
.content
%h3 {{p.name}}
.tagline {{p.tagline}}
Expand All @@ -298,7 +298,7 @@
.col-lg-4.col-md-6
<a href="{{p.slug}}">
.section-card.bg-white.blog-post
<img src="/{{p.featured_image}}" class="cover">
<img src="{{p.featured_image.url}}" class="cover">
.content
%h3 {{p.title}}
%div
Expand Down
2 changes: 1 addition & 1 deletion templates/project/list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.col-md-4.col-6.p-2
<a href="/project/{{p.slug}}">
.section-card.bg-white.p-0.anime.zoomIn
<img src="/{{p.cover}}" class="cover">
<img src="{{p.cover.url}}" class="cover">
.content
%h4 {{p.name}}
.tagline {{p.tagline}}
Expand Down
4 changes: 2 additions & 2 deletions templates/project/project.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.tagline {{project.tagline}}
%section.row.m-0.p-2
.col-md-9.py-4
<img src="/{{project.cover}}" class="featured_image">
<img src="{{project.cover.url}}" class="featured_image">
.post-card.bg-white
{{project.detail|safe}}
.col
Expand All @@ -25,7 +25,7 @@
<a href="/@{{m.user.username}}">
.row.m-0
.col-3.p-0
<img src="/{{m.avatar}}" class="rounded-circle">
<img src="{{m.avatar.url}}" class="rounded-circle">
.col.p-2.d-flex.align-items-center
%h5 {{m.first_name}} {{m.last_name}}
</a>
Expand Down

0 comments on commit 4ea2cbf

Please sign in to comment.