تغيير نمط منشور ويكي

دليل سريع لتغيير نمط منشورات الويكي الخاصة بك:

تغيير لون الخلفية:

في /admin/customize/themes الخاص بك، أضف شيفرة CSS هذه ضمن Common > CSS

.wiki .topic-body .cooked {
  background-color: #dcffdc; /*light green*/
}

تغيير حجم النص:

إذا أردت، يمكنك أيضًا تغيير الخط المستخدم أو حجم النص، وحتى اللون

.wiki .topic-body .cooked p {
  font-size: 18px;
  color: green;
}

إضافة نص:

يمكنك إضافة نص لتوضيح للمستخدمين أن ما يشاهدونه هو منشور ويكي

.post-info.edits .wiki::before {
  content: "EDIT THIS WIKI POST";
  color: green;
  background-color: #d2e2d2;
  margin-right: 3px;
  font-weight: bold;
  border: 1px solid green;
  padding: 3px;
}


يتم التحكم في إصدار هذه الوثيقة - اقترح تغييرات على github.

22 إعجابًا

Hey, we just changed the background color of wikis on the Fairphone forum, but like all other posts each wiki starts out as staff-blue when you load it, then slowly turns white and only then turns green.
Is there a way to disable this animation for wiki posts?

I believe this should do the trick:

.wiki .topic-body {animation: none;}

6 إعجابات

Here’s a Theme Component which makes Wikified posts pale green again, and incorporates @Kris’s animation: none tweak. (I chose an essentially random pale green as I did this surreptitiously while I was supposed to be paying attention in a meeting. But you can change the RGB value in the Theme Component CSS after installation)

Improvements always welcome by pull request.

4 إعجابات

هل توجد طريقة لجعل الخلفية مشروطة بالموضوع الفاتح والداكن؟ نقدر ردكم.

إعجاب واحد (1)

أبسط ما يمكن فعله هو إنشاء مكونين مختلفين للموضوع، أحدهما للموضوع الفاتح والآخر للموضوع الداكن، حتى لا تحتاج إلى كتابة أي CSS إضافي.

إعجابَين (2)

لكي تعمل تخصيصات الويكي بشكل جيد في الرسائل الخاصة مع التغييرات الجديدة، أقترح تعديلًا طفيفًا على CSS بحيث يستهدف العنصر .cooked:

// تخصيص منشورات الويكي
.wiki .topic-body .cooked {
    background-color: #e8f9fd;
    animation: none;
}
.post-info.edits .wiki::before {
    content: "منشور ويكي";
    margin-right: 5px;
    font-weight: bold;
}

سأضيف هذا أيضًا في المنشور الأصلي.


لاحقًا…
وللمتعة، حولتها إلى مكون سمة (Theme Component) مع إمكانية تخصيص لون الخلفية والنص.

إعجابَين (2)