diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index fb8147f..f62f8e6 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -70,7 +70,7 @@ SQL ->select('ejaculations.*') ->with('user', 'tags') ->withLikes() - ->take(10) + ->take(21) ->get(); return view('home')->with(compact('informations', 'categories', 'globalEjaculationCounts', 'publicLinkedEjaculations')); diff --git a/app/MetadataResolver/MetadataResolver.php b/app/MetadataResolver/MetadataResolver.php index 83351db..8560d33 100644 --- a/app/MetadataResolver/MetadataResolver.php +++ b/app/MetadataResolver/MetadataResolver.php @@ -27,7 +27,7 @@ class MetadataResolver implements Resolver '~www\.patreon\.com/~' => PatreonResolver::class, '~www\.deviantart\.com/.*/art/.*~' => DeviantArtResolver::class, '~\.syosetu\.com/n\d+[a-z]{2,}~' => NarouResolver::class, - '~ci-en\.jp/creator/\d+/article/\d+~' => CienResolver::class, + '~ci-en\.(jp|net|dlsite\.com)/creator/\d+/article/\d+~' => CienResolver::class, '~www\.plurk\.com\/p\/.*~' => PlurkResolver::class, '~(adult\.)?contents\.fc2\.com\/article_search\.php\?id=\d+~' => FC2ContentsResolver::class, '~store\.steampowered\.com/app/\d+~' => SteamResolver::class, diff --git a/app/Utilities/Formatter.php b/app/Utilities/Formatter.php index 0adee69..6098388 100644 --- a/app/Utilities/Formatter.php +++ b/app/Utilities/Formatter.php @@ -75,4 +75,21 @@ class Formatter return $url; } + + /** + * imgタグのsrcsetで使用できる形式で、プロフィール画像URLを生成します。 + * @param object $user Userなど、getProfileImageUrl()が実装されているオブジェクト + * @param int $baseSize 1x解像度における画像サイズ + * @param int $maxDensity 最高密度 + * @return string srcset用の文字列 + */ + public function profileImageSrcSet($user, int $baseSize, int $maxDensity = 3) + { + $srcset = []; + for ($i = 1; $i <= $maxDensity; $i++) { + $srcset[] = $user->getProfileImageUrl($baseSize * $i) . " {$i}x"; + } + + return implode(',', $srcset); + } } diff --git a/dist/bin/php-debug.sh b/dist/bin/php-debug.sh new file mode 100755 index 0000000..ef526bc --- /dev/null +++ b/dist/bin/php-debug.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +export APP_DEBUG=true +exec tissue-entrypoint.sh php "$@" diff --git a/resources/assets/js/components/TagInput.vue b/resources/assets/js/components/TagInput.vue index be3458b..c1d10ef 100644 --- a/resources/assets/js/components/TagInput.vue +++ b/resources/assets/js/components/TagInput.vue @@ -41,7 +41,7 @@ case 'Enter': case ' ': if ((event as any).isComposing !== true) { - this.tags.push(this.buffer); + this.tags.push(this.buffer.trim()); this.buffer = ""; } event.preventDefault(); @@ -49,7 +49,7 @@ case 'Unidentified': // 実際にテキストボックスに入力されている文字を見に行く (フォールバック処理) if (event.srcElement && (event.srcElement as HTMLInputElement).value.slice(-1) == ' ') { - this.tags.push(this.buffer); + this.tags.push(this.buffer.trim()); this.buffer = ""; event.preventDefault(); } diff --git a/resources/assets/js/user/stats.js b/resources/assets/js/user/stats.js index 971b2ad..2bc1c7c 100644 --- a/resources/assets/js/user/stats.js +++ b/resources/assets/js/user/stats.js @@ -32,6 +32,10 @@ function createLineGraph(id, labels, data) { beginAtZero: true } }] + }, + tooltips: { + mode: 'index', + intersect: false, } } }); @@ -60,6 +64,10 @@ function createBarGraph(id, labels, data) { beginAtZero: true } }] + }, + tooltips: { + mode: 'index', + intersect: false, } } }); diff --git a/resources/views/components/ejaculation.blade.php b/resources/views/components/ejaculation.blade.php index 9635273..3d17540 100644 --- a/resources/views/components/ejaculation.blade.php +++ b/resources/views/components/ejaculation.blade.php @@ -1,7 +1,7 @@