Skip to content

Commit 0d3828c

Browse files
committed
Finetuneing
1 parent 6e3e6bd commit 0d3828c

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

next/app/(main)/PageHome.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface Props {
2525
}
2626

2727
export default function HomePage({ pageData, posts, partyTips, event }: Props) {
28-
let promo_box = pageData && pageData.promo_box as ItemsPromoBox;
28+
let promo_box = pageData && (pageData.promo_box as ItemsPromoBox);
2929

3030
return (
3131
<View>
@@ -37,15 +37,17 @@ export default function HomePage({ pageData, posts, partyTips, event }: Props) {
3737
}}
3838
>
3939
{event && (
40-
<PromoBox
41-
title={event.promo_title}
42-
text={event.promo_text}
43-
backgroundColor={event.color}
44-
textColor={Colors.white}
45-
imageId={event.title_image as string}
46-
buttonLabel={event.promo_button_label}
47-
buttonUrl={event.promo_button_url}
48-
></PromoBox>
40+
<View style={{ paddingBottom: Metrics.tripleBaseMargin }}>
41+
<PromoBox
42+
title={event.promo_title}
43+
text={event.promo_text}
44+
backgroundColor={event.color}
45+
textColor={Colors.white}
46+
imageId={event.title_image as string}
47+
buttonLabel={event.promo_button_label}
48+
buttonUrl={event.promo_button_url}
49+
></PromoBox>
50+
</View>
4951
)}
5052

5153
<View
@@ -143,5 +145,6 @@ const { styles, ids } = StyleSheet.create({
143145
},
144146
promoBoxContainer: {
145147
paddingHorizontal: Metrics.tripleBaseMargin,
148+
paddingBottom: Metrics.tripleBaseMargin,
146149
},
147150
});

next/app/(main)/[slug]/PageProgram.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function ProgramPage({
6767
start: "0 top",
6868

6969
end: () =>
70-
`${postRef.current.getBoundingClientRect().y - memberButtonRef.current.getBoundingClientRect().y} bottom`,
70+
`${postRef.current.getBoundingClientRect().y - memberButtonRef.current.getBoundingClientRect().y + memberButtonRef.current.getBoundingClientRect().height / 2} bottom`,
7171
scrub: true,
7272
pin: true,
7373
// markers: true, // Remove after debugging
@@ -273,7 +273,7 @@ export default function ProgramPage({
273273
</View>
274274
</View>
275275
{promo_box && (
276-
<View style={{ width: "90%" }}>
276+
<View style={{ width: "90%", paddingTop: Metrics.tripleBaseMargin }}>
277277
<PromoBox
278278
title={promo_box.title}
279279
text={promo_box.text}
@@ -288,7 +288,7 @@ export default function ProgramPage({
288288
)}
289289
<View ref={postRef}>
290290
{posts && posts.length > 0 && (
291-
<View style={{ width: "90vw" }}>
291+
<View style={{ width: "90vw", paddingTop: Metrics.tripleBaseMargin }}>
292292
<View
293293
style={{
294294
flexDirection: "row",
@@ -374,7 +374,7 @@ const { ids, styles } = StyleSheet.create({
374374
image: { width: "100%" },
375375
contentContainer: {
376376
width: "74vw",
377-
paddingVertical: Metrics.tripleBaseMargin,
377+
paddingTop: Metrics.tripleBaseMargin,
378378
"@media (max-width: 910px)": {
379379
width: "90vw",
380380
},

next/app/(main)/beitrag/[date]/[postslug]/PagePost.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function BeitragPage({ post, morePosts }: Props) {
5353
start: "0 top",
5454

5555
end: () =>
56-
`${postRef.current.getBoundingClientRect().y - memberButtonRef.current.getBoundingClientRect().y} bottom`,
56+
`${postRef.current.getBoundingClientRect().y - memberButtonRef.current.getBoundingClientRect().y + memberButtonRef.current.getBoundingClientRect().height / 2} bottom`,
5757
scrub: true,
5858
pin: true,
5959
// markers: true, // Remove after debugging

next/components/PromoBox.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ const PromoBox = ({
4848
layout={!isMobile ? undefined : "responsive"}
4949
fill={!isMobile}
5050
alt={title}
51-
onError={event => { console.log("IMAGE ERROR ECONNRESET: ", event);}}
51+
onError={(event) => {
52+
console.log("IMAGE ERROR ECONNRESET: ", event);
53+
}}
5254
/>
5355
</View>
5456

@@ -92,7 +94,6 @@ const { ids, styles } = StyleSheet.create({
9294
container: {
9395
borderRadius: 9,
9496
padding: Metrics.doubleBaseMargin,
95-
marginBottom: Metrics.tripleBaseMargin,
9697
flexDirection: "row",
9798
justifyContent: "space-between",
9899
"@media (max-width: 910px)": {

0 commit comments

Comments
 (0)