Commit bf78ab5c authored by Eriksson Monteiro's avatar Eriksson Monteiro

update advertisement module

parent 2dabc49d
...@@ -408,27 +408,30 @@ input:focus { ...@@ -408,27 +408,30 @@ input:focus {
.ads-slider { .ads-slider {
height: 50px; height: 50px;
padding-left: 50px; padding-left: 50px;
max-width: 700px; padding-top: 7px;
max-width: 800px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
.ads-slider span { .ads-slider span {
text-decoration: none;
font-size: 1.2em; font-size: 1.2em;
width: 100%; width: 100%;
height: 25px;
margin: 0 auto; margin: 0 auto;
line-height: 25px;
text-align: left; text-align: left;
display: block; display: block;
max-height: 16px;
overflow: hidden;
} }
#advertisement_target_phrase { #advertisement_target_phrase {
font-size: 0.85em; font-size: 14px;
} }
#advertisement_headline { #advertisement_headline {
font-weight: bold; font-weight: bold;
font-size: 14px;
} }
.loader { .loader {
......
...@@ -71,19 +71,32 @@ cr.define('millix_bar', function () { ...@@ -71,19 +71,32 @@ cr.define('millix_bar', function () {
$headline.prop("href", undefined); $headline.prop("href", undefined);
$targetPhrase.prop("href", undefined); $targetPhrase.prop("href", undefined);
$headline.prop("title", undefined);
$targetPhrase.prop("title", undefined);
$headline.off('click'); $headline.off('click');
$targetPhrase.off('click'); $targetPhrase.off('click');
} else { } else {
let domain = new URL(advertisement.advertisement_url).host;
if(domain.startsWith("www.")) {
domain = domain.substring(4);
}
advertisement.attributes.forEach(attribute => { advertisement.attributes.forEach(attribute => {
if (attribute.attribute_type === "advertisement_headline") { if (attribute.attribute_type === "advertisement_headline") {
$headline.text(attribute.value); $headline.text(attribute.value);
} else if (attribute.attribute_type === "target_phrase") { } else if (attribute.attribute_type === "target_phrase") {
$targetPhrase.text(`${attribute.value} - ${advertisement.advertisement_url}`); $targetPhrase.text(`${attribute.value} - ${domain}`);
} }
}); });
$headline.prop("href", advertisement.advertisement_url); $headline.prop("href", advertisement.advertisement_url);
$targetPhrase.prop("href", advertisement.advertisement_url); $targetPhrase.prop("href", advertisement.advertisement_url);
$headline.prop("title", domain);
$targetPhrase.prop("title", domain);
$headline.off('click'); $headline.off('click');
$targetPhrase.off('click'); $targetPhrase.off('click');
$headline.on('click', () => chrome.send('showMillixWallet', ['new_tab', advertisement.advertisement_url])); $headline.on('click', () => chrome.send('showMillixWallet', ['new_tab', advertisement.advertisement_url]));
......
...@@ -767,7 +767,7 @@ export const DATABASE_ENGINE = 'sqlite'; ...@@ -767,7 +767,7 @@ export const DATABASE_ENGINE = 'sqlite';
export const DATABASE_CONNECTION = {}; export const DATABASE_CONNECTION = {};
export const MILLIX_CIRCULATION = 9e15; export const MILLIX_CIRCULATION = 9e15;
export const NODE_MILLIX_BUILD_DATE = 1631097631; export const NODE_MILLIX_BUILD_DATE = 1631097631;
export const NODE_MILLIX_VERSION = '1.11.6-tangled'; export const NODE_MILLIX_VERSION = '1.11.7-tangled';
export const DATA_BASE_DIR_MAIN_NETWORK = './millix-tangled'; export const DATA_BASE_DIR_MAIN_NETWORK = './millix-tangled';
export const DATA_BASE_DIR_TEST_NETWORK = './millix-tangled'; export const DATA_BASE_DIR_TEST_NETWORK = './millix-tangled';
let DATA_BASE_DIR = MODE_TEST_NETWORK ? DATA_BASE_DIR_TEST_NETWORK : DATA_BASE_DIR_MAIN_NETWORK; let DATA_BASE_DIR = MODE_TEST_NETWORK ? DATA_BASE_DIR_TEST_NETWORK : DATA_BASE_DIR_MAIN_NETWORK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment