mobile version, optimizations, navalny, welcome improved

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2024-03-20 20:16:11 +07:00
parent d774e1cf6e
commit 3e222f397a
13 changed files with 463 additions and 247 deletions

View File

@ -8,6 +8,9 @@ namespace mirzaev\site\repression\controllers;
use mirzaev\site\repression\controllers\core, use mirzaev\site\repression\controllers\core,
mirzaev\site\repression\models\views; mirzaev\site\repression\models\views;
// Фреймворк для сайта ipinfo.io
use ipinfo\ipinfo\IPinfo;
/** /**
* Контроллер основной страницы * Контроллер основной страницы
* *
@ -32,8 +35,11 @@ final class index_controller extends core
'iphone' => (bool) rand(0, 1), 'iphone' => (bool) rand(0, 1),
]; ];
// Получение дополнительных данных
$data = (array) (new IPinfo(require '../settings/ipinfo.php'))->getDetails($_SERVER['cf-connecting-ip'] ?? $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR']);
// Запись просмотра // Запись просмотра
views::increase(); views::increase($data);
// Инициализация счётчика просмотров // Инициализация счётчика просмотров
$this->variables['views'] = [ $this->variables['views'] = [
@ -44,6 +50,8 @@ final class index_controller extends core
'last' => views::last(10) 'last' => views::last(10)
]; ];
$this->variables['creepy'] = "{$data['continent']['name']}, {$data['country_name']}, {$data['city']}, {$data['latitude']}, {$data['longitude']}, {$data['org']}, {$data['ip']}, seen in extremist chats, seen in LGBTQ+ chats, anti-state activities, problems with studies, was in contact with a criminal group (2017), wears strange pants, suspect in the case of January 15, 2024 No. 2360501";
// Генерация представления // Генерация представления
return $this->view->render(DIRECTORY_SEPARATOR . 'index.html', $this->variables); return $this->view->render(DIRECTORY_SEPARATOR . 'index.html', $this->variables);
} }

View File

@ -8,9 +8,6 @@ namespace mirzaev\site\repression\models;
use mirzaev\arangodb\collection, use mirzaev\arangodb\collection,
mirzaev\arangodb\document; mirzaev\arangodb\document;
// Фреймворк для сайта ipinfo.io
use ipinfo\ipinfo\IPinfo;
// Библиотека для ArangoDB // Библиотека для ArangoDB
use ArangoDBClient\Document as _document; use ArangoDBClient\Document as _document;
@ -30,17 +27,25 @@ class views extends core
*/ */
final public const COLLECTION = 'views'; final public const COLLECTION = 'views';
public static function increase(array &$errors = []): ?bool /**
* Увеличить счётчик посещений используя данные пользователя из запроса
*
* @param ?array $data Дополнительные данные пользователя
*
* @return bool Записано в базу данных?
*/
public static function increase(array $data = null, array &$errors = []): bool
{ {
try { try {
if (collection::init(static::$arangodb->session, self::COLLECTION)) if (collection::init(static::$arangodb->session, self::COLLECTION))
if ($_SERVER['HTTP_USER_AGENT'] === 'nginx-ssl early hints') return null; if ($_SERVER['HTTP_USER_AGENT'] === 'nginx-ssl early hints') return null;
else if (document::write(static::$arangodb->session, self::COLLECTION, [ else if (document::write(static::$arangodb->session, self::COLLECTION, [
'ip' => $_SERVER['REMOTE_ADDR'] ?? null, 'ip' => $_SERVER['REMOTE_ADDR'] ?? null,
'cf-connecting-ip' => $_SERVER['cf-connecting-ip'] ?? null,
'x-forwarded-for' => $_SERVER['HTTP_X_FORWARDED_FOR'] ?? null, 'x-forwarded-for' => $_SERVER['HTTP_X_FORWARDED_FOR'] ?? null,
'referer' => $_SERVER['HTTP_REFERER'] ?? null, 'referer' => $_SERVER['HTTP_REFERER'] ?? null,
'useragent' => $_SERVER['HTTP_USER_AGENT'] ?? null 'useragent' => $_SERVER['HTTP_USER_AGENT'] ?? null
] + (array) (new IPinfo(require '../settings/ipinfo.php'))->getDetails($_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR']))) return true; ] + $data)) return true;
else throw new exception('Не удалось создать аккаунт'); else throw new exception('Не удалось создать аккаунт');
else throw new exception('Не удалось инициализировать коллекцию'); else throw new exception('Не удалось инициализировать коллекцию');
} catch (exception $e) { } catch (exception $e) {

View File

@ -81,11 +81,16 @@ button[disabled]:is(:hover, :active) {
background-color: var(--button-light-red); background-color: var(--button-light-red);
} }
body { body {
--padding-vertical: min(200px, 20vh);
margin: 0; margin: 0;
position: relative; position: relative;
height: 100vh; width: 100vw;
overflow-x: hidden; height: 100%;
padding-top: var(--padding-vertical);
padding-bottom: var(--padding-vertical);
overflow-x: clip;
background-color: black; background-color: black;
} }
@ -120,7 +125,7 @@ body > aside {
body>article { body>article {
position: relative !important; position: relative !important;
margin: 20vh auto 0 !important; margin: 0 auto !important;
width: 800px !important; width: 800px !important;
border-radius: 10px; border-radius: 10px;
background-color: var(--background-dark); background-color: var(--background-dark);
@ -153,6 +158,7 @@ body > article > header {
clip-path: border-box; clip-path: border-box;
border-radius: 0px 0px 10px 10px; border-radius: 0px 0px 10px 10px;
background-color: var(--background-dark); background-color: var(--background-dark);
} }
body>article>header>section { body>article>header>section {
@ -166,6 +172,7 @@ body > article > header > section {
body>article>header>section>h1 { body>article>header>section>h1 {
font-size: 2.5rem; font-size: 2.5rem;
margin: auto; margin: auto;
text-align: center;
color: red; color: red;
} }
@ -183,18 +190,17 @@ body > section.block {
} }
body>section.block { body>section.block {
box-sizing: border-box;
border-radius: 10px; border-radius: 10px;
margin: 20px auto 0; margin: 20px auto 0;
width: 700px; width: 800px;
padding: 30px 50px; padding: 30px 50px;
display: block;
} }
body>article>main { body>article>main {
padding-top: 10px; padding-top: 10px;
border-radius: 0 0 10px 10px; border-radius: 0 0 10px 10px;
/* box-shadow: 1px 6px 11px 3px rgba(0,0,0,0.6);
-webkit-box-shadow: 1px 6px 11px 3px rgba(0,0,0,0.6);
-moz-box-shadow: 1px 6px 11px 3px rgba(0,0,0,0.6); */
} }
body>article>main>section { body>article>main>section {
@ -313,7 +319,7 @@ body > article > main > section > img {
} }
body>article>main>section#conclusion { body>article>main>section#conclusion {
height: 425px; margin-bottom: 50px;
} }
body>article>main>section#conclusion>h2 { body>article>main>section#conclusion>h2 {
@ -458,17 +464,24 @@ body > section#contacts > section#links {
} }
body>section#views { body>section#views {
display: flow-root;
}
body>section#views>h3 {
margin: 0 0 15px;
height: 1.4rem;
display: flex; display: flex;
gap: 25px;
} }
body>section#views>section { body>section#views>section {
float: left;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
} }
body>section#views>section:first-of-type { body>section#views>section:first-of-type {
margin-right: 25px;
width: calc(80% - 25px); width: calc(80% - 25px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -479,16 +492,6 @@ body > section#views > section:last-of-type {
width: 20% width: 20%
} }
body > section#views > section:last-of-type > p:first-of-type {
margin-top: calc(1.3rem + 15px);
}
body > section#views > section > h3 {
margin: 0 0 15px;
height: 1.4rem;
display: flex;
}
body>section#views>section>h3>i.icon { body>section#views>section>h3>i.icon {
margin-left: auto; margin-left: auto;
} }
@ -507,6 +510,7 @@ body > section#views > section > p:not(:last-of-type) {
body>section#views>section:first-of-type>p>span:nth-of-type(2) { body>section#views>section:first-of-type>p>span:nth-of-type(2) {
margin-right: auto; margin-right: auto;
max-width: 150px; max-width: 150px;
min-width: 50px;
} }
body>section#views>section>p>span, body>section#views>section>p>span,
@ -579,8 +583,112 @@ body > section#license > img {
transition: 5s; transition: 5s;
} }
@media (max-width: 800px) { body>svg#navalny2 {
width: 800px;
height: 300px;
padding: unset;
}
body>section#navalny {
width: 800px;
height: 190px;
padding: unset;
cursor: pointer;
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-mask-image: url(#NAVALNY);
-webkit-mask-size: contain;
-webkit-mask-position: center;
-webkit-mask-repeat: no-repeat;
mask-image: url(#NAVALNY);
mask-size: contain;
mask-position: center;
mask-repeat: no-repeat;
-webkit-backdrop-filter: saturate(100%) hue-rotate(230deg) blur(22px);
backdrop-filter: saturate(100%) hue-rotate(230deg) blur(22px);
background-color: rgba(0, 3, 210, 0.05);
}
body>section#navalny:hover {
-webkit-backdrop-filter: saturate(600%) hue-rotate(240deg) blur(18px);
backdrop-filter: saturate(600%) hue-rotate(240deg) blur(18px);
background-color: rgba(0, 3, 210, 0.1);
}
@media (max-width: 840px) {
body { body {
padding-bottom: unset; padding-top: unset;
padding-bottom: 20px;
}
body>article>header {
position: relative;
}
body>article {
width: 100% !important;
margin: unset;
border-radius: unset;
}
body>article>div#cover,
body>article>main {
border-radius: unset;
}
body>article>main {
box-shadow: 1px 6px 11px 3px rgba(0, 0, 0, 0.6);
-webkit-box-shadow: 1px 6px 11px 3px rgba(0, 0, 0, 0.6);
-moz-box-shadow: 1px 6px 11px 3px rgba(0, 0, 0, 0.6);
}
body>section.block {
width: calc(100% - 40px) !important;
margin-left: 20px !important;
margin-right: 20px !important;
}
mask#NAVALNY>text {
font-size: calc(5rem - (5rem - 17vw)) !important;
transform: translate(0, 120px) !important;
}
}
@media (max-width: 710px) {
body>article>header {
height: calc(140px + (110px - 20vw));
}
body>article>header>section>h1 {
padding: 0 10vw;
}
}
@media (max-width: 600px) {
body>section.block#views>h3 {
display: block;
text-align: center;
}
body>section.block#views>section:first-of-type>p>span:nth-of-type(3) {
display: none;
}
body>section.block#views>section:first-of-type {
margin-right: 0;
margin-bottom: 15px;
width: 100%;
}
body>section.block#views>section:last-of-type {
width: 100%;
}
}
@media (max-width: 430px) {
body>article>header>section>h1 {
padding: 0 5vw;
} }
} }

