diff --git a/apps/content/templates/content/blocks/video.html b/apps/content/templates/content/blocks/video.html
index 72bc8f86..791920b1 100644
--- a/apps/content/templates/content/blocks/video.html
+++ b/apps/content/templates/content/blocks/video.html
@@ -6,10 +6,10 @@
{% if 'youtube.com' in content.url or 'youtu.be' in content.url %}
VIDEO
+ webkitallowfullscreen mozallowfullscreen allowfullscreen>
{% elif 'vimeo.com' in content.url %}
{% endif %}
diff --git a/project/templates/blocks/lil_store_js.html b/project/templates/blocks/lil_store_js.html
index cb5eb6f8..e1698df0 100644
--- a/project/templates/blocks/lil_store_js.html
+++ b/project/templates/blocks/lil_store_js.html
@@ -3,6 +3,7 @@
window.LIL_STORE = {
staticUrl: '{% static "" %}',
accessToken: '{{ request.user.auth_token }}',
+ isMobile: {{ request.user_agent.is_mobile|yesno:"true,false" }},
user: {
id: {{ request.user.id|default:'null' }},
}
diff --git a/web/src/components/ContestWorks.vue b/web/src/components/ContestWorks.vue
index 18bb1fc8..7a02e968 100644
--- a/web/src/components/ContestWorks.vue
+++ b/web/src/components/ContestWorks.vue
@@ -1,6 +1,6 @@
-
+
+
+
Здесь вы сможете увидеть работы участников после их добавления
@@ -48,12 +51,33 @@
},
computed: {
columns() {
+ const columnWidth = 300;
+ const heights = [0, 0, 0];
const first = [];
const second = [];
const third = [];
+ let index = 0;
for(let i=0; i < this.contestWorks.length; i++) {
const work = this.contestWorks[i];
- [first, second, third][i % 3].push(work);
+ let column = index % 3;
+ const workHeight = work.img_height / work.img_width * columnWidth + 50;
+ let minHeight = 0;
+ if(i > 3){
+ for(let j=0; j < 3; j++){
+ let col = j % 3;
+ if(! minHeight || heights[j] < minHeight){
+ minHeight = heights[j];
+ if(heights[column] - heights[j] > workHeight * 0.1){
+ column = j;
+ index += j - column;
+ }
+ }
+ }
+ }
+
+ heights[column] += workHeight;
+ [first, second, third][column].push(work);
+ index++;
}
return [first, second, third];
}
@@ -97,6 +121,7 @@
display: flex;
flex-direction: column;
margin-right: 20px;
+ width: 300px;
}
.contest-works__loader {
width: 100%;