החלפת דף הבית

סיכום מבוסס בינה מלאכותית

The Homepage Toggle theme component, created by Joseph_Hansen, allows users to switch between two homepages with a toggle button in the header. It automatically uses the primary and tertiary colors from the theme and can be customized with icons and URLs. The component was originally designed for an art forum and has been tested on multiple browsers. However, some users have reported errors, such as frold and denvergeeks, when installing the component.

Others have pointed out alternative methods to achieve a similar result, like using the gallery view in the theme, as mentioned by twofoursixeight. Jagster noted that icons must be added to the admin setting “svg icon subset” for the component to work properly.

Unfortunately, the component is currently marked as broken, as david explained that modifying the header using decorateWidget has been deprecated and is no longer possible.

:information_source: Summary A theme component that toggles between two homepages.
:hammer_and_wrench: Repository GitHub - josephclaytonhansen/discourse-homepage-toggle · GitHub
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

This Discourse theme component adds a toggleable homepage in the header, allowing users to jump between two pages that can be set in the theme component settings.

  • It uses the primary and tertiary colors from your theme automatically.
  • You can set the icons (and URLs) for each side of the toggle in the theme component settings.

This was created for an art forum to toggle between an art-focused homepage gallery and a more traditional forum view. The default icons (a gallery and a list) reflect this by default but they are customizable.

Tested on Firefox, Chrome, Safari, and Edge- no issues found. For desktop only- future updates may include a mobile version as well

7 לייקים

nicely done. i like this. :clap:

4 לייקים

When using that function I get this error

It works when using the url manually

2 לייקים

Seems like a useful component for those that want an art/picture focused home.

However: The gallery view in Customization > Theme can also be used for a similar purpose.

לייק 1

And FYI for every beginner: icons (list or grip-verticaletc.) must be added on admin setting svg icon subset.

2 לייקים

It looks like to be desktop-only, right?

2 לייקים

2 לייקים

I missed that last sentence totally :man_facepalming:

I think there is a tag for such situations, like desktop

2 לייקים

This appears to be broken… what would it take to repair it?

לייק 1

the decorateWidget is deprecated (edit: in the header)

2 לייקים

Specifically: modifying the header using decorateWidget was deprecated, and is now impossible. More details here:

(decorateWidget itself still exists for now, and is still a supported way to customize some parts of the Discourse UI)

I’ll mark this theme-component broken for now

2 לייקים