Extracts modules for different sections of the UI
This commit is contained in:
15
lib/display/intro.ex
Normal file
15
lib/display/intro.ex
Normal file
@@ -0,0 +1,15 @@
|
||||
defmodule Display.Intro do
|
||||
def intro(module, modules) do
|
||||
if not module in modules do
|
||||
show_intro(module.intro)
|
||||
else
|
||||
""
|
||||
end
|
||||
end
|
||||
|
||||
def show_intro(""), do: nil
|
||||
def show_intro(message) do
|
||||
message <> "\n"
|
||||
|> Colours.green
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user