高级搜索横幅

:warning:

此主题组件已弃用,不再建议使用。其功能现已集成到 Discourse Core 中 —— 请参阅我们的文档,了解如何设置欢迎横幅:

Creating a banner to display at the top of your site

:discourse2: 摘要 高级搜索横幅 在主话题列表导航上方放置一个搜索栏,并可选地包含标题和副标题文本。
:eyeglasses: 预览 在 Discourse Theme Creator 上预览
:hammer_and_wrench: 仓库链接 https://github.com/discourse/discourse-search-banner
:open_book: 初次使用 Discourse 主题? Discourse 主题使用初学者指南

安装此主题组件

功能

默认情况下,此横幅出现在所有顶级话题页面上(最新/新/未读/热门/分类……即 顶部菜单 站点设置中的任何内容),但也可以设置为仅在社区的首页显示。

设置

名称 描述
显示位置 决定横幅出现在哪些页面上
插件出口 横幅在页面上的显示位置
浅色背景图片 浅色配色方案下横幅的背景图片
深色背景图片 深色配色方案下横幅的背景图片
平铺背景图片 重复背景图片
显示给谁 谁可以看到搜索横幅(已登录、未登录或两者皆可)
特殊样式 可选的变体,用于更改搜索横幅的外观
翻译 默认值
search_banner.headline 欢迎来到我们的社区
search_banner.subhead 很高兴您来到这里。如果需要帮助,请在发帖前进行搜索。
search_banner.search_button_text

若要省略某一项不显示,请将字段留空。

自定义样式

HTML 元素在此横幅出现的任何位置都会获得名为 .display-search-banner 的类,而横幅本身被包裹在 .custom-search-banner 类中,因此通过一些 CSS,您应该能够根据需要自定义此横幅的外观。

未来增强

  • 添加选项以在特定分类中启用横幅

致谢

:sparkling_heart: 此组件大量借鉴了 @angusPavilion Header Search Theme Component


:discourse2: 由我们托管? 主题组件在我们的 Standard、Business 和 Enterprise 计划中均可使用。

83 个赞
[PAID] New search bar
Bringing popular features to Discourse: Header search, welcome banner, and category icons / emoji
Elementary Layout Component
Searching for users on mobile
How to add links on home page menu to other site?
New Theme: Tag-Pages Navigation
New Theme: Tag-Pages Navigation
Adding Search option
Header search in custom header
Can't find how to localize a theme component
Creating and installing plugins?
Bug with "search_banner.search_button_text" shown in search banner theme component
Pavilion Header Search Theme Component
Help Needed for Installing Meta Branded Theme
Banner Featured Links
Search section like on Reddit?
How do I edit "Welcome to our community" and tagline on the Homepage?
Anything wrong with this component?
User card out of alignment
Search Banner image cuts off on smaller screens
Pavilion Header Search Theme Component
Where to find search bar in our settings?
Where to find search bar in our settings?
3.5.0.beta9: Improving color management, core welcome banner, and staff action log filters
Welcome Banner components
What plug-in or customization for this header?
Translations of theme component sample texts
Homepage header, how to add?
How can I make the home page similar to this one?
Theme or Custom CSS on Monday’s Discourse Instance?
Community not displaying correctly - new problem - help!
Christmas Decoration Component :christmas_tree:
Challenge with non-admin users not getting page to load?
We're upgrading our icons to Font Awesome 6!
Search for and/or filter topics in a category using text search
Forum search bar not showing up
How to add custom links below welcome banner?
Pavilion Header Search Theme Component
Search banner requires login
Mint Theme
Advanced Header Search
Tag partly visible on "which topic do you want to reply to" modal
Custom Platform
Making my discourse site look a certain way
How can I change the HTML template of advanced search?
Fully Theme
How to change the header text on the title page
How to make a custom search bar?
Bug in Search banner theme component
Simple modifications
How can I achieve these header and footer customisations?
Meta Branded theme and all categories header
Search in this topic filter issue with Search banner TC
Bug with "search_banner.search_button_text" shown in search banner theme component