Fix links in layout

Fix links in layout

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Hello Phoenix!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            Toggle navigation

          </button>
          <a class="navbar-brand" href="<%= home_path @conn, :index %>">Office Tournament

<a href="<%= home_path @conn, :index %>">Home

<a href="<%= login_path @conn, :index %>">Login

<a href="<%= user_path @conn, :index %>">Users

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

      <%= @inner %>

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Hello Phoenix!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            Toggle navigation

          </button>
          Office Tournament

Home

About

Contact

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

      <%= @inner %>


Remove daily sum spent, add currency for transaction in desktop version

  <%= render ExMoney.SharedView, "dashboard_navbar.html", conn: @conn, navigation: @navigation %>

Dashboard

      <%= for account <- @accounts do %>

<%= account.balance %> <%= account.currency_label %>

          <%= account.name %>

      <% end %>

Recent transactions

      <%= for {date, transactions} <- @recent_transactions do %>

<%= date %>

            <%= for transaction <- transactions do %>

                <%= description(transaction) %>
                <%= transaction.category.humanized_name %>
                <%= transaction.amount %> <%= transaction.account.currency_label %>

            <% end %>

      <% end %>

  <%= render ExMoney.SharedView, "dashboard_navbar.html", conn: @conn, navigation: @navigation %>

Dashboard

      <%= for account <- @accounts do %>

<%= account.balance %> <%= account.currency_label %>

          <%= account.name %>

      <% end %>

Recent transactions

      <%= for {date, transactions} <- @recent_transactions do %>

<%= date %>

                <%= balance(transactions) %> <%= List.first(transactions).account.currency_label %>

            <%= for transaction <- transactions do %>

                <%= description(transaction) %>
                <%= transaction.category.humanized_name %>
                <%= transaction.amount %>

            <% end %>

      <% end %>


Added :tel to telephone links

Added :tel to telephone links

Telephone entries now show as links in phone_number#index.
Phone numbers are not shown anywhere else currently. If a phone
number is ever shown by a method other than rendering
phone_number#show, it will need to be done via the link function
that phoenix provides.
Closes #112.

<%= gettext "Phone Numbers" %>

      <%= gettext "Number" %>
      <%= gettext "Type" %>

<%= for phone_number <- @phone_numbers do %>

      <%= link phone_number.value, to: "tel:"<>phone_number.value %>
      <%= phone_number.number_type %>

        <%= link "Show", to: user_phone_number_path(@conn, :show, @user, phone_number), class: "btn btn-default btn-xs" %>
        <%= link "Edit", to: user_phone_number_path(@conn, :edit, @user, phone_number), class: "btn btn-default btn-xs" %>
        <%= link "Delete", to: user_phone_number_path(@conn, :delete, @user, phone_number), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>

<% end %>

<%= link "New phone number", to: user_phone_number_path(@conn, :new, @user) %>

<%= gettext "Phone Numbers" %>

      <%= gettext "Number" %>
      <%= gettext "Type" %>

<%= for phone_number <- @phone_numbers do %>

      <%= phone_number.value %>
      <%= phone_number.number_type %>

        <%= link "Show", to: user_phone_number_path(@conn, :show, @user, phone_number), class: "btn btn-default btn-xs" %>
        <%= link "Edit", to: user_phone_number_path(@conn, :edit, @user, phone_number), class: "btn btn-default btn-xs" %>
        <%= link "Delete", to: user_phone_number_path(@conn, :delete, @user, phone_number), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>

<% end %>

<%= link "New phone number", to: user_phone_number_path(@conn, :new, @user) %>


Don't show twitter button in test

Don't show twitter button in test

This button was causing flickers in test. We defined the like button
while the page was still loading. When we tried to click on it, the
twitter button had rearranged the position of DOM elements, and the
click event failed.

          <%= link(@post.title, to: post_path(@conn, :show, @post)) %>

        <%= raw Tilex.Markdown.to_html(@post.body) %>

        <%= if assigns[:twitter_shareable] && Mix.env != :test do %>
          <a href='http://twitter.com/share'
             class='twitter-share-button'
             data-text= "Today I learned: <%= @post.title %>"
             data-via= "<%= Tilex.Developer.twitter_handle(@post.developer) %>"
             data-hashtags= "<%= @post.channel.twitter_hashtag %>"
             data-url= "<%= post_url(@conn, :show, @post) %>">
            Tweet

        <% end %>

            <%= link(@post.developer.username, to: developer_path(@conn, :show, @post.developer)) %>

            <%= link(display_date(@post), to: post_path(@conn, :show, @post), class: "post__permalink") %>

            <%= link("##{@post.channel.name}", to: channel_path(@conn, :show, @post.channel.name), class: "post__tag-link") %>

            <%= link("permalink", to: post_path(@conn, :show, @post), class: "post__permalink") %>

            <%= link("raw", to: "#{post_path(@conn, :show, @post)}.md", class: "post__raw-link") %>

          <%= if Guardian.Plug.current_resource(@conn) && (@post.developer == Guardian.Plug.current_resource(@conn) || Guardian.Plug.current_resource(@conn).admin) do %>

              <%= link("edit", to: post_path(@conn, :edit, @post), class: "post__permalink") %>

          <% end %>

            <%= link to: "#", class: "js-like-action post__like-link", id: @post.slug do %>
              <%= @post.likes %>
              likes
            <% end %>

          <%= link(@post.title, to: post_path(@conn, :show, @post)) %>

        <%= raw Tilex.Markdown.to_html(@post.body) %>

        <%= if assigns[:twitter_shareable] do %>
          <a href='http://twitter.com/share'
             class='twitter-share-button'
             data-text= "Today I learned: <%= @post.title %>"
             data-via= "<%= Tilex.Developer.twitter_handle(@post.developer) %>"
             data-hashtags= "<%= @post.channel.twitter_hashtag %>"
             data-url= "<%= post_url(@conn, :show, @post) %>">
            Tweet

        <% end %>

            <%= link(@post.developer.username, to: developer_path(@conn, :show, @post.developer)) %>

            <%= link(display_date(@post), to: post_path(@conn, :show, @post), class: "post__permalink") %>

            <%= link("##{@post.channel.name}", to: channel_path(@conn, :show, @post.channel.name), class: "post__tag-link") %>

            <%= link("permalink", to: post_path(@conn, :show, @post), class: "post__permalink") %>

            <%= link("raw", to: "#{post_path(@conn, :show, @post)}.md", class: "post__raw-link") %>

          <%= if Guardian.Plug.current_resource(@conn) && (@post.developer == Guardian.Plug.current_resource(@conn) || Guardian.Plug.current_resource(@conn).admin) do %>

              <%= link("edit", to: post_path(@conn, :edit, @post), class: "post__permalink") %>

          <% end %>

            <%= link to: "#", class: "js-like-action post__like-link", id: @post.slug do %>
              <%= @post.likes %>
              likes
            <% end %>


Fix #165: Ensure trapped signals wait for node to completely shut down before exiting

#!/bin/sh
set -e

unset CDPATH

SCRIPT_DIR="$(cd $(dirname "$0") && pwd -P)"
RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
RELEASES_DIR="$RELEASE_ROOT_DIR/releases"
REL_NAME="<%= release_name %>"
REL_VSN=$(cat "$RELEASES_DIR"/start_erl.data | cut -d' ' -f2)
ERTS_VSN=$(cat "$RELEASES_DIR"/start_erl.data | cut -d' ' -f1)

__pid=""

_cleanup() {
    trap - HUP INT TERM QUIT EXIT USR1 USR2
    echo ""
    echo "Shutting down.."
    "$RELEASES_DIR/$REL_VSN/$REL_NAME.sh" rpc init stop
    wait $__pid
}

case "$1" in
    foreground)
        trap '_cleanup' HUP INT TERM QUIT EXIT USR1 USR2

        "$RELEASES_DIR/$REL_VSN/$REL_NAME.sh" $@ &
        __pid=$!

        wait $__pid
        exit $?
        ;;
    *)
        exec "$RELEASES_DIR/$REL_VSN/$REL_NAME.sh" "$@"
        ;;
esac

#!/bin/sh
set -e

unset CDPATH

SCRIPT_DIR="$(cd $(dirname "$0") && pwd -P)"
RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
RELEASES_DIR="$RELEASE_ROOT_DIR/releases"
REL_NAME="<%= release_name %>"
REL_VSN=$(cat "$RELEASES_DIR"/start_erl.data | cut -d' ' -f2)
ERTS_VSN=$(cat "$RELEASES_DIR"/start_erl.data | cut -d' ' -f1)

_cleanup() {
    echo "Shutting down node cleanly.."
    exec "$RELEASES_DIR/$REL_VSN/$REL_NAME.sh" rpc init stop
}

case "$1" in
    foreground)
        trap '_cleanup' HUP INT TERM QUIT EXIT USR1 USR2

        "$RELEASES_DIR/$REL_VSN/$REL_NAME.sh" $@ &
        __pid=$!

        wait $__pid
        __exit_status=$?

        exit $__exit_status
        ;;
    *)
        exec "$RELEASES_DIR/$REL_VSN/$REL_NAME.sh" "$@"
        ;;
esac


Use static_path helper for stride logo

Use static_path helper for stride logo

<!DOCTYPE html>

    <%= if Application.get_env(:remote_retro, :env) == :prod do %>

    <% else %>

    <% end %>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="A real-time application for conducting Agile retrospectives">
    <meta name="google-site-verification" content="T5W8sjrjt-BmTK5SYTjPM-FQZD8oGNatTNAJSyRex7o" />
    <meta name="author" content="">
    <title>RemoteRetro</title>

    <link rel="preload" href="<%= static_path(@conn, "/css/semantic-ui/font/lato-v14-latin-regular.woff2") %>" as="font" crossorigin="anonymous" />
    <link rel="preload" href="<%= static_path(@conn, "/css/semantic-ui/themes/default/assets/fonts/icons.woff2") %>" as="font" crossorigin="anonymous" />
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/semantic-ui/semantic.min.css") %>">
    <link rel="stylesheet" href="<%= app_css(@conn) %>">

    <%= if Application.get_env(:remote_retro, :env) == :test do %>

    <% end %>

  <body class="<%= if assigns[:is_landing_page], do: "landing-page" %>">

    <%= unless assigns[:omit_header] do %>

RemoteRetro

Built by

<img src="<%= static_path(@conn, "/images/stride_logo.svg") %>" alt="Stride" />

    <% end %>
      <%= render @view_module, @view_template, assigns %>

    <%= if assigns[:include_js] do %>

    <% end %>

