Commit bf78ab5c authored by Eriksson Monteiro's avatar Eriksson Monteiro

update advertisement module

parent 2dabc49d
......@@ -408,27 +408,30 @@ input:focus {
.ads-slider {
height: 50px;
padding-left: 50px;
max-width: 700px;
padding-top: 7px;
max-width: 800px;
overflow: hidden;
position: relative;
}
.ads-slider span {
text-decoration: none;
font-size: 1.2em;
width: 100%;
height: 25px;
margin: 0 auto;
line-height: 25px;
text-align: left;
display: block;
max-height: 16px;
overflow: hidden;
}
#advertisement_target_phrase {
font-size: 0.85em;
font-size: 14px;
}
#advertisement_headline {
font-weight: bold;
font-size: 14px;
}
.loader {
......
......@@ -71,19 +71,32 @@ cr.define('millix_bar', function () {
$headline.prop("href", undefined);
$targetPhrase.prop("href", undefined);
$headline.prop("title", undefined);
$targetPhrase.prop("title", undefined);
$headline.off('click');
$targetPhrase.off('click');
} else {
let domain = new URL(advertisement.advertisement_url).host;
if(domain.startsWith("www.")) {
domain = domain.substring(4);
}
advertisement.attributes.forEach(attribute => {
if (attribute.attribute_type === "advertisement_headline") {
$headline.text(attribute.value);
} 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);
$targetPhrase.prop("href", advertisement.advertisement_url);
$headline.prop("title", domain);
$targetPhrase.prop("title", domain);
$headline.off('click');
$targetPhrase.off('click');
$headline.on('click', () => chrome.send('showMillixWallet', ['new_tab', advertisement.advertisement_url]));
......
......@@ -767,7 +767,7 @@ export const DATABASE_ENGINE = 'sqlite';
export const DATABASE_CONNECTION = {};
export const MILLIX_CIRCULATION = 9e15;
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_TEST_NETWORK = './millix-tangled';
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