Skip to content

Commit

Permalink
Versão BETA
Browse files Browse the repository at this point in the history
update
  • Loading branch information
minecraftbedrockpro authored Jan 20, 2025
1 parent 0e30079 commit a5e38fa
Show file tree
Hide file tree
Showing 3 changed files with 223 additions and 85 deletions.
121 changes: 102 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,107 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marketplace Free v1.0</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="minecoin.png" type="image/png">
<script src="javascript.js"></script>
<script>
function showSection(id) {
// Esconde todas as seções
var sections = document.querySelectorAll('.section');
sections.forEach(function(section) {
section.classList.remove('active');
});
<style>
.modal {
display: none; /* Escondido por padrão */
position: fixed;
z-index: 9999;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5); /* Fundo semitransparente */
display: flex;
justify-content: center;
align-items: center;
}

.modal-content {
background-color: #000000; /* Fundo do conteúdo preto */
padding: 20px;
border-radius: 10px;
width: 80%;
max-width: 450px;
text-align: center;
position: relative;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Sombra */
border: 2px solid blue; /* Borda azul de 2px */
}

// Mostra a seção selecionada
document.getElementById(id).classList.add('active');

.modal-content ul {
list-style-position: inside; /* Posição dos pontos dentro da lista */
padding-left: 0; /* Remover espaçamento à esquerda */
margin: 0; /* Remover margens */
text-align: left; /* Alinhar à esquerda */
}
</script>

.close {
position: absolute;
top: 10px;
right: 15px;
color: #aaa;
font-size: 24px;
font-weight: bold;
cursor: pointer;
}

.close:hover {
color: #ff0000; /* Vermelho ao passar o mouse */
}
</style>
</head>
<body>


<!-- Modal (Tela de introdução) -->
<div id="modal" class="modal">
<div class="modal-content">
<span id="closeModal" class="close">&times;</span>
<h2 style="color: #00ff00;">Versão Atual: <span>1.0</span></h2>
<p style="color: #1e90ff;">Verifique se há alguma versão nova:</p>
<a href="https://github.com/minecraftbedrockpro/Marketplace-Free/releases" target="_blank" style="color: #1e90ff;">https://github.com/minecraftbedrockpro/Marketplace-Free/Versões</a>
<h3 style="color: #1e90ff;">Modificações em:</h3>
<ul>
<li>Mapas</li>
<li>Addons</li>
<li>Texturas</li>
<li>Shaders</li>
<li>Skins</li>
</ul>
</div>
</div>
<script>
// Selecionar elementos
const modal = document.getElementById('modal');
const closeModalButton = document.querySelector('.close');

// Fechar modal ao clicar no botão X
closeModalButton.addEventListener('click', () => {
modal.style.display = 'none';
});

// Fechar modal ao clicar fora do conteúdo
window.addEventListener('click', (event) => {
if (event.target === modal) {
modal.style.display = 'none';
}
});

// Checar se o modal já foi mostrado
if (!localStorage.getItem('modalShown')) {
modal.style.display = 'flex';
localStorage.setItem('modalShown', 'true');
}
</script>
</body>
</html>
<nav>
<a href="#" onclick="showSection('mapas-world')">Mapas World</a>
<a href="#" onclick="showSection('addons')">Addons</a>
<a href="#" onclick="showSection('textura-packs')">Textura Packs</a>
<a href="#" onclick="showSection('shaders-packs')">Shaders Packs</a>
<a href="#" onclick="showSection('skin-packs')">Skin Packs</a>
<a href="#Mapas" onclick="showSection('mapas-world')">Mapas World</a>
<a href="#Addons" onclick="showSection('addons')">Addons</a>
<a href="#Texturas" onclick="showSection('textura-packs')">Textura Packs</a>
<a href="#Shaders" onclick="showSection('shaders-packs')">Shaders Packs</a>
<a href="#Skins" onclick="showSection('skin-packs')">Skin Packs</a>
</nav>
<main>
<!-- Seção Mapas World -->
Expand Down Expand Up @@ -413,7 +492,11 @@ <h2>Minecraft Legends Crossover</h2>
</a>
</div>
</div>

