See the readme file in the theme’s GitHub repository.
Ideas to improve this theme are very welcome
Update 24/12/2018:
You no longer need to overwrite any code in order to customize this theme. It’s now shipped with theme settings that allow customization for each of the 6 tabs with ability to disable any tab. See the readme file for details.
The component’s JS code expects in several places that there is a logged in user, so CSS wouldn’t be enough to show the bar for anonymous users. My recommendation here is to fork the component and modify it to make it show up to anonymous users.
Discourse core has this neat route /new-topic that exists to make it possible to open the composer via a URL. So, all you need to do is use that route as the URL for the tab that should open the composer.
I’m glad to here that your community enjoys this component and finds it useful, thanks! I support adding this feature to the component, but I can’t implement it right now (maybe in a few months). Though if someone else feels like working on this feature in the meantime, I’d be totally happy to merge a pull request with this feature.
Yes, the data needed is exposed in the currentUser object which is easily accessible. Most of the work for this feature would be 1) figuring out which tab(s) to display the badges on and 2) positioning the badges correctly with CSS.
Yes these are the correct properties that we need to consume, but with Discourse being an Ember application, we typically don’t subscribe to DOM events to update the UI. Instead, we should use what Ember calls ‘computed’ properties.
The component already defines a computed property here, so you can use that as an example. Once you’ve defined your computed property that determines whether or not the notifications badge should be displayed (based on the currentUser.unread_high_priority_notifications etc. properties), you will need to use your computed property in the Handlebars template in the same link at the bottom.
Note: implementing this feature in a separate component is tricky, so everything I said here assumes that you’re implementing this in the component itself, not a separate component.
شريط التبويب يظهر بخلفية بيضاء حتى في الوضع الداكن. لقد قمت بالتحديث من النسخة التجريبية 2.7.0 بيتا 1 إلى النسخة التجريبية 2.7.0 بيتا 3، وبعد ذلك بدأ ظهور الخلفية البيضاء. قبل ذلك، كان كل شيء يعمل بشكل ممتاز. حاولت أيضًا إزالة جميع مكونات السمة الأخرى وإزالة جميع التخصيصات للتأكد من عدم وجود أي شيء يتسبب في هذه المشكلة مع شريط التبويب. ولكن حتى في نسخة Discourse الأساسية، يظهر شريط التبويب بخلفية بيضاء في الوضع الداكن. هل يمكن لأحد النظر في هذا الأمر من فضلك؟
يبدو أن هذا التبويب يتسبب في تغطية شريط تقدم الموضوع لزر الرد في بعض الحالات (على سبيل المثال، يمكنني تكرار هذه المشكلة باستخدام Chrome لمحاكاة iPhone SE)
كما ترون، يتم تغطية زر الرد بواسطة شريط التقدم. لكن إذا قمت بتعطيل الشريط، فسيتم العمل بشكل صحيح. أعتقد أن السبب هو أن موضع زر التقدم نسبي، لكنني لا أعرف كيفية إصلاح ذلك.
@haroldfy لا أستطيع إعادة إنتاج هذه المشكلة هنا في Meta أو منشئ السمات. ربما لديك سمات أو تخصيصات أخرى تتداخل؟ يمكنني إلقاء نظرة إذا كان موقعك عامًا.
@littleviolette أحاول تجنب إضافة كود يستهدف عناصر مكون آخر قدر الإمكان. في هذه الحالة، يمكنك إنشاء مكون منفصل يحتوي على هذا CSS لدفع زر ToC فوق الشريط: