Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

criar pop up na página inicial #84

Open
estelanm opened this issue Apr 18, 2018 · 1 comment
Open

criar pop up na página inicial #84

estelanm opened this issue Apr 18, 2018 · 1 comment
Milestone

Comments

@estelanm
Copy link

pessoal, preciso de uma pop up na pagina inicial com a seguinte imagem, para o seguinte link:

http://juventude.gov.br/conselhos-em-rede

whatsapp image 2018-04-13 at 17 05 10

@mnt-c
Copy link
Collaborator

mnt-c commented Apr 18, 2018

Estella a criação do "pop-up" é feita por javascript, que geralmente é bloqueado na rede. Inclui um código para testar o resultado e como esperado fui bloqueado.

screenshot from 2018-04-18 15-22-43

Código de teste
<style>
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    padding-top: 100px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.modal-img {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    width: 80%;
}
.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
</style>

<div id="myModal" class="modal">
  <div class="modal-content">
    <span class="close">&times;</span>
    <a href="http://juventude.gov.br/conselhos-em-rede">
      <img class="modal-img" src="http://juventude.gov.br/juventude/conselhos-popup.jpeg">
    </a>
  </div>
</div>

<script>
var modal = document.getElementById('myModal');
var span = document.getElementsByClassName("close")[0];
modal.style.display = "block";

/* fechar */
span.onclick = function() {
    modal.style.display = "none";
}

/* fechar tela */
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}
</script>

Encaminhei o e-mail para a equipe e estou no aguardo da liberação.

@joenio joenio added this to the Sprint 6 milestone May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants