mirror of
https://github.com/manualdousuario/marreta.git
synced 2025-09-04 11:41:12 +00:00
renomeada o marreta cta
This commit is contained in:
parent
b4e8bff4d5
commit
eca0b80529
1 changed files with 12 additions and 10 deletions
|
@ -533,6 +533,8 @@ class URLAnalyzer
|
||||||
|
|
||||||
// Add Marreta CTA
|
// Add Marreta CTA
|
||||||
$this->addMarretaCTA($dom, $xpath);
|
$this->addMarretaCTA($dom, $xpath);
|
||||||
|
// Add Brand Bar / Adicionar barra de marca
|
||||||
|
$this->addBrandBar($dom, $xpath);
|
||||||
|
|
||||||
return $dom->saveHTML();
|
return $dom->saveHTML();
|
||||||
}
|
}
|
||||||
|
@ -625,21 +627,21 @@ class URLAnalyzer
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add Marreta CTA and debug panel
|
* Add Brand Bar CTA and debug panel
|
||||||
|
* Adiciona CTA da marca e painel de debug
|
||||||
*/
|
*/
|
||||||
private function addMarretaCTA($dom, $xpath)
|
private function addBrandBar($dom, $xpath)
|
||||||
{
|
{
|
||||||
$body = $xpath->query('//body')->item(0);
|
$body = $xpath->query('//body')->item(0);
|
||||||
if ($body) {
|
if ($body) {
|
||||||
// Add Marreta CTA
|
$brandDiv = $dom->createElement('div');
|
||||||
$marretaDiv = $dom->createElement('div');
|
$brandDiv->setAttribute('style', 'z-index: 99999; position: fixed; top: 0; right: 4px; background: rgb(37,99,235); color: #fff; font-size: 13px; line-height: 1em; padding: 6px; margin: 0px; overflow: hidden; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; font-family: Tahoma, sans-serif;');
|
||||||
$marretaDiv->setAttribute('style', 'z-index: 99999; position: fixed; top: 0; right: 4px; background: rgb(37,99,235); color: #fff; font-size: 13px; line-height: 1em; padding: 6px; margin: 0px; overflow: hidden; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; font-family: Tahoma, sans-serif;');
|
$brandHtml = $dom->createDocumentFragment();
|
||||||
$marretaHtml = $dom->createDocumentFragment();
|
$brandHtml->appendXML('<a href="'.SITE_URL.'" style="color: #fff; text-decoration: none; font-weight: bold;" target="_blank">'.htmlspecialchars(SITE_DESCRIPTION).'</a>');
|
||||||
$marretaHtml->appendXML('Chapéu de paywall é <a href="'.SITE_URL.'" style="color: #fff; text-decoration: underline; font-weight: bold;" target="_blank">Marreta</a>!');
|
$brandDiv->appendChild($brandHtml);
|
||||||
$marretaDiv->appendChild($marretaHtml);
|
$body->appendChild($brandDiv);
|
||||||
$body->appendChild($marretaDiv);
|
|
||||||
|
|
||||||
// Add debug panel if DEBUG is true
|
// Add debug panel if DEBUG is true / Adicionar painel de depuração se DEBUG for verdadeiro
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
$debugDiv = $dom->createElement('div');
|
$debugDiv = $dom->createElement('div');
|
||||||
$debugDiv->setAttribute('style', 'z-index: 99999; position: fixed; bottom: 10px; right: 10px; background: rgba(0,0,0,0.8); color: #fff; font-size: 13px; line-height: 1.4; padding: 10px; border-radius: 3px; font-family: monospace; max-height: 200px; overflow-y: auto;');
|
$debugDiv->setAttribute('style', 'z-index: 99999; position: fixed; bottom: 10px; right: 10px; background: rgba(0,0,0,0.8); color: #fff; font-size: 13px; line-height: 1.4; padding: 10px; border-radius: 3px; font-family: monospace; max-height: 200px; overflow-y: auto;');
|
||||||
|
|
Loading…
Add table
Reference in a new issue