Version 1.0
This commit is contained in:
commit
aed0498e36
BIN
assets/logo.png
Normal file
BIN
assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
assets/logomenu.png
Normal file
BIN
assets/logomenu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1023 B |
BIN
fonts/digital-7-mono.ttf
Normal file
BIN
fonts/digital-7-mono.ttf
Normal file
Binary file not shown.
85
h0us3-script.js
Normal file
85
h0us3-script.js
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
var fechaActual = new Date();
|
||||
var chorradas = [
|
||||
'Basicamente, como no has modificado nada, pues es todo igual solo que 30" despues!!!!',
|
||||
'Otra vez?? Tamos tontos o ke?',
|
||||
'Nada, nada, tu sigue dandole...',
|
||||
'Pero de verdad crees que esto funciona?',
|
||||
'Estoi empezando a pensar que te gusta darle al botoncito ehhhh...',
|
||||
'O no tienes amigos o de verdad que no lo entiendo',
|
||||
'En el tiempo que llevas perdido cientos de galaxias han desaparecido del universo... piensa en ello!!!',
|
||||
'Quieres conocer un secreto???? Sigue dandole al botoncito...',
|
||||
'...',
|
||||
'......',
|
||||
'.........',
|
||||
'H0us3. Posiblemente la peor pelicula que he visto sobre informatica en mi vida',
|
||||
'La paranoia padre',
|
||||
'De verdad alguien puede tragarse eso...',
|
||||
'Es que es inconcebible...',
|
||||
'Vamos, que no hay por donde cogerla',
|
||||
'Mira que tengo visto cosas extrañas ehhh...',
|
||||
'Pero que en un grupo de informaticos haya 4 chicas!!!!! que no se lo cree nadie ostia!!!.',
|
||||
'Na, ahora en serio... me esta llevando mas tiempo escribir las frasecitas que el codigo en si.',
|
||||
'Pero es adictivo XDDDDDD',
|
||||
'Toc Toc',
|
||||
'Quien es?',
|
||||
'Testigos de Jehova',
|
||||
'¿Jehovi?',
|
||||
'¡Jehova!',
|
||||
'¡Cada día te quiero mas... ouih ouih, ouih ouahhh!',
|
||||
'Ala venga, a ponerse hacer algo productivo...',
|
||||
'Que si, venga, deja de darle al botoncito',
|
||||
'Que se gasta, que todo tiene un limite',
|
||||
'Pues nada sigue, si el que pierde el tiempo eres tu...',
|
||||
'De repente sucede una explosion enorme...',
|
||||
'Se forma el universo...',
|
||||
'Los planetas...',
|
||||
'La tierra...',
|
||||
'Aparece la vida...',
|
||||
'Evoluciona...',
|
||||
'Nacen imperios...',
|
||||
'Ocasionan guerras...',
|
||||
'Descubrimientos...',
|
||||
'han pasado millones de años hasta este momento...',
|
||||
'y tu aqui, pulsando un botoncito para leer la siguiente tonteria...',
|
||||
'venga, ya que has llegado hasta aqui te voi a confiar el secreto de la vida...',
|
||||
'y es que todo tiene un final, y aunque uno no quiera otro puede quitarle el boton de continuar....'
|
||||
|
||||
]
|
||||
const msgEle=document.getElementById('h0us3-msg');
|
||||
var idxChorradas=0;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
mostrarHoraActual();
|
||||
var btnAdelantar = document.getElementById('h0us3-adelantar');
|
||||
btnAdelantar.addEventListener('click', adelantarHora);
|
||||
setInterval(actualizarHora, 1000);
|
||||
});
|
||||
|
||||
function mostrarHoraActual() {
|
||||
var horas = fechaActual.getHours().toString().padStart(2, '0');
|
||||
var minutos = fechaActual.getMinutes().toString().padStart(2, '0');
|
||||
var segundos = fechaActual.getSeconds().toString().padStart(2, '0');
|
||||
document.getElementById('h0us3-horas').textContent = horas;
|
||||
document.getElementById('h0us3-minutos').textContent = minutos;
|
||||
document.getElementById('h0us3-segundos').textContent = segundos;
|
||||
}
|
||||
|
||||
function actualizarHora() {
|
||||
fechaActual.setSeconds(fechaActual.getSeconds() + 1);
|
||||
mostrarHoraActual();
|
||||
}
|
||||
|
||||
function adelantarHora() {
|
||||
fechaActual.setSeconds(fechaActual.getSeconds() + 30);
|
||||
msgEle.textContent=chorradas[idxChorradas];
|
||||
idxChorradas++;
|
||||
if (idxChorradas>= chorradas.length){
|
||||
var btnAdelantar = document.getElementById('h0us3-adelantar');
|
||||
btnAdelantar.removeEventListener('click', adelantarHora);
|
||||
btnAdelantar.style.animation = 'fadeOut 0.5s forwards';
|
||||
setTimeout(function() {
|
||||
btnAdelantar.parentNode.removeChild(btnAdelantar);
|
||||
},500);
|
||||
}
|
||||
mostrarHoraActual();
|
||||
}
|
||||
51
h0us3-style.css
Normal file
51
h0us3-style.css
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
@font-face {
|
||||
font-family: "Digital-7 Mono";
|
||||
src: url("fonts/digital-7-mono.ttf");
|
||||
}
|
||||
|
||||
.h0us3-reloj {
|
||||
font-family: "Digital-7 Mono", sans-serif;
|
||||
font-size: 48px;
|
||||
color: #00ff00; /* Verde */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
#h0us3-adelantar {
|
||||
margin-left: 2rem;
|
||||
font-size: 24px;
|
||||
padding: 5px 10px;
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#h0us3-adelantar:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
#h0us3-msg{
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
|
||||
#toplevel_page_h0us3-config .wp-menu-image img {
|
||||
width: 24px;
|
||||
height: auto;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@keyframes fadeOut {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
73
h0us3.php
Normal file
73
h0us3.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
/*
|
||||
Plugin Name: H0us3
|
||||
Description: Plugin Chorrada nivel Dios que no hace mucho pero mola mogollon
|
||||
Version: 1.0
|
||||
Author: El Colega del Mangante
|
||||
*/
|
||||
|
||||
//Funcionalidad de FrontEnd//
|
||||
function h0us3_load_recursos() {
|
||||
wp_enqueue_style('h0us3-style', plugins_url('h0us3-style.css', __FILE__));
|
||||
wp_enqueue_style('h0us3-custom-font', plugins_url('fonts/digital-7-mono.ttf', __FILE__), array(), '1.0');
|
||||
wp_enqueue_script('h0us3-script', plugins_url('h0us3-script.js', __FILE__), array(), false, true);
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'h0us3_load_recursos');
|
||||
function h0us3_reloj_shortcode() {
|
||||
ob_start(); ?>
|
||||
<div class="h0us3-reloj">
|
||||
<div id="h0us3-horas">00</div>
|
||||
<div id="h0us3-dos-puntos">:</div>
|
||||
<div id="h0us3-minutos">00</div>
|
||||
<div id="h0us3-dos-puntos">:</div>
|
||||
<div id="h0us3-segundos">00</div>
|
||||
<button id="h0us3-adelantar">Ir 30" al FUTURO</button>
|
||||
</div>
|
||||
<div><p id="h0us3-msg">Pulsa en el boton para saber lo que pasara en tu pagina dentro de 30 segundos</p></div>
|
||||
<?php
|
||||
$output = ob_get_clean();
|
||||
return $output;
|
||||
}
|
||||
add_shortcode('h0us3_reloj', 'h0us3_reloj_shortcode');
|
||||
|
||||
|
||||
//Funcionalidad de Backend//
|
||||
function h0us3_admin_load_recursos() {
|
||||
wp_enqueue_style('h0us3-style', plugins_url('h0us3-style.css', __FILE__));
|
||||
}
|
||||
add_action('admin_enqueue_scripts', 'h0us3_admin_load_recursos');
|
||||
|
||||
function h0us3_agregar_menu_configuracion() {
|
||||
add_menu_page(
|
||||
'Configuración de H0us3',
|
||||
'H0us3',
|
||||
'manage_options',
|
||||
'h0us3-config',
|
||||
'h0us3_pagina_opciones',
|
||||
plugins_url( 'assets/logomenu.png', __FILE__ ),
|
||||
'2'
|
||||
);
|
||||
}
|
||||
add_action('admin_menu', 'h0us3_agregar_menu_configuracion');
|
||||
|
||||
function h0us3_agregar_pagina_opciones() {
|
||||
add_options_page(
|
||||
'Configuración de H0us3',
|
||||
'H0us3',
|
||||
'manage_options',
|
||||
'h0us3-config',
|
||||
'h0us3_pagina_opciones',
|
||||
plugins_url( 'assets/logo.png', __FILE__ )
|
||||
);
|
||||
}
|
||||
add_action('admin_menu', 'h0us3_agregar_pagina_opciones');
|
||||
function h0us3_pagina_opciones() {
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1>Configuración de H0us3</h1>
|
||||
<p>Si te pensabas que ibas a encontrar algo estabas muy equivocado!!!!!!.</p>
|
||||
<p>Bueno, si lo que buscabas era algo de informacion te dire que si colocas '[h0us3_reloj]' en una pagina o entrada seras testigo del primer viaje espacio-temporal informatico de la historia </p>
|
||||
<span>(Siempre y cuando no te hayas tomado 'algo' antes, que entonces has comenzado el viaje antes de tiempo)</span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user