Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TheAgency: Resize images with existing sizes #3113

Merged
merged 2 commits into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Media/Assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function initializeMediaApplication(displayMediaApplication, mediaApplicationUrl
return result;
},
thumbSize: function () {
return this.smallThumbs ? 120 : 240 ;
return this.smallThumbs ? 160 : 240 ;
},
currentPrefs: {
get: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function initializeMediaFieldEditor(el, modalBodyElement, mediaItemUrl, allowMul
return this.selectedMedia || this.mediaItems.length === 1;
},
thumbSize: function () {
return this.smallThumbs ? 120 : 240;
return this.smallThumbs ? 160 : 240;
},
currentPrefs: {
get: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function initializeMediaApplication(displayMediaApplication, mediaApplicationUrl
return result;
},
thumbSize: function () {
return this.smallThumbs ? 120 : 240 ;
return this.smallThumbs ? 160 : 240 ;
},
currentPrefs: {
get: function () {
Expand Down Expand Up @@ -2508,7 +2508,7 @@ function initializeMediaFieldEditor(el, modalBodyElement, mediaItemUrl, allowMul
return this.selectedMedia || this.mediaItems.length === 1;
},
thumbSize: function () {
return this.smallThumbs ? 120 : 240;
return this.smallThumbs ? 160 : 240;
},
currentPrefs: {
get: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<i class="fas fa-plus fa-3x"></i>
</div>
</div>
<img class="img-fluid" src="{{ project.Project.Image.Paths.first | asset_url | resize_url: width:400, height: 300, mode: 'stretch' }}" alt="{{ project.DisplayText }}">
<img class="img-fluid" src="{{ project.Project.Image.Paths.first | asset_url | resize_url: width:480, height: 480, mode: 'stretch' }}" alt="{{ project.DisplayText }}">
</div>
<div class="portfolio-caption">
<h4>{{ project.DisplayText }}</h4>
Expand Down Expand Up @@ -246,7 +246,7 @@
<!-- Project Details Go Here -->
<h2 class="text-uppercase">{{ project.DisplayText }}</h2>
<p class="item-intro text-muted">{{ project.Project.Category.Text }}</p>
<img class="img-fluid d-block mx-auto" src="{{ project.Project.Image.Paths.first | asset_url | resize_url: width:400, height: 300, mode: 'stretch' }}" alt="{{ project.DisplayText }}">
<img class="img-fluid d-block mx-auto" src="{{ project.Project.Image.Paths.first | asset_url | resize_url: width:480, height: 480, mode: 'min' }}" alt="{{ project.DisplayText }}">
<p>{{ project.HtmlBodyPart.Html | raw }}</p>
{% comment %}
<ul class="list-inline">
Expand Down