<!DOCTYPE html>

    <%= if Application.get_env(:remote_retro, :env) == :prod do %>

    <% else %>

    <% end %>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="A real-time application for conducting Agile retrospectives">
    <meta name="google-site-verification" content="T5W8sjrjt-BmTK5SYTjPM-FQZD8oGNatTNAJSyRex7o" />
    <meta name="author" content="">
    <title>RemoteRetro</title>

    <link rel="preload" href="<%= static_path(@conn, "/css/semantic-ui/font/lato-v14-latin-regular.woff2") %>" as="font" crossorigin="anonymous" />
    <link rel="preload" href="<%= static_path(@conn, "/css/semantic-ui/themes/default/assets/fonts/icons.woff2") %>" as="font" crossorigin="anonymous" />
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/semantic-ui/semantic.min.css") %>">
    <link rel="stylesheet" href="<%= app_css(@conn) %>">

    <%= if Application.get_env(:remote_retro, :env) == :test do %>

    <% end %>

  <body class="<%= if assigns[:is_landing_page], do: "landing-page" %>">

    <%= unless assigns[:omit_header] do %>

RemoteRetro

Built by

    <% end %>
      <%= render @view_module, @view_template, assigns %>

    <%= if assigns[:include_js] do %>

    <% end %>


don’t crash if no original_href is present

<%= gettext("Video") %>: <%= SignDict.Entry.to_string @video.entry %>

<%= if @video.video_url do %>
  <video src="<%= @video.video_url %>" loop controls poster="<%= @video.thumbnail_url %>"></video>
<% end %>

<%= gettext("Entry") %>

<%= link SignDict.Entry.to_string(@video.entry), to: backend_entry_path(@conn, :show, @video.entry) %>

<%= gettext("User") %>

<%= link @video.user.name, to: backend_user_path(@conn, :show, @video.user) %>

<%= gettext("video.state") %>

<%= @video.state %>

<%= gettext("video.copyright") %>

<%= @video.copyright %>

<%= gettext("video.license") %>

<%= @video.license %>

<%= gettext("video.original_href") %>

      <%= if @video.original_href do %>
        <%= link @video.original_href, to: @video.original_href, target: "_blank", rel: "noopener" %>
      <% end %>

<%= gettext("video.video_url") %>

      <%= if @video.video_url do %>
        <%= link @video.video_url, to: @video.video_url, target: "_blank", rel: "noopener" %>
      <% else %>
        NONE
      <% end %>

<%= gettext("video.thumbnail_url") %>

      <%= if @video.thumbnail_url do %>
        <%= link @video.thumbnail_url, to: @video.thumbnail_url, target: "_blank", rel: "noopener" %>
      <% else %>
        NONE
      <% end %>

<%= gettext("video.plays") %>

<%= @video.plays %>

<%= gettext("video.metadata") %>

<%= format_metadata(@video) %>

  <%= link gettext("Edit"), to: backend_entry_video_path(@conn, :edit, @video.entry_id, @video), class: "c-button" %>

<%= gettext("Video") %>: <%= SignDict.Entry.to_string @video.entry %>

<%= if @video.video_url do %>
  <video src="<%= @video.video_url %>" loop controls poster="<%= @video.thumbnail_url %>"></video>
<% end %>

<%= gettext("Entry") %>

<%= link SignDict.Entry.to_string(@video.entry), to: backend_entry_path(@conn, :show, @video.entry) %>

<%= gettext("User") %>

<%= link @video.user.name, to: backend_user_path(@conn, :show, @video.user) %>

<%= gettext("video.state") %>

<%= @video.state %>

<%= gettext("video.copyright") %>

<%= @video.copyright %>

<%= gettext("video.license") %>

<%= @video.license %>

<%= gettext("video.original_href") %>

<%= link @video.original_href, to: @video.original_href, target: "_blank", rel: "noopener" %>

<%= gettext("video.video_url") %>

      <%= if @video.video_url do %>
        <%= link @video.video_url, to: @video.video_url, target: "_blank", rel: "noopener" %>
      <% else %>
        NONE
      <% end %>

<%= gettext("video.thumbnail_url") %>

      <%= if @video.thumbnail_url do %>
        <%= link @video.thumbnail_url, to: @video.thumbnail_url, target: "_blank", rel: "noopener" %>
      <% else %>
        NONE
      <% end %>

<%= gettext("video.plays") %>

<%= @video.plays %>

<%= gettext("video.metadata") %>

<%= format_metadata(@video) %>

  <%= link gettext("Edit"), to: backend_entry_video_path(@conn, :edit, @video.entry_id, @video), class: "c-button" %>


implimented bare bones card layout

implimented bare bones card layout

Show account

    Name:
    <%= @user.name %>

<%= @user.job_title %>

<%= @user.phone %>

<%= @user.address %>

  <%= unless (login_field = Coherence.Config.login_field) == :email do %>

      <%= humanize login_field %>
      <%= Map.get(@user, login_field) %>

  <% end %>

    Email:
    <%= @user.email %>

<%= link "Edit", to: registration_path(@conn, :edit) %>
<%= link "Delete", to: registration_path(@conn, :delete), method: :delete, data: [confirm: "Are you sure?"] %>

Show Skills

    <%= for skill <- @user.skills  do %>

<%= skill.name %>

        <%= link "", to: skill_path(@conn, :edit, skill.id), class: "glyphicon glyphicon-pencil", alt: "Edit" %>
        <%= link "", to: skill_path(@conn, :delete, skill.id), method: :delete, data: [confirm: "Are you sure?"], class: "glyphicon glyphicon-remove", alt: "Delete" %>

    <% end %>

  <%= for exp <- @user.experiences  do %>

<%= exp.organization %>

<%= exp.category %>

<%= exp.position %>

        <%= exp.from %> - <%= exp.to %>

            <%= unless exp.description_one == nil do %>

<%= exp.description_one %>

            <%= end %>

            <%= unless exp.description_two == nil do %>

<%= exp.description_two %>

            <%= end %>

            <%= unless exp.description_three == nil do %>

