多功能横幅

:discourse: 摘要 Versatile Banner 为您的网站添加了一个可自定义的横幅。
:eyeglasses: 预览 在 Discourse Theme Creator 上预览
:hammer_and_wrench: 仓库链接 https://github.com/discourse/discourse-versatile-banner
:open_book: 初次使用 Discourse 主题? Discourse 主题使用入门指南

安装此主题组件

功能

此主题组件是先前横幅努力的演进。目标是通过使用主题设置来提供更轻松和灵活的使用体验。

以下是功能的亮点:

  • 限制显示给已登录用户或匿名用户
  • 限制显示仅在移动设备或桌面设备上
  • 限制显示在特定页面上
  • 可关闭、可展开和始终可见的选项
  • 全浏览器宽度选项
  • 颜色管理
  • 使用 HTML 自定义标题和列(详见下文)
  • 持久状态选项(详见下文)

自定义横幅内容

横幅内容分为主标题和列。您的横幅最多可以有 5 列,但由于宽度限制,建议数量为 3 列或更少。提供了 HTML 模板,可以根据您的个人需求进行自定义。您还可以控制每列的宽度,并在每列的顶部添加任何图片或 Font Awesome 图标。

使用持久状态选项

持久状态选项将依赖最多两个 Cookie。这些 Cookie 将包含横幅的名称以及与横幅状态相关的 true/false 值。如果您对在网站上使用 Cookie 有任何顾虑,最好避免使用此设置。为 cookie_lifespan 设置选择相对时间选项,将确保在用户按下相应按钮后,横幅在该时间段内保持关闭/展开/折叠状态。如果没有此设置,横幅将在每次完整页面加载时重置。如果您对横幅进行了更改,并希望确保所有用户都能看到这些更改,即使那些之前关闭了横幅的用户,请务必更改 “cookie name”。这将基本上重置任何持久状态,然后允许用户再次关闭横幅

设置

名称 描述
对会员显示 对登录论坛的用户显示横幅
对匿名用户显示 对匿名用户显示横幅
在移动设备上显示 在移动设备上显示横幅
在桌面上显示 在台式电脑上显示横幅
在首页显示 在首页显示横幅
URL 必须包含 输入应显示横幅的路径。在路径末尾添加 * 作为通配符
可关闭 允许用户关闭横幅
可折叠 允许用户展开和折叠横幅
默认折叠状态 启用可折叠设置时的默认折叠状态
Cookie 生命周期 用于记住横幅是否已关闭、展开或折叠的 Cookie 的生命周期。如果设置为 “none”,此组件将不使用任何 Cookie,并且下次用户执行完整页面加载时,与该横幅相关的任何先前创建的 Cookie 都将被删除。值以单个单位测量,因此设置 “year” 将为一年,“week” 将为一周,依此类推。
Cookie 名称 当对横幅进行重要更改时,您必须更改 Cookie 名称以确保所有用户都能看到更改。
全宽横幅 以全浏览器宽度显示横幅
交换默认位置 如果有其他与横幅相关的组件处于活动状态,请使用此选项将其位置与 Versatile Banner 交换
插件出口 below-site-header 将其放在侧边栏上方,above-main-container 将其放在侧边栏旁边的内容上方
横幅背景图片 背景图片的来源 URL。提示:您可以将图片上传到您的主主题并使用该 URL,但请确保不要使用此组件的 “Uploads” 部分。每次更新此组件时,添加到此组件的任何上传都将被删除。
横幅背景图片深色模式 当检测到系统深色模式时,背景图片的来源 URL。
背景颜色 用作背景图片的替代
背景颜色深色模式 当检测到系统深色模式时,用作背景图片的替代。
主要文本颜色 横幅的主要文本颜色
主要文本颜色深色模式 当检测到系统深色模式时,横幅的主要文本颜色
次要文本颜色 图标和文本标题的文本颜色,以及按钮背景颜色。
次要文本颜色深色模式 当检测到系统深色模式时,图标和文本标题的文本颜色,以及按钮背景颜色。
链接文本颜色 横幅内链接的文本颜色
链接文本颜色深色模式 当检测到系统深色模式时,横幅内链接的文本颜色。
翻译 默认值
close.title 关闭横幅
close.label 关闭
toggle.title 展开/折叠横幅
toggle.collapse_label 折叠
toggle.expand_label 展开

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

101 个赞
Homepage Banner
Homepage specific design and content
Showing two banners: one to anonymous users, and one for logged-in members
Discourse Theme Creation
Activated child Component and broke Discourse!
How to add a simple Banner
Adding a new banner just above the logo
Banner on Discourse
Landing page customization
Message to display to only users without accounts/logged in?
Turned my Discourse into a successful ecommerce platform!
Adding a new banner just above the logo
Ideas for highlighting content on our forum
Impact of component positioning with 2.5.0.beta6
Using an Image for a Global Banner Topic - Dimensions?
Showing a Warning to Non-Registered Users
Customise home login page
Enhancing My engineering Community Landing Page - Technology Support Category
How to add top welcome message to the board
How is the Banner at meta.discourse.org created?
Is it possible to change the order of topics?
Can the new About page be more visible?
Need help to emulate old forum
Creating a banner that only 1 group can see, while the other groups don't
Sticky global notice
Banner text customization for Subscriptions plugin
How to I stop topics automatically un-pinning when a user reaches the bottom?
How to insert Versatile Banner before the content of the post.?
Need guidance for adding description bar
Customizing your site with existing theme components
Homepage Feature
How to Set a Closable Banner at the Top of site?
Order of two items in the same plugin outlet
How to add this type of banner?
Customize Your Site Branding
Can the new About page be more visible?
Asking for advice on "How to create a Banner on the main page"/
No HTML in global notice
Welcome Link Banner theme-component with photos
How to apply CSS code only in the discourse home page?
How to make the automatic dark theme the same as the selected dark theme?
Make the Welcome Banner less intrusive
Your own banner with a link
I want add photo for download my app
How to add title and buttons naturally above forum topics?
Where shall I put this code for a top banner?
Is it possible to insert a box of text between the header and topic list?
How do I create a welcome banner like the one on this site?
Customizing the groups page
What are good plugins or theme components for a forum emphasizing pictures?
Creating a banner to display at the top of your site
Horizon Theme
Missing margin in the .banner- box for Versatile Banner TC
What Are Some Good Welcome Banner Designs?
App interviewer
How minimal is your forum?
How to add a header image and customize it
Category Banners
Как сделать заголовок H1 на главной странице
Как поставить Банер на главной странице
Hover preview and quote of the day
Creating a "Featured Categories" homepage banner
Making my discourse site look a certain way
Help with alignment in the "versatile banner" plugin
Make Banner Undismissable
Can I add a banner only on my homepage?
Welcome message at the top
Globally pinned topic only appears in one category
Pin a post even in the categories home page
How do i turn of unpin/pin option for my forum users?
[PAID] Assistance to Set-up My Forum
Custom HTML on Groups page
Banner diference mobile/web
Help me code menu top same image
Publish a notification at top of the page
How to create a welcome banner/section?
Landing page customization