View File

@ -12,7 +12,7 @@ section.popup {
} }
section.popup>div.wrap { section.popup>div.wrap {
width: 320px; width: 330px;
padding: 30px 25px; padding: 30px 25px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -23,11 +23,12 @@ section.popup>div.wrap {
section.popup>div.wrap>h4 { section.popup>div.wrap>h4 {
margin: auto; margin: auto;
margin-bottom: 8px;
padding-top: 8px; padding-top: 8px;
font-size: 1.6rem; font-size: 1.8rem;
} }
section.popup>div.wrap>p { section.popup>div.wrap>:is(p, ul) {
margin: 0px 20px; margin: 0px 20px;
} }
@ -49,8 +50,24 @@ section.popup>div.wrap>div.row>button:first-child {
section.popup>div.wrap>div.row>button:last-child { section.popup>div.wrap>div.row>button:last-child {
margin-right: auto; margin-right: auto;
flex-grow: 1;
} }
section.popup>div.wrap>div.row>button[disabled]:is(:hover, :active) { section.popup>div.wrap>div.row>button[disabled]:is(:hover, :active) {
cursor: none; cursor: none;
} }
@media (max-width: 430px) {
section.popup>div.wrap {
width: 100vw;
margin: auto 25px;
}
}
@media (max-width: 330px) {
section.popup>div.wrap {
width: 100vw;
margin: unset;
border-radius: unset;
}
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!-- Created using Krita: https://krita.org -->
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:krita="http://krita.org/namespaces/svg/krita"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
width="648.72pt"
height="98.16pt"
viewBox="0 0 648.72 98.16">
<defs/>
<text id="shape0" krita:useRichText="true" text-rendering="auto" krita:textVersion="3" transform="translate(25.679998194793, 33.4399986334414)" fill="#000000" stroke-opacity="0" stroke="#000000" stroke-width="0" stroke-linecap="square" stroke-linejoin="bevel" letter-spacing="0" text-anchor="middle" word-spacing="0" style="text-align: start;text-align-last: auto;font-family: Gidugu;font-size: 200;"><tspan x="329.0390625">NAVALNY</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

View File

@ -4,9 +4,9 @@
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<section id="account"> <!-- <section id="account">
<button id="login" title="Authentication" onclick="return account.authentication()"><i class='icon authentication'></i></button> <button id="login" title="Authentication" onclick="return account.authentication()"><i class='icon authentication'></i></button>
</section> </section> -->
{% endblock %} {% endblock %}
{% block js %} {% block js %}

View File

@ -4,7 +4,7 @@
{% block meta %} {% block meta %}
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=800px" /> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=3" />
<meta name="HandheldFriendly" content="true" /> <meta name="HandheldFriendly" content="true" />
<meta name="MobileOptimized" content="width" /> <meta name="MobileOptimized" content="width" />
<meta content='yes' name='apple-mobile-web-app-capable' /> <meta content='yes' name='apple-mobile-web-app-capable' />
@ -35,13 +35,26 @@
<meta property="twitter:description" <meta property="twitter:description"
content="I was kidnapped and recruited by Wagner PMC in Khabarovsk due to anti-government posts on my blog"> content="I was kidnapped and recruited by Wagner PMC in Khabarovsk due to anti-government posts on my blog">
<meta property="twitter:image" content="https://repression.mirzaev.sexy/images/mirzaev.jpg"> <meta property="twitter:image" content="https://repression.mirzaev.sexy/images/mirzaev.jpg">
<link rel="icon" type="image/gif" href="/images/favicon/favicon.gif"> <link rel="icon" type="image/gif" href="/images/favicon/favicon_alternative.gif">
<script> <script>
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
// Не смартфон
const e = document.querySelector('link[rel=icon]'); const e = document.querySelector('link[rel=icon]');
let i = 0; // let i = 0;
setTimeout(fn => setInterval("e.href = '/images/favicon_2/' + (++i > 69 ? i = 0 : i) + '.gif'", 150), 5000); // setTimeout(fn => setInterval(fn => e.href = '/images/favicon_2/' + (++i > 69 ? i = 0 : i) + '.gif', 150), 60000);
if (/Firefox/i.test(navigator.userAgent)) {
// Firefox
e.href = '/images/favicon/favicon.gif';
}
}
</script> </script>
<script> <script>
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
// Не смартфон
setTimeout(fn => { setTimeout(fn => {
const buffer = document.title; const buffer = document.title;
const length = buffer.length; const length = buffer.length;
@ -54,8 +67,9 @@
setInterval(fn => { setInterval(fn => {
for(let i = 8; --i > 0;) document.title = document.title.replaceAt(Math.random() * length, symbols[Math.floor(Math.random() * _length)]); for(let i = 8; --i > 0;) document.title = document.title.replaceAt(Math.random() * length, symbols[Math.floor(Math.random() * _length)]);
setTimeout(fn => document.title = buffer, 20); setTimeout(fn => document.title = buffer, 20);
}, 600); }, 300);
}, 5000); }, 20000);
}
</script> </script>
{% for meta in head.metas %} {% for meta in head.metas %}
<meta {% for name, value in meta.attributes %}{{name}}="{{value}}" {% endfor %} /> <meta {% for name, value in meta.attributes %}{{name}}="{{value}}" {% endfor %} />

View File

@ -71,11 +71,11 @@
</section> </section>
</section> </section>
<section id="views" class="block"> <section id="views" class="block">
<section>
<h3> <h3>
Last 10 unique views Last 10 unique views
<!-- <i class="icon eye"></i> --> <!-- <i class="icon eye"></i> -->
</h3> </h3>
<section>
{% for view in views.last %} {% for view in views.last %}
<p> <p>
<span title="{{ view.country_name }}" class="unselectable">{{ view.country_flag.emoji }}</span> <span title="{{ view.country_name }}" class="unselectable">{{ view.country_flag.emoji }}</span>
@ -83,7 +83,8 @@
{% if view.referer is not null %}<samp>(<small title="{{ view.referer }}&lrm;">{{ view.referer {% if view.referer is not null %}<samp>(<small title="{{ view.referer }}&lrm;">{{ view.referer
}}&lrm;</small>)</samp>{% endif %} }}&lrm;</small>)</samp>{% endif %}
<span title="{{ view.useragent }}">{{ view['x-forwarded-for'] ?? view.ip }}</span> <span title="{{ view.useragent }}">{{ view['x-forwarded-for'] ?? view.ip }}</span>
<span title="{{ view.created }}" data-date-convert="title" data-date-convert-format="year.month.day hour:minute:second"> <span title="{{ view.created }}" data-date-convert="title"
data-date-convert-format="year.month.day hour:minute:second">
<b data-date-convert="value">{{ view.created }}</b> <b data-date-convert="value">{{ view.created }}</b>
</span> </span>
</p> </p>
@ -111,10 +112,23 @@
<span>0. You just DO WHAT THE FUCK YOU WANT TO.</span> <span>0. You just DO WHAT THE FUCK YOU WANT TO.</span>
</p> </p>
<img src="/images/pmc_boykisser.png" alt="PMC Boykisser Group" class="unselectable" ondragstart="return false"> <img style="rotate: 30deg" src="/images/pmc_boykisser.png" alt="PMC Boykisser Group" class="unselectable" ondragstart="return false">
</section> </section>
<section id="navalny" class="block unselectable" onclick="location.href = 'https://en.wikipedia.org/wiki/Death_and_funeral_of_Alexei_Navalny'">
<svg style="width: 100%;">
<mask id="NAVALNY" width="100%" height="100%" x="0%" y="0%" >
<text fill="#ffffff"
style="font-family: commissioner;font-size: 9.5rem;font-weight: bold; transform: translate(0px, 150px)"
x="50%" text-anchor="middle">
<tspan>NAVALNY</tspan>
</text>
</mask>
</svg>
</section>
<!-- <section data-layer><video src="/videos/bahmut.mp4" poster="/images/misha.png" width="100%" muted="false" loop="true" autoplay></video></section> --> <!-- <section data-layer><video src="/videos/bahmut.mp4" poster="/images/misha.png" width="100%" muted="false" loop="true" autoplay></video></section> -->
<section data-layer-color="red" data-layer-width="50" data-layer-height="35" data-layer-speed="0.003" data-layer> <section data-layer-color="red" data-layer-width="50" data-layer-height="40" data-layer-speed="0.0004" data-layer>
<canvas class="shell"></canvas> <canvas class="shell"></canvas>
</section> </section>
<!-- <section data-layer-color="blue" data-layer-width="100" data-layer-height="160" data-layer-speed="0.004" data-layer> <!-- <section data-layer-color="blue" data-layer-width="100" data-layer-height="160" data-layer-speed="0.004" data-layer>
@ -123,10 +137,10 @@
<canvas class="shell"></canvas></section> <canvas class="shell"></canvas></section>
--> -->
<svg> <svg style="position: absolute; width: 0px; height: 0px; opacity: 0;">
<defs> <defs>
<filter id="blob"> <filter id="blob">
<feGaussianBlur in="SourceGraphic" stdDeviation="24" result="blur"></feGaussianBlur> <feGaussianBlur in="SourceGraphic" stdDeviation="28" result="blur"></feGaussianBlur>
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9" result="blob"> <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9" result="blob">
</feColorMatrix> </feColorMatrix>
</filter> </filter>
@ -224,15 +238,15 @@
layers.blur = false; layers.blur = false;
layers.generate(0); layers.generate(0);
window.addEventListener("wheel", function(e) { //window.addEventListener("wheel", function(e) {
const layer = document.querySelectorAll('[data-layer]')[layers.current()].lastElementChild.getBoundingClientRect(); // const layer = document.querySelectorAll('[data-layer]')[layers.current()].lastElementChild.getBoundingClientRect();
// У слоёв есть отрицательный margin а так же height за пределами 100% // У слоёв есть отрицательный margin а так же height за пределами 100%
//const offset = window.innerHeight * 12.5 / 100; //const offset = window.innerHeight * 12.5 / 100;
//if (e.wheelDelta > 0 && layer.bottom - offset * 2 <= window.innerHeight) layers.next(); //if (e.wheelDelta > 0 && layer.bottom - offset * 2 <= window.innerHeight) layers.next();
//else if (layer.top + offset >= 0) layers.previous(); //else if (layer.top + offset >= 0) layers.previous();
}); //});
for (const shell of document.querySelectorAll('section[data-layer]>[class=shell]')) { for (const shell of document.querySelectorAll('section[data-layer]>[class=shell]')) {
// Перебор оболочек // Перебор оболочек
@ -240,19 +254,19 @@
if (layer instanceof w.detail.womb) { if (layer instanceof w.detail.womb) {
// Перебор слоёв // Перебор слоёв
// Инициализация цвета слоя // Инициализация цвета
const color = shell.parentElement.getAttribute('data-layer-color'); const color = shell.parentElement.getAttribute('data-layer-color');
// Инициализация цвета слоя // Инициализация ширины
const width = +shell.parentElement.getAttribute('data-layer-width'); const width = +shell.parentElement.getAttribute('data-layer-width');
// Инициализация цвета слоя // Инициализация высоты
const height = +shell.parentElement.getAttribute('data-layer-height'); const height = +shell.parentElement.getAttribute('data-layer-height');
// Инициализация цвета слоя // Инициализация скорости
const speed = +shell.parentElement.getAttribute('data-layer-speed'); const speed = +shell.parentElement.getAttribute('data-layer-speed');
// Инициализация динамичности слоя // Инициализация динамичности
let offset = Math.random() * 100; let offset = Math.random() * 100;
// Удалось инициализировать слой // Удалось инициализировать слой
@ -261,11 +275,15 @@
layer.block.height = height; layer.block.height = height;
layer.generate(offset += speed, color); layer.generate(offset += speed, color);
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
// Не смартфон
// Инициализация сдвига // Инициализация сдвига
setInterval(function() { setInterval(function() {
layer.dump(); layer.dump();
layer.generate(offset += speed, color); layer.generate(offset += speed, color);
}, 30); }, 120);
window.addEventListener('resize', function(e) { window.addEventListener('resize', function(e) {
layer.init(); layer.init();
@ -273,6 +291,7 @@
layer.generate(offset += speed, color); layer.generate(offset += speed, color);
}, true); }, true);
} }
}
} }
}); });
}); });
@ -308,6 +327,9 @@
const boykisser = document.getElementById('license').getElementsByTagName('img')[0]; const boykisser = document.getElementById('license').getElementsByTagName('img')[0];
//if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
// Не смартфон
// Initialize iterator // Initialize iterator
let r = 0; let r = 0;
@ -315,7 +337,8 @@
// Found element // Found element
// Rotate // Rotate
setInterval('boykisser.style.rotate = --r + "deg"', 240); //setInterval(fn => boykisser.style.rotate = --r + "deg", 240);
} }
//} else boykisser.remove();
</script> </script>
{% endblock %} {% endblock %}