<%= exp.description_three %>

            <%= end %>

        <%= link "Edit", to: experience_path(@conn, :edit, exp.id) %>
        <%= link "Delete", to: experience_path(@conn, :delete, exp.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>

  <%= for edu <- @user.educations  do %>

<%= edu.organization %>

<%= edu.status %>

<%= edu.degree %>

<%= edu.gpa %>

<%= edu.from %>

<%= edu.to %>

        <%= link "Edit", to: education_path(@conn, :edit, edu.id) %>
        <%= link "Delete", to: education_path(@conn, :delete, edu.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>

  <%= for aw <- @user.awards  do %>

<%= aw.title %>

<%= aw.on %>

        <%= link "Edit", to: award_path(@conn, :edit, aw.id) %>
        <%= link "Delete", to: award_path(@conn, :delete, aw.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>

  <%= for ref <- @user.references  do %>

<%= ref.name %>

<%= ref.association %>

<%= ref.phone %>

<%= ref.email %>

        <%= link "Edit", to: reference_path(@conn, :edit, ref.id) %>
        <%= link "Delete", to: reference_path(@conn, :delete, ref.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>

Show account

    Name:
    <%= @user.name %>

<%= @user.job_title %>

<%= @user.phone %>

<%= @user.address %>

  <%= unless (login_field = Coherence.Config.login_field) == :email do %>

      <%= humanize login_field %>
      <%= Map.get(@user, login_field) %>

  <% end %>

    Email:
    <%= @user.email %>

<%= link "Edit", to: registration_path(@conn, :edit) %>
<%= link "Delete", to: registration_path(@conn, :delete), method: :delete, data: [confirm: "Are you sure?"] %>

Show Skills

  <%= for skill <- @user.skills  do %>

<%= skill.name %>

        <%= link "", to: skill_path(@conn, :edit, skill.id), class: "glyphicon glyphicon-pencil", alt: "Edit" %>
        <%= link "", to: skill_path(@conn, :delete, skill.id), method: :delete, data: [confirm: "Are you sure?"], class: "glyphicon glyphicon-remove", alt: "Delete" %>

  <% end %>

Show Experience

  <%= for exp <- @user.experiences  do %>

<%= exp.category %>

<%= exp.organization %>

<%= exp.position %>

        <%= exp.from %> - <%= exp.to %>

        <%= unless exp.description_one == nil do %>

<%= exp.description_one %>

        <%= end %>

        <%= unless exp.description_two == nil do %>

<%= exp.description_two %>

        <%= end %>

        <%= unless exp.description_three == nil do %>

<%= exp.description_three %>

        <%= end %>

        <%= link "Edit", to: experience_path(@conn, :edit, exp.id) %>
        <%= link "Delete", to: experience_path(@conn, :delete, exp.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>

Show Education

  <%= for edu <- @user.educations  do %>

<%= edu.organization %>

<%= edu.status %>

<%= edu.degree %>

<%= edu.gpa %>

<%= edu.from %>

<%= edu.to %>

        <%= link "Edit", to: education_path(@conn, :edit, edu.id) %>
        <%= link "Delete", to: education_path(@conn, :delete, edu.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>

Show Award

  <%= for aw <- @user.awards  do %>

<%= aw.title %>

<%= aw.on %>

        <%= link "Edit", to: award_path(@conn, :edit, aw.id) %>
        <%= link "Delete", to: award_path(@conn, :delete, aw.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>

Show References

  <%= for ref <- @user.references  do %>

<%= ref.name %>

<%= ref.association %>

<%= ref.phone %>

<%= ref.email %>

        <%= link "Edit", to: reference_path(@conn, :edit, ref.id) %>
        <%= link "Delete", to: reference_path(@conn, :delete, ref.id), method: :delete, data: [confirm: "Are you sure?"] %>

  <% end %>


Bugfix form template

Bugfix form template

<%%= form_for @changeset, @action, [class: "editform"], fn f -> %>
  <%%= if @changeset.action do %>

<%= "<%= gettext \"" %>Oops, something went wrong! Please check the errors below.<%= "\" %\>" %>

  <%% end %>
<%= for {label, input, error} <- inputs, input do %>
  <%= label %>
  <%= input %>
  <%= error %>
<% end %>
  <%%= submit gettext("Submit"), class: "button" %>
<%% end %>

<%%= form_for @changeset, @action, [class: "editform"], fn f -> %>
  <%%= if @changeset.action do %>

<%= "<%= gettext \"" %>Oops, something went wrong! Please check the errors below.<%= "\" %\>" %>

  <%% end %>
<%= for {label, input, error} <- inputs, input do %>
  <%= label %>
  <%= input %>
  <%= error %>
<% end %>
  <%%= submit gettext("Submit") %>
<%% end %>


cleanup event#index

cleanup event#index

    Public
    Name
    Date

  <%= for event <- @events do %>

      <%= event.public %>

        <%= link event.name, to: classroom_dashboard_path(@conn, :show, event) %>

        <%= event.description %>

        <%= l(event.starts_at) %> -
        <%= l(event.ends_at) %>

  <% end %>

  <%= link "New event", to: account_event_path(@conn, :new), class: "btn btn-success" %>

    Public
    Name
    Date
    City
    Classroom
    Invitations
    Materials

  <%= for event <- @events do %>

      <%= event.public %>

        <%= link event.name, to: account_event_path(@conn, :show, event) %>

        <%= event.description %>

        <%= l(event.starts_at) %> -
        <%= l(event.ends_at) %>
      <%= event.location.city %>
      <%= link "Classroom", to: classroom_dashboard_path(@conn, :show, event) %>
      <%= link length(event.invitations), to: classroom_invitation_path(@conn, :index, event) %>
      <%= link length(event.materials), to: classroom_material_path(@conn, :index, event) %>

        <%= link "Edit", to: account_event_path(@conn, :edit, event), class: "btn btn-default btn-sm" %>
        <%= link "Delete", to: account_event_path(@conn, :delete, event), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-sm" %>

  <% end %>

  <%= link "New event", to: account_event_path(@conn, :new), class: "btn btn-success" %>


Hide the outline on the avatar on focus

Hide the outline on the avatar on focus

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>bors</title>
    <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
    <link rel="icon" type="image/svg+xml" title="bors eye" href="/images/i.svg">
    <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
    <link rel="manifest" href="/images/manifest.json">
    <link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="theme-color" content="#eeeeee">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
<%= if not is_nil(@conn.assigns[:user]) do %>
    <meta name="bors-current-user" content="<%= @conn.assigns.user.id %>">
<% end %>

      <%= if assigns[:project] do %>
      <div hidden="hidden" id="js--on-project-ping" data-bors-project-id="<%= @project.id %>" role="alert" class="alert js--closable">
      This page is out of date. Reload

      <% end %>
      <%= if not is_nil get_flash(@conn, :ok) do %>

      <%= get_flash(@conn, :ok) %>

      <% end %>
      <%= if not is_nil get_flash(@conn, :error) do %>

      <%= get_flash(@conn, :error) %>

      <% end %>

        <a id=header-logo href="<%= page_path(@conn, :index) %>"><img alt="bors" src='<%= static_path(@conn, "/images/a.svg") %>' width="90" height="25">

          Home
          Forum
          Docs
          Dashboard

<%= if is_nil @conn.assigns[:user] do %>
          <a class=header-link href='<%= auth_path(@conn, :index, "github") %>'>Log in with GitHub
<% else %>
  <%= if @conn.path_info == ["repositories"] do %>
          Repositories
  <% else %>
          <a class="header-link hide-on-narrow" href="<%= project_path(@conn, :index) %>">Repositories
  <% end %>

            <img width=25 height=25 class="no-outline-on-focus" src="<%= @conn.assigns.avatar_url %>" alt="" role="presentation">
            <%= @conn.assigns.user.login %> ▾

<% end %>
<%= if not is_nil @conn.assigns[:user] do %>

  <%= if @conn.assigns.user.is_admin do %>
            <a href="<%= admin_path(@conn, :index) %>">Admin
  <% end %>
            <a class=show-on-narrow href="<%= project_path(@conn, :index) %>">Repositories
            <a href="<%= auth_path(@conn, :logout) %>">Log out
<% end %>

    <%= render @view_module, @view_template, assigns %>

        Home
        Forum
        Docs
        Dashboard

          Build:
          <a href="https://github.com/bors-ng/bors-ng/tree/<%= elem(get_version(), 1) %>">
            <%= elem(get_version(), 0) %>

        This service is provided for free on a best-effort basis.

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>bors</title>
    <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
    <link rel="icon" type="image/svg+xml" title="bors eye" href="/images/i.svg">
    <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
    <link rel="manifest" href="/images/manifest.json">
    <link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="theme-color" content="#eeeeee">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
<%= if not is_nil(@conn.assigns[:user]) do %>
    <meta name="bors-current-user" content="<%= @conn.assigns.user.id %>">
<% end %>

      <%= if assigns[:project] do %>
      <div hidden="hidden" id="js--on-project-ping" data-bors-project-id="<%= @project.id %>" role="alert" class="alert js--closable">
      This page is out of date. Reload

      <% end %>
      <%= if not is_nil get_flash(@conn, :ok) do %>

      <%= get_flash(@conn, :ok) %>

      <% end %>
      <%= if not is_nil get_flash(@conn, :error) do %>

      <%= get_flash(@conn, :error) %>

      <% end %>

        <a id=header-logo href="<%= page_path(@conn, :index) %>"><img alt="bors" src='<%= static_path(@conn, "/images/a.svg") %>' width="90" height="25">

          Home
          Forum
          Docs
          Dashboard

<%= if is_nil @conn.assigns[:user] do %>
          <a class=header-link href='<%= auth_path(@conn, :index, "github") %>'>Log in with GitHub
<% else %>
  <%= if @conn.path_info == ["repositories"] do %>
          Repositories
  <% else %>
          <a class="header-link hide-on-narrow" href="<%= project_path(@conn, :index) %>">Repositories
  <% end %>

            <img width=25 height=25 src="<%= @conn.assigns.avatar_url %>" alt="" role="presentation">
            <%= @conn.assigns.user.login %> ▾

<% end %>
<%= if not is_nil @conn.assigns[:user] do %>

  <%= if @conn.assigns.user.is_admin do %>
            <a href="<%= admin_path(@conn, :index) %>">Admin
  <% end %>
            <a class=show-on-narrow href="<%= project_path(@conn, :index) %>">Repositories
            <a href="<%= auth_path(@conn, :logout) %>">Log out
<% end %>

    <%= render @view_module, @view_template, assigns %>

        Home
        Forum
        Docs
        Dashboard

          Build:
          <a href="https://github.com/bors-ng/bors-ng/tree/<%= elem(get_version(), 1) %>">
            <%= elem(get_version(), 0) %>

        This service is provided for free on a best-effort basis.


fix invocation script bug

fix invocation script bug

Transaction Information

  <span class="fa <%= get_icon(@transaction.type) %>">
  <%= get_type(@transaction.type) %>
  | Hash:
  <%= @transaction.txid %>

<a href="<%= transactions_path(@conn, :index) %>" alt="Back to all transactions" title="Back to all transactions" class="back-link"><%= gettext "Back to all transactions" %>

      <%= if @transaction.type == "ClaimTransaction" do %>

<%= gettext "Claimed from" %>

        <%= for input <- @transaction.claims do %>

            <a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type != "ClaimTransaction" and @transaction.vin != []  do %>

<%= gettext "Sent from" %>

        <%= for input <- @transaction.vin do %>

    				<a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>

		<img src="<%= static_path(@conn, "/images/ICON_Sent-arrow.svg")%>" alt="Sent arrow" title="Sent arrow" class="transaction-sent-arrow" />

      <%= if @transaction.vouts != [] do %>

<%= gettext "Sent to" %>

        <%= for vout <- @transaction.vouts do %>

    				<a href="<%= address_path(@conn, :index, vout.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= vout.address_hash %>

<%= Helpers.round_or_not(vout.value) %> <%= Api.get_asset_name(vout.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type == "RegisterTransaction" do %>

<%= gettext "Registered" %>

          <a href="<%= address_path(@conn, :index, @transaction.asset.admin)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= @transaction.asset.admin %>

<%= Helpers.round_or_not(@transaction.asset.amount) %> <%= Api.get_asset_name(@transaction.txid) %>

      <% end %>

<%= gettext "Time" %>

<%= compare_time_and_get_minutes(@transaction.time) %>

      <%= get_explanation("transaction_time") %>

<%= gettext "Network Fee" %>

<%= @transaction.net_fee %>

      <%= get_explanation("transaction_network_fees") %>

<%= gettext "System Fee" %>

<%= @transaction.sys_fee %>

      <%= get_explanation("transaction_system_fees") %>

<%= gettext "Included in Block" %>

<a href="<%= block_path( @conn, :index, @transaction.block_hash) %>" alt="View transaction" title="View transaction" class="large-blue-link col-4-width"><%= @transaction.block_height %>

<%= gettext "Size" %>

<%= @transaction.size %> <%= gettext "bytes" %>

      <%= get_explanation("transaction_size") %>

<%= gettext "Bytecode Invocation Script" %>

      <%= get_explanation("bytecode_invocation_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_inv(script) %>

			<% end %>

<%= gettext "Bytecode Verification Script" %>

      <%= get_explanation("bytecode_verification_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_ver(script) %>

			<% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Bytecode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage" %> <%=att["usage"]%>

<%= att["script"] %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Bytecode Script" %>

<%= @transaction.script %>

<% end %>

<%= gettext "Opcode Invocation Script" %>

      <%= get_explanation("opcode_invocation_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_invocation(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= gettext "Opcode Verification Script" %>

      <%= get_explanation("opcode_verification_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_verification(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Opcode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage" %> <%=att["usage"]%>

<%= Disassembler.parse_script(att["data"]) %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Opcode Script" %>

<%= Disassembler.parse_script(@transaction.script) %>

<% end %>

Transaction Information

  <span class="fa <%= get_icon(@transaction.type) %>">
  <%= get_type(@transaction.type) %>
  | Hash:
  <%= @transaction.txid %>

<a href="<%= transactions_path(@conn, :index) %>" alt="Back to all transactions" title="Back to all transactions" class="back-link"><%= gettext "Back to all transactions" %>

      <%= if @transaction.type == "ClaimTransaction" do %>

<%= gettext "Claimed from" %>

        <%= for input <- @transaction.claims do %>

            <a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type != "ClaimTransaction" and @transaction.vin != []  do %>

<%= gettext "Sent from" %>

        <%= for input <- @transaction.vin do %>

    				<a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>

		<img src="<%= static_path(@conn, "/images/ICON_Sent-arrow.svg")%>" alt="Sent arrow" title="Sent arrow" class="transaction-sent-arrow" />

      <%= if @transaction.vouts != [] do %>

<%= gettext "Sent to" %>

        <%= for vout <- @transaction.vouts do %>

    				<a href="<%= address_path(@conn, :index, vout.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= vout.address_hash %>

<%= Helpers.round_or_not(vout.value) %> <%= Api.get_asset_name(vout.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type == "RegisterTransaction" do %>

<%= gettext "Registered" %>

          <a href="<%= address_path(@conn, :index, @transaction.asset.admin)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= @transaction.asset.admin %>

<%= Helpers.round_or_not(@transaction.asset.amount) %> <%= Api.get_asset_name(@transaction.txid) %>

      <% end %>

<%= gettext "Time" %>

<%= compare_time_and_get_minutes(@transaction.time) %>

      <%= get_explanation("transaction_time") %>

<%= gettext "Network Fee" %>

<%= @transaction.net_fee %>

      <%= get_explanation("transaction_network_fees") %>

<%= gettext "System Fee" %>

<%= @transaction.sys_fee %>

      <%= get_explanation("transaction_system_fees") %>

<%= gettext "Included in Block" %>

<a href="<%= block_path( @conn, :index, @transaction.block_hash) %>" alt="View transaction" title="View transaction" class="large-blue-link col-4-width"><%= @transaction.block_height %>

<%= gettext "Size" %>

<%= @transaction.size %> <%= gettext "bytes" %>

      <%= get_explanation("transaction_size") %>

<%= gettext "Bytecode Invocation Script" %>

      <%= get_explanation("bytecode_invocation_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_inv(script) %>

			<% end %>

<%= gettext "Bytecode Verification Script" %>

      <%= get_explanation("bytecode_verification_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_ver(script) %>

			<% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Bytecode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage" %> <%=att["usage"]%>

<%= att["script"] %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Bytecode Script" %>

<%= @transaction.script %>

<% end %>

<%= gettext "Opcode Invocation Script" %>

      <%= get_explanation("opcode_invocation_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_invocation(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= gettext "Opcode Verification Script" %>

      <%= get_explanation("opcode_verification_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_verification(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Opcode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage" %> <%=att["usage"]%>

<%= Disassembler.parse_script(att["script"]) %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Opcode Script" %>

<%= Disassembler.parse_script(@transaction.script) %>

<% end %>


add check spam

add check spam


new click toggle system with data-target

<div style="padding: 40px;">
  <%= raw(@content) %>

  <%= if assigns[:show_help_desk_widget] != nil and assigns[:show_help_desk_widget] == "Show" do %>
    <!-- Start of justicedemocrats Zendesk Widget script -->
    <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var e=this.createElement("script");n&&(this.domain=n),e.id="js-iframe-async",e.src="https://assets.zendesk.com/embeddable_framework/main.js",this.t=+new Date,this.zendeskHost="justicedemocrats.zendesk.com",this.zEQueue=a,this.body.appendChild(e)},o.write('<body onload="document._l();">'),o.close()}();
    /*]]>*/</script>
    <!-- End of justicedemocrats Zendesk Widget script -->
  <% end %>
</div>

<script>

  function show (el) {
    el.style.display = 'block';
  }

  function hide (el) {
    el.style.display = 'none';
  }

  function toggle (el) {
    if (el.style.display == 'none') {
      el.style.display = 'block';
    } else {
      el.style.display = 'none';
    }
  }

  function showHiddenContent (ev) {
    var el = document.querySelector('#vol-events');
    var action = el.getAttribute('data-action');

    if (action == 'show') {
      show(el)
    } else if (action == 'hide') {
      hide(el)
    } else {
      toggle(el)
    }
  }

  function toggleTarget (ev) {
    var el = ev.target
    var targetId = el.getAttribute('data-target')

    var target = document.querySelector('#' + targetId)

    if (target) toggle(target)
  }

  var buttons = Array.from(document.querySelectorAll('.show-events'));

  buttons.forEach(function (button) {
    button.addEventListener('click', showHiddenContent);
  })

  var togglers = Array.from(document.querySelectorAll('.toggler'));

  togglers.forEach(function (button) {
    button.addEventListener('click', toggleTarget)
  });

</script>

<div style="padding: 40px;">
  <%= raw(@content) %>

  <%= if assigns[:show_help_desk_widget] != nil and assigns[:show_help_desk_widget] == "Show" do %>
    <!-- Start of justicedemocrats Zendesk Widget script -->
    <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var e=this.createElement("script");n&&(this.domain=n),e.id="js-iframe-async",e.src="https://assets.zendesk.com/embeddable_framework/main.js",this.t=+new Date,this.zendeskHost="justicedemocrats.zendesk.com",this.zEQueue=a,this.body.appendChild(e)},o.write('<body onload="document._l();">'),o.close()}();
    /*]]>*/</script>
    <!-- End of justicedemocrats Zendesk Widget script -->
  <% end %>
</div>

<script>

  function show (el) {
    el.style.display = 'block';
  }

  function hide (el) {
    el.style.display = 'none';
  }

  function toggle (el) {
    if (el.style.display == 'none') {
      el.style.display = 'block';
    } else {
      el.style.display = 'none';
    }
  }

  function showHiddenContent (ev) {
    var els = [document.querySelector('#vol-events')].concat(Array.from(document.querySelectorAll('.vol-events')));

    els.forEach(el => {
      var action = el.getAttribute('data-action');

      if (action == 'show') {
        show(el)
      } else if (action == 'hide') {
        hide(el)
      } else {
        toggle(el)
      }
    })
  }

  var buttons = Array.from(document.querySelectorAll('.show-events'));

  buttons.forEach(function (button) {
    button.addEventListener('click', showHiddenContent);
  })

</script>


Re-fixup sponsorship tiers

Re-fixup sponsorship tiers

  - The formatting of numbers was wrong

Sponsors

        Our sponsors play a vital role in supporting the foundation's initiatives. It is through their generous donations that we can work on our mission to support and expand the Beam community.

          <%= for %{logo_url: logo_path, url: href} <- active_and_founding_sponsors(@sponsors) do %>

              <a href="<%= href %>" class="d-block mb-2">
                <img class="img-fluid img-thumbnail borderless sponsor" src="<%= image_path(@conn, logo_path) %>" alt="">

          <% end %>
          <%= for %{logo_url: logo_path, url: href} <- active_non_founding_sponsors(@sponsors) do %>

              <a href="<%= href %>" class="d-block mb-2">
                <img class="img-fluid img-thumbnail borderless sponsor" src="<%= image_path(@conn, logo_path) %>" alt="">

          <% end %>

Become a sponsor!

Your donation will help the development of technologies and open source projects that your engineers and many engineers around the world will use daily.

We are really excited you are interested in helping us grow a diverse community around the Erlang and Elixir Ecosystem. Your donation will help the development of technologies and open source projects that your engineers and many engineers around the world will use daily. This work can’t be done without the financial support of organizations like yours.

When you become a sponsor we will acknowledge your donation and we will include your logo and link on the EEF web site and on other communications such as conferences and social media whenever appropriate.

Sponsorship Tiers

              Revenue or expense (whichever is larger)
              Yearly minimal sponsorship fee

               $1,000,000
              $2,000

              $1,000,000 … $5,000,000
              $5,000

               $5,000,000
              $10,000

Founding Sponsors

        <%= for %{name: name} <- active_and_founding_sponsors(@sponsors) do %>

<%= name %>

        <% end %>

Sponsors

        Our sponsors play a vital role in supporting the foundation's initiatives. It is through their generous donations that we can work on our mission to support and expand the Beam community.

          <%= for %{logo_url: logo_path, url: href} <- active_and_founding_sponsors(@sponsors) do %>

              <a href="<%= href %>" class="d-block mb-2">
                <img class="img-fluid img-thumbnail borderless sponsor" src="<%= image_path(@conn, logo_path) %>" alt="">

          <% end %>
          <%= for %{logo_url: logo_path, url: href} <- active_non_founding_sponsors(@sponsors) do %>

              <a href="<%= href %>" class="d-block mb-2">
                <img class="img-fluid img-thumbnail borderless sponsor" src="<%= image_path(@conn, logo_path) %>" alt="">

          <% end %>

Become a sponsor!

Your donation will help the development of technologies and open source projects that your engineers and many engineers around the world will use daily.

We are really excited you are interested in helping us grow a diverse community around the Erlang and Elixir Ecosystem. Your donation will help the development of technologies and open source projects that your engineers and many engineers around the world will use daily. This work can’t be done without the financial support of organizations like yours.

When you become a sponsor we will acknowledge your donation and we will include your logo and link on the EEF web site and on other communications such as conferences and social media whenever appropriate.

Sponsorship Tiers

              Revenue or expense (whichever is larger)
              Yearly minimal sponsorship fee

               $10,000
              $2,000

              $10,000 … $50,000
              $5,000

               $50,000
              $10,000

Founding Sponsors

        <%= for %{name: name} <- active_and_founding_sponsors(@sponsors) do %>

<%= name %>

        <% end %>


Fix search

Fix search

<form method="GET" action="<%= episodes_path(@conn, :index) %>">

    <input class="input-group-field" type="search" name="q" placeholder="Find an episode" value="<%= @search_term %>">

  <a class="button large secondary expanded" href="<%= episodes_path(@conn, :index) %>"> See all episodes
</form>

  <%= if @page.total_entries == 0 do %>
    Sorry, no episodes found for "<%= @search_term %>"
  <% else %>
    <%= @page.total_entries %> result(s) for "<%= @search_term %>"
  <% end %>

<%= paginate @conn, @page, fn -> %>
  <%= for episode <- @page.entries do %>
  <%= Podcatcher.Web.ComponentsView.render "episode_card.html", conn: @conn, episode: episode %>
  <% end %>
<% end %>

<form method="GET" action="<%= episodes_path(@conn, :index) %>">

    <input class="input-group-field" type="search" name="q" placeholder="Find an episode" value="<%= @search_term %>">

  <a class="button large secondary expanded" href="<%= episodes_path(@conn, :index) %>"> See all episodes
</form>

  <%= if @page.total_entries == 0 do %>
    Sorry, no episodes found for "<%= @search_term %>"
  <% else %>
    <%= @page.total_entries %> result(s) for "<%= @search_term %>"
  <% end %>

<%= paginate @conn, @page, fn -> %>
  <%= for episode <- @page.entries do %>
  <%= ComponentsView.render "episode_card.html", conn: @conn, episode: episode %>
  <% end %>
<% end %>


Remove logging from graphiql

Remove logging from graphiql

<!--
The request to this GraphQL server provided the header "Accept: text/html"
and as a result has been presented GraphiQL - an in-browser IDE for
exploring GraphQL.

If you wish to receive JSON, provide the header "Accept: application/json" or
add "&raw" to the end of the URL within a browser.
-->
<!DOCTYPE html>
<html>
<head>
  <link href="//cdn.jsdelivr.net/graphiql/<%= graphiql_version %>/graphiql.css" rel="stylesheet" />
  <script src="//cdn.jsdelivr.net/fetch/0.9.0/fetch.min.js"></script>
  <script src="//cdn.jsdelivr.net/react/0.14.2/react.min.js"></script>
  <script src="//cdn.jsdelivr.net/react/0.14.2/react-dom.min.js"></script>
  <script src="//cdn.jsdelivr.net/graphiql/<%= graphiql_version %>/graphiql.min.js"></script>
</head>
<body>
  <script>
    // Collect the URL parameters
    var parameters = {};
    window.location.search.substr(1).split('&').forEach(function (entry) {
      var eq = entry.indexOf('=');
      if (eq >= 0) {
        parameters[decodeURIComponent(entry.slice(0, eq))] =
          decodeURIComponent(entry.slice(eq + 1));
      }
    });

    // Produce a Location query string from a parameter object.
    function locationQuery(params) {
      return '?' + Object.keys(params).map(function (key) {
        return encodeURIComponent(key) + '=' +
          encodeURIComponent(params[key]);
      }).join('&');
    }

    // Derive a fetch URL from the current URL, sans the GraphQL parameters.
    var graphqlParamNames = {
      query: true,
      variables: true,
      operationName: true
    };

    var otherParams = {};
    for (var k in parameters) {
      if (parameters.hasOwnProperty(k) && graphqlParamNames[k] !== true) {
        otherParams[k] = parameters[k];
      }
    }
    var fetchURL = locationQuery(otherParams);

    // Defines a GraphQL fetcher using the fetch API.
    function graphQLFetcher(graphQLParams) {
      return fetch(fetchURL, {
        method: 'post',
        headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(graphQLParams),
        credentials: 'include',
      }).then(function (response) {
        return response.json();
      });
    }

    // When the query and variables string is edited, update the URL bar so
    // that it can be easily shared.
    function onEditQuery(newQuery) {
      parameters.query = newQuery;
      updateURL();
    }

    function onEditVariables(newVariables) {
      parameters.variables = newVariables;
      updateURL();
    }

    function updateURL() {
      history.replaceState(null, null, locationQuery(parameters));
    }

    // Render <GraphiQL /> into the body.
    React.render(
      React.createElement(GraphiQL, {
        fetcher: graphQLFetcher,
        onEditQuery: onEditQuery,
        onEditVariables: onEditVariables,
        query: '<%= query %>',
        response: '<%= result %>',
        variables: '<%= variables %>'
      }),
      document.body
    );
  </script>
</body>
</html>

<!--
The request to this GraphQL server provided the header "Accept: text/html"
and as a result has been presented GraphiQL - an in-browser IDE for
exploring GraphQL.

If you wish to receive JSON, provide the header "Accept: application/json" or
add "&raw" to the end of the URL within a browser.
-->
<!DOCTYPE html>
<html>
<head>
  <link href="//cdn.jsdelivr.net/graphiql/<%= graphiql_version %>/graphiql.css" rel="stylesheet" />
  <script src="//cdn.jsdelivr.net/fetch/0.9.0/fetch.min.js"></script>
  <script src="//cdn.jsdelivr.net/react/0.14.2/react.min.js"></script>
  <script src="//cdn.jsdelivr.net/react/0.14.2/react-dom.min.js"></script>
  <script src="//cdn.jsdelivr.net/graphiql/<%= graphiql_version %>/graphiql.min.js"></script>
</head>
<body>
  <script>
    // Collect the URL parameters
    var parameters = {};
    window.location.search.substr(1).split('&').forEach(function (entry) {
      var eq = entry.indexOf('=');
      if (eq >= 0) {
        parameters[decodeURIComponent(entry.slice(0, eq))] =
          decodeURIComponent(entry.slice(eq + 1));
      }
    });

    // Produce a Location query string from a parameter object.
    function locationQuery(params) {
      return '?' + Object.keys(params).map(function (key) {
        return encodeURIComponent(key) + '=' +
          encodeURIComponent(params[key]);
      }).join('&');
    }

    // Derive a fetch URL from the current URL, sans the GraphQL parameters.
    var graphqlParamNames = {
      query: true,
      variables: true,
      operationName: true
    };

    var otherParams = {};
    for (var k in parameters) {
      if (parameters.hasOwnProperty(k) && graphqlParamNames[k] !== true) {
        otherParams[k] = parameters[k];
      }
    }
    var fetchURL = locationQuery(otherParams);

    // Defines a GraphQL fetcher using the fetch API.
    function graphQLFetcher(graphQLParams) {
      return fetch(fetchURL, {
        method: 'post',
        headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(graphQLParams),
        credentials: 'include',
      }).then(function (response) {
        return response.json();
      });
    }

    // When the query and variables string is edited, update the URL bar so
    // that it can be easily shared.
    function onEditQuery(newQuery) {
      parameters.query = newQuery;
      updateURL();
    }

    function onEditVariables(newVariables) {
      parameters.variables = newVariables;
      updateURL();
    }

    function updateURL() {
      history.replaceState(null, null, locationQuery(parameters));
    }

    console.log("<%= query %>")
    // Render <GraphiQL /> into the body.
    React.render(
      React.createElement(GraphiQL, {
        fetcher: graphQLFetcher,
        onEditQuery: onEditQuery,
        onEditVariables: onEditVariables,
        query: '<%= query %>',
        response: '<%= result %>',
        variables: '<%= variables %>'
      }),
      document.body
    );
  </script>
</body>
</html>


properly link to the boards that are created

  Welcome,
  <%= if String.length(@user[:first]) > 0 do %>
    <%= @user[:first] %>!
  <% else %>
    <%= @user[:email] %>!
  <% end %>

        Whiteboards are ephemeral. There is no guarantee that they'll
        stick around for long periods of time. If they go away, that's
        why.

        Future versions of Whiteboard will not have this limitation.

Boards

    <%= if length(@whiteboards) == 0 do %>

          You have no boards configured.
          Create one using the form on the right →

    <% else %>

      <%= Enum.map @whiteboards, fn(whiteboard) -> %>

          <a href="/whiteboards/<%= whiteboard[:key] %>">
            <%= whiteboard[:name] %>

      <% end %>

    <% end %>

Create Board

    <%= render "create_board_form.html" %>

  Welcome,
  <%= if String.length(@user[:first]) > 0 do %>
    <%= @user[:first] %>!
  <% else %>
    <%= @user[:email] %>!
  <% end %>

        Whiteboards are ephemeral. There is no guarantee that they'll
        stick around for long periods of time. If they go away, that's
        why.

        Future versions of Whiteboard will not have this limitation.

Boards

    <%= if length(@whiteboards) == 0 do %>

          You have no boards configured.
          Create one using the form on the right →

    <% else %>

      <%= Enum.map @whiteboards, fn(whiteboard) -> %>

<%= whiteboard[:name] %>

      <% end %>

    <% end %>

Create Board

    <%= render "create_board_form.html" %>


adjust header

adjust header

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Hello SGC!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

            <%= if logged_in?(@conn) do %>

<%= link current_user(@conn).username, to: user_path(@conn, :show, @user.user_id) %>

<%= link "Logout", to: session_path(@conn, :delete) %>

            <% else %>

<%= link "Login", to: session_path(@conn, :new) %>

            <% end %>

SGC

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

        <%= render @view_module, @view_template, assigns %>

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Hello SGC!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

            <%= if logged_in?(@conn) do %>

<%= current_user(@conn).username %>

<%= link "Logout", to: session_path(@conn, :delete) %>

            <% else %>

<%= link "Login", to: session_path(@conn, :new) %>

            <% end %>

        SGC

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

        <%= render @view_module, @view_template, assigns %>


Boot script improvements

Boot script improvements

- Document env vars and functions
- Define which things are public/private
- Move pre_start events in to places where they
  can do more prior to startup
- Add RELEASE_CONFIG_DIR env var, for defining
  where to look for vm.args, sys.config, and other
  config related files. By default it will check first
  in the release root directory, and then the release version
  directory.

#!/bin/sh

set -e

# Path to this script
SCRIPT=$(readlink $0 || true)
if [ -z $SCRIPT ]; then
    SCRIPT=$0
fi;
# Parent directory of this script
SCRIPT_DIR="$(cd `dirname "$SCRIPT"` && pwd -P)"
# Root directory of all releases
RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd -P)"
# Name of the release
REL_NAME="<%= rel_name %>"
# Current version of the release
REL_VSN="<%= rel_vsn %>"
# Current version of ERTS being used
ERTS_VSN="<%= erts_vsn %>"
# VM code loading mode, embedded by default, can also be interactive
# See http://erlang.org/doc/man/code.html
CODE_LOADING_MODE="${CODE_LOADING_MODE:-embedded}"
# Directory containing the current version of this release
REL_DIR="$RELEASE_ROOT_DIR/releases/$REL_VSN"
# The lib directory for this release
REL_LIB_DIR="$RELEASE_ROOT_DIR/lib"
# Options passed to erl
ERL_OPTS="<%= erl_opts %>"
# When stdout is piped to a file, this is the directory those files will
# be stored in. defaults to /log in the release root directory
RUNNER_LOG_DIR="${RUNNER_LOG_DIR:-$RELEASE_ROOT_DIR/log}"
# A string of extra options to pass to erl, here for plugins
EXTRA_OPTS=""

# Pre-start/stop event hook paths
PRE_START_HOOK="$REL_DIR/hooks/pre_start"
POST_START_HOOK="$REL_DIR/hooks/post_start"
PRE_STOP_HOOK="$REL_DIR/hooks/pre_stop"
POST_STOP_HOOK="$REL_DIR/hooks/post_stop"

# Get node pid
get_pid() {
    if output="$(nodetool rpcterms os getpid)"
    then
        echo "$output" | sed -e 's/"//g'
        return 0
    else
        echo "$output"
        return 1
    fi
}

# Generate a unique nodename
gen_nodename() {
    id="longname$(gen_id)-${NAME}"
    "$BINDIR/erl" -boot start_clean -eval '[Host] = tl(string:tokens(atom_to_list(node()),"@")), io:format("~s~n", [Host]), halt()' -noshell ${NAME_TYPE} $id
}

# Generate a random id
gen_id() {
    od -t x -N 4 /dev/urandom | head -n1 | awk '{print $2}'
}

# Control a node
# Use like `nodetool "ping"`
nodetool() {
    command="$1"; shift

    "$ERTS_DIR/bin/escript" "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \
                            -setcookie "$COOKIE" "$command" $@
}

# Run an escript in the node's environment
# Use like `escript "path/to/escript"`
escript() {
    shift; scriptpath="$1"; shift
    export RELEASE_ROOT_DIR

    "$ERTS_DIR/bin/escript" "$ROOTDIR/$scriptpath" $@
}

# Private. For setting ERTS_DIR and ROOTDIR
_find_erts_dir() {
    __erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
    if [ -d "$__erts_dir" ]; then
        ERTS_DIR="$__erts_dir";
        ROOTDIR="$RELEASE_ROOT_DIR"
    else
        __erl="$(which erl)"
        code="io:format(\"~s\", [code:root_dir()]), halt()."
        __erl_root="$("$__erl" -noshell -eval "$code")"
        ERTS_DIR="$__erl_root/erts-$ERTS_VSN"
        ROOTDIR="$__erl_root"
    fi
}

# Private. Open a shell on a remote node
_rem_sh() {
    # Generate a unique id used to allow multiple remsh to the same node
    # transparently
    id="remsh$(gen_id)-${NAME}"

    # Get the node's ticktime so that we use the same thing.
    TICKTIME="$(nodetool rpcterms net_kernel get_net_ticktime)"

    # Setup remote shell command to control node
    #exec "$BINDIR/erl" "$NAME_TYPE" "$id" -remsh "$NAME" -boot start_clean \
    #    -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
    #    -setcookie "$COOKIE" -hidden -kernel net_ticktime $TICKTIME
    exec "$BINDIR/erl" \
         -pa "$ROOTDIR"/lib/*/ebin -pa "$CONSOLIDATED_DIR" \
         -hidden -noshell \
         -boot start_clean -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
         -kernel net_ticktime $TICKTIME \
         -user Elixir.IEx.CLI "$NAME_TYPE" "$id" -setcookie "$COOKIE" \
         -extra --no-halt +iex -"$NAME_TYPE" "$id" --cookie "$COOKIE" --remsh "$NAME"
}

# Output a start command for the last argument of run_erl
_start_command() {
    printf "exec \"%s\" \"%s\"" "$RELEASE_ROOT_DIR/bin/$REL_NAME" \
           "$START_OPTION"
}

# Allow override of where to look for config files
# By default it's $CWD/
if [ -z "$RELEASE_CONFIG_DIR" ]; then
    RELEASE_CONFIG_DIR="$RELEASE_ROOT_DIR"
fi

# Set VMARGS_PATH, the path to the vm.args file to use
# Use $RELEASE_CONFIG_DIR/vm.args if exists, otherwise releases/VSN/vm.args
if [ -z "$VMARGS_PATH" ]; then
    if [ -f "$RELEASE_CONFIG_DIR/vm.args" ]; then
        VMARGS_PATH="$RELEASE_CONFIG_DIR/vm.args"
    else
        VMARGS_PATH="$REL_DIR/vm.args"
    fi
fi

orig_vmargs_path="$VMARGS_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's vm.args
    if [ ! -L "$orig_vmargs_path" ]; then
       #we're in copy mode, rename the vm.args file to vm.args.orig
       mv "$VMARGS_PATH" "$orig_vmargs_path"
    fi

    awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < "$orig_vmargs_path" > "$VMARGS_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink vm.args.orig to vm.args, and keep it as a
    #symlink.
    if [ -L "$orig_vmargs_path" ]; then
       mv "$orig_vmargs_path" "$VMARGS_PATH"
    fi
fi

# Make sure log directory exists
mkdir -p "$RUNNER_LOG_DIR"

# Set SYS_CONFIG_PATH, the path to the sys.config file to use
# Use $RELEASE_CONFIG_DIR/sys.config if exists, otherwise releases/VSN/sys.config
if [ -z "$SYS_CONFIG_PATH" ]; then
    if [ -f "$RELEASE_CONFIG_DIR/sys.config" ]; then
        SYS_CONFIG_PATH="$RELEASE_CONFIG_DIR/sys.config"
    else
        SYS_CONFIG_PATH="$REL_DIR/sys.config"
    fi
fi

orig_sys_config_path="$SYS_CONFIG_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's sys.config
    if [ ! -L "$orig_sys_config_path" ]; then
       #We're in copy mode, rename sys.config to sys.config.orig
       mv "$SYS_CONFIG_PATH" "$orig_sys_config_path"
    fi

    awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < "$orig_sys_config_path" > "$SYS_CONFIG_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink sys.config.orig to sys.config. Keep it as
    #a symlink.
    if [ -L "$orig_sys_config_path" ]; then
       mv "$orig_sys_config_path"  "$SYS_CONFIG_PATH"
    fi
fi

# Extract the target node name from node.args
# Should be `-sname somename` or `-name somename@somehost`
NAME_ARG=$(egrep '^-s?name' "$VMARGS_PATH" || true)
if [ -z "$NAME_ARG" ]; then
    echo "vm.args needs to have either -name or -sname parameter."
    exit 1
fi

# Extract the name type and name from the NAME_ARG for REMSH
# NAME_TYPE should be -name or -sname
NAME_TYPE="$(echo "$NAME_ARG" | awk '{print $1}')"
# NAME will be either `somename` or `somename@somehost`
NAME="$(echo "$NAME_ARG" | awk '{print $2}')"

# Where the pipe will be stored when using `start`
# This is used so you can attach the running application to the current
# shell using `attach`
PIPE_DIR="${PIPE_DIR:-/tmp/erl_pipes/$NAME/}"

# Extract the target cookie
COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)"
DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie"
if [ -z "$COOKIE_ARG" ]; then
    if [ -f "$DEFAULT_COOKIE_FILE" ]; then
        COOKIE="$(cat "$DEFAULT_COOKIE_FILE")"
    else
        printf "a secret cookie must be provided in one of the following ways:\n  - with vm.args using the -setcookie parameter,\n  or\n  by writing the cookie to '$DEFAULT_COOKIE_FILE', with permissions set to 0400"
        exit 1
    fi
else
    # Extract cookie name from COOKIE_ARG
    COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')"
fi

_find_erts_dir
export ROOTDIR="$RELEASE_ROOT_DIR"
export BINDIR="$ERTS_DIR/bin"
export EMU="beam"
export PROGNAME="erl"
export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH"
ERTS_LIB_DIR="$ERTS_DIR/../lib"
CONSOLIDATED_DIR="$ROOTDIR/lib/${REL_NAME}-${REL_VSN}/consolidated"

cd "$ROOTDIR"

# User can specify an sname without @hostname
# This will fail when creating remote shell
# So here we check for @ and add @hostname if missing
case $NAME in
    *@*)
        # Nothing to do
        ;;
    *)
        NAME=$NAME@$(gen_nodename)
        ;;
esac

# Check the first argument for instructions
case "$1" in
    start|start_boot)

        # Make sure there is not already a node running
        #RES=`$NODETOOL ping`
        #if [ "$RES" = "pong" ]; then
        #    echo "Node is already running!"
        #    exit 1
        #fi
        # Save this for later.
        CMD=$1
        case "$1" in
            start)
                shift
                START_OPTION="console"
                HEART_OPTION="start"
                ;;
            start_boot)
                shift
                START_OPTION="console_boot"
                HEART_OPTION="start_boot"
                ;;
        esac
        RUN_PARAM="$@"

        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        # Set arguments for the heart command
        set -- "$SCRIPT_DIR/$REL_NAME" "$HEART_OPTION"
        [ "$RUN_PARAM" ] && set -- "$@" "$RUN_PARAM"

        # Export the HEART_COMMAND
        HEART_COMMAND="$RELEASE_ROOT_DIR/bin/$REL_NAME $CMD"
        export HEART_COMMAND

        mkdir -p "$PIPE_DIR"

        "$BINDIR/run_erl" -daemon "$PIPE_DIR" "$RUNNER_LOG_DIR" \
                          "$(_start_command)"

        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        ;;

    stop)
        [ -f "$PRE_STOP_HOOK" ] && . "$PRE_STOP_HOOK"
        # Wait for the node to completely stop...
        PID="$(get_pid)"
        if ! nodetool "stop"; then
            exit 1
        fi
        while $(kill -s 0 "$PID" 2>/dev/null);
        do
            sleep 1
        done
        [ -f "$POST_STOP_HOOK" ] && . "$POST_STOP_HOOK"
        ;;

    restart)
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        ## Restart the VM without exiting the process
        if ! nodetool "restart"; then
            exit 1
        fi
        ;;

    reboot)
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        ## Restart the VM completely (uses heart to restart it)
        if ! nodetool "reboot"; then
            exit 1
        fi
        ;;

    pid)
        ## Get the VM's pid
        if ! get_pid; then
            exit 1
        fi
        ;;

    ping)
        ## See if the VM is alive
        if ! nodetool "ping"; then
            exit 1
        fi
        ;;

    escript)
        ## Run an escript under the node's environment
        if ! escript $@; then
            exit 1
        fi
        ;;

    attach)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        exec "$BINDIR/to_erl" "$PIPE_DIR"
        ;;

    remote_console)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        _rem_sh
        ;;

    upgrade|downgrade|install)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "install" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    unpack)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "unpack" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    console|console_clean|console_boot)
        # .boot file typically just $REL_NAME (ie, the app name)
        # however, for debugging, sometimes start_clean.boot is useful.
        # For e.g. 'setup', one may even want to name another boot script.
        case "$1" in
            console)
                if [ -f "$REL_DIR/$REL_NAME.boot" ]; then
                  BOOTFILE="$REL_DIR/$REL_NAME"
                else
                  BOOTFILE="$REL_DIR/start"
                fi
                ;;
            console_clean)
                BOOTFILE="$ROOTDIR/bin/start_clean"
                ;;
            console_boot)
                shift
                BOOTFILE="$1"
                shift
                ;;
        esac
        # Setup beam-required vars
        EMU="beam"
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Start the VM, executing pre_start hook along
        # the way. We can't run the post_start hook because
        # the console will crash with no TTY attached
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" \
            -boot "$BOOTFILE" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            -args_file "$VMARGS_PATH" \
            -config "$SYS_CONFIG_PATH" \
            -mode "$CODE_LOADING_MODE" \
            ${ERL_OPTS} \
            -user Elixir.IEx.CLI \
            -extra --no-halt +iex

        # Dump environment info for logging purposes
        echo "Exec: $@" -- ${1+$ARGS} ${EXTRA_OPTS}
        echo "Root: $ROOTDIR"

        # Log the startup
        echo "$RELEASE_ROOT_DIR"
        logger -t "$REL_NAME[$$]" "Starting up"

        exec "$@" -- ${1+$ARGS} ${EXTRA_OPTS}
        ;;

    foreground)
        # start up the release in the foreground for use by runit
        # or other supervision services

        [ -f "$REL_DIR/$REL_NAME.boot" ] && BOOTFILE="$REL_NAME" || BOOTFILE=start
        FOREGROUNDOPTIONS="-noshell -noinput +Bd"

        # Setup beam-required vars
        EMU=beam
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Start the VM, executing pre and post start hooks
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" $FOREGROUNDOPTIONS \
            -boot "$REL_DIR/$BOOTFILE" -mode "$CODE_LOADING_MODE" -config "$SYS_CONFIG_PATH" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -args_file "$VMARGS_PATH" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            ${ERL_OPTS} \
            -extra ${EXTRA_OPTS}

        # Dump environment info for logging purposes
        echo "Exec: $@" -- ${1+$ARGS}
        echo "Root: $ROOTDIR"

        trap '{}' QUIT TERM KILL HUP SIGUSR1 SIGUSR2
        "$@" -- ${1+$ARGS} &
        __bg_pid=$!
        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        wait $__bg_pid
        ;;
    rpc)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        nodetool rpc $@
        ;;
    rpcterms)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        nodetool rpcterms $@
        ;;
    eval)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        nodetool "eval" $@
        ;;
    *)
        __command_path="$REL_DIR/commands/$1"
        if [ -f "$__command_path" ]; then
            . "$__command_path"
        else
            echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|downgrade|install|escript|rpc|rpcterms|eval}"
            exit 1
        fi
        ;;
esac

exit 0

#!/bin/sh

set -e

SCRIPT=$(readlink $0 || true)
if [ -z $SCRIPT ]; then
    SCRIPT=$0
fi;
SCRIPT_DIR="$(cd `dirname "$SCRIPT"` && pwd -P)"
RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd -P)"
REL_NAME="<%= rel_name %>"
REL_VSN="<%= rel_vsn %>"
ERTS_VSN="<%= erts_vsn %>"
CODE_LOADING_MODE="${CODE_LOADING_MODE:-embedded}"
REL_DIR="$RELEASE_ROOT_DIR/releases/$REL_VSN"
REL_LIB_DIR="$RELEASE_ROOT_DIR/lib"
ERL_OPTS="<%= erl_opts %>"
RUNNER_LOG_DIR="${RUNNER_LOG_DIR:-$RELEASE_ROOT_DIR/log}"

# Pre-start/stop event hooks
PRE_START_HOOK="$REL_DIR/hooks/pre_start"
POST_START_HOOK="$REL_DIR/hooks/post_start"
PRE_STOP_HOOK="$REL_DIR/hooks/pre_stop"
POST_STOP_HOOK="$REL_DIR/hooks/post_stop"

find_erts_dir() {
    __erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
    if [ -d "$__erts_dir" ]; then
        ERTS_DIR="$__erts_dir";
        ROOTDIR="$RELEASE_ROOT_DIR"
    else
        __erl="$(which erl)"
        code="io:format(\"~s\", [code:root_dir()]), halt()."
        __erl_root="$("$__erl" -noshell -eval "$code")"
        ERTS_DIR="$__erl_root/erts-$ERTS_VSN"
        ROOTDIR="$__erl_root"
    fi
}

# Get node pid
_get_pid() {
    if output="$(_nodetool rpcterms os getpid)"
    then
        echo "$output" | sed -e 's/"//g'
        return 0
    else
        echo "$output"
        return 1
    fi
}

_get_nodename() {
    id="longname$(_gen_id)-${NAME}"
    "$BINDIR/erl" -boot start_clean -eval '[Host] = tl(string:tokens(atom_to_list(node()),"@")), io:format("~s~n", [Host]), halt()' -noshell ${NAME_TYPE} $id
}

# Connect to a remote node
_rem_sh() {
    # Generate a unique id used to allow multiple remsh to the same node
    # transparently
    id="remsh$(_gen_id)-${NAME}"

    # Get the node's ticktime so that we use the same thing.
    TICKTIME="$(_nodetool rpcterms net_kernel get_net_ticktime)"

    # Setup remote shell command to control node
    #exec "$BINDIR/erl" "$NAME_TYPE" "$id" -remsh "$NAME" -boot start_clean \
    #    -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
    #    -setcookie "$COOKIE" -hidden -kernel net_ticktime $TICKTIME
    exec "$BINDIR/erl" \
         -pa "$ROOTDIR"/lib/*/ebin -pa "$CONSOLIDATED_DIR" \
         -hidden -noshell \
         -boot start_clean -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
         -kernel net_ticktime $TICKTIME \
         -user Elixir.IEx.CLI "$NAME_TYPE" "$id" -setcookie "$COOKIE" \
         -extra --no-halt +iex -"$NAME_TYPE" "$id" --cookie "$COOKIE" --remsh "$NAME"
}

# Generate a random id
_gen_id() {
    od -t x -N 4 /dev/urandom | head -n1 | awk '{print $2}'
}

# Control a node
_nodetool() {
    command="$1"; shift

    "$ERTS_DIR/bin/escript" "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \
                                -setcookie "$COOKIE" "$command" $@
}

# Run an escript in the node's environment
_escript() {
    shift; scriptpath="$1"; shift
    export RELEASE_ROOT_DIR

    "$ERTS_DIR/bin/escript" "$ROOTDIR/$scriptpath" $@
}

# Output a start command for the last argument of run_erl
_start_command() {
    printf "exec \"%s\" \"%s\"" "$RELEASE_ROOT_DIR/bin/$REL_NAME" \
           "$START_OPTION"
}

# Use $CWD/vm.args if exists, otherwise releases/VSN/vm.args
if [ -z "$VMARGS_PATH" ]; then
    if [ -f "$RELEASE_ROOT_DIR/vm.args" ]; then
        VMARGS_PATH="$RELEASE_ROOT_DIR/vm.args"
    else
        VMARGS_PATH="$REL_DIR/vm.args"
    fi
fi

orig_vmargs_path="$VMARGS_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's vm.args
    if [ ! -L "$orig_vmargs_path" ]; then
       #we're in copy mode, rename the vm.args file to vm.args.orig
       mv "$VMARGS_PATH" "$orig_vmargs_path"
    fi

    awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < "$orig_vmargs_path" > "$VMARGS_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink vm.args.orig to vm.args, and keep it as a
    #symlink.
    if [ -L "$orig_vmargs_path" ]; then
       mv "$orig_vmargs_path" "$VMARGS_PATH"
    fi
fi

# Make sure log directory exists
mkdir -p "$RUNNER_LOG_DIR"

# Use $CWD/sys.config if exists, otherwise releases/VSN/sys.config
if [ -z "$SYS_CONFIG_PATH" ]; then
    if [ -f "$RELEASE_ROOT_DIR/sys.config" ]; then
        SYS_CONFIG_PATH="$RELEASE_ROOT_DIR/sys.config"
    else
        SYS_CONFIG_PATH="$REL_DIR/sys.config"
    fi
fi

orig_sys_config_path="$SYS_CONFIG_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's sys.config
    if [ ! -L "$orig_sys_config_path" ]; then
       #We're in copy mode, rename sys.config to sys.config.orig
       mv "$SYS_CONFIG_PATH" "$orig_sys_config_path"
    fi

    awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < "$orig_sys_config_path" > "$SYS_CONFIG_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink sys.config.orig to sys.config. Keep it as
    #a symlink.
    if [ -L "$orig_sys_config_path" ]; then
       mv "$orig_sys_config_path"  "$SYS_CONFIG_PATH"
    fi
fi

# Extract the target node name from node.args
NAME_ARG=$(egrep '^-s?name' "$VMARGS_PATH" || true)
if [ -z "$NAME_ARG" ]; then
    echo "vm.args needs to have either -name or -sname parameter."
    exit 1
fi

# Extract the name type and name from the NAME_ARG for REMSH
NAME_TYPE="$(echo "$NAME_ARG" | awk '{print $1}')"
NAME="$(echo "$NAME_ARG" | awk '{print $2}')"

PIPE_DIR="${PIPE_DIR:-/tmp/erl_pipes/$NAME/}"

# Extract the target cookie
COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)"
DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie"
if [ -z "$COOKIE_ARG" ]; then
    if [ -f "$DEFAULT_COOKIE_FILE" ]; then
        COOKIE="$(cat "$DEFAULT_COOKIE_FILE")"
    else
        printf "a secret cookie must be provided in one of the following ways:\n  - with vm.args using the -setcookie parameter,\n  or\n  by writing the cookie to '$DEFAULT_COOKIE_FILE', with permissions set to 0400"
        exit 1
    fi
else
    # Extract cookie name from COOKIE_ARG
    COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')"
fi

find_erts_dir
export ROOTDIR="$RELEASE_ROOT_DIR"
export BINDIR="$ERTS_DIR/bin"
export EMU="beam"
export PROGNAME="erl"
export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH"
ERTS_LIB_DIR="$ERTS_DIR/../lib"
CONSOLIDATED_DIR="$ROOTDIR/lib/${REL_NAME}-${REL_VSN}/consolidated"

cd "$ROOTDIR"

# User can specify an sname without @hostname
# This will fail when creating remote shell
# So here we check for @ and add @hostname if missing
case $NAME in
    *@*)
        # Nothing to do
        ;;
    *)
        NAME=$NAME@$(_get_nodename)
        ;;
esac

# Check the first argument for instructions
case "$1" in
    start|start_boot)

        # Make sure there is not already a node running
        #RES=`$NODETOOL ping`
        #if [ "$RES" = "pong" ]; then
        #    echo "Node is already running!"
        #    exit 1
        #fi
        # Save this for later.
        CMD=$1
        case "$1" in
            start)
                shift
                START_OPTION="console"
                HEART_OPTION="start"
                ;;
            start_boot)
                shift
                START_OPTION="console_boot"
                HEART_OPTION="start_boot"
                ;;
        esac
        RUN_PARAM="$@"

        # Set arguments for the heart command
        set -- "$SCRIPT_DIR/$REL_NAME" "$HEART_OPTION"
        [ "$RUN_PARAM" ] && set -- "$@" "$RUN_PARAM"

        # Export the HEART_COMMAND
        HEART_COMMAND="$RELEASE_ROOT_DIR/bin/$REL_NAME $CMD"
        export HEART_COMMAND

        mkdir -p "$PIPE_DIR"

        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        "$BINDIR/run_erl" -daemon "$PIPE_DIR" "$RUNNER_LOG_DIR" \
                          "$(_start_command)"

        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        ;;

    stop)
        [ -f "$PRE_STOP_HOOK" ] && . "$PRE_STOP_HOOK"
        # Wait for the node to completely stop...
        PID="$(_get_pid)"
        if ! _nodetool "stop"; then
            exit 1
        fi
        while $(kill -s 0 "$PID" 2>/dev/null);
        do
            sleep 1
        done
        [ -f "$POST_STOP_HOOK" ] && . "$POST_STOP_HOOK"
        ;;

    restart)
        ## Restart the VM without exiting the process
        if ! _nodetool "restart"; then
            exit 1
        fi
        ;;

    reboot)
        ## Restart the VM completely (uses heart to restart it)
        if ! _nodetool "reboot"; then
            exit 1
        fi
        ;;

    pid)
        ## Get the VM's pid
        if ! _get_pid; then
            exit 1
        fi
        ;;

    ping)
        ## See if the VM is alive
        if ! _nodetool "ping"; then
            exit 1
        fi
        ;;

    escript)
        ## Run an escript under the node's environment
        if ! _escript $@; then
            exit 1
        fi
        ;;

    attach)
        # Make sure a node IS running
        if ! _nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        exec "$BINDIR/to_erl" "$PIPE_DIR"
        ;;

    remote_console)
        # Make sure a node IS running
        if ! _nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        _rem_sh
        ;;

    upgrade|downgrade|install)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! _nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "install" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    unpack)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! _nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "unpack" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    console|console_clean|console_boot)
        # .boot file typically just $REL_NAME (ie, the app name)
        # however, for debugging, sometimes start_clean.boot is useful.
        # For e.g. 'setup', one may even want to name another boot script.
        case "$1" in
            console)
                if [ -f "$REL_DIR/$REL_NAME.boot" ]; then
                  BOOTFILE="$REL_DIR/$REL_NAME"
                else
                  BOOTFILE="$REL_DIR/start"
                fi
                ;;
            console_clean)
                BOOTFILE="$ROOTDIR/bin/start_clean"
                ;;
            console_boot)
                shift
                BOOTFILE="$1"
                shift
                ;;
        esac
        # Setup beam-required vars
        EMU="beam"
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" \
            -boot "$BOOTFILE" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            -args_file "$VMARGS_PATH" \
            -config "$SYS_CONFIG_PATH" \
            -mode "$CODE_LOADING_MODE" \
            ${ERL_OPTS} \
            -extra

        # Dump environment info for logging purposes
        echo "Exec: $@" -- ${1+$ARGS}
        echo "Root: $ROOTDIR"

        # Log the startup
        echo "$RELEASE_ROOT_DIR"
        logger -t "$REL_NAME[$$]" "Starting up"

        # Start the VM, executing pre_start hook along
        # the way. We can't run the post_start hook because
        # the console will crash with no TTY attached
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        exec "$@" -- ${1+$ARGS}
        ;;

    foreground)
        # start up the release in the foreground for use by runit
        # or other supervision services

        [ -f "$REL_DIR/$REL_NAME.boot" ] && BOOTFILE="$REL_NAME" || BOOTFILE=start
        FOREGROUNDOPTIONS="-noshell -noinput +Bd"

        # Setup beam-required vars
        EMU=beam
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" $FOREGROUNDOPTIONS \
            -boot "$REL_DIR/$BOOTFILE" -mode "$CODE_LOADING_MODE" -config "$SYS_CONFIG_PATH" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -args_file "$VMARGS_PATH" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            ${ERL_OPTS}

        # Dump environment info for logging purposes
        echo "Exec: $@" -- ${1+$ARGS}
        echo "Root: $ROOTDIR"

        # Start the VM, executing pre and post start hooks
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        trap '{}' QUIT TERM KILL HUP SIGUSR1 SIGUSR2
        "$@" -- ${1+$ARGS} &
        __bg_pid=$!
        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        wait $__bg_pid
        ;;
    rpc)
        # Make sure a node IS running
        if ! _nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        _nodetool rpc $@
        ;;
    rpcterms)
        # Make sure a node IS running
        if ! _nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        _nodetool rpcterms $@
        ;;
    eval)
        # Make sure a node IS running
        if ! _nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        _nodetool "eval" $@
        ;;
    *)
        __command_path="$REL_DIR/commands/$1"
        if [ -f "$__command_path" ]; then
            . "$__command_path"
        else
            echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|downgrade|install|escript|rpc|rpcterms|eval}"
            exit 1
        fi
        ;;
