signage: bring in from external repo

This is b28e6f07aa48f1e2f01eb37bffa180f97a7b03bd from
https://code.hackerspace.pl/q3k/love2d-signage/. We only keep code
commited by inf and q3k, and we're both now licensing this code under
the ISC license, as per COPYING in the root of hscloud.

Change-Id: Ibeee2e6923605e4b1a17a1d295867c056863ef59
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1335
Reviewed-by: informatic <informatic@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
diff --git a/hswaw/signage/nodes/at.lua b/hswaw/signage/nodes/at.lua
new file mode 100644
index 0000000..9adf98c
--- /dev/null
+++ b/hswaw/signage/nodes/at.lua
@@ -0,0 +1,46 @@
+local node = ThreadNode:extend('nodes.at', {
+  threadFile = 'nodes/at_thread.lua',
+  threadChannel = 'at',
+
+  api = 'http://at.hackerspace.pl/api',
+})
+
+local bigFont = love.graphics.newFont('fonts/Lato-Light.ttf', 80)
+local textFont = love.graphics.newFont('fonts/Lato-Light.ttf', 50)
+local smallFont = love.graphics.newFont('fonts/Lato-Light.ttf', 30)
+
+function node:render()
+  love.graphics.setColor( 0, 0, 0 )
+  love.graphics.rectangle("fill", 0, 0, love.graphics.getWidth(), love.graphics.getHeight())
+
+  if self.state then
+    love.graphics.setColor( 1.0, 1.0, 1.0, 0.4 )
+    love.graphics.setFont(bigFont)
+    love.graphics.printf('Currently at hackerspace:', 50, 100, love.graphics.getWidth() - 100, 'center')
+
+    usersList = (table.concat(lume.map(self.state.users, function(v) return v.login end), ', ') or 'nobody...') .. '\n'
+
+    if self.state.unknown > 0 then
+      usersList = usersList .. '\n...and ' .. tostring(self.state.unknown) .. ' unknown creatures'
+    end
+
+    if self.state.kektops > 0 then
+      usersList = usersList .. '\n...and ' .. tostring(self.state.kektops) .. ' kektops'
+    end
+
+    if self.state.esps > 0 then
+      usersList = usersList .. '\n...and ' .. tostring(self.state.esps) .. ' ESPs'
+    end
+
+    love.graphics.setColor( 1.0, 1.0, 1.0 )
+    love.graphics.setFont(textFont)
+    love.graphics.printf(usersList, 50, 220, love.graphics.getWidth() - 100, 'center')
+  else
+    love.graphics.setColor( 1.0, 1.0, 1.0, 0.4 )
+
+    love.graphics.setFont(smallFont)
+    love.graphics.printf("Loading at...", 0, love.graphics.getHeight() - 200, love.graphics.getWidth(), 'center')
+  end
+end
+
+return node