Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
HTML
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        
        .release-notes-wrapper {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
            overflow: hidden;
        }
        
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px 40px;
            border-radius: 0;
            margin-bottom: 0;
            position: relative;
            overflow: hidden;
        }
        
        .header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -10%;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            border-radius: 50%;
        }
        
        .header h1 {
            margin: 0;
            font-size: 32px;
            font-weight: 600;
        }
        
        .metadata {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 20px 40px;
            border-bottom: 1px solid #dee2e6;
            display: flex;
            align-items: center;
            gap: 30px;
            flex-wrap: wrap;
        }
        
        .metadata-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .metadata-item strong {
            color: #495057;
            font-weight: 600;
        }
        
        .metadata-item span {
            color: #0A2333;
            background: white;
            padding: 6px 14px;
            border-radius: 6px;
            font-weight: 600;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        
        #widget.doc-containerlink {
            paddingdisplay: 0inline-flex;
            minalign-heightitems: 700pxcenter;
            backgroundgap: #ffffff8px;
             }padding: 10px 20px;
        
    background: linear-gradient(135deg, #667eea  .message-box {0%, #764ba2 100%);
            paddingcolor: 40pxwhite;
            text-aligndecoration: centernone;
            background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%)border-radius: 8px;
            marginfont-weight: 30px600;
            borderfont-radiussize: 10px14px;
            border-lefttransition: 5pxall solid0.3s #ffc107ease;
            box-shadow: 0 4px 12px rgba(255102, 193126, 7234, 0.23);
        }
        margin-left: auto;
        .message-box.error {}
        
    background: linear-gradient(135deg, #fee 0%, #fcc 100%); .doc-link:hover {
            border-left-colortransform: #dc3545translateY(-2px);
            box-shadow: 0 4px6px 12px20px rgba(220102, 53126, 69234, 0.24);
        }
        
        .message-box h2doc-link:active {
            colortransform: #856404translateY(0);
        }
    margin-bottom: 15px;
   
         font#widget-size:container 24px;{
         }
   padding: 0;
    
        .message-box.error h2 {min-height: 700px;
            colorbackground: #721c24#ffffff;
        }
        
        .message-box p {
            colorpadding: #85640440px;
            fonttext-sizealign: 16pxcenter;
            line-height: 1.6;
        }background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
        
    margin: 30px;
   .message-box.error p {
            colorborder-radius: #721c2410px;
        }
    border-left: 5px solid  #ffc107;
        .message-icon {
     box-shadow: 0 4px 12px rgba(255, 193,  font-size: 48px7, 0.2);
        }
    margin-bottom: 15px;
   
         display: block;
.message-box.error {
         }
   background: linear-gradient(135deg, #fee 0%, #fcc 100%);
        iframe {
            borderborder-left-color: none#dc3545;
            widthbox-shadow: 0 100%;
4px 12px rgba(220, 53, 69, 0.2);
       height: 800px;}
        
    display: block;
   .message-box h2    }{
        
        .loading {color: #856404;
            textmargin-alignbottom: center15px;
            paddingfont-size: 60px 20px24px;
         }
   color: #6c757d;
    
        font-size: 18px.message-box.error h2 {
            color: #721c24;
        }
        
        .loading::beforemessage-box p {
            contentcolor: ''#856404;
            displayfont-size: block16px;
            widthline-height: 50px1.6;
        }
    height: 50px;
   
         margin: 0 auto 20px;.message-box.error p {
            bordercolor: 4px solid #e9ecef#721c24;
         }
   border-top-color: #667eea;
    
        border.message-radius:icon 50%;{
            animationfont-size: spin 1s linear infinite48px;
        }
    margin-bottom: 15px;
   
        @keyframes spindisplay: {block;
        }
    from { transform: rotate(0deg); }
        iframe    to { transform: rotate(360deg); }
        }
    border: none;
   
        @media (max-width: 768px) {100%;
            bodyheight: {800px;
                paddingdisplay: 10pxblock;
        }
    }
    
        .loading {
            .header {
    text-align: center;
            padding: 60px 20px;
            color: }#6c757d;
            font-size: 18px;
            .header h1 {}
        
        font-size: 24px;.loading::before {
            }content: '';
            display: block;
            .metadata {width: 50px;
                paddingheight: 15px 20px50px;
            margin: 0   flex-direction: columnauto 20px;
            border: 4px   align-items: flex-startsolid #e9ecef;
            }border-top-color: #667eea;
        }
     </style>