esac

exit 0


ensure no extra or missing newlines in control template occur

Package: <%= sanitized_name %><%= if external_dependencies != nil do %>
Version: <%= version %>
Vendor: <%= vendor %>
Architecture: <%= arch %>
Maintainer: <%= maintainers %>
Installed-Size: <%= installed_size %>
Depends: <%= external_dependencies %>
Priority: optional
Section: utils
Homepage: <%= homepage %>
Description: <%= description %><% else %>
Version: <%= version %>
Vendor: <%= vendor %>
Architecture: <%= arch %>
Maintainer: <%= maintainers %>
Installed-Size: <%= installed_size %>
Priority: optional
Section: utils
Homepage: <%= homepage %>
Description: <%= description %><% end %>

Package: <%= sanitized_name %>
Version: <%= version %>
Vendor: <%= vendor %>
Architecture: <%= arch %>
Maintainer: <%= maintainers %>
Installed-Size: <%= installed_size %><%= if external_dependencies != nil do %>
Depends: <%= external_dependencies %>
<% end %>Priority: optional
Section: utils
Homepage: <%= homepage %>
Description: <%= description %>


make sure $__erl is not empty. Fixes #70


Validators don't like itemprop in meta.

Validators don't like itemprop in meta.

<% # Shared meta tags %>
<%= render Ello.Serve.Webapp.MetaView, "_shared.html", assigns %>

