Cabeçalho da Marca

:discourse2: Resumo Brand Header adiciona um cabeçalho superior extra para branding com seu logotipo, links de navegação e ícones de redes sociais para visualizações em dispositivos móveis e desktop. O logotipo da marca pode ser uma imagem ou texto.
:eyeglasses: Pré-visualização Pré-visualizar no Discourse Theme Creator
:hammer_and_wrench: Link do Repositório https://github.com/discourse/discourse-brand-header
:open_book: Novo em Temas do Discourse? Guia para iniciantes sobre o uso de Temas do Discourse

Instalar este componente de tema

Recursos

Pré-visualização no desktop:

Pré-visualização no mobile:

Configurações

Nome Descrição
nome da marca
URL do site
URL do logotipo mobile
links Links de texto a serem exibidos no cabeçalho
ícones Links de ícones a serem exibidos no cabeçalho
ícones personalizados do Font Awesome Lista de ícones do FontAwesome 6 usados neste componente de tema
mostrar barra no mobile
plugin outlet

Usando Ícones do Font Awesome 6

Para permitir que os ícones do Font Awesome 6 sejam exibidos corretamente neste componente de tema, você precisará adicioná-los em 3 locais no Discourse:

  1. A configuração do site subconjunto de ícones svg
  2. A configuração ícones personalizados do font awesome no componente
  3. A configuração ícones no componente

Além disso, para alguns ícones do Font Awesome 6, você precisará especificar um prefixo fa ou fab com o nome do ícone (Ex: “fab-bluesky”), pois alguns ícones fazem parte de um subconjunto específico de ícones. Consulte Estamos atualizando nossos ícones para o Font Awesome 6! para detalhes sobre esse uso.

Depois de adicionar esses ícones nos três locais, você deverá vê-los exibidos corretamente no componente de tema Brand Header.

:discourse2: Hospedado por nós? Componentes de tema estão disponíveis para uso em nossos planos Standard, Business e Enterprise.

87 curtidas
Is there a setting to add Facebook, twitter , Instagram profile links?
Beginner's guide to using Discourse Themes
Reuse Discourse Hamburger Functionality
Introducing Font Awesome 5 and SVG icons
WordPress in a Discourse iFrame?
How to use brand header html in my WordPress site
Can I add a icon and link back to my homesite at the top bar
Login with federated social networks
Customise home login page
How to put a backlink to our company website above the top-menu in discourse?
How to finely scroll out custom header?
How to create additional header?
🌅 Introducing Horizon, our newest theme
Customize Your Site Branding
How to embed Discourse in Wordpress?
Need to create good-looking front page with Discourse login option
How I can add a custom header
Horizon interaction with Brand Header
Customizing your site with existing theme components
Quick access to bookmarks and messages on user menu
How to add a directory of people/businesses to my theme?
Air Theme
How to create custom theme component?
Custom website header with forum
How do the Links and Icons settings work?
Adding header in theme messes up topic progress bar (when docked)
Structuring a multilingual community
Brand Header breaks chat reply box on mobile (iOS)
Help needed with theming and logo
Insert Link to External Website
Are these possible only with a custom theme?
Horizon Theme
Dropdown links in existing Header
How do I move an image/banner to the VERY top of the page?
Combining Brand Header and Header Submenus Plugins
How to add top menu bar like try.discourse.org
Brand header theme component breaks page layout on static and no_ember pages
Brand header theme component breaks page layout on static and no_ember pages
TypeError: Discourse._registerPluginCode is not a function
DiscoTOC & Brand Header - using together
Structuring a multilingual community
Display name of forum
How to make your side have a side-bar and external links
TavoWEB theme for Discourse
Why does the logo navigate to Discourse home not main site home
Customize the header with links, icons, or menus

@vinothkannans Great component!

One small issue. Currently, if a header link is internal to a site (e.g. to a particular category), if it is tapped in the responsive menu, the responsive menu will stay open. The expected behaviour is that the menu would close.

Screenshot%20at%20Oct%2026%2010-13-03

5 curtidas

I am also seeing this issue for internal links, where the header does not disappear on mobile. Instead, the header slides right and leaves the main page opaque (I believe an overlay is being set), even if the header is folded back up.

Is there a fix for this?

In the mobile view, when we click on the hamburger menu, if then we click outside of the menu, the hamburger menu would be expanded even more, instead of closing. and also it has some other glitches. for example when hamburger menu is open and we click on a topic link.

1 curtida

I’m curious, is there some sort of code I can use/edit to move the links to this side of the header?

Ideally with the fa-icons left in place (on the far right). I’d just like to see what it looks like.

Hey there, would you be open to adding an option to display the bar below the header instead of above?

1 curtida

Sure, I will accept it if you can submit it in a PR.

4 curtidas

Any hints as to what needs to be changed for that? I never worked with Discourse before.

1 curtida

https://github.com/discourse/discourse-brand-header/blob/master/common/header.html#L192-L194

You should mount the widget in “below-site-header” connector instead of “above-site-header”. It will require few more tweaks too.

6 curtidas

Thanks, I got it to work! Will probably PR when I have a bit more time.

4 curtidas

I merged your other PR which will add an optional target parameter to links.

https://github.com/discourse/discourse-brand-header/pull/4

8 curtidas

This is now done in the commit below

4 curtidas

I love this change, but on several sites where I use it personally, and on a hosted site I’m a moderator of (the NaNoWriMo forums) we’ve been seeing some issues. Unlike the regular hamburger menu, if you try to swipe it away it bounces back onto the screen.

I’ve personally seen this on a fully updated Moto (g7) Power on Android 9 and on a fully updated iPhone 8.

There has also been at least one report of the menu opening on touches near the icon and not just on it, but I’ve personally been unable to reproduce that particular behavior.

2 curtidas

Thanks! Turns out I did not have time to make a proper PR, do you think you’ll be able to add the below/above site header setting?

1 curtida

Seems like it would be very useful to be able to add attributes to the header links somehow, e.g. for css class, target, etc.

1 curtida

I have had a query as to why the menu is not working on mobile devices. The user pressed on the left burger menu but then on a menu link - and his perception was it wasn’t working as the menu still filled most of the screen.

I’ve had to explain you need to touch somewhere on the right of the screen, to the side of the menu, to close it.

Would it be possible to make it more intuitive, either by:

  • Auto-closing the menu when you click on a menu link on mobile devices?
  • Including a ‘Close Menu’ button on mobile devices?
1 curtida

I’ve been meaning to make a similar request. I often try to dismiss the menu on mobile by swiping it to the left. It appears to be working, but then it pops back into place. The other menus in Discourse it works to swipe them back to the side to dismiss them.

1 curtida

Olá!

Estamos experimentando layouts diferentes entre duas versões do mesmo fórum (discourse 3.2.0.beta4-dev e discourse 3.3.0.beta1-dev).

Aqui está um exemplo sem CSS personalizado, apenas o componente bruto.

O layout HTML do Discourse mudou entre as 2 versões?

Além disso, o comportamento de “slide-in” está quebrado na v3.3.

2 curtidas

Estou tendo o mesmo problema no Discourse 3.2.2. O comportamento de “slide-in” está quebrado.

Estou me perguntando, vendo as datas das postagens acima, se o componente de tema brand-header ainda é suportado?

Com base nas 2 postagens anteriores, está quebrado há pelo menos 5 meses e ninguém respondeu. Vou assumir que este componente de tema está inativo, a menos que alguém diga o contrário.