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!
סיכום מבוסס בינה מלאכותית
User lilstranded seeks to implement a side-by-side layout in Discourse, with post author details on the left and content on the right, as opposed to the default vertical stack. Initial suggestions include using CSS Flexbox NateDhaliwal, but Canapin notes it can’t be done with CSS alone and would require a theme component. lilstranded confirms CSS tinkering broke the layout. After clarification, manuel agrees CSS alone won’t suffice due to template structure, referencing Epic forums as an example. Arkshine reverse-engineers the Epic layout and shares a working theme component that repositions widgets and adjusts CSS, with a note that post count requires a separate plugin Arkshine. lilstranded confirms success and thanks Arkshine with a celebratory GIF.
קופסאות גמישות ב-CSS, אולי? רק מפסגת המחשבות שלי. ואז אולי להשתמש ב-API/requests כדי למשוך נתונים נוספים כמו ספירת הפוסטים.
מה שאתה רוצה זה בעיקר להחליף את הפסים האופקיים בפסים אנכיים?
אפשר לעשות את זה עם רכיב נושא, ולא ניתן לעשות את זה באמצעות CSS בלבד.
זה ידרוש זהירות כדי לא לשבור כלום, ויכול להיות לא טריוויאלי לעשות את זה :-thinking:
ניסיתי קצת לשחק עם Flexbox בסיסי, אבל זה רק שבר את הפריסה.
שלום @Canapin! למעשה, אני רוצה Shkoyot the post author בצד שמאל ופרטי תוכן הפוסט בצד ימין במקום שהם יהיו זה על זה כמו בפריסת discourse הסטוקית.
זה יהיה מועיל אם קיימים תוספים לכך.
ממה שאני רואה, הם הוסיפו מחדש את הנתונים (שם משתמש וכו’) לאחר התוכן של הווידג’ט post-avatar, הוסיפו רוחב ל-.topic-avatar, והם מסתירים הכל עם CSS פרט לתאריך. ננסה לראות אם אני יכול לשחזר את זה.
You can try this basic theme component: GitHub - Arkshine/discourse-topic-avatar-vertical-layout · GitHub.
- Desktop view only
- It’s compatible with other modifications [1]
- The post count is not included. You need a plugin, like this one: GitHub - Arkshine/discourse-user-post-count · GitHub.
Let me know if you see issues.
It moves the
poster-namewidget under thepost-avatarwidget. No other changes apart from CSS adjustments. ↩︎
That worked like a charm! Thanks a lot, buddy.