<% # Custom meta tags %>

<%= for image_url <- image_urls(@post) do %>
  <meta name="image" content="<%= image_url %>"/>
  <meta property="og:image" content="<%= image_url %>"/>
<% end %>

<%= for embed_url <- embed_urls(@post) do %>
  <meta property="og:video" content="<%= embed_url %>"/>
<% end %>

<%= if @post.reposted_source do %>
  <link href="<%= post_url(@post.reposted_source) %>" rel="canonical" />
<% end %>

<% # Shared meta tags %>
<%= render Ello.Serve.Webapp.MetaView, "_shared.html", assigns %>

<% # Custom meta tags %>

<%= for image_url <- image_urls(@post) do %>
  <meta name="image" itemprop="image" content="<%= image_url %>"/>
  <meta property="og:image" content="<%= image_url %>"/>
<% end %>

<%= for embed_url <- embed_urls(@post) do %>
  <meta property="og:video" content="<%= embed_url %>"/>
<% end %>

<%= if @post.reposted_source do %>
  <link href="<%= post_url(@post.reposted_source) %>" rel="canonical" />
<% end %>


Add google analytics tracking code.

Add google analytics tracking code.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>What3things</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
  </head>

  <body>

      <main>
        <%= render @view_module, @view_template, assigns %>
      </main>

    <script src="<%= static_path(@conn, "/js/elm.js") %>"></script>
    <script src="<%= static_path(@conn, "/js/app.js") %>"></script>
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-4855628-20', 'auto');
      ga('send', 'pageview');
    </script>
  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>What3things</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
  </head>

  <body>

      <main>
        <%= render @view_module, @view_template, assigns %>
      </main>

    <script src="<%= static_path(@conn, "/js/elm.js") %>"></script>
    <script src="<%= static_path(@conn, "/js/app.js") %>"></script>
  </body>
