コミットを比較
16 コミット
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
| e0be154325 | |||
| 3e97e3c4f4 | |||
| b9c990d6b5 | |||
| 506c29a32d | |||
| 535e44c4e7 | |||
| ba39be8551 | |||
| 52312b81bc | |||
| 05e4d668cd | |||
| 8bb3afb4aa | |||
| c077cff3ae | |||
| 743ee14c17 | |||
| 4897b014c6 | |||
| 251237f0e4 | |||
| 87def12aa2 | |||
| c631c4d776 | |||
| 274589b455 |
@@ -0,0 +1,44 @@
|
||||
export default class
|
||||
CommonModule
|
||||
{
|
||||
static
|
||||
isWide (chr)
|
||||
{
|
||||
return chr.match (/[^\x01-\x7f]/) !== null;
|
||||
}
|
||||
|
||||
static
|
||||
lenByFull (str)
|
||||
{
|
||||
return str.split ('').map (c => this.isWide (c) ? 1 : .5)
|
||||
.reduce ((a, c) => a + c);
|
||||
}
|
||||
|
||||
static
|
||||
indexByFToC (str, index)
|
||||
{
|
||||
let i = 0;
|
||||
let work = '';
|
||||
|
||||
for (let c of str)
|
||||
{
|
||||
work += c;
|
||||
|
||||
if (this.lenByFull (work) > index)
|
||||
break;
|
||||
|
||||
i += 1;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
static
|
||||
midByFull (str, start, length)
|
||||
{
|
||||
const trimmedLeft = str.slice (this.indexByFToC (str, start));
|
||||
|
||||
return trimmedLeft.slice (0, this.indexByFToC (trimmedLeft, length));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php if (!($available)): ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<strong>【警報】</strong>AIニジカが落ちてるぬ゛〜゛ん゛(泣)
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="container my-5">
|
||||
<div class="accordion mb-5" id="accordion-filter">
|
||||
<div class="accordion-item">
|
||||
|
||||
@@ -7,6 +7,11 @@ const LOG_PATH = './log.txt';
|
||||
|
||||
$log_data = [];
|
||||
|
||||
exec ("(ps -Af | grep -e '^miteruzo' | grep 'python3 main.py') && (ps -Af | grep -e '^miteruzo' | grep 'obs')",
|
||||
$output, $exit_code);
|
||||
$available = $exit_code === 0;
|
||||
unset ($output, $exit_code);
|
||||
|
||||
$page = (int) ($_GET['p'] ?? 1);
|
||||
$length = (int) ($_GET['max'] ?? 20);
|
||||
$asc = ($_GET['asc'] ?? 0) != 0;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
<script src="./talk.js?<?= filemtime ('./talk.js') ?>" type="text/javascript"></script>
|
||||
<script src="./talk.js?<?= filemtime ('./talk.js') ?>" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
+22
-2
@@ -1,3 +1,6 @@
|
||||
import CommonModule from './common_module.js';
|
||||
|
||||
|
||||
class
|
||||
Talk
|
||||
{
|
||||
@@ -46,10 +49,27 @@ Canvas
|
||||
this.putText (0, 0, 15, $ ('#dt').val ());
|
||||
this.putImage (this.nizika, 370, 260, 1.1);
|
||||
this.putImage (this.talking, 0, 0, 640 / 1024);
|
||||
this.putText (75, 43.75, 20, '> ' + $ ('#chat').val (),
|
||||
this.putText (75, 43.75, 20,
|
||||
('> ' + ((CommonModule.lenByFull ($ ('#chat').val ()) <= 21)
|
||||
? $ ('#chat').val ()
|
||||
: (CommonModule.midByFull ($ ('#chat').val (), 0, 19.5)
|
||||
+ '...'))),
|
||||
undefined, undefined,
|
||||
true);
|
||||
this.putText (62.5, 93.75, 31.25, $ ('#answer').val (), 'Nikumaru', '#c00000');
|
||||
this.putText (62.5, 93.75, 31.25,
|
||||
((CommonModule.lenByFull ($ ('#answer').val ()) <= 16)
|
||||
? $ ('#answer').val ()
|
||||
: CommonModule.midByFull ($ ('#answer').val (), 0, 16)),
|
||||
'Nikumaru', '#c00000');
|
||||
if (CommonModule.lenByFull ($ ('#answer').val ()) > 16)
|
||||
{
|
||||
this.putText (62.5, 125, 31.25,
|
||||
((CommonModule.lenByFull ($ ('#answer').val ()) <= 32)
|
||||
? CommonModule.midByFull ($ ('#answer').val (), 16, 16)
|
||||
: (CommonModule.midByFull ($ ('#answer').val (), 16, 14.5)
|
||||
+ '...')),
|
||||
'Nikumaru', '#c00000');
|
||||
}
|
||||
}
|
||||
|
||||
putBG ()
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@
|
||||
if ($_SERVER['HTTP_HOST'] === 'nizika.monster')
|
||||
header ('location: //nizika.tv/talk.php');
|
||||
|
||||
$dt = $_GET['dt'];
|
||||
$chat = $_GET['chat'];
|
||||
$answer = $_GET['answer'];
|
||||
$dt = htmlspecialchars ($_GET['dt']);
|
||||
$chat = htmlspecialchars ($_GET['chat']);
|
||||
$answer = htmlspecialchars ($_GET['answer']);
|
||||
|
||||
require_once './talk.frm.php';
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
require_once './forms/dev_info.frm.php';
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="stylesheet" href="./styles/style.css" />
|
||||
<title>ニジカもんすたぁ!! - このサイトについて</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php require_once './forms/header.frm.php' ?>
|
||||
|
||||
<main>
|
||||
<h1>ニジカもんすたぁ!! について</h1>
|
||||
<p>このサイトは,伊地知ニジカを愛で,愛でて,愛でまくることを目的としたサイトです.</p>
|
||||
<p>このサイトに関するソースは,すべて,<a href="http://miteruzo.ml:3000/miteruzo" target="_blank">運営の Git</a> に公開してあります.</p>
|
||||
<p>どなたでも自由に開発に参加することができます.</p>
|
||||
<p>詳細は該当リポジトリの Wiki 等を御参照ください.</p>
|
||||
</main>
|
||||
|
||||
<?php require_once './forms/footer.frm.php' ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="stylesheet" href="./styles/style.css" />
|
||||
<title>ニジカもんすたぁ!! - 開発者向け情報</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php require_once './forms/header.frm.php' ?>
|
||||
|
||||
<main>
|
||||
<h1>開発者向け情報</h1>
|
||||
|
||||
<p>詳細は <a href="http://miteruzo.ml:3000/miteruzo/nizika/wiki" target="_blank">Git 内 Wiki</a> を御覧ください.</p>
|
||||
</main>
|
||||
|
||||
<?php require_once './forms/footer.frm.php' ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<hr />
|
||||
|
||||
<footer>
|
||||
<p>このサイトでは,一部において,芳文社様をはじめとするさまざまな方の著作物を無許可で使用しております.</p>
|
||||
<p>それ以外の部分については,パブリック・ドメインとし,誰の知的財産にも属しないものとします.</p>
|
||||
</footer>
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<header>
|
||||
<ul id="global-menu">
|
||||
<li><a href="/top.php">トップ</a></li>
|
||||
<li><a href="/products">作品</a></li>
|
||||
<li><a href="/licence.php">社会契約</a></li>
|
||||
<li><a href="/dev_info.php">開発者向け情報</a></li>
|
||||
<li><a href="/about.php">このサイトについて</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="stylesheet" href="./styles/style.css" />
|
||||
<title>ニジカもんすたぁ!! - 社会契約</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php require_once './forms/header.frm.php' ?>
|
||||
|
||||
<main>
|
||||
<h1>社会契約</h1>
|
||||
</main>
|
||||
|
||||
<?php require_once './forms/footer.frm.php' ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+5
-1
@@ -2,13 +2,17 @@
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="stylesheet" href="./styles/style.css" />
|
||||
<title>ニジカもんすたぁ!! - トップ</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php require_once './forms/header.frm.php' ?>
|
||||
|
||||
<main>
|
||||
<p>ニジカもんすたぁ!! にようこそ!</p>
|
||||
<h1>ニジカもんすたぁ!! にようこそ!</h1>
|
||||
</main>
|
||||
|
||||
<?php require_once './forms/footer.frm.php' ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
require_once './forms/licence.frm.php';
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="stylesheet" href="../styles/style.css" />
|
||||
<title>ニジカもんすたぁ!! - 作品</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php require_once '../forms/header.frm.php' ?>
|
||||
|
||||
<main>
|
||||
<h1>作品一覧</h1>
|
||||
</main>
|
||||
|
||||
<?php require_once '../forms/footer.frm.php' ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
require_once './forms/index.frm.php';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
body
|
||||
{
|
||||
margin: 0 10%;
|
||||
}
|
||||
|
||||
#global-menu
|
||||
{
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
#global-menu > li
|
||||
{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
新しい課題から参照
ユーザをブロックする