Class: AblyUi::Core::Meganav
- Inherits:
- 
      ViewComponent::Base
      
        - Object
- ViewComponent::Base
- AblyUi::Core::Meganav
 
- Includes:
- MeganavConfig, SharedAssets, Util
- Defined in:
- lib/ably_ui/core/meganav/meganav.rb
Constant Summary
Constants included from Util
Instance Attribute Summary collapse
- 
  
    
      #login_link  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute login_link. 
- 
  
    
      #logo_link  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute logo_link. 
- 
  
    
      #options  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute options. 
- 
  
    
      #url_base  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute url_base. 
Instance Method Summary collapse
- 
  
    
      #initialize(session_data: {}, theme_name: :white, login_link: '/login', logo_link: '', url_base: AblyUi::Core::Util::DEFAULT_URL_BASE)  ⇒ Meganav 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Meganav. 
- #panels ⇒ Object
Methods included from SharedAssets
#ably_logo, #ably_stack_path, #aws_logo_path, #highest_performer, #highest_user_adoption, #users_love_us
Methods included from Util
#abs_url, #append_random_postfix
Methods included from MeganavConfig
Constructor Details
#initialize(session_data: {}, theme_name: :white, login_link: '/login', logo_link: '', url_base: AblyUi::Core::Util::DEFAULT_URL_BASE) ⇒ Meganav
Returns a new instance of Meganav.
| 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # File 'lib/ably_ui/core/meganav/meganav.rb', line 14 def initialize( session_data: {}, theme_name: :white, login_link: '/login', logo_link: '', url_base: AblyUi::Core::Util::DEFAULT_URL_BASE ) @session_data = session_data @theme_name = theme_name @options = @login_link = login_link @url_base = url_base @logo_link = logo_link || url_base theme_setup(theme_name) end | 
Instance Attribute Details
#login_link ⇒ Object (readonly)
Returns the value of attribute login_link.
| 10 11 12 | # File 'lib/ably_ui/core/meganav/meganav.rb', line 10 def login_link @login_link end | 
#logo_link ⇒ Object (readonly)
Returns the value of attribute logo_link.
| 10 11 12 | # File 'lib/ably_ui/core/meganav/meganav.rb', line 10 def logo_link @logo_link end | 
#options ⇒ Object (readonly)
Returns the value of attribute options.
| 10 11 12 | # File 'lib/ably_ui/core/meganav/meganav.rb', line 10 def @options end | 
#url_base ⇒ Object (readonly)
Returns the value of attribute url_base.
| 10 11 12 | # File 'lib/ably_ui/core/meganav/meganav.rb', line 10 def url_base @url_base end | 
Instance Method Details
#panels ⇒ Object
| 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | # File 'lib/ably_ui/core/meganav/meganav.rb', line 30 def panels [ { label: 'Products', short_label: 'Products', id: 'products-panel', class: 'AblyUi::Core::MeganavContentProducts' }, { label: 'Solutions', short_label: 'Solutions', id: 'use-cases-panel', class: 'AblyUi::Core::MeganavContentUseCases' }, { label: 'Company', short_label: 'Company', id: 'company-panel', class: 'AblyUi::Core::MeganavContentCompany' }, { label: 'Developers', short_label: 'Developers', id: 'developers-panel', class: 'AblyUi::Core::MeganavContentDevelopers' } ] end |