</html>


Add Door/Door Group nav items

Add Door/Door Group nav items

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Alkaloid Gatekeeper</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
              Toggle navigation

            </button>

<%= link "Companies", to: company_path(@conn, :index) %>

<%= link "Door Groups", to: door_group_path(@conn, :index) %>

<%= link "Doors", to: door_path(@conn, :index) %>

<%= link "RFID Tokens", to: rfid_token_path(@conn, :index) %>

<%= link "Access Log", to: door_access_attempt_path(@conn, :index) %>

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

      <%= @inner %>

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Alkaloid Gatekeeper</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
              Toggle navigation

            </button>

<%= link "Companies", to: company_path(@conn, :index) %>

<%= link "RFID Tokens", to: rfid_token_path(@conn, :index) %>

<%= link "Access Log", to: door_access_attempt_path(@conn, :index) %>

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

      <%= @inner %>


Trying to fix heroku from weird error.

Trying to fix heroku from weird error.

    <%= for user <- Map.keys(@prs) do %>
      <%= for commit <- @prs[user] do %>

            <img src="<%= commit.github_user_avatar %>" style="width: 32px; height: 32px;" />
            <%= user %>

          <%= link "Travis", [{:to, commit.travis_url}] %>
          <%= link "Github", [{:to, commit.pr.html_url}] %>

            <span class="label label-<%= status_class(commit.status) %> text-uppercase">
              <%= to_string(commit.status) %>

      <% end %>
    <% end %>

    <%= for user <- Map.keys(@prs) do %>
      <%= for commit <- @prs[user] do %>

            <img src="<%= commit.github_user_avatar %>" style="width: 32px; height: 32px;" />
            <%= user %>

          <%= link "Travis", to: commit.travis_url %>
          <%= link "Github", to: commit.pr.html_url %>

            <span class="label label-<%= status_class(commit.status) %> text-uppercase">
              <%= to_string(commit.status) %>

      <% end %>
    <% end %>