<div id="hud" class="hud">
<div id="version" class="hud-item">Versão: 1.0.0</div>
<!-- Mensagem de 4D Skins Maps -->
<div id="skinsMapsAlert" class="hud-item alert">4D Skins/Mapas não suportados</div>
</div>
</main>
<script>
function showSection(id) {
Expand Down Expand Up @@ -442,4 +525,4 @@ <h2>Minecraft Legends Crossover</h2>
};
</script>
</body>
</html>
</html>
112 changes: 48 additions & 64 deletions javascript.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,56 @@
function showSection(id) {
// Esconde todas as seções
var sections = document.querySelectorAll('.section');
sections.forEach(function(section) {
section.classList.remove('active');
});
document.addEventListener('DOMContentLoaded', (event) => {
console.log("JavaScript carregado!");

// Mostra a seção selecionada
document.getElementById(id).classList.add('active');
}
// Criar o HUD dinamicamente
const hud = document.createElement('div');
hud.id = 'hud';
hud.classList.add('hud');

// Recupera a seção ativa ao carregar a página
window.onload = function() {
const savedSection = localStorage.getItem('activeSection');
if (savedSection && document.getElementById(savedSection)) {
showSection(savedSection);
} else {
// Mostra a seção principal (default) se nada estiver salvo
showSection('mapas-world');
}
// Criar o item da versão
const versionElement = document.createElement('div');
versionElement.id = 'version';
versionElement.classList.add('hud-item');
versionElement.style.color = '#00ff00'; // Cor verde para a versão
versionElement.textContent = 'Versão: 1.0.0';
hud.appendChild(versionElement);

function showSection(id) {
// Salva a seção ativa no localStorage
localStorage.setItem('activeSection', id);

// Esconde todas as seções
var sections = document.querySelectorAll('.section');
sections.forEach(function(section) {
section.classList.remove('active');
});

// Mostra a seção selecionada
document.getElementById(id).classList.add('active');
}

// Recupera a seção ativa ao carregar a página
window.onload = function() {
const savedSection = localStorage.getItem('activeSection');
if (savedSection && document.getElementById(savedSection)) {
showSection(savedSection);
} else {
// Mostra a seção principal (default) se nada estiver salvo
showSection('mapas-world');
}
};
// Criar o alerta de Skins/Maps
const skinsMapsAlert = document.createElement('div');
skinsMapsAlert.id = 'skinsMapsAlert';
skinsMapsAlert.classList.add('hud-item', 'alert');
skinsMapsAlert.style.color = '#ff0000'; // Cor vermelha para o alerta
skinsMapsAlert.textContent = 'Skins Packs e Mapas World 4D não suportados';
hud.appendChild(skinsMapsAlert);

// Adicionar o HUD ao body
document.body.appendChild(hud);
});
// Função para mostrar o modal
function showModal() {
modal.style.display = 'flex';
}
function search() {
// Obtém o valor da pesquisa
var input = document.getElementById('searchInput').value.toLowerCase();
// Obtém todos os elementos h2
var h2s = document.querySelectorAll('h2');
var found = false;

h2s.forEach(function(h2) {
// Verifica se o texto do h2 corresponde ao valor da pesquisa
if (h2.textContent.toLowerCase().includes(input)) {
// Mostra a seção correspondente
showSection(h2.closest('.section').id);
// Destaca o h2 correspondente
h2.style.backgroundColor = 'yellow';
found = true;
} else {
// Remove o destaque dos h2s que não correspondem
h2.style.backgroundColor = '';
}
});
// Selecionar elementos
const modal = document.getElementById('modal');
const closeModalButton = document.querySelector('.close');

if (!found) {
alert("Nenhum resultado encontrado.");
}
// Verificar se o modal já foi exibido
const isModalShown = localStorage.getItem('modalShown');

// Se o modal não foi exibido, mostrar e marcar como exibido
if (!isModalShown) {
showModal();
localStorage.setItem('modalShown', 'true');
}

// Fechar modal ao clicar no botão X
closeModalButton.addEventListener('click', () => {
modal.style.display = 'none';
});

// Fechar modal ao clicar fora do conteúdo
window.addEventListener('click', (event) => {
if (event.target === modal) {
modal.style.display = 'none';
}
});
75 changes: 73 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #050505; /* Cor de fundo */
background-image: url('images/nome-da-imagem-fundo.png'); /* Imagem de fundo */
background-size: cover; /* Cobrir toda a página */
background-repeat: no-repeat; /* Não repetir a imagem */
background-attachment: fixed; /* Fixa a imagem ao fundo */
Expand Down Expand Up @@ -203,7 +202,6 @@ section p {
border-radius: 50px;
border: 2px solid rgb(255, 255, 255);
}

/* Adicionando estados interativos para botões */
button, .button {
outline: none; /* Remove a borda padrão ao focar */
Expand All @@ -221,3 +219,76 @@ button:active, .button:active {
background-color: #003a80; /* Altere conforme necessário */
color: white; /* Altere conforme necessário */
}

body {
display: flex; /* Usar flexbox para organizar os elementos */
min-height: 100vh; /* Garantir que o corpo ocupe a altura total da tela */
margin: 0; /* Remover margens padrão */
font-family: 'Segoe UI', sans-serif;
}

.left-sidebar {
display: flex;
flex-direction: column;
padding: 10px;
background-color: #000000; /* Cor de fundo da barra lateral */
color: white;
width: 200px; /* Largura da barra lateral */
height: 100vh; /* Altura da barra lateral */
}

.content {
flex: 1;
padding: 20px;
}

.hidden {
display: none;
}

/* Estilo das seções */
.section {
padding: 20px;
background-color: #000000; /* Cor de fundo das seções */
border: 1px solid #000000; /* Cor da borda das seções */
border-radius: 5px;
margin-top: 20px;
}

/* Estilo geral do HUD (diminuindo tamanho) */
.hud {
position: fixed;
top: 10px;
left: 10px;
background-color: rgba(0, 0, 0, 0.3); /* Fundo semi-transparente */
color: white;
padding: 5px; /* Diminui o espaçamento interno */
border-radius: 5px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 12px; /* Reduz o tamanho da fonte */
z-index: 9999; /* Garantir que fique acima de outros elementos */
width: auto; /* Ajuste automático para o conteúdo */
}

/* Estilo dos itens dentro do HUD (diminuindo o tamanho) */
.hud-item {
margin: 3px 0; /* Menor margem entre os itens */
font-size: 12px; /* Reduz o tamanho da fonte */
}

/* Ajustes para o alerta de "4D Skins Maps não suportados" */
#skinsMapsAlert {
color: #ff0000; /* Alerta em vermelho */
font-weight: bold;
}

/* Estilo para a versão (não será alterado, mas pode ser ajustado se necessário) */
#version {
color: #00ff00; /* Cor verde para a versão */
font-weight: bold;
}

/* Se você quiser esconder essa mensagem dinamicamente via JavaScript, pode criar uma classe oculta */
.hidden {
display: none;
}

0 comments on commit a5e38fa

Please sign in to comment.