diff --git a/webapp/components/MasonryGrid/MasonryGrid.vue b/webapp/components/MasonryGrid/MasonryGrid.vue index 4c5e00852..e750e4ccc 100644 --- a/webapp/components/MasonryGrid/MasonryGrid.vue +++ b/webapp/components/MasonryGrid/MasonryGrid.vue @@ -1,9 +1,5 @@ @@ -13,16 +9,28 @@ export default { data() { return { itemsCalculating: 0, + isMobile: false, } }, + computed: { + gridStyle() { + const size = this.isMobile ? '1px' : '2px' + return { gridAutoRows: size, rowGap: size } + }, + }, + watch: { + isMobile() { + this.$nextTick(() => { + this.$children.forEach((child) => { + if (child.calculateItemHeight) child.calculateItemHeight() + }) + }) + }, + }, created() { this.$on('calculating-item-height', this.startCalculation) this.$on('finished-calculating-item-height', this.endCalculation) }, - beforeDestroy() { - this.$off('calculating-item-height', this.startCalculation) - this.$off('finished-calculating-item-height', this.endCalculation) - }, methods: { startCalculation() { this.itemsCalculating += 1 @@ -30,6 +38,24 @@ export default { endCalculation() { this.itemsCalculating -= 1 }, + checkMobile() { + this.isMobile = window.innerWidth <= 810 + }, + }, + mounted() { + this.checkMobile() + // Children mount before parent — recalculate their spans with correct grid values + this.$nextTick(() => { + this.$children.forEach((child) => { + if (child.calculateItemHeight) child.calculateItemHeight() + }) + }) + window.addEventListener('resize', this.checkMobile) + }, + beforeDestroy() { + this.$off('calculating-item-height', this.startCalculation) + this.$off('finished-calculating-item-height', this.endCalculation) + window.removeEventListener('resize', this.checkMobile) }, } @@ -37,6 +63,11 @@ export default { diff --git a/webapp/components/ProgressBar/ProgressBar.vue b/webapp/components/ProgressBar/ProgressBar.vue index 8be2a165f..25c9a5a0a 100644 --- a/webapp/components/ProgressBar/ProgressBar.vue +++ b/webapp/components/ProgressBar/ProgressBar.vue @@ -35,6 +35,7 @@ export default { }, computed: { progressBarWidth() { + if (!this.goal) return 'width: 0%;' return `width: ${(this.progress / this.goal) * 100}%;` }, progressBarColorClass() { @@ -59,7 +60,6 @@ export default { position: relative; height: 100%; flex: 1; - margin-right: $space-x-small; } .progress-bar__goal { @@ -108,7 +108,6 @@ export default { .progress-bar__label { position: relative; - float: right; @media (max-width: 350px) { font-size: $font-size-small; @@ -117,7 +116,7 @@ export default { .progress-bar-button { position: relative; - float: right; + margin-left: $space-x-small; @media (max-width: 810px) { display: none; diff --git a/webapp/components/UserTeaser/UserTeaserNonAnonymous.vue b/webapp/components/UserTeaser/UserTeaserNonAnonymous.vue index 25168491f..2ad939e44 100644 --- a/webapp/components/UserTeaser/UserTeaserNonAnonymous.vue +++ b/webapp/components/UserTeaser/UserTeaserNonAnonymous.vue @@ -117,10 +117,6 @@ export default { if (!(id && slug)) return '' return { name: 'groups-id-slug', params: { slug, id } } }, - groupSlug() { - const { slug } = this.group || {} - return slug && `&${slug}` - }, groupName() { const { name } = this.group || {} return name || this.$t('profile.userAnonym') diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 157d5882c..d51b854fd 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -66,10 +66,15 @@ export default { padding-bottom: 8rem; } -.desktop-footer { - @media (max-width: 810px) { +@media (max-width: 810px) { + .desktop-footer { display: none; } + + .ds-container { + padding-left: $space-x-small !important; + padding-right: $space-x-small !important; + } } .chat-modul { diff --git a/webapp/pages/groups/_id/__snapshots__/_slug.spec.js.snap b/webapp/pages/groups/_id/__snapshots__/_slug.spec.js.snap index 2943c7299..775e9098e 100644 --- a/webapp/pages/groups/_id/__snapshots__/_slug.spec.js.snap +++ b/webapp/pages/groups/_id/__snapshots__/_slug.spec.js.snap @@ -224,8 +224,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close class="ds-my-small" >

School For Citizens @@ -233,8 +232,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

&school-for-citizens @@ -536,8 +534,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close class="chip" > Our children shall receive education for life. @@ -990,7 +987,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

School For Citizens @@ -1157,8 +1153,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

&school-for-citizens @@ -1413,8 +1408,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close class="chip" > Our children shall receive education for life. @@ -1498,7 +1492,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

School For Citizens @@ -1665,8 +1658,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

&school-for-citizens @@ -1940,8 +1932,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close class="chip" > Our children shall receive education for life. @@ -2025,7 +2016,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

School For Citizens @@ -2287,8 +2277,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

&school-for-citizens @@ -2589,8 +2578,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close class="chip" > Our children shall receive education for life. @@ -3043,7 +3031,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a close

Yoga Practice @@ -3393,8 +3380,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

&yoga-practice @@ -4081,7 +4067,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

Yoga Practice @@ -4248,8 +4233,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

&yoga-practice @@ -4882,7 +4866,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

Yoga Practice @@ -5049,8 +5032,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

&yoga-practice @@ -5702,7 +5684,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

Yoga Practice @@ -5964,8 +5945,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

&yoga-practice @@ -6651,7 +6631,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a curre

Investigative Journalism @@ -7001,8 +6980,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a hidde

&investigative-journalism @@ -7303,8 +7281,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a hidde class="chip" > Investigative journalists share ideas and insights and can collaborate. @@ -7774,7 +7751,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a hidde

Investigative Journalism @@ -8048,8 +8024,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a hidde

&investigative-journalism @@ -8349,8 +8324,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a hidde class="chip" > Investigative journalists share ideas and insights and can collaborate. @@ -8820,7 +8794,7 @@ exports[`GroupProfileSlug given a puplic group – "yoga-practice" given a hidde

{{ groupName }}

-

+

{{ `&${groupSlug}` }}

@@ -163,7 +162,7 @@

- {{ group.about }} + {{ group.about }}
@@ -710,6 +709,9 @@ export default { margin-bottom: $space-small; } } +.word-break-all { + word-break: break-all; +} .collaps-button { align-self: flex-end; } diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index 711daf507..8b01b82cf 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -110,8 +110,14 @@ !isMobile && posts.length <= 2 ? 'grid-column-helper' : '', ]" > + + -