revamp the main index template

revamp the main index template

    <div class="uk-vertical-align uk-text-center" style="background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjQsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTEzMHB4IiBoZWlnaHQ9IjQ1MHB4IiB2aWV3Qm94PSIwIDAgMTEzMCA0NTAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDExMzAgNDUwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxyZWN0IGZpbGw9IiNGNUY1RjUiIHdpZHRoPSIxMTMwIiBoZWlnaHQ9IjQ1MCIvPg0KPC9zdmc+DQo=') 50% 0 no-repeat; height: 450px;">

Willkommen zu die Gebetsguppe!

A place to join with others in Prayer.

Resources

        How to Pray

Help

        Issue Tracker / Bug Reports


hide embed scrollbar

hide embed scrollbar

<title>Liquio Inline</title>

<div class="area" style="background: <%= score_color(@poll) %>;">

			<%= if @poll.choice_type == "time_quantity" do %>
			<% else %>
				<%= if @poll.results.mean != nil do %>
					<%= if @poll.choice_type == "probability" do %>
						<%= round(@poll.results.mean * 100) %>%
					<% else %>
						<%= number_format(@poll.results.mean) %>
					<% end %>
				<% else %>
					?
				<% end %>

			<% end %>
			<%= round(@poll.results.turnout_ratio * 100) %>% turnout