├── .discourse-compatibility ├── javascripts └── discourse │ └── connectors │ └── above-site-header │ ├── brand-header.hbs │ └── brand-header.js.es6 ├── README.md ├── about.json ├── desktop └── desktop.scss ├── mobile ├── mobile.scss └── header.html ├── settings.yaml ├── LICENSE.txt └── common ├── common.scss └── header.html /.discourse-compatibility: -------------------------------------------------------------------------------- 1 | 2.6.0.beta3: 79d57c32d579d85590ef50344edf236cad52f9de -------------------------------------------------------------------------------- /javascripts/discourse/connectors/above-site-header/brand-header.hbs: -------------------------------------------------------------------------------- 1 | {{#if showWidget}} 2 | {{mount-widget widget="brand-header"}} 3 | {{/if}} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Brand header theme component for Discourse 2 | 3 | More info at: https://meta.discourse.org/t/brand-header-theme-component/77977 4 | -------------------------------------------------------------------------------- /about.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Brand Header Theme Component", 3 | "about_url": "https://meta.discourse.org/t/brand-header-theme-component/77977", 4 | "license_url": "https://github.com/discourse/discourse-brand-header/blob/main/LICENSE.txt", 5 | "component": true 6 | } 7 | -------------------------------------------------------------------------------- /javascripts/discourse/connectors/above-site-header/brand-header.js.es6: -------------------------------------------------------------------------------- 1 | export default { 2 | setupComponent(args, component) { 3 | // show full bar on desktop and on mobile if specifically enabled 4 | component.set( 5 | "showWidget", 6 | !component.site.mobileView || settings.show_bar_on_mobile 7 | ); 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /desktop/desktop.scss: -------------------------------------------------------------------------------- 1 | .b-header { 2 | width: 100%; 3 | background-color: var(--header_background); 4 | height: 62px; 5 | margin-bottom: 0; 6 | .title { 7 | float: left; 8 | margin-right: 24px; 9 | a { 10 | color: var(--secondary); 11 | } 12 | &:visited { 13 | color: var(--secondary); 14 | } 15 | .rtl & { 16 | float: right; 17 | margin-left: 24px; 18 | margin-right: 0; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /mobile/mobile.scss: -------------------------------------------------------------------------------- 1 | .b-header { 2 | .title { 3 | padding: 0.5em; 4 | a { 5 | color: var(--tertiary); 6 | } 7 | &:visited { 8 | color: var(--tertiary); 9 | } 10 | } 11 | 12 | #toggle-hamburger-brand-menu { 13 | margin: 0; 14 | 15 | .d-icon { 16 | font-size: 1.143em; 17 | vertical-align: middle; 18 | } 19 | } 20 | } 21 | 22 | .profiler-results { 23 | display: none; 24 | } 25 | 26 | // applies when show_bar_on_mobile is checked 27 | .above-site-header-outlet .b-header { 28 | width: 100%; 29 | background-color: var(--tertiary); 30 | height: 48px; 31 | margin-bottom: 0; 32 | 33 | .title { 34 | float: left; 35 | margin-right: 24px; 36 | a { 37 | color: var(--secondary); 38 | } 39 | &:visited { 40 | color: var(--secondary); 41 | } 42 | .rtl & { 43 | float: right; 44 | margin-left: 24px; 45 | margin-right: 0; 46 | } 47 | } 48 | .title { 49 | padding: 0px; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /settings.yaml: -------------------------------------------------------------------------------- 1 | brand_name: 2 | default: "Netdata" 3 | website_url: 4 | default: "https://netdata.cloud" 5 | logo_url: 6 | default: "https://github.com/netdata/developer-relations/blob/main/community/Assets/logo_for_brand_header.png?raw=true" 7 | mobile_logo_url: 8 | default: "https://github.com/netdata/developer-relations/blob/main/community/Assets/logo_for_brand_header.png?raw=true" 9 | links: 10 | type: list 11 | list_type: simple 12 | default: >- 13 | Get the Agent, https://learn.netdata.cloud/docs/get, _blank| 14 | Sign into Cloud, https://app.netdata.cloud, _blank| 15 | Netdata Learn, https://learn.netdata.cloud, _blank| 16 | Help, https://netdata.cloud/community, _blank 17 | icons: 18 | type: list 19 | list_type: simple 20 | default: "" 21 | description: "Format: icon-name,url,target (optional)" 22 | custom_font_awesome_icons: 23 | type: list 24 | list_type: simple 25 | default: "" 26 | description: "List of FontAwesome 5 icons used in this theme component" 27 | show_bar_on_mobile: 28 | type: bool 29 | default: false 30 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017: Discourse 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /common/common.scss: -------------------------------------------------------------------------------- 1 | .b-header { 2 | .contents { 3 | margin: 14px 0; 4 | } 5 | 6 | #brand-logo { 7 | // max-height: 32px; 8 | height: 32px; 9 | margin-top: 14px; 10 | } 11 | 12 | #brand-text-logo { 13 | line-height: 32px; 14 | margin: 0; 15 | } 16 | 17 | nav.links { 18 | float: left; 19 | .rtl & { 20 | float: right; 21 | } 22 | } 23 | 24 | .nav-pills { 25 | margin-bottom: 0; 26 | > li > a { 27 | color: var(--secondary); 28 | line-height: 22px; 29 | &:hover { 30 | color: var(--quaternary); 31 | background-color: var(--quaternary-low); 32 | } 33 | &.active > a, 34 | > a.active { 35 | color: var(--secondary); 36 | background-color: var(--quaternary); 37 | } 38 | } 39 | } 40 | 41 | .panel { 42 | float: right; 43 | position: relative; 44 | .rtl & { 45 | float: left; 46 | } 47 | } 48 | 49 | ul.icons { 50 | text-align: center; 51 | margin: 0 0 0 5px; 52 | > li { 53 | float: left; 54 | list-style: none; 55 | } 56 | a { 57 | width: 28px; 58 | height: 28px; 59 | font-size: 16px; 60 | line-height: 28px; 61 | display: inline-block; 62 | margin: 2px; 63 | } 64 | .rtl & { 65 | margin: 0 5px 0 0; 66 | > li { 67 | float: right; 68 | } 69 | } 70 | } 71 | 72 | .panel > ul.icons { 73 | float: right; 74 | a, 75 | .d-icon { 76 | color: var(--secondary); 77 | } 78 | .rtl & { 79 | float: left; 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /mobile/header.html: -------------------------------------------------------------------------------- 1 | 94 | -------------------------------------------------------------------------------- /common/header.html: -------------------------------------------------------------------------------- 1 | 137 | --------------------------------------------------------------------------------