איך להשיג פריסת צד-צד לנושאי הודעות כמו זו?

I would love to achieve a side-by-side layout for my Discourse instance (see attached image). Could anyone please guide me on how to do this? I appreciate any help you can provide!

2 לייקים

קופסאות גמישות ב-CSS, אולי? רק מפסגת המחשבות שלי. ואז אולי להשתמש ב-API/requests כדי למשוך נתונים נוספים כמו ספירת הפוסטים.

מה שאתה רוצה זה בעיקר להחליף את הפסים האופקיים בפסים אנכיים?
אפשר לעשות את זה עם רכיב נושא, ולא ניתן לעשות את זה באמצעות CSS בלבד.
זה ידרוש זהירות כדי לא לשבור כלום, ויכול להיות לא טריוויאלי לעשות את זה :-thinking:

לייק 1

ניסיתי קצת לשחק עם Flexbox בסיסי, אבל זה רק שבר את הפריסה.

שלום @Canapin! למעשה, אני רוצה Shkoyot the post author בצד שמאל ופרטי תוכן הפוסט בצד ימין במקום שהם יהיו זה על זה כמו בפריסת discourse הסטוקית.
זה יהיה מועיל אם קיימים תוספים לכך.

לייק 1

I’d agree, you can’t re-position these items in a clean way with CSS. The avatar and the default metadata are arranged separately on the template:

I wonder how it’s actually done on the Epic forums. Is this a template override? I don’t see any plugin outlet at this location:

לייק 1

ממה שאני רואה, הם הוסיפו מחדש את הנתונים (שם משתמש וכו’) לאחר התוכן של הווידג’ט post-avatar, הוסיפו רוחב ל-.topic-avatar, והם מסתירים הכל עם CSS פרט לתאריך. ננסה לראות אם אני יכול לשחזר את זה.

לייק 1

You can try this basic theme component: GitHub - Arkshine/discourse-topic-avatar-vertical-layout.

Let me know if you see issues.


  1. It moves the poster-name widget under the post-avatar widget. No other changes apart from CSS adjustments. ↩︎

9 לייקים

That worked like a charm! Thanks a lot, buddy.

2 לייקים

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.