</head>
<body>
border-radius: 50%;
      <div class="release-notes-wrapper">
     animation: spin 1s <div class="header">
linear infinite;
        }
     <h1 id="page-title">Dicionário de Dados</h1>
        </div>
@keyframes spin {
      
      from { <div class="metadata">transform: rotate(0deg); }
            <div class="metadata-item">to { transform: rotate(360deg); }
        }
        <strong>Versão:</strong> 
        @media (max-width: 768px) {
     <span id="version-display">Carregando...</span>
      body {
     </div>
            <div class="metadata-item">padding: 10px;
            }
    <strong>Última atualização:</strong> 
      
            <span id="last-update">-</span>
.header {
             </div>
   padding: 20px;
    </div>
        }
          <div id="widget-container">  
            <div class="loading">Carregando documento...</div>.header h1 {
        </div>
    </div>

    <script>
font-size: 24px;
           (function() {}
            //
 Mapeamento de versões para Document IDs do Google Docs e arquivos .txtmetadata {
            // Gerado automaticamente a partirpadding: da pasta: 141aJRhZeYZca4QCBnou6-00WzRLkBYbs15px 20px;
            // Data: 2025-12-16
  flex-direction: column;
         // Total: 62 versões (2 Google Docs + 60 arquivos .txt - todos funcionando!)
align-items: flex-start;
            }
     const versionToDocId = {
    
            // Google Docs (2).doc-link {
                '12.1.2503.14': '13QaSU_lP1_haWnOYl7UjPvsKfi3AaPdKwciYHrceEt4',margin-left: 0;
                '12.1.2511.2': '1gLo16QDT99iGdaoKyFHBW1n5jF-gt-awBjnSQrBZa3c',
margin-top: 10px;
                width: 100%;
                // Arquivos .txt (60) - funcionando diretamente no Widget Connector
justify-content: center;
            }
        '12.1.2503': '1BRsJyHOHQNOEpAfIm5ndOn6z_0gffbaF',}
    </style>
</head>
<body>
    <div class="release-notes-wrapper">
        <div class="header">
            <h1 id="page-title">Dicionário de Dados</h1>
        </div>
        
        <div class="metadata">
            <div class="metadata-item">
                <strong>Versão:</strong> 
                <span id="version-display">Carregando...</span>
            </div>
            <div class="metadata-item">
                <strong>Última atualização:</strong> 
                <span id="last-update">-</span>
            </div>
            <a href="#" id="doc-link" class="doc-link" target="_blank" style="display: none;">
                <span>📄</span>
                <span>Abrir no Google Docs</span>
            </a>
        </div>
        
        <div id="widget-container">
            <div class="loading">Carregando documento...</div>
        </div>
    </div>

    <script>
        (function() {
            // Mapeamento de versões para Document IDs do Google Docs e arquivos .txt
            // Gerado automaticamente a partir da pasta: 141aJRhZeYZca4QCBnou6-00WzRLkBYbs
            // Data: 2025-12-16
            // Total: 62 versões (2 Google Docs + 60 arquivos .txt - todos funcionando!)
            const versionToDocId = {
                // Google Docs (2)
                '12.1.2503.14': '13QaSU_lP1_haWnOYl7UjPvsKfi3AaPdKwciYHrceEt4',
                '12.1.2511.2': '1gLo16QDT99iGdaoKyFHBW1n5jF-gt-awBjnSQrBZa3c',
                
                // Arquivos .txt (60) - funcionando diretamente no Widget Connector
                '12.1.2503': '1BRsJyHOHQNOEpAfIm5ndOn6z_0gffbaF',
                '12.1.2503.15': '12ejZuDikegyaH2n16n2Hpas1Z3VEjc5e',
                '12.1.2503.16': '15BkT50wXw7kJccfw4iRB-LVGQyTzQVf1',
                '12.1.2503.17': '1L4FUKbDjnAs29rK0ymfMgRVJPPVtzYdW',
                '12.1.2503.18': '1LNSFua5jsEw9m2D4X7lBVsbk6qXsG3cm',
                '12.1.2507': '1pT42y90cnf2UY2gK5k035jEFVkIs7s-n',
                '12.1.2507.1': '1lo7KiRJGWYJFfH-Xqv-dvNcRoIy6ecj3',
                '12.1.2507.2': '1xe9L8cCurcXIw5tzxe4H9KNzFgpIObA1',
                '12.1.2507.3': '1P9jEM2cgtUkyfdK5bsKlSvFCk_SqpMqU',
                '12.1.2507.4': '12Qk7mEnEe2iIsE-nFUUGOmbt_t8rwjn-',
                '12.1.2507.5': '1ljgI7Re2mT3yv7TgnZLOZv_n0vzzJTxF',
                '12.1.2507.6': '1lwblHVXZUKF8qgdajVB2Va41fxpJkZ9X',
                '12.1.2507.7': '1LWO9GFD8iO6HQEJn_wBybP1EdZ2AZSsD',
                '12.1.2507.8': '1bhB3Pig68EAvmXGoUptLYnJPEnGW4fVr',
                '12.1.2507.9': '1shjpLbeGfQmrV6DMtm4EuIvqdhHTuEIy',
                '12.1.2507.10': '1wU40XkkEMRqw4Ieanf5QrkBz8SwqISzj',
                '12.1.2507.11': '1goM3M1WCXvtdx46fY7ZmeeDtwpnvbld5',
                '12.1.2507.12': '15r-G5LdQpPn9gcktkpYVPQS1exs6Io8t',
                '12.1.2507.13': '1xVHx0mjDewGUVwIGR8GWqTMqX1R_Cj21',
                '12.1.2507.14': '1uFblMZhJaYPFrGKtFCC9bAa-2xxtXmi_',
                '12.1.2507.15': '1vNN6ONnbq1ApNJy6uzGW_hZ27HvhW7Dd',
                '12.1.2507.16': '1g27jhn6ZEliSZhAJ7Co9FUFLtNBfqVHH',
                '12.1.2507.17': '1LkwBvxVy_oykf3gEAwlf2eRn0NMiMnL1',
                '12.1.2507.18': '1he66XmpG6YhgKlxtMv3xik6KccuMKLeS',
                '12.1.2511': '1gPiO2P_mF0wpLX-2g5oFBqi4QS630wKM',
                '12.1.2511.1': '1yv4EZZKrfPgI-RWggMfBANtx6dL8owhA',
                '12.1.2511.3': '14Zd-Npn6VGioc1wsokDL4vfPRVzhb-AY',
                '12.1.2511.4': '1VjoqjmjqCokx4Kv5QDTDa9wZsF1QwICY',
                '12.1.2511.5': '1evpMFJmgDUFX__dC6W83LZqKQXjmy88s',
                '12.1.2511.6': '1_e3AgOsc9Oqy-JoZhus-zyU-961karvw',
                '12.1.2511.7': '19TKZ4fYof03H0pdzldQnV7_ZYjxowkNr',
                '12.1.2511.8': '12ivR5sJUwVwcRJr0Q_aHBT_y4JwlnTd4',
                '12.1.2511.9': '1Exio4F5z2lo6HnEnLpkDquuu8HUiD3C-',
                '12.1.2511.10': '1NRs4aZct5OVmSiXDPgMmUw9iFURlC6Od',
                '12.1.2511.11': '1AAOtpmIahaHaYYUtUFL3OJGJ07dTKLU_',
                '12.1.2511.12': '1c19qwsUQdWb_H58qcamAQ6Fz9Bwg78Bs',
                '12.1.2511.13': '1CS-VXZJLzPSBjov0r4JVAcTPE5daaE4M',
                '12.1.2511.14': '1dei-4_gijuPsGzSQKZpIh9DMCYJ2pw8j',
                '12.1.2511.15': '1qDv9Zm_0CJiKl6iJBzxVxwFCoHNZBky4',
                '12.1.2511.16': '1H51vcp3ierWZE0XB1QEtzUnm0J-0uEVp',
                '12.1.2511.17': '1OwFzjD6j4_OlDi9x7f5xqqoBo_eKY1rd',
                '12.1.2511.18': '1iaMmEP6yDzHR4oTM_SjM2obkaUz1zrBA',
                '12.1.2603.1': '19iieXcJNDoIM8lp09Zd-faD22AWepfTC',
                '12.1.2603.2': '1DFR1cWRUVm3PsPQsVbuJySIjxMIy085L',
                '12.1.2603.3': '1PLCl8hhtuvnW8Q9WDug9NH9F_qO-CUoq',
                '12.1.2603.4': '1qFmELYGulpQizNrXFBCpHdcLOSC5LrsZ',
                '12.1.2603.5': '1Q8ZSMOooNeSgmfdEucEsRO6P8z370enZ',
                '12.1.2603.6': '1P5-nq151raX-NhYufnTRrZMZyeAKsSp2',
                '12.1.2603.7': '1VfNdP7lRvi37ZKSOzX1KyEp6dK_t0I-N',
                '12.1.2603.8': '1pxJPuMKfOWXrkwS7zzmm_3i_GerA44Zi',
                '12.1.2603.9': '1evoXM_3WvL4SGVkwB8EYgwXuD6E4Asmw',
                '12.1.2603.10': '18tytubaH1oywQoWyAycMM-qMq_347CHb',
                '12.1.2603.11': '1ORyeFI8qYQynt20Ud66XLKewYQoVdLA6',
                '12.1.2603.12': '1gDfH7fyZSUGl90ikqO3yXsZGm_EXC4PW',
                '12.1.2607.1': '1ruRPs4fBJrKpLoECMGh0X5Ca4Bc_hfPb',
                '12.1.2607.2': '1njYTB38Ts6_dAZKvkqdvdQcPx99HTRml',
                '12.1.2607.3': '1uQR-2_JLet0Cyo7K6XaClDaXqxBu7udV',
                '12.1.2607.4': '1G41yiKUzoWgIrbQATlhYntb73FSH9U76',
                '12.1.2607.5': '1_BfY0poM0AeAFy39vK-XZmBhEafIzzBf',
                '12.1.2607.6': '1cm7WuMWrQYjGDdeMdmdAqIFX5ugROaHY',
            };
            
            // Função para extrair versão do título "Dicionário de Dados 12.1.2503.14"
            function getPageVersion() {
                const versionPattern = /(\d+\.\d+\.\d+(?:\.\d+)?)/;
                
                // Método 1: Título da página (Confluence)
                const selectors = [
                    'h1#title-text',
                    '.page-title',
                    'h1',
                    '[data-page-title]'
                ];
                
                for (const selector of selectors) {
                    const element = document.querySelector(selector);
                    if (element) {
                        const text = element.textContent.trim();
                        const match = text.match(versionPattern);
                        if (match) {
                            return match[1];
                        }
                    }
                }
                
                // Método 2: Meta tags
                const metaTitle = document.querySelector('meta[property="og:title"], meta[name="title"]');
                if (metaTitle) {
                    const titleText = metaTitle.getAttribute('content') || '';
                    const match = titleText.match(versionPattern);
                    if (match) {
                        return match[1];
                    }
                }
                
                // Método 3: document.title
     return match[1];
          const titleMatch = document.title.match(versionPattern);
       }
         if (titleMatch) {
     }
               return titleMatch[1];
                // Método 3: document.title}
                const
 titleMatch = document.title.match(versionPattern);
             // Método 4: ifURL (titleMatchfallback)
 {
               const urlParams = new URLSearchParams(window.location.search);
  return titleMatch[1];
             const titleParam  }
= urlParams.get('title');
                if (titleParam) {
                  //  Métodoconst 4:match URL= (fallback)decodeURIComponent(titleParam).match(versionPattern);
                const  urlParams = newif URLSearchParams(window.location.search);match) {
                const titleParam = urlParams.get('title');
     return match[1];
           if (titleParam) {
       }
             const match = decodeURIComponent(titleParam).match(versionPattern); }
                
    if (match) {
          return null;
            }
     return match[1];
      
            // Obter }versão
            const version   }= getPageVersion();
            const container   = document.getElementById('widget-container');
            
    return null;
       if (!version) {
     }
           container.innerHTML = `
                //  Obter versão
 <div class="message-box error">
         const version = getPageVersion();
            const<span container = document.getElementById('widget-container');class="message-icon">❌</span>
            
            if (!version) {<h2>Versão não identificada</h2>
                container.innerHTML = `
      <p>Certifique-se de que o título da página contém a versão no formato:<br>
   <div class="message-box error">
                   <strong>"Dicionário de    <span class="message-icon">❌</span>Dados 12.1.2503.14"</strong></p>
                    </div>
    <h2>Versão não identificada</h2>
          `;
              <p>Certifique-se de quereturn;
 o título da página contém a versão no formato:<br>
   }
            
         <strong>"Dicionário de Dados 12.1.2503.14"</strong></p>
 Atualizar display
            document.getElementById('version-display').textContent = version;
    </div>
        document.getElementById('page-title').textContent =    `Dicionário de Dados ${version}`;
            document.getElementById('last-update').textContent =   returnnew Date().toLocaleString('pt-BR');
            }
            // Obter Document ID
            const //docId Atualizar display= versionToDocId[version];
            document.getElementById('version-display').textContent = version;

            if document.getElementById('page-title').textContent = `Dicionário de Dados ${version}`;
(!docId) {
                document.getElementById('last-update').textContent = new Date().toLocaleString('pt-BR');
container.innerHTML = `
                    <div class="message-box">
            // Obter Document ID
         <span class="message-icon">📋</span>
   const docId = versionToDocId[version];
            
      <h2>Release Notes ainda não foi expedido if (!docId) {
para essa versão</h2>
                   container.innerHTML = `
   <p>O Release Notes para a versão <strong>${version}</strong> ainda não foi expedido.<br>
       <div class="message-box">
                Aguarde a expedição ou verifique se a versão <span class="message-icon">📋</span>está correta.</p>
                    </div>
    <h2>Release     Notes ainda não foi expedido para essa versão</h2>`;
                return;
        <p>O Release Notes para a}
 versão <strong>${version}</strong> ainda não foi expedido.<br>
      
            // Construir URL do Google Doc
 Aguarde a expedição ou verifique se a versão está correta.</p>
  const googleDocUrl = `https://docs.google.com/document/d/${docId}/edit?usp=sharing`;
            const previewUrl  </div>= `https://docs.google.com/document/d/${docId}/preview`;
            
    `;
        // Adicionar link para abrir documento
   return;
         const docLink  }
= document.getElementById('doc-link');
            if (docLink) {
             // Construir URL dodocLink.href Google= DocgoogleDocUrl;
            const  googleDocUrl = `https://docs.google.com/document/d/${docId}/edit?usp=sharing`;
 docLink.style.display = 'inline-flex';
           const previewUrl = `https://docs.google.com/document/d/${docId}/preview`;
            
            // Verificar se está em modo de edição (Confluence)
            if (window.location.href.includes('editpage.action') || window.location.href.includes('edit')) {
                // Modo de edição: mostrar código do macro Widget Connector
                const widgetCode = `<ac:structured-macro ac:name="widget" ac:schema-version="1">
  <ac:parameter ac:name="url">${googleDocUrl}</ac:parameter>
  <ac:parameter ac:name="width">100%</ac:parameter>
  <ac:parameter ac:name="height">800</ac:parameter>
</ac:structured-macro>`;
                
                container.innerHTML = `
                    <div style="padding: 30px 40px;">
                        <div style="background: #f4f5f7; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
                            <h3 style="margin-bottom: 15px; color: #495057;">📋 Código do Widget Connector:</h3>
                            <pre style="background: white; padding: 15px; border-radius: 5px; overflow-x: auto; font-size: 13px; border: 1px solid #dee2e6;">${widgetCode}</pre>
                        </div>
                        <p style="color: #6c757d; font-size: 14px;">
                            💡 <strong>Instruções:</strong> Copie o código acima e cole no editor do Confluence usando o macro "Widget Connector".
                        </p>
                    </div>
                `;
            } else {
                // Modo de visualização: usar iframe
                const iframe = document.createElement('iframe');
                iframe.src = previewUrl;
                iframe.width = '100%';
                iframe.height = '800';
                iframe.allow = 'fullscreen';
                iframe.title = `Dicionário de Dados ${version}`;
                
                container.innerHTML = '';
                container.appendChild(iframe);
            }
        })();
    </script>
</body>
</html>