Footer links management

pull/5719/head
Viktor Baranov 2 years ago
parent 04d2b63913
commit 3e992d3fe0
  1. 8
      apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex
  2. 5
      apps/block_scout_web/lib/block_scout_web/views/layout_view.ex
  3. 5
      config/runtime.exs

@ -21,7 +21,7 @@
<div class="col-xs-12 col-lg-3"> <div class="col-xs-12 col-lg-3">
<p class="footer-info-text"><%= gettext("Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks.") %></p> <p class="footer-info-text"><%= gettext("Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks.") %></p>
<div class="footer-social-icons"> <div class="footer-social-icons">
<a href="https://github.com/blockscout/blockscout" rel="noreferrer" target="_blank" class="footer-social-icon" title='<%= gettext("Github") %>'> <a href="<%= Application.get_env(:block_scout_web, :footer)[:github_link] %>" rel="noreferrer" target="_blank" class="footer-social-icon" title='<%= gettext("Github") %>'>
<div class="footer-social-icon-container fontawesome-icon github"></div> <div class="footer-social-icon-container fontawesome-icon github"></div>
</a> </a>
<a href="https://www.twitter.com/blockscoutcom/" rel="noreferrer" target="_blank" class="footer-social-icon" title='<%= gettext("Twitter") %>'> <a href="https://www.twitter.com/blockscoutcom/" rel="noreferrer" target="_blank" class="footer-social-icon" title='<%= gettext("Twitter") %>'>
@ -37,9 +37,9 @@
<h3>BlockScout</h3> <h3>BlockScout</h3>
<ul> <ul>
<li><a href="<%= issue_link(@conn) %>" rel="noreferrer" class="footer-link" target="_blank"><%= gettext("Submit an Issue") %></a></li> <li><a href="<%= issue_link(@conn) %>" rel="noreferrer" class="footer-link" target="_blank"><%= gettext("Submit an Issue") %></a></li>
<li><a href="https://github.com/blockscout/blockscout" rel="noreferrer" class="footer-link"><%= gettext("Contribute") %></a></li> <li><a href="<%= Application.get_env(:block_scout_web, :footer)[:github_link] %>" rel="noreferrer" class="footer-link"><%= gettext("Contribute") %></a></li>
<li><a href="http://discord.gg/gnosischain" rel="noreferrer" class="footer-link"><%= gettext("Chat (#blockscout)") %></a></li> <li><a href="<%= Application.get_env(:block_scout_web, :footer)[:chat_link] %>" rel="noreferrer" class="footer-link"><%= gettext("Chat (#blockscout)") %></a></li>
<li><a href="https://forum.poa.network/c/blockscout" rel="noreferrer" class="footer-link"><%= gettext("Forum") %></a></li> <li><a href="<%= Application.get_env(:block_scout_web, :footer)[:forum_link] %>" rel="noreferrer" class="footer-link"><%= gettext("Forum") %></a></li>
<%= if System.get_env("COIN_NAME") && System.get_env("NETWORK_PATH") && System.get_env("SUBNETWORK") && System.get_env("JSON_RPC") && System.get_env("CHAIN_ID") do %> <%= if System.get_env("COIN_NAME") && System.get_env("NETWORK_PATH") && System.get_env("SUBNETWORK") && System.get_env("JSON_RPC") && System.get_env("CHAIN_ID") do %>
<li><a class="footer-link js-btn-add-chain-to-mm btn-add-chain-to-mm in-footer" style="cursor: pointer;"><%= gettext("Add") <> " #{System.get_env("SUBNETWORK")}" %></a></li> <li><a class="footer-link js-btn-add-chain-to-mm btn-add-chain-to-mm in-footer" style="cursor: pointer;"><%= gettext("Add") <> " #{System.get_env("SUBNETWORK")}" %></a></li>
<% end %> <% end %>

@ -7,7 +7,6 @@ defmodule BlockScoutWeb.LayoutView do
import BlockScoutWeb.AddressView, only: [from_address_hash: 1] import BlockScoutWeb.AddressView, only: [from_address_hash: 1]
@issue_url "https://github.com/blockscout/blockscout/issues/new"
@default_other_networks [ @default_other_networks [
%{ %{
title: "POA", title: "POA",
@ -71,7 +70,9 @@ defmodule BlockScoutWeb.LayoutView do
title: subnetwork_title() <> ": <Issue Title>" title: subnetwork_title() <> ": <Issue Title>"
] ]
[@issue_url, "?", URI.encode_query(params)] issue_url = "#{Application.get_env(:block_scout_web, :footer)[:github_link]}/blockscout/issues/new"
[issue_url, "?", URI.encode_query(params)]
end end
defp issue_body(conn) do defp issue_body(conn) do

@ -25,3 +25,8 @@ indexer_empty_blocks_sanitizer_batch_size =
end end
config :indexer, Indexer.Fetcher.EmptyBlocksSanitizer, batch_size: indexer_empty_blocks_sanitizer_batch_size config :indexer, Indexer.Fetcher.EmptyBlocksSanitizer, batch_size: indexer_empty_blocks_sanitizer_batch_size
config :block_scout_web, :footer,
chat_link: System.get_env("FOOTER_CHAT_LINK", "https://discord.gg/3CtNAqVMRV"),
forum_link: System.get_env("FOOTER_FORUM_LINK", "https://forum.poa.network/c/blockscout"),
github_link: System.get_env("FOOTER_GITHUB_LINK", "https://github.com/blockscout/blockscout")

Loading…
Cancel
Save