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!
קופסאות גמישות ב-CSS, אולי? רק מפסגת המחשבות שלי. ואז אולי להשתמש ב-API/requests כדי למשוך נתונים נוספים כמו ספירת הפוסטים.
מה שאתה רוצה זה בעיקר להחליף את הפסים האופקיים בפסים אנכיים?
אפשר לעשות את זה עם רכיב נושא, ולא ניתן לעשות את זה באמצעות CSS בלבד.
זה ידרוש זהירות כדי לא לשבור כלום, ויכול להיות לא טריוויאלי לעשות את זה :-thinking:
ניסיתי קצת לשחק עם Flexbox בסיסי, אבל זה רק שבר את הפריסה.
שלום @Canapin! למעשה, אני רוצה Shkoyot the post author בצד שמאל ופרטי תוכן הפוסט בצד ימין במקום שהם יהיו זה על זה כמו בפריסת discourse הסטוקית.
זה יהיה מועיל אם קיימים תוספים לכך.
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:
ממה שאני רואה, הם הוסיפו מחדש את הנתונים (שם משתמש וכו’) לאחר התוכן של הווידג’ט post-avatar, הוסיפו רוחב ל-.topic-avatar, והם מסתירים הכל עם CSS פרט לתאריך. ננסה לראות אם אני יכול לשחזר את זה.
You can try this basic theme component: GitHub - Arkshine/discourse-topic-avatar-vertical-layout.
- 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.
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.

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


