diff --git a/lib/locale.js b/lib/locale.js index 0544738..aca1edb 100644 --- a/lib/locale.js +++ b/lib/locale.js @@ -17,7 +17,8 @@ exports.menu_node = "Nodes", exports.menu_network = "Network", exports.menu_claim_address = "Claim Address", -exports.ex_title = "Block Explorer", +exports.ex_title = "{1} Block Explorer", +exports.ex_description = "A listing of all verified {1} transactions", exports.ex_search_title = "Search", exports.ex_search_button = "Search", exports.ex_search_message = "Search by block height, block hash, tx hash or address", @@ -28,7 +29,9 @@ exports.ex_latest_transactions = "Latest Transactions", exports.ex_summary = "Block Summary", exports.ex_supply = "Coin Supply", exports.ex_block = "Block", -exports.tx_title = "Transaction Details", + +exports.tx_title = "{1} Transaction Details", +exports.tx_description = "Viewing tx data from {1} block # {2}", exports.tx_block_hash = "Block Hash", exports.tx_recipients = "Recipients", exports.tx_contributors = "Contributor(s)", @@ -38,13 +41,18 @@ exports.tx_nonstandard = "NONSTANDARD TX", exports.view_raw_tx_data = "View Raw Transaction Data", exports.view_block = "View Block", -exports.block_title = "Block Details", +exports.block_title = "{1} Block Details", +exports.block_description = "Viewing block data from {1} block # {2}", exports.block_previous = "Previous Block", exports.block_next = "Next Block", exports.block_genesis = "GENESIS", exports.view_raw_block_data = "View Raw Block Data", exports.view_tx = "View Transaction", +exports.error_title = "{1} Block Explorer Error", +exports.error_description = "The page you are looking for cannot be found", +exports.error_description_alt = "An error occurred which prevented the page from loading correctly", + exports.difficulty = "Difficulty", exports.network = "Network", exports.masternodecount = "Masternodes", @@ -67,13 +75,25 @@ exports.hidden_recipient = "Hidden Recipient", exports.unknown_address = "Unknown Address", exports.unknown_sender = "Unknown Sender", exports.unknown_recipient = "Unknown Recipient", +exports.last_updated = "Last Updated", exports.initial_index_alert = "Blockchain data is currently being synchronized. You may browse the site during this time, but keep in mind that data may not yet be fully accurate and some functionality may not work until synchronization is complete.", +exports.a_title = "{1} Wallet Address Details", +exports.a_description = "Viewing balance and transaction data from {1} address {2}", exports.a_menu_showing = "Showing", exports.a_menu_txs = "transactions", exports.a_menu_all = "All", exports.a_qr = "QR Code", +exports.mn_title = "{1} Masternodes", +exports.mn_description = "A listing of all masternodes known to be active on the {1} network", +exports.mn_masternode_list = "Masternode List", + +exports.move_title = "{1} Coin Movements", +exports.move_description = "A listing of larger movements where {1} or more {2} coins were sent in a single transaction", + +exports.rl_title = "Top {1} Coin Holders", +exports.rl_description = "A listing of the richest {1} wallet addresses and breakdown of the current coin distribution", exports.rl_received_coins = "Top 100 - Received Coins", exports.rl_current_balance = "Top 100 - Current Balance", exports.rl_received = "Received", @@ -85,16 +105,18 @@ exports.rl_top75 = "Top 51-75", exports.rl_top100 = "Top 76-100", exports.rl_hundredplus = "101+", +exports.net_title = "{1} Network Peers", +exports.net_description = "A listing of {1} network peers that have connected to the explorer node in the last 24 hours", exports.net_addnodes = "Add Nodes", exports.net_connections = "Connections", exports.net_address = "Address", exports.net_protocol = "Protocol", exports.net_subversion = "Sub-version", exports.net_country = "Country", -exports.net_warning = "This is simply a sub sample of the network based on wallets connected to this node.", -exports.api_title = "API Documentation", -exports.api_message = "The block explorer provides an API allowing users and/or applications to retrieve information from the network without the need for a local wallet.", +exports.api_title = "{1} Public API", +exports.api_description = "A listing of public API endpoints for retrieving {1} coin data from the network without the need for a local wallet", +exports.api_documentation = "API Documentation", exports.api_calls = "API Calls", exports.api_getnetworkhashps = "Returns the current network hashrate. (hash/s)", exports.api_getdifficulty = "Returns the current difficulty.", @@ -116,6 +138,8 @@ exports.api_getnextrewardestimate = 'Returns an estimate for the next block rewa exports.api_getnextrewardwhenstr = 'Returns a string describing how long until the votes are tallied and the next block reward is computed.', // Markets view +exports.mkt_title = "{1} Market Details", +exports.mkt_description = "Viewing {1} market data for the {2} exchange", exports.mkt_hours = "24 hours", exports.mkt_view_chart = "View 24 hour summary", exports.mkt_view_summary = "View 24 hour chart", @@ -138,10 +162,16 @@ exports.mkt_type = "Type", exports.mkt_time_stamp = "Time Stamp", exports.mkt_select = "Market Select", +// Claim address view +exports.claim_title = "{1} Wallet Address Claim", +exports.claim_description = "Verify ownership of your {1} wallet address and set a custom display name in the explorer", + // Heavycoin exports.heavy_vote = "Vote", // Heavycoin rewards view -exports.heavy_title = "Reward/voting information", +exports.heavy_title = "{1} Reward/Voting Details", +exports.heavy_description = "Viewing {1} voting data and coin reward change details", +exports.heavy_reward_voting_info = "Reward/voting information", exports.heavy_cap = "Coin Cap", exports.heavy_phase = "Phase", exports.heavy_maxvote = "Max Vote", diff --git a/lib/settings.js b/lib/settings.js index 3160cb6..db6f9a7 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -241,6 +241,15 @@ exports.shared_pages = { // position: Determine where the search box should appear on the website // valid options: inside-header, below-header "position": "inside-header" + }, + // page_title_image: A collection of settings that pertain to the page title image for each page + "page_title_image": { + // image_path: The path to an image file that is displayed in the header section of all pages next to the page title (NOTE: This image can be enabled/disabled on a per-page basis) + // NOTE: The path root is /public + // The optimum logo size is 48x48 as the image will be forced to this size when displayed + "image_path": "/img/page-title-img.png", + // enable_animation: Enable/disable the flip/spin animation on the page title image (true/false) + "enable_animation": true } }, // page_footer: A collection of settings that pertain to the page footer that is displayed at the bottom of all pages @@ -285,8 +294,17 @@ exports.shared_pages = { exports.index_page = { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": true, - // show_last_updated: Determine whether to show a label above the transaction data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the index page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.ex_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.ex_description" (true/false) + "show_description": true + }, // transaction_table: a collection of settings that pertain to the transaction table on the index page // Table data is populated via the /ext/getlasttxs api "transaction_table": { @@ -305,6 +323,15 @@ exports.index_page = { exports.block_page = { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the block page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.block_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.block_description" (true/false) + "show_description": true + }, // genesis_block: Your coins genesis block hash is used to determine the beginning of the blockchain // For many bitcoin clones you can use the following cmd to get the block hash of the genesis block: coin-cli getblockhash 0 // NOTE: If this value is not entered correctly it will not be possible for the explorer to find or navigate to the genesis block, neither via block or transaction hash @@ -315,6 +342,15 @@ exports.block_page = { exports.transaction_page = { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the transaction/tx page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.tx_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.tx_description" (true/false) + "show_description": true + }, // genesis_tx: Your coins genesis transaction hash is used to determine the beginning of the blockchain // For many bitcoin clones you can use the following cmd to find the list of transaction hashes from the genesis block: coin-cli getblock 00014f36c648cdbc750f7dd28487a23cd9e0b0f95f5fccc5b5d01367e3f57469 // NOTE: If this value is not entered correctly it will not be possible for the explorer to find or navigate to the genesis block by searching for the genesis transaction hash @@ -325,6 +361,15 @@ exports.transaction_page = { exports.address_page = { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the address page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.a_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.a_description" (true/false) + "show_description": true + }, // show_sent_received: Determine whether to show Total Sent and Total Received columns at the top of the address page "show_sent_received": false, // enable_hidden_address_view: Determine whether to allow viewing the special 'hidden_address' wallet address which is populated anytime a private/hidden wallet address is involved in a transaction @@ -349,7 +394,16 @@ exports.address_page = { // error_page: a collection of settings that pertain to the error page exports.error_page = { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) - "show_panels": false + "show_panels": false, + // page_header: a collection of settings that pertain to the error page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.error_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.error_description" (true/false) + "show_description": true + } }; /* Additional Pages (can be enabled/disabled via settings) */ @@ -361,8 +415,19 @@ exports.masternodes_page = { "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the masternode data with the last updated date (true/false) - "show_last_updated": true, + // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) + "show_panels": false, + // page_header: a collection of settings that pertain to the masternodes page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.mn_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.mn_description" (true/false) + "show_description": true + }, // masternode_table: a collection of settings that pertain to the masternode table on the masternodes page // Table data is populated via the /ext/getmasternodelist api "masternode_table": { @@ -380,8 +445,17 @@ exports.movement_page = { "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the movement data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the movement page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.move_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.move_description" (true/false) + "show_description": true + }, // movement_table: a collection of settings that pertain to the movement table on the movement page // Table data is populated via the /ext/getlasttxs api "movement_table": { @@ -409,8 +483,19 @@ exports.network_page = { "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the network data with the last updated date (true/false) - "show_last_updated": true, + // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) + "show_panels": false, + // page_header: a collection of settings that pertain to the network page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.net_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.net_description" (true/false) + "show_description": true + }, // connections_table: a collection of settings that pertain to the connections table on the network page // Table data is populated via the /ext/getnetworkpeers api "connections_table": { @@ -444,8 +529,17 @@ exports.richlist_page = { "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the richlist/top100 data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the richlist/top100 page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.rl_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.rl_description" (true/false) + "show_description": true + }, // show_current_balance: Determine whether to show the top 100 list of wallet addresses that currently have the most coins in a single wallet (true/false) "show_current_balance": true, // show_received_coins: Determine whether to show the top 100 list of wallet addresses that have the highest total number of coins received based on adding up all received transactions (true/false) @@ -486,8 +580,17 @@ exports.markets_page = { "enabled": false, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the market data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the markets page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.mkt_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.mkt_description" (true/false) + "show_description": true + }, // show_market_dropdown_menu: Determine whether the markets menu in the page header will function as a dropdown or a single-click menu item that opens the default market (true/false) // If set to true, the markets header menu will function as a dropdown that allows selecting from all available markets // If set to false, the markets header menu will function as a single-click menu item that opens the default market only @@ -601,6 +704,15 @@ exports.api_page = { "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the api page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.api_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.api_description" (true/false) + "show_description": true + }, // sample_data: a collection of settings that pertain to the sample data that is used to display example api links to real data "sample_data": { // blockindex: This value can be any valid block height number from your coins blockchain @@ -827,6 +939,15 @@ exports.claim_address_page = { "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the claim address page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.claim_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.claim_description" (true/false) + "show_description": true + }, // show_header_menu: Show/hide the "Claim Address" header menu item (true/false) // If set to false, the claim address page can still be accessed via the claim link on each address page // NOTE: The "claim_address_page.enabled" setting must also be set to true or else the header item will automatically be hidden as well @@ -940,8 +1061,17 @@ exports.blockchain_specific = { "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the reward data with the last updated date (true/false) - "show_last_updated": true + // page_header: a collection of settings that pertain to the reward page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.reward_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.reward_description" (true/false) + "show_description": true + } }, //api_cmds: A collection of settings that pertain to the list of customizable heavycoin rpc api commands // Not all blockchains utilize the same rpc cmds for accessing the internal daemon api. Use these settings to set alternate names for similar api cmds. @@ -1193,6 +1323,13 @@ exports.loadSettings = function loadSettings() { json_settings = fix_deprecated_setting(json_settings, 'social_links', 'shared_pages.page_footer.social_links'); // fix old deprecated settings from v1.99 json_settings = fix_deprecated_setting(json_settings, 'shared_pages.page_header.show_search', 'shared_pages.page_header.search.enabled'); + json_settings = fix_deprecated_setting(json_settings, 'index_page.show_last_updated', 'index_page.page_header.show_last_updated'); + json_settings = fix_deprecated_setting(json_settings, 'masternodes_page.show_last_updated', 'masternodes_page.page_header.show_last_updated'); + json_settings = fix_deprecated_setting(json_settings, 'movement_page.show_last_updated', 'movement_page.page_header.show_last_updated'); + json_settings = fix_deprecated_setting(json_settings, 'network_page.show_last_updated', 'network_page.page_header.show_last_updated'); + json_settings = fix_deprecated_setting(json_settings, 'richlist_page.show_last_updated', 'richlist_page.page_header.show_last_updated'); + json_settings = fix_deprecated_setting(json_settings, 'markets_page.show_last_updated', 'markets_page.page_header.show_last_updated'); + json_settings = fix_deprecated_setting(json_settings, 'blockchain_specific.heavycoin.reward_page.show_last_updated', 'blockchain_specific.heavycoin.reward_page.page_header.show_last_updated'); // check if social_links setting exists if (json_settings.shared_pages.page_footer.social_links != null) { // loop through the social links to look for and change image_url to image_path diff --git a/locale/en.json b/locale/en.json index fc21fe9..e8a0c26 100644 --- a/locale/en.json +++ b/locale/en.json @@ -12,7 +12,8 @@ "menu_claim_address": "Claim Address", // explorer view - "ex_title": "Block Explorer", + "ex_title": "{1} Block Explorer", + "ex_description": "A listing of all verified {1} transactions", "ex_search_title": "Search", "ex_search_button": "Search", "ex_search_message": "Search by block height, block hash, tx hash or address", @@ -24,7 +25,8 @@ "ex_block": "Block", // transaction view - "tx_title": "Transaction Details", + "tx_title": "{1} Transaction Details", + "tx_description": "Viewing tx data from {1} block # {2}", "tx_block_hash": "Block Hash", "tx_recipients": "Recipients", "tx_contributors": "Input Addresses", @@ -35,13 +37,19 @@ "view_block": "View Block", // block view + "block_title": "{1} Block Details", + "block_description": "Viewing block data from {1} block # {2}", "block_previous": "Previous Block", "block_next": "Next Block", - "block_title": "Block Details", "block_genesis": "GENESIS", "view_raw_block_data": "View Raw Block Data", "view_tx": "View Transaction", + // error view + "error_title": "{1} Block Explorer Error", + "error_description": "The page you are looking for cannot be found", + "error_description_alt": "An error occurred which prevented the page from loading correctly", + // global "difficulty": "Difficulty", "masternodecount": "Masternodes", @@ -65,15 +73,29 @@ "unknown_address": "Unknown Address", "unknown_sender": "Unknown Sender", "unknown_recipient": "Unknown Recipient", + "last_updated": "Last Updated", "initial_index_alert": "Blockchain data is currently being synchronized. You may browse the site during this time, but keep in mind that data may not yet be fully accurate and some functionality may not work until synchronization is complete.", - // address menu + // address view + "a_title": "{1} Wallet Address Details", + "a_description": "Viewing balance and transaction data from {1} address {2}", "a_menu_showing": "Showing last", "a_menu_txs": "transactions", "a_menu_all": "All", "a_qr": "QR Code", + // masternode view + "mn_title": "{1} Masternodes", + "mn_description": "A listing of all masternodes known to be active on the {1} network", + "mn_masternode_list": "Masternode List", + + // movement view + "move_title": "{1} Coin Movements", + "move_description": "A listing of larger movements where {1} or more {2} coins were sent in a single transaction", + // richlist + "rl_title": "Top {1} Coin Holders", + "rl_description": "A listing of the richest {1} wallet addresses and breakdown of the current coin distribution", "rl_received_coins": "Top 100 - Received Coins", "rl_current_balance": "Top 100 - Current Balance", "rl_received": "Received", @@ -85,17 +107,19 @@ "rl_top100": "Top 76-100", "rl_hundredplus": "101+", + "net_title": "{1} Network Peers", + "net_description": "A listing of {1} network peers that have connected to the explorer node in the last 24 hours", "net_addnodes": "Add Nodes", "net_connections": "Connections", "net_address": "Address", "net_protocol": "Protocol", "net_subversion": "Sub-version", "net_country": "Country", - "net_warning": "This is sub sample of the network based on wallets that have connected to this node in the last 24 hours.", // api view - "api_title": "API Documentation", - "api_message": "The block explorer provides an API allowing users and/or applications to retrieve information from the network without the need for a local wallet.", + "api_title": "{1} Public API", + "api_description": "A listing of public API endpoints for retrieving {1} coin data from the network without the need for a local wallet", + "api_documentation": "API Documentation", "api_calls": "API Calls", "api_getnetworkhashps": "Returns the current network hashrate. (hash/s)", "api_getdifficulty": "Returns the current difficulty.", @@ -117,6 +141,8 @@ "api_getnextrewardwhenstr": "Returns a string describing how long until the votes are tallied and the next block reward is computed.", // markets view + "mkt_title": "{1} Market Details", + "mkt_description": "Viewing {1} market data for the {2} exchange", "mkt_hours": "24 hours", "mkt_view_chart": "View 24 hour summary", "mkt_view_summary": "View 24 hour chart", @@ -139,8 +165,14 @@ "mkt_time_stamp": "Time Stamp", "mkt_select": "Market Select", + // claim address view + "claim_title": "{1} Wallet Address Claim", + "claim_description": "Verify ownership of your {1} wallet address and set a custom display name in the explorer", + // heavycoin rewards view - "heavy_title": "Reward/voting information", + "heavy_title": "{1} Reward/Voting Details", + "heavy_description": "Viewing {1} voting data and coin reward change details", + "heavy_reward_voting_info": "Reward/voting information", "heavy_vote": "Vote", "heavy_cap": "Coin Cap", "heavy_phase": "Phase", diff --git a/public/css/style.scss b/public/css/style.scss index 29b294b..b5ca4fb 100644 --- a/public/css/style.scss +++ b/public/css/style.scss @@ -869,4 +869,26 @@ tr { .navbar-nav .nav-link:hover { color: #686868; +} + +#page-header-container { + display: flex; + margin-bottom: 5px; +} + +#header-img-container { + margin-right: 5px; +} + +#header-img { + width: 48px; + height: 48px; +} + +#page-title { + margin: 0; +} + +.sub-page-header { + font-size: 90%; } \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index 966dbf9..1ee9ebf 100644 --- a/routes/index.js +++ b/routes/index.js @@ -166,7 +166,7 @@ function route_get_tx(res, txid) { function route_get_index(res, error) { // check if index page should show last updated date - if (settings.index_page.show_last_updated == true) { + if (settings.index_page.page_header.show_last_updated == true) { // lookup last updated date db.get_stats(settings.coin.name, function (stats) { res.render('index', { active: 'home', error: error, last_updated: stats.blockchain_last_updated, showSync: db.check_show_sync_message()}); @@ -240,7 +240,7 @@ router.get('/markets/:market/:coin_symbol/:pair_symbol', function(req, res) { // load market data var market_data = require('../lib/markets/' + market_id); // check if markets page should show last updated date - if (settings.markets_page.show_last_updated == true) { + if (settings.markets_page.page_header.show_last_updated == true) { // lookup last updated date db.get_stats(settings.coin.name, function (stats) { res.render('./market', { @@ -302,7 +302,7 @@ router.get('/richlist', function(req, res) { distc: distribution.t_51_75, distd: distribution.t_76_100, diste: distribution.t_101plus, - last_updated: (settings.richlist_page.show_last_updated == true ? stats.richlist_last_updated : null), + last_updated: (settings.richlist_page.page_header.show_last_updated == true ? stats.richlist_last_updated : null), showSync: db.check_show_sync_message() }); }); @@ -322,7 +322,7 @@ router.get('/movement', function(req, res) { // ensure movement page is enabled if (settings.movement_page.enabled == true) { // check if movement page should show last updated date - if (settings.movement_page.show_last_updated == true) { + if (settings.movement_page.page_header.show_last_updated == true) { // lookup last updated date db.get_stats(settings.coin.name, function (stats) { res.render('movement', {active: 'movement', last_updated: stats.blockchain_last_updated, showSync: db.check_show_sync_message()}); @@ -341,7 +341,7 @@ router.get('/network', function(req, res) { // ensure network page is enabled if (settings.network_page.enabled == true) { // check if network page should show last updated date - if (settings.network_page.show_last_updated == true) { + if (settings.network_page.page_header.show_last_updated == true) { // lookup last updated date db.get_stats(settings.coin.name, function (stats) { res.render('network', {active: 'network', last_updated: stats.network_last_updated, showSync: db.check_show_sync_message()}); @@ -361,7 +361,7 @@ router.get('/masternodes', function(req, res) { // ensure masternode page is enabled if (settings.masternodes_page.enabled == true) { // check if masternodes page should show last updated date - if (settings.masternodes_page.show_last_updated == true) { + if (settings.masternodes_page.page_header.show_last_updated == true) { // lookup last updated date db.get_stats(settings.coin.name, function (stats) { res.render('masternodes', {active: 'masternodes', last_updated: stats.masternodes_last_updated, showSync: db.check_show_sync_message()}); @@ -400,7 +400,7 @@ router.get('/reward', function(req, res) { stats: stats, heavy: heavy, votes: votes, - last_updated: (settings.blockchain_specific.heavycoin.reward_page.show_last_updated == true ? stats.reward_last_updated : null), + last_updated: (settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated == true ? stats.reward_last_updated : null), showSync: db.check_show_sync_message() }); }); diff --git a/settings.json.template b/settings.json.template index d56dde9..1f02598 100644 --- a/settings.json.template +++ b/settings.json.template @@ -240,6 +240,15 @@ // position: Determine where the search box should appear on the website // valid options: inside-header, below-header "position": "inside-header" + }, + // page_title_image: A collection of settings that pertain to the page title image for each page + "page_title_image": { + // image_path: The path to an image file that is displayed in the header section of all pages next to the page title (NOTE: This image can be enabled/disabled on a per-page basis) + // NOTE: The path root is /public + // The optimum logo size is 48x48 as the image will be forced to this size when displayed + "image_path": "/img/page-title-img.png", + // enable_animation: Enable/disable the flip/spin animation on the page title image (true/false) + "enable_animation": true } }, // page_footer: A collection of settings that pertain to the page footer that is displayed at the bottom of all pages @@ -369,8 +378,17 @@ "index_page": { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": true, - // show_last_updated: Determine whether to show a label above the transaction data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the index page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.ex_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.ex_description" (true/false) + "show_description": true + }, // transaction_table: a collection of settings that pertain to the transaction table on the index page // Table data is populated via the /ext/getlasttxs api "transaction_table": { @@ -389,6 +407,15 @@ "block_page": { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the block page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.block_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.block_description" (true/false) + "show_description": true + }, // genesis_block: Your coins genesis block hash is used to determine the beginning of the blockchain // For many bitcoin clones you can use the following cmd to get the block hash of the genesis block: coin-cli getblockhash 0 // NOTE: If this value is not entered correctly it will not be possible for the explorer to find or navigate to the genesis block, neither via block or transaction hash @@ -399,6 +426,15 @@ "transaction_page": { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the transaction/tx page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.tx_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.tx_description" (true/false) + "show_description": true + }, // genesis_tx: Your coins genesis transaction hash is used to determine the beginning of the blockchain // For many bitcoin clones you can use the following cmd to find the list of transaction hashes from the genesis block: coin-cli getblock 00014f36c648cdbc750f7dd28487a23cd9e0b0f95f5fccc5b5d01367e3f57469 // NOTE: If this value is not entered correctly it will not be possible for the explorer to find or navigate to the genesis block by searching for the genesis transaction hash @@ -409,6 +445,15 @@ "address_page": { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the address page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.a_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.a_description" (true/false) + "show_description": true + }, // show_sent_received: Determine whether to show Total Sent and Total Received columns at the top of the address page "show_sent_received": false, // enable_hidden_address_view: Determine whether to allow viewing the special 'hidden_address' wallet address which is populated anytime a private/hidden wallet address is involved in a transaction @@ -433,7 +478,16 @@ // error_page: a collection of settings that pertain to the error page "error_page": { // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) - "show_panels": false + "show_panels": false, + // page_header: a collection of settings that pertain to the error page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.error_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.error_description" (true/false) + "show_description": true + } }, /* Additional Pages (can be enabled/disabled via settings) */ @@ -445,8 +499,17 @@ "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the masternode data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the masternodes page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.mn_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.mn_description" (true/false) + "show_description": true + }, // masternode_table: a collection of settings that pertain to the masternode table on the masternodes page // Table data is populated via the /ext/getmasternodelist api "masternode_table": { @@ -464,8 +527,17 @@ "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the movement data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the movement page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.move_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.move_description" (true/false) + "show_description": true + }, // movement_table: a collection of settings that pertain to the movement table on the movement page // Table data is populated via the /ext/getlasttxs api "movement_table": { @@ -493,8 +565,17 @@ "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the network data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the network page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.net_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.net_description" (true/false) + "show_description": true + }, // connections_table: a collection of settings that pertain to the connections table on the network page // Table data is populated via the /ext/getnetworkpeers api "connections_table": { @@ -528,8 +609,17 @@ "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the richlist/top100 data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the richlist/top100 page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.rl_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.rl_description" (true/false) + "show_description": true + }, // show_current_balance: Determine whether to show the top 100 list of wallet addresses that currently have the most coins in a single wallet (true/false) "show_current_balance": true, // show_received_coins: Determine whether to show the top 100 list of wallet addresses that have the highest total number of coins received based on adding up all received transactions (true/false) @@ -570,8 +660,17 @@ "enabled": false, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the market data with the last updated date (true/false) - "show_last_updated": true, + // page_header: a collection of settings that pertain to the markets page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.mkt_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.mkt_description" (true/false) + "show_description": true + }, // show_market_dropdown_menu: Determine whether the markets menu in the page header will function as a dropdown or a single-click menu item that opens the default market (true/false) // If set to true, the markets header menu will function as a dropdown that allows selecting from all available markets // If set to false, the markets header menu will function as a single-click menu item that opens the default market only @@ -685,6 +784,15 @@ "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the api page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.api_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.api_description" (true/false) + "show_description": true + }, // sample_data: a collection of settings that pertain to the sample data that is used to display example api links to real data "sample_data": { // blockindex: This value can be any valid block height number from your coins blockchain @@ -911,6 +1019,15 @@ "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, + // page_header: a collection of settings that pertain to the claim address page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.claim_title" (true/false) + "show_title": true, + // show_description: Determine whether to show the page description as defined in "locale.claim_description" (true/false) + "show_description": true + }, // show_header_menu: Show/hide the "Claim Address" header menu item (true/false) // If set to false, the claim address page can still be accessed via the claim link on each address page // NOTE: The "claim_address_page.enabled" setting must also be set to true or else the header item will automatically be hidden as well @@ -1057,8 +1174,17 @@ "enabled": true, // show_panels: Determine whether to show the panels configured in the shared_pages.page_header section across the top of this page (true/false) "show_panels": false, - // show_last_updated: determine whether to show a label above the reward data with the last updated date (true/false) - "show_last_updated": true + // page_header: a collection of settings that pertain to the reward page header + "page_header": { + // show_img: Determine whether to show the page title image defined in the "shared_pages.page_header.page_title_image" setting (true/false) + "show_img": true, + // show_title: Determine whether to show the page title as defined in "locale.reward_title" (true/false) + "show_title": true, + // show_last_updated: Determine whether to show a label below the page title with the last updated date (true/false) + "show_last_updated": true, + // show_description: Determine whether to show the page description as defined in "locale.reward_description" (true/false) + "show_description": true + } }, //api_cmds: A collection of settings that pertain to the list of customizable heavycoin rpc api commands // Not all blockchains utilize the same rpc cmds for accessing the internal daemon api. Use these settings to set alternate names for similar api cmds. diff --git a/views/address.pug b/views/address.pug index 5080c1e..e9cb0dc 100644 --- a/views/address.pug +++ b/views/address.pug @@ -106,6 +106,8 @@ block content enableTooltips(); } }); + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.address_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); - var balance = Number((address.received - address.sent) / 100000000).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true}); - var balanceParts = balance.split('.'); @@ -131,6 +133,21 @@ block content if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != '' - theadClasses.push('thead-' + settings.shared_pages.table_header_bgcolor); .col-xs-12.col-md-12 + if settings.address_page.page_header.show_img == true || settings.address_page.page_header.show_title == true || settings.address_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.address_page.page_header.show_img == true && settings.address_page.page_header.show_title == true && settings.address_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.address_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.address_page.page_header.show_title == true + h3#page-title #{settings.locale.a_title.replace('{1}', settings.coin.name)} + if settings.address_page.page_header.show_description == true + if settings.address_page.page_header.show_title != true + #page-title-container + .sub-page-header.text-muted=settings.locale.a_description.replace('{1}', settings.coin.name).replace('{2}', (address.a_id == 'hidden_address' ? settings.locale.hidden_address : (address.a_id == 'unknown_address' ? settings.locale.unknown_address : address.a_id))) + else + .sub-page-header.text-muted=settings.locale.a_description.replace('{1}', settings.coin.name).replace('{2}', (address.a_id == 'hidden_address' ? settings.locale.hidden_address : (address.a_id == 'unknown_address' ? settings.locale.unknown_address : address.a_id))) + .cardSpacer.clearfix .card.card-default.border-0.card-address-summary.cardSpacer .card-header(style='position:relative;') if settings.claim_address_page.enabled == false || address.name == null || address.name == '' diff --git a/views/block.pug b/views/block.pug index ffe6a5c..5424e79 100644 --- a/views/block.pug +++ b/views/block.pug @@ -26,8 +26,25 @@ block content $('span#timestampCol').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(#{block.time}, true)); enableTooltips(); } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.block_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); .col-xs-12.col-md-12 + if settings.block_page.page_header.show_img == true || settings.block_page.page_header.show_title == true || settings.block_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.block_page.page_header.show_img == true && settings.block_page.page_header.show_title == true && settings.block_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.block_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.block_page.page_header.show_title == true + h3#page-title #{settings.locale.block_title.replace('{1}', settings.coin.name)} + if settings.block_page.page_header.show_description == true + if settings.block_page.page_header.show_title != true + #page-title-container + .sub-page-header.text-muted=settings.locale.block_description.replace('{1}', settings.coin.name).replace('{2}', block.height) + else + .sub-page-header.text-muted=settings.locale.block_description.replace('{1}', settings.coin.name).replace('{2}', block.height) + .cardSpacer.clearfix .card.card-default.border-0.cardSpacer .card-header(style='padding-left:25px;padding-right:25px;') .row diff --git a/views/claim_address.pug b/views/claim_address.pug index e8bab36..286fb64 100644 --- a/views/claim_address.pug +++ b/views/claim_address.pug @@ -63,8 +63,25 @@ block content $('
').insertBefore('#claimForm'); $('#claimAlert').html(generateAlertHTML('info', true, ('!{claim_name}' == '' ? 'Unc' : 'C') + 'laimed address', '!{hash} is currently ' + ('!{claim_name}' == '' ? 'un' : '') + 'claimed' + ('!{claim_name}' == '' ? '' : ' as ' + displayAsText('!{claim_name}') + '.'))); } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.claim_address_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); .col-xs-12.col-md-12 + if settings.claim_address_page.page_header.show_img == true || settings.claim_address_page.page_header.show_title == true || settings.claim_address_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.claim_address_page.page_header.show_img == true && settings.claim_address_page.page_header.show_title == true && settings.claim_address_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.claim_address_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.claim_address_page.page_header.show_title == true + h3#page-title #{settings.locale.claim_title.replace('{1}', settings.coin.name)} + if settings.claim_address_page.page_header.show_description == true + if settings.claim_address_page.page_header.show_title != true + #page-title-container + .sub-page-header.text-muted=settings.locale.claim_description.replace('{1}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.claim_description.replace('{1}', settings.coin.name) + .cardSpacer.clearfix .card.card-default.border-0.cardSpacer .card-header strong Claim Wallet Address diff --git a/views/error.pug b/views/error.pug index 98633b0..5b14604 100644 --- a/views/error.pug +++ b/views/error.pug @@ -1,6 +1,25 @@ extends layout block content - h1= message - h2= error.status -//- pre #{error.stack} + if settings.shared_pages.page_header.page_title_image.enable_animation == true && settings.error_page.page_header.show_img + script. + $(document).ready(function() { + startRotateElement('img#header-img'); + }); + .col-xs-12.col-md-12 + if settings.error_page.page_header.show_img == true || settings.error_page.page_header.show_title == true || settings.error_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.error_page.page_header.show_img == true && settings.error_page.page_header.show_title == true && settings.error_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.error_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.error_page.page_header.show_title == true + h3#page-title=settings.locale.error_title.replace('{1}', settings.coin.name) + if settings.error_page.page_header.show_description == true + if settings.error_page.page_header.show_title != true + #page-title-container + .sub-page-header.text-muted=(error.status == null ? settings.locale.error_description_alt : settings.locale.error_description) + else + .sub-page-header.text-muted=(error.status == null ? settings.locale.error_description_alt : settings.locale.error_description) + .cardSpacer.clearfix + h2=(error.status == null ? '' : error.status + ' ') + message \ No newline at end of file diff --git a/views/index.pug b/views/index.pug index a8c4dd3..0e192e7 100644 --- a/views/index.pug +++ b/views/index.pug @@ -89,17 +89,21 @@ block content }, (setting_reload_table_seconds * 1000) ); } - var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; + if ('#{settings.index_page.page_header.show_last_updated}' == 'true') { + var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; - if (lastUpdatedDate != 0) { - $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); + if (lastUpdatedDate != 0) { + $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); - if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { - $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); - enableTooltips(); - } - } else - $('span#lastUpdatedDate').html(' N/A'); + if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { + $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); + enableTooltips(); + } + } else + $('span#lastUpdatedDate').html(' N/A'); + } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.index_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); if error !== null .col-12 @@ -110,9 +114,31 @@ block content strong #{settings.locale.ex_error} div #{error} .col-md-12.cardSpacer - if settings.index_page.show_last_updated == true - div.font-weight-bold(style='margin-bottom:15px;') Blockchain data last updated: - span#lastUpdatedDate.font-weight-normal + if settings.index_page.page_header.show_img == true || settings.index_page.page_header.show_title == true || settings.index_page.page_header.show_last_updated == true || settings.index_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.index_page.page_header.show_img == true && settings.index_page.page_header.show_title == true && settings.index_page.page_header.show_last_updated == true && settings.index_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.index_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.index_page.page_header.show_title == true + h3#page-title #{settings.locale.ex_title.replace('{1}', settings.coin.name)} + if settings.index_page.page_header.show_last_updated == true + if settings.index_page.page_header.show_title != true && settings.index_page.page_header.show_description != true + #page-title-container + .sub-page-header + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + else + .sub-page-header(style='margin-bottom:' + (settings.index_page.page_header.show_description == true ? '5' : '0') + 'px') + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + if settings.index_page.page_header.show_description == true + if settings.index_page.page_header.show_title != true && settings.index_page.page_header.show_last_updated != true + #page-title-container + .sub-page-header.text-muted=settings.locale.ex_description.replace('{1}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.ex_description.replace('{1}', settings.coin.name) + .cardSpacer.clearfix .card.card-default.border-0.cardSpacer .card-header strong #{settings.locale.ex_latest_transactions} diff --git a/views/info.pug b/views/info.pug index c5ac639..c8e56df 100644 --- a/views/info.pug +++ b/views/info.pug @@ -1,14 +1,32 @@ extends layout block content + script. + $(document).ready(function() { + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.api_page.page_header.show_img} == true) + startRotateElement('img#header-img'); + }); .col-md-12.cardSpacer + if settings.api_page.page_header.show_img == true || settings.api_page.page_header.show_title == true || settings.api_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.api_page.page_header.show_img == true && settings.api_page.page_header.show_title == true && settings.api_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.api_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.api_page.page_header.show_title == true + h3#page-title #{settings.locale.api_title.replace('{1}', settings.coin.name)} + if settings.api_page.page_header.show_description == true + if settings.api_page.page_header.show_title != true + #page-title-container + .sub-page-header.text-muted=settings.locale.api_description.replace('{1}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.api_description.replace('{1}', settings.coin.name) + .cardSpacer.clearfix .card.card-default.border-0 .card-header - strong #{settings.locale.api_title} + strong #{settings.locale.api_documentation} .card-body img(src=settings.shared_pages.logo, style='margin:0;height:128px;') - p - em #{settings.locale.api_message} hr - var hide_rpc_api_section = !(settings.api_page.public_apis.rpc.getdifficulty.enabled == true && settings.api_cmds['getdifficulty'] != null && settings.api_cmds['getdifficulty'] != '') && !(settings.api_page.public_apis.rpc.getconnectioncount.enabled == true && settings.api_cmds['getconnectioncount'] != null && settings.api_cmds['getconnectioncount'] != '') && !(settings.api_page.public_apis.rpc.getblockcount.enabled == true && settings.api_cmds['getblockcount'] != null && settings.api_cmds['getblockcount'] != '') && !(settings.api_page.public_apis.rpc.getblockhash.enabled == true && settings.api_cmds['getblockhash'] != null && settings.api_cmds['getblockhash'] != '') && !(settings.api_page.public_apis.rpc.getblock.enabled == true && settings.api_cmds['getblock'] != null && settings.api_cmds['getblock'] != '') && !(settings.api_page.public_apis.rpc.getrawtransaction.enabled == true && settings.api_cmds['getrawtransaction'] != null && settings.api_cmds['getrawtransaction'] != '') && !(settings.api_page.public_apis.rpc.getnetworkhashps.enabled == true && settings.shared_pages.show_hashrate == true && settings.api_cmds['getnetworkhashps'] != null && settings.api_cmds['getnetworkhashps'] != '') && !(settings.api_page.public_apis.rpc.getvotelist.enabled == true && settings.api_cmds['getvotelist'] != null && settings.api_cmds['getvotelist'] != '') && !(settings.api_page.public_apis.rpc.getmasternodecount.enabled == true && settings.api_cmds['getmasternodecount'] != null && settings.api_cmds['getmasternodecount'] != '') && (!settings.blockchain_specific.heavycoin.enabled || (!(settings.blockchain_specific.heavycoin.public_apis.getmaxmoney.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getmaxmoney'] != null && settings.blockchain_specific.heavycoin.api_cmds['getmaxmoney'] != '') && !(settings.blockchain_specific.heavycoin.public_apis.getmaxvote.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getmaxvote'] != null && settings.blockchain_specific.heavycoin.api_cmds['getmaxvote'] != '') && !(settings.blockchain_specific.heavycoin.public_apis.getvote.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getvote'] != null && settings.blockchain_specific.heavycoin.api_cmds['getvote'] != '') && !(settings.blockchain_specific.heavycoin.public_apis.getphase.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getphase'] != null && settings.blockchain_specific.heavycoin.api_cmds['getphase'] != '') && !(settings.blockchain_specific.heavycoin.public_apis.getreward.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getreward'] != null && settings.blockchain_specific.heavycoin.api_cmds['getreward'] != '') && !(settings.blockchain_specific.heavycoin.public_apis.getsupply.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getsupply'] != null && settings.blockchain_specific.heavycoin.api_cmds['getsupply'] != '') && !(settings.blockchain_specific.heavycoin.public_apis.getnextrewardestimate.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getnextrewardestimate'] != null && settings.blockchain_specific.heavycoin.api_cmds['getnextrewardestimate'] != '') && !(settings.blockchain_specific.heavycoin.public_apis.getnextrewardwhenstr.enabled == true && settings.blockchain_specific.heavycoin.api_cmds['getnextrewardwhenstr'] != null && settings.blockchain_specific.heavycoin.api_cmds['getnextrewardwhenstr'] != ''))); - var hide_ext_api_section = !settings.api_page.public_apis.ext.getmoneysupply.enabled && !settings.api_page.public_apis.ext.getdistribution.enabled && !settings.api_page.public_apis.ext.getaddress.enabled && !settings.api_page.public_apis.ext.getaddresstxs.enabled && !settings.api_page.public_apis.ext.gettx.enabled && !settings.api_page.public_apis.ext.getbalance.enabled && !settings.api_page.public_apis.ext.getlasttxs.enabled && !settings.api_page.public_apis.ext.getcurrentprice.enabled && !settings.api_page.public_apis.ext.getnetworkpeers.enabled && !settings.api_page.public_apis.ext.getbasicstats.enabled && !settings.api_page.public_apis.ext.getsummary.enabled && !(settings.api_page.public_apis.ext.getmasternodelist.enabled && settings.api_cmds['getmasternodelist'] != null && settings.api_cmds['getmasternodelist'] != '') && !settings.api_page.public_apis.ext.getmasternoderewards.enabled && !settings.api_page.public_apis.ext.getmasternoderewardstotal.enabled; diff --git a/views/layout.pug b/views/layout.pug index 6671821..d5fd88a 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -26,6 +26,59 @@ html(lang='en') script(type='text/javascript', src='//cdn.datatables.net/v/bs4/dt-1.10.22/datatables.min.js') if active == 'reward' script(type='text/javascript', src='/js/Chart.min.js') + - var showPanels = false + case active + when 'home' + if settings.index_page.show_panels == true + - showPanels = true + break + when 'block' + if settings.block_page.show_panels == true + - showPanels = true + break + when 'tx' + if settings.transaction_page.show_panels == true + - showPanels = true + break + when 'address' + if settings.address_page.show_panels == true + - showPanels = true + break + when 'masternodes' + if settings.masternodes_page.show_panels == true + - showPanels = true + break + when 'movement' + if settings.movement_page.show_panels == true + - showPanels = true + break + when 'network' + if settings.network_page.show_panels == true + - showPanels = true + break + when 'richlist' + if settings.richlist_page.show_panels == true + - showPanels = true + break + when 'markets' + if settings.markets_page.show_panels == true + - showPanels = true + break + when 'info' + if settings.api_page.show_panels == true + - showPanels = true + break + when 'claim-address' + if settings.claim_address_page.show_panels == true + - showPanels = true + break + when 'reward' + if settings.blockchain_specific.heavycoin.reward_page.show_panels == true + - showPanels = true + break + default + if settings.error_page.show_panels == true + - showPanels = true script. /* Special thanks to the stackoverflow community for the getParameterByName function: https://stackoverflow.com/a/901144/3038650 */ function getParameterByName(name, url = window.location.href) { @@ -102,7 +155,31 @@ html(lang='en') // Ensure columns are properly aligned $($.fn.dataTable.tables(true)).DataTable().columns.adjust(); }, 2, 'adjustTableColumns'); - } + } + function rotateElement(elementSelector) { + var element = $(elementSelector); + + if (element.length > 0) { + $({ deg: 0 }).animate({ deg: 360 }, { + duration: 2000, + step: function(deg) { + element.css({ + transform: 'rotateY(' + deg + 'deg)' + }); + }, + done: function() { + setTimeout(function() { + rotateElement(elementSelector); + }, 1500); + } + }); + } + } + function startRotateElement(elementSelector) { + setTimeout(function() { + rotateElement(elementSelector); + }, 100); + } $(document).ready(function() { if ('#{active}' != '') $('##{active}').addClass('active'); @@ -273,61 +350,7 @@ html(lang='en') e.preventDefault(); fixFooterHeightAndPosition(); }); - var showPanels = false; - switch ('#{active}') { - case 'home': - if ('#{settings.index_page.show_panels}' == 'true') - showPanels = true; - break; - case 'block': - if ('#{settings.block_page.show_panels}' == 'true') - showPanels = true; - break; - case 'tx': - if ('#{settings.transaction_page.show_panels}' == 'true') - showPanels = true; - break; - case 'address': - if ('#{settings.address_page.show_panels}' == 'true') - showPanels = true; - break; - case 'masternodes': - if ('#{settings.masternodes_page.show_panels}' == 'true') - showPanels = true; - break; - case 'movement': - if ('#{settings.movement_page.show_panels}' == 'true') - showPanels = true; - break; - case 'network': - if ('#{settings.network_page.show_panels}' == 'true') - showPanels = true; - break; - case 'richlist': - if ('#{settings.richlist_page.show_panels}' == 'true') - showPanels = true; - break; - case 'markets': - if ('#{settings.markets_page.show_panels}' == 'true') - showPanels = true; - break; - case 'info': - if ('#{settings.api_page.show_panels}' == 'true') - showPanels = true; - break; - case 'claim-address': - if ('#{settings.claim_address_page.show_panels}' == 'true') - showPanels = true; - break; - case 'reward': - if ('#{settings.blockchain_specific.heavycoin.reward_page.show_panels}' == 'true') - showPanels = true; - break; - default: - if ('#{settings.error_page.show_panels}' == 'true') - showPanels = true; - } - if (showPanels) { + if (#{showPanels} == true) { hideShowPanel('#{settings.panel1}', 'pnlOne'); hideShowPanel('#{settings.panel2}', 'pnlTwo'); hideShowPanel('#{settings.panel3}', 'pnlThree'); @@ -456,34 +479,36 @@ html(lang='en') span.fas.fa-exclamation-triangle(style='margin-right:5px;') strong #{settings.locale.ex_warning} div #{settings.locale.initial_index_alert} - .col-lg-12 - .row.text-center.d-flex.justify-content-center - div(class="col-lg-2 col-lg-offset-" + settings.paneloffset) - - if (settings.panel1 != '') { - .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlOne') - - } - - if (settings.panel2 != '') { - .col-lg-2 - .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlTwo') - - } - - if (settings.panel3 != '') { - .col-lg-2 - .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlThree') - - } - - if (settings.panel4 != '') { - .col-lg-2 - .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlFour') - - } - - if (settings.panel5 != '') { - .col-lg-2 - .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlFive') - - } - if settings.shared_pages.page_header.search.enabled == true && settings.shared_pages.page_header.search.position.toString().toLowerCase() == 'below-header' - div#search-row.row.text-center - form.form-inline.col-12.d-flex.justify-content-center(method='post', action='/search') - #index-search.form-group.d-flex.justify-content-center - input.form-control(type='text', name='search', placeholder=settings.locale.ex_search_message, style='min-width:80%;margin-right:5px;') - button.btn.btn-success(type='submit') #{settings.locale.ex_search_button} + if showPanels == true || (settings.shared_pages.page_header.search.enabled == true && settings.shared_pages.page_header.search.position.toString().toLowerCase() == 'below-header') + .col-lg-12 + if showPanels == true + .row.text-center.d-flex.justify-content-center + div(class="col-lg-2 col-lg-offset-" + settings.paneloffset) + - if (settings.panel1 != '') { + .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlOne') + - } + - if (settings.panel2 != '') { + .col-lg-2 + .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlTwo') + - } + - if (settings.panel3 != '') { + .col-lg-2 + .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlThree') + - } + - if (settings.panel4 != '') { + .col-lg-2 + .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlFour') + - } + - if (settings.panel5 != '') { + .col-lg-2 + .card.card-default.border-0.d-none.d-lg-block.d-block.cardSpacer(id='pnlFive') + - } + if settings.shared_pages.page_header.search.enabled == true && settings.shared_pages.page_header.search.position.toString().toLowerCase() == 'below-header' + div#search-row.row.text-center + form.form-inline.col-12.d-flex.justify-content-center(method='post', action='/search') + #index-search.form-group.d-flex.justify-content-center + input.form-control(type='text', name='search', placeholder=settings.locale.ex_search_message, style='min-width:80%;margin-right:5px;') + button.btn.btn-success(type='submit') #{settings.locale.ex_search_button} block content div#footer-container(class=footerClasses, role='navigation') .col-4.navbar-nav diff --git a/views/market.pug b/views/market.pug index 0a8243f..8e01903 100644 --- a/views/market.pug +++ b/views/market.pug @@ -4,17 +4,21 @@ block content include ./includes/common.pug script. $(document).ready(function() { - var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; + if ('#{settings.markets_page.page_header.show_last_updated}' == 'true') { + var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; - if (lastUpdatedDate != 0) { - $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); + if (lastUpdatedDate != 0) { + $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); - if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { - $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); - enableTooltips(); - } - } else - $('span#lastUpdatedDate').html(' N/A'); + if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { + $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); + enableTooltips(); + } + } else + $('span#lastUpdatedDate').html(' N/A'); + } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.markets_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); - var theadClasses = []; if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != '' @@ -78,9 +82,31 @@ block content }); }); .col-xs-12.col-md-12 - if settings.markets_page.show_last_updated == true - div.font-weight-bold(style='margin-bottom:15px;') Market data last updated: - span#lastUpdatedDate.font-weight-normal + if settings.markets_page.page_header.show_img == true || settings.markets_page.page_header.show_title == true || settings.markets_page.page_header.show_last_updated == true || settings.markets_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.markets_page.page_header.show_img == true && settings.markets_page.page_header.show_title == true && settings.markets_page.page_header.show_last_updated == true && settings.markets_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.markets_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.markets_page.page_header.show_title == true + h3#page-title !{settings.locale.mkt_title.replace('{1}', marketdata.market_name + ' (' + marketdata.coin + '/' + marketdata.exchange + ')')} + if settings.markets_page.page_header.show_last_updated == true + if settings.markets_page.page_header.show_title != true && settings.markets_page.page_header.show_description != true + #page-title-container + .sub-page-header + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + else + .sub-page-header(style='margin-bottom:' + (settings.markets_page.page_header.show_description == true ? '5' : '0') + 'px') + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + if settings.markets_page.page_header.show_description == true + if settings.markets_page.page_header.show_title != true && settings.markets_page.page_header.show_last_updated != true + #page-title-container + .sub-page-header.text-muted=settings.locale.mkt_description.replace('{1}', marketdata.coin + '/' + marketdata.exchange).replace('{2}', marketdata.market_name) + else + .sub-page-header.text-muted=settings.locale.mkt_description.replace('{1}', marketdata.coin + '/' + marketdata.exchange).replace('{2}', marketdata.market_name) + .cardSpacer.clearfix if settings.markets_page.show_market_select == true && settings.market_count > 1 .row .col-md-12.cardSpacer diff --git a/views/masternodes.pug b/views/masternodes.pug index fcbe562..350895a 100644 --- a/views/masternodes.pug +++ b/views/masternodes.pug @@ -108,27 +108,51 @@ block content } }); - var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; + if ('#{settings.masternodes_page.page_header.show_last_updated}' == 'true') { + var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; - if (lastUpdatedDate != 0) { - $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); + if (lastUpdatedDate != 0) { + $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); - if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { - $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); - enableTooltips(); - } - } else - $('span#lastUpdatedDate').html(' N/A'); + if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { + $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); + enableTooltips(); + } + } else + $('span#lastUpdatedDate').html(' N/A'); + } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.masternodes_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); .col-md-12.cardSpacer - .text-center(style='margin-bottom:15px;') - i The current listing of all masternodes known to be active on the network. - if settings.masternodes_page.show_last_updated == true - div.font-weight-bold(style='margin-bottom:15px;') Masternode list last updated: - span#lastUpdatedDate.font-weight-normal + if settings.masternodes_page.page_header.show_img == true || settings.masternodes_page.page_header.show_title == true || settings.masternodes_page.page_header.show_last_updated == true || settings.masternodes_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.masternodes_page.page_header.show_img == true && settings.masternodes_page.page_header.show_title == true && settings.masternodes_page.page_header.show_last_updated == true && settings.masternodes_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.masternodes_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.masternodes_page.page_header.show_title == true + h3#page-title #{settings.locale.mn_title.replace('{1}', settings.coin.name)} + if settings.masternodes_page.page_header.show_last_updated == true + if settings.masternodes_page.page_header.show_title != true && settings.masternodes_page.page_header.show_description != true + #page-title-container + .sub-page-header + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + else + .sub-page-header(style='margin-bottom:' + (settings.masternodes_page.page_header.show_description == true ? '5' : '0') + 'px') + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + if settings.masternodes_page.page_header.show_description == true + if settings.masternodes_page.page_header.show_title != true && settings.masternodes_page.page_header.show_last_updated != true + #page-title-container + .sub-page-header.text-muted=settings.locale.mn_description.replace('{1}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.mn_description.replace('{1}', settings.coin.name) + .cardSpacer.clearfix .card.card-default .card-header - strong Masternodes + strong Masternode List table#masternodes-table.table.table-bordered.table-striped.table-hover - var theadClasses = []; if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != '' diff --git a/views/movement.pug b/views/movement.pug index a31b653..e138774 100644 --- a/views/movement.pug +++ b/views/movement.pug @@ -88,22 +88,48 @@ block content }, (setting_reload_table_seconds * 1000) ); } - var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; + if ('#{settings.movement_page.page_header.show_last_updated}' == 'true') { + var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; - if (lastUpdatedDate != 0) { - $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); + if (lastUpdatedDate != 0) { + $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); - if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { - $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); - enableTooltips(); - } - } else - $('span#lastUpdatedDate').html(' N/A'); + if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { + $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); + enableTooltips(); + } + } else + $('span#lastUpdatedDate').html(' N/A'); + } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.movement_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); .col-md-12 - if settings.movement_page.show_last_updated == true - div.font-weight-bold(style='margin-bottom:15px;') Blockchain data last updated: - span#lastUpdatedDate.font-weight-normal + if settings.movement_page.page_header.show_img == true || settings.movement_page.page_header.show_title == true || settings.movement_page.page_header.show_last_updated == true || settings.movement_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.movement_page.page_header.show_img == true && settings.movement_page.page_header.show_title == true && settings.movement_page.page_header.show_last_updated == true && settings.movement_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.movement_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.movement_page.page_header.show_title == true + h3#page-title #{settings.locale.move_title.replace('{1}', settings.coin.name)} + if settings.movement_page.page_header.show_last_updated == true + if settings.movement_page.page_header.show_title != true && settings.movement_page.page_header.show_description != true + #page-title-container + .sub-page-header + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + else + .sub-page-header(style='margin-bottom:' + (settings.movement_page.page_header.show_description == true ? '5' : '0') + 'px') + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + if settings.movement_page.page_header.show_description == true + if settings.movement_page.page_header.show_title != true && settings.movement_page.page_header.show_last_updated != true + #page-title-container + .sub-page-header.text-muted=settings.locale.move_description.replace('{1}', settings.movement_page.movement_table.min_amount).replace('{2}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.move_description.replace('{1}', settings.movement_page.movement_table.min_amount).replace('{2}', settings.coin.name) + .cardSpacer.clearfix .card.card-default.border-0.cardSpacer .card-header strong="Latest Movement" diff --git a/views/network.pug b/views/network.pug index 8f48d1e..338ee15 100644 --- a/views/network.pug +++ b/views/network.pug @@ -144,28 +144,52 @@ block content fixFooterHeightAndPosition(); }); - var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; + if ('#{settings.network_page.page_header.show_last_updated}' == 'true') { + var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; - if (lastUpdatedDate != 0) { - $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); + if (lastUpdatedDate != 0) { + $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); - if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { - $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); - enableTooltips(); - } - } else - $('span#lastUpdatedDate').html(' N/A'); + if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { + $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); + enableTooltips(); + } + } else + $('span#lastUpdatedDate').html(' N/A'); + } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.network_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); - var theadClasses = []; if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != '' - theadClasses.push('thead-' + settings.shared_pages.table_header_bgcolor); .col-md-12.cardSpacer - .text-center(style='margin-bottom:15px;') - i #{settings.locale.net_warning} .container - if settings.network_page.show_last_updated == true - div.font-weight-bold(style='margin-bottom:15px;') Network data last updated: - span#lastUpdatedDate.font-weight-normal + if settings.network_page.page_header.show_img == true || settings.network_page.page_header.show_title == true || settings.network_page.page_header.show_last_updated == true || settings.network_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.network_page.page_header.show_img == true && settings.network_page.page_header.show_title == true && settings.network_page.page_header.show_last_updated == true && settings.network_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.network_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.network_page.page_header.show_title == true + h3#page-title #{settings.locale.net_title.replace('{1}', settings.coin.name)} + if settings.network_page.page_header.show_last_updated == true + if settings.network_page.page_header.show_title != true && settings.network_page.page_header.show_description != true + #page-title-container + .sub-page-header + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + else + .sub-page-header(style='margin-bottom:' + (settings.network_page.page_header.show_description == true ? '5' : '0') + 'px') + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + if settings.network_page.page_header.show_description == true + if settings.network_page.page_header.show_title != true && settings.network_page.page_header.show_last_updated != true + #page-title-container + .sub-page-header.text-muted=settings.locale.net_description.replace('{1}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.net_description.replace('{1}', settings.coin.name) + .cardSpacer.clearfix ul.nav.nav-tabs(role='tablist') li.nav-item(role='presentation') a.nav-link.active(href='#connections', aria-controls='connections', role='tab', data-toggle='tab') #{settings.locale.net_connections} diff --git a/views/reward.pug b/views/reward.pug index 35a26c1..77e2942 100644 --- a/views/reward.pug +++ b/views/reward.pug @@ -16,26 +16,52 @@ block content } }); - var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; + if ('#{settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated}' == 'true') { + var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; - if (lastUpdatedDate != 0) { - $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); + if (lastUpdatedDate != 0) { + $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); - if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { - $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); - enableTooltips(); - } - } else - $('span#lastUpdatedDate').html(' N/A'); + if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { + $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); + enableTooltips(); + } + } else + $('span#lastUpdatedDate').html(' N/A'); + } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.blockchain_specific.heavycoin.reward_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); .row(style='margin-left:0;margin-right:0;') .col-xs-12.col-md-12 - if settings.blockchain_specific.heavycoin.reward_page.show_last_updated == true - div.font-weight-bold(style='margin-bottom:15px;') Reward data last updated: - span#lastUpdatedDate.font-weight-normal + if settings.blockchain_specific.heavycoin.reward_page.page_header.show_img == true || settings.blockchain_specific.heavycoin.reward_page.page_header.show_title == true || settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated == true || settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.blockchain_specific.heavycoin.reward_page.page_header.show_img == true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_title == true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated == true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.blockchain_specific.heavycoin.reward_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.blockchain_specific.heavycoin.reward_page.page_header.show_title == true + h3#page-title #{settings.locale.heavy_title.replace('{1}', settings.coin.name)} + if settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated == true + if settings.blockchain_specific.heavycoin.reward_page.page_header.show_title != true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_description != true + #page-title-container + .sub-page-header + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + else + .sub-page-header(style='margin-bottom:' + (settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true ? '5' : '0') + 'px') + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + if settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true + if settings.blockchain_specific.heavycoin.reward_page.page_header.show_title != true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated != true + #page-title-container + .sub-page-header.text-muted=settings.locale.heavy_description.replace('{1}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.heavy_description.replace('{1}', settings.coin.name) + .cardSpacer.clearfix .card.card-default.border-0.card-address-summary .card-header(style='position:relative;') - strong #{settings.locale.heavy_title} + strong #{settings.locale.heavy_reward_voting_info} span.small (#{settings.coin.symbol}) table.table.table-bordered.table-striped.summary-table(style='border-top:0;border-bottom:0;margin-top:0 !important;') - var theadClasses = []; diff --git a/views/richlist.pug b/views/richlist.pug index 36a12b2..f9e4e23 100644 --- a/views/richlist.pug +++ b/views/richlist.pug @@ -40,28 +40,57 @@ block content } ); - var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; + if ('#{settings.richlist_page.page_header.show_last_updated}' == 'true') { + var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)}; - if (lastUpdatedDate != 0) { - $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); + if (lastUpdatedDate != 0) { + $('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate)); - if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { - $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); - enableTooltips(); - } - } else - $('span#lastUpdatedDate').html(' N/A'); + if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) { + $('span#lastUpdatedDate').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true)); + enableTooltips(); + } + } else + $('span#lastUpdatedDate').html(' N/A'); + } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.richlist_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); - var theadClasses = []; if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != '' - theadClasses.push('thead-' + settings.shared_pages.table_header_bgcolor); + if settings.richlist_page.page_header.show_img == true || settings.richlist_page.page_header.show_title == true || settings.richlist_page.page_header.show_last_updated == true || settings.richlist_page.page_header.show_description == true + .row(style='margin: 0 0 5px 0;') + div(class=(settings.richlist_page.wealth_distribution.show_distribution_table == true || settings.richlist_page.wealth_distribution.show_distribution_chart == true ? 'col-xs-12 col-lg-8' : 'col-12')) + .container + #page-header-container(style='align-items:' + (settings.richlist_page.page_header.show_img == true && settings.richlist_page.page_header.show_title == true && settings.richlist_page.page_header.show_last_updated == true && settings.richlist_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.richlist_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.richlist_page.page_header.show_title == true + h3#page-title #{settings.locale.rl_title.replace('{1}', settings.coin.name)} + if settings.richlist_page.page_header.show_last_updated == true + if settings.richlist_page.page_header.show_title != true && settings.richlist_page.page_header.show_description != true + #page-title-container + .sub-page-header + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + else + .sub-page-header(style='margin-bottom:' + (settings.richlist_page.page_header.show_description == true ? '5' : '0') + 'px') + span.font-weight-bold=settings.locale.last_updated + ':' + span.text-muted#lastUpdatedDate + if settings.richlist_page.page_header.show_description == true + if settings.richlist_page.page_header.show_title != true && settings.richlist_page.page_header.show_last_updated != true + #page-title-container + .sub-page-header.text-muted=settings.locale.rl_description.replace('{1}', settings.coin.name) + else + .sub-page-header.text-muted=settings.locale.rl_description.replace('{1}', settings.coin.name) + .cardSpacer.clearfix .row(style='margin-left:0;margin-right:0;') if settings.richlist_page.show_current_balance == true || settings.richlist_page.show_received_coins == true div(class=(settings.richlist_page.wealth_distribution.show_distribution_table == true || settings.richlist_page.wealth_distribution.show_distribution_chart == true ? 'col-xs-12 col-lg-8' : 'col-12')) .container - if settings.richlist_page.show_last_updated == true - div.font-weight-bold(style='margin-bottom:15px;') Top 100 data last updated: - span#lastUpdatedDate.font-weight-normal ul.nav.nav-tabs(role='tablist') if settings.richlist_page.show_current_balance == true li.nav-item(role='presentation') @@ -134,7 +163,7 @@ block content if settings.richlist_page.wealth_distribution.show_distribution_table == true || settings.richlist_page.wealth_distribution.show_distribution_chart == true div(class=(settings.richlist_page.show_received_coins == true || settings.richlist_page.show_current_balance == true ? 'col-xs-12 col-lg-4' : 'col-12')) if settings.richlist_page.wealth_distribution.show_distribution_table == true - #summary-panel.card.card-default.border-0(style='margin-top:34px;') + #summary-panel.card.card-default.border-0(style='margin-top:' + (settings.richlist_page.show_current_balance == true || settings.richlist_page.show_received_coins == true ? '34' : '0') + 'px;') .card-header strong #{settings.locale.rl_wealth} table.table.table-hover.table-bordered.summary-table.right-border-0(style='margin-bottom:0;') diff --git a/views/tx.pug b/views/tx.pug index f1dbafd..46ff00b 100644 --- a/views/tx.pug +++ b/views/tx.pug @@ -13,8 +13,25 @@ block content $('span#timestampCol').attr('data-toggle', 'tooltip').attr('data-placement', 'auto').attr('title', format_unixtime(#{tx.timestamp}, true)); enableTooltips(); } + if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.transaction_page.page_header.show_img} == true) + startRotateElement('img#header-img'); }); .col-xs-12.col-md-12 + if settings.transaction_page.page_header.show_img == true || settings.transaction_page.page_header.show_title == true || settings.transaction_page.page_header.show_description == true + #page-header-container(style='align-items:' + (settings.transaction_page.page_header.show_img == true && settings.transaction_page.page_header.show_title == true && settings.transaction_page.page_header.show_description == true ? 'flex-start' : 'center')) + if settings.transaction_page.page_header.show_img == true + #header-img-container + img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path)) + #page-title-container + if settings.transaction_page.page_header.show_title == true + h3#page-title #{settings.locale.tx_title.replace('{1}', settings.coin.name)} + if settings.transaction_page.page_header.show_description == true + if settings.transaction_page.page_header.show_title != true + #page-title-container + .sub-page-header.text-muted=settings.locale.tx_description.replace('{1}', settings.coin.name).replace('{2}', tx.blockindex) + else + .sub-page-header.text-muted=settings.locale.tx_description.replace('{1}', settings.coin.name).replace('{2}', tx.blockindex) + .cardSpacer.clearfix .card.card-default.border-0.cardSpacer .card-header strong=settings.coin.symbol + ' TXid: ' + tx.txid