Nisutec
(Niclas)
5 ديسمبر 2019، 5:43ص
1
مرحبًا،
هل من الممكن تغيير أيقونة الموظفين من الإداريين والمُعدِّلين إلى أيقونة أخرى؟
Nisutec
(Niclas)
5 ديسمبر 2019، 6:51ص
3
شكرًا لك على هذه المعلومات، لكنني سأقوم بتغيير أيقونة الدرع خلف اسم عضو الطاقم.
إذا كان هذا هو التغيير الذي تريده، فستظهر الأيقونة بجانب اسم المستخدم
أضف هذا إلى الرأس المشترك:
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('shield-alt', 'terminal');
</script>
“terminal” هو ما اخترته؛ استبدله بخيارك الخاص.
كما أضف ما اخترته إلى “مجموعة أيقونات SVG” في لوحة التحكم الخاصة بك.
إذا ضعت، فغالبًا ما يمكنك ببساطة البحث عن “مجموعة أيقونات SVG” هنا.
Nisutec
(Niclas)
6 ديسمبر 2019، 6:12ص
5
لقد أضفت الكود التالي إلى الرأس
لكن الآن أيقونة الدرع مخفية. كيف يمكنني استخدام أيقونة FA أخرى؟
هل من الممكن إضافة أيقونات FA Pro إلى “مجموعة أيقونات SVG”؟
لا أعرف، بالتأكيد ستحتاج إلى الاشتراك/الدفع، وعلى الأرجح ستحتاج إلى تعديل السكربت ليتناسب مع ذلك.
ربما يمكنك التواصل معهم والسؤال، يرجى إبلاغنا بنتائجك. لست متأكدًا مما إذا كان الأمر يستحق 99 دولارًا سنويًا، ولكن إذا طلب عدد كافٍ من الأشخاص ذلك، ربما تتمكن منصة Discourse من الحصول على ترخيص/إضافته؟
إلى ذلك الحين، يمكنك استخدام الأيقونات المجانية.
Canapin
(Coin-coin le Canapin)
6 ديسمبر 2019، 2:54م
7
لا أعرف إن كان ذلك يمكن أن يساعد، لكن ربما يمكنك الاطلاع على هذا:
You can replace a Discourse’s default SVG icons individually or as a whole with your own custom SVG and override them within a theme or theme component.
Step 1 - Create an SVG Spritesheet
To get started, you must create an SVG Spritesheet. This can contain anything from a single additional custom SVG icon up to an entire replacement set of hundreds.
The spritesheet should be saved as an SVG file. In principle, you are nesting the <svg> tag contents from the original SVG icon file into <symbol> …
See also: We're upgrading our icons to Font Awesome 6!
We will shortly merge into master a branch that upgrades Discourse to Font Awesome 5.5.0 (the free version) and switches to using SVG icons instead of an icon font. This is a substantial change, with lots of benefits, and one significant change for developers.
Here is a quick rundown of the changes:
using SVG icons will provide crisper icons, better for accessibility and easier to customize, see this Github article for more details
since…
Nisutec
(Niclas)
6 ديسمبر 2019، 6:43م
8
حسنًا، السطر الأول في الترويسة الخاصة بي مخصص لإمكانية استخدام جميع أيقونات FA. لكن في الوقت الحالي، لا يمكن لواجهة برمجة التطبيقات (API) على الأرجح الوصول إليها.
سأحاول تقديم طلب ميزة لذلك.
شكرًا لكم جميعًا على مساعدتكم
Nisutec
(Niclas)
6 ديسمبر 2019، 9:29م
9
كيف يمكنني استخدام ملف SVG مخصص كرمز؟
لقد قمت برفع ملف الـ SVG في Dark Design.
ولدي رأس الصفحة المخصص التالي:
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('shield-alt', '$shield-alt-duotone');
</script>
لكن الرمز غير مرئي.
Canapin
(Coin-coin le Canapin)
6 ديسمبر 2019، 9:45م
10
هذا ليس هو كيفية عملها. $shield-alt-duotone هو متغير يُقصد استخدامه في CSS المخصص الخاص بك. الموضوع الأول الذي ربطتُ به سابقًا يشرح كيفية استبدال الأيقونات بأخرى جديدة باستخدام ملف SVG:
You can replace a Discourse’s default SVG icons individually or as a whole with your own custom SVG and override them within a theme or theme component.
Step 1 - Create an SVG Spritesheet
To get started, you must create an SVG Spritesheet. This can contain anything from a single additional custom SVG icon up to an entire replacement set of hundreds.
The spritesheet should be saved as an SVG file. In principle, you are nesting the <svg> tag contents from the original SVG icon file into <symbol> …
Nisutec
(Niclas)
7 ديسمبر 2019، 9:29ص
11
حسناً، إنه يعمل، شكراً لك.