View File

@ -3,23 +3,47 @@
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<section class="popup"> <video style="z-index: 999999; position: fixed; left: 0; top: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; display: none; object-fit: cover;
cursor: none;" id="end" class="unselectable"src="/videos/end.mp4" poster="/images/misha.png" ondragstart="return false"></video>
<video style="z-index: 999999; position: fixed; left: 0; top: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; display: none; object-fit: cover;
cursor: none;" id="end_post" class="unselectable"src="/videos/end_post.mp4" poster="/images/misha.png" ondragstart="return false"></video>
<section id="welcome" class="popup" style="display: none">
<div class="wrap"> <div class="wrap">
<h4>WARNING</h4> <h4>WARNING</h4>
<ul>
<li><b>Bright</b> graphics libraries</li>
<li>Can be <b>screamers</b></li>
<li>Political content</li>
<li>Sounds and music</li>
<li><b>Cruel</b> information</li>
<li><b>Cringe</b> information</li>
</ul>
<p> <p>
My site uses my <b>bright</b> graphics libraries, be careful. If you are from Russia, then <b>refrain</b> from distributing this material
</p>
<p>
If you are from Russia, then refrain from distributing this material - it is <b>dangerous for your life</b>
</p> </p>
<div class="row separated"> <div class="row separated">
<button <button
onclick="this.parentElement.parentElement.parentElement.remove();"> onclick="this.parentElement.parentElement.parentElement.remove();">
I understand I understand
</button> </button>
<button onclick="bebra.what.play(); alert('I know your geolocation'); this.disabled = true">I didn't <button
onclick="bebra.what.play(); this.innerText = 'I see you'; setTimeout(fn => {alert('{{ creepy }}'); this.removeAttribute('onmouseover'); this.removeAttribute('onmouseleave'); setTimeout(fn => this.innerText = 'you have 5 minutes', 10); setTimeout(fn => this.innerText = 'you have 4 minutes', 60010); setTimeout(fn => this.innerText = 'you have 3 minutes', 120010); setTimeout(fn => this.innerText = 'you have 2 minutes', 180010); setTimeout(fn => this.innerText = 'you have 1 minute', 240010); setTimeout(fn => { const end = document.getElementById('end'); end.style.display = 'block'; this.parentElement.parentElement.parentElement.remove(); end.play(); end.onended = fn => {end.remove(); const end_post = document.getElementById('end_post'); end_post.style.display = 'block'; end_post.play(); end_post.onended = fn => {end_post.remove(); body.innerText = 'теперь посмотри на свою страницу вконтакте'; body.classList.add('unselectable'); body.setAttribute('style', 'color: #1f2631; text-align: end; margin-right: 10vw; width: 90vw; margin-top: 60vh; overflow-y: hidden;')};}}, 320010); this.disabled = true; }, 10);"
onmouseover="this.innerText = 'Are you sure?'"
onmouseleave="this.innerText = 'I did not understand'"
>I did not
understand</button> understand</button>
</div> </div>
</div> </div>
</section> </section>
<script>
const welcome = e => {
if(e.deltaY >= 0) {
window.removeEventListener('wheel', welcome);
document.getElementById('welcome').removeAttribute('style');
}
};
window.addEventListener('wheel', welcome);
</script>
{% endblock %} {% endblock %}

View File

@ -31,8 +31,12 @@
// Вызов события о том, что шутник инициализирован // Вызов события о том, что шутник инициализирован
document.dispatchEvent(new CustomEvent("troller.initialized")); document.dispatchEvent(new CustomEvent("troller.initialized"));
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
// Не смартфон
// Активация изображения при потере фокуса с окна // Активация изображения при потере фокуса с окна
setTimeout(() => bebra.what.enable(), 300000); setTimeout(() => bebra.what.enable(), 300000);
}
setTimeout(() => bebra.furgal.start(true), 120000); setTimeout(() => bebra.furgal.start(true), 120000);