Class: Head::Theater

Inherits:
ApplicationComponent show all
Defined in:
app/components/head/theater.rb

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#initialize

Constructor Details

This class inherits a constructor from Head::ApplicationComponent

Instance Method Details

#with_avatar(image:) ⇒ Object



79
80
81
82
83
84
# File 'app/components/head/theater.rb', line 79

def with_avatar(image:, &)
  with_knob(preset: :avatar, right: true) do
    image_tag(image)
  end
  with_wing(id: :avatar, right: true, &)
end

#with_helpObject



53
54
55
56
# File 'app/components/head/theater.rb', line 53

def with_help(&)
  with_knob(preset: :help, right: true)
  with_wing(id: :help, right: true, &)
end

#with_identicon(username:) ⇒ Object



72
73
74
75
76
77
# File 'app/components/head/theater.rb', line 72

def with_identicon(username:, &)
  with_knob(preset: :identicon, right: true) do
    ::Head::Identicon.new(username.to_s).to_svg
  end
  with_wing(id: :identicon, right: true, &)
end

#with_mainmenuObject



48
49
50
51
# File 'app/components/head/theater.rb', line 48

def with_mainmenu(&)
  with_knob(preset: :mainmenu)
  with_wing(id: :mainmenu, &)
end

#with_notificationsObject



58
59
60
61
# File 'app/components/head/theater.rb', line 58

def with_notifications(&)
  with_knob(preset: :notifications, right: true)
  with_wing(id: :notifications, right: true, &)
end

#with_search(**options) ⇒ Object



68
69
70
# File 'app/components/head/theater.rb', line 68

def with_search(**options)
  with_knob(preset: :search, options:)
end

#with_settingsObject



63
64
65
66
# File 'app/components/head/theater.rb', line 63

def with_settings(&)
  with_knob(preset: :settings, right: true)
  with_wing(id: :settings, right: true, &)
end