diff --git a/app/Controllers/Admin/AuditsController.php b/app/Controllers/Admin/AuditsController.php index 3867ea30..b4d6b4d7 100644 --- a/app/Controllers/Admin/AuditsController.php +++ b/app/Controllers/Admin/AuditsController.php @@ -45,7 +45,6 @@ class AuditsController extends MainController 'uid' => Base::getUid(), 'data' => [ 'sheet' => $sheet, - 'type' => $type, 'type' => 'audits', 'pagesCount' => ceil($pagesCount / $this->limit), 'pNum' => $page, diff --git a/app/Libraries/Content.php b/app/Libraries/Content.php index 15659d70..91bee9ac 100644 --- a/app/Libraries/Content.php +++ b/app/Libraries/Content.php @@ -13,6 +13,7 @@ class Content if ($type == 'text') { $text = $Parsedown->text($content); $text = self::parseVideo($text); + $text = self::parseSpoiler($text); } else { $text = $Parsedown->line($content); } @@ -38,6 +39,16 @@ class Content return $content; } + public static function parseSpoiler($content) + { + $regexp = '/\{spoiler(?!.*\{spoiler)(\s?)(?(1)(.*?))\}(.*?)\{\/spoiler\}/is'; + while (preg_match($regexp, $content)) { + $content = preg_replace($regexp, "
" . Translate::get('see more') . "$2$3
", $content); + } + + return $content; + } + // Парсинг user login / uid public static function parseUser($content, $with_user = false, $to_uid = false) { diff --git a/app/ThirdParty/Parsedown/MyParsedown.php b/app/ThirdParty/Parsedown/MyParsedown.php index 526e99e9..510638e9 100644 --- a/app/ThirdParty/Parsedown/MyParsedown.php +++ b/app/ThirdParty/Parsedown/MyParsedown.php @@ -5,17 +5,15 @@ class MyParsedown extends Parsedown { - - private $baseImagePath; - - + function __construct() { - $this->InlineTypes['{'][]= 'ColoredText'; + $this->InlineTypes['{'][] = 'ColoredText'; $this->inlineMarkerList .= '{'; - // $this->baseImagePath = Config::get('meta.url'); + // $this->baseImagePath = Config::get('meta.url'); + $this->InlineTypes[':'][] = 'Emoji'; } - + protected function element(array $Element) { if ($this->safeMode) { @@ -28,8 +26,8 @@ class MyParsedown extends Parsedown $server_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null; $href_host = isset($Element['attributes']['href']) ? parse_url($Element['attributes']['href'], PHP_URL_HOST) : null; - // Add a list of allowed urls to the config? - if ($server_host != $href_host) { + // Add a list of allowed urls to the config? + if ($server_host != $href_host) { $Element['attributes']['target'] = '_blank'; $Element['attributes']['rel'] = 'noopener nofollow ugc'; } @@ -54,29 +52,26 @@ class MyParsedown extends Parsedown if (isset($Element['handler'])) { $markup .= $this->{$Element['handler']}($Element['text'], $Element['nonNestables']); - } - else { + } else { $markup .= self::escape($Element['text'], true); } $markup .= ''; - } - else { + } else { $markup .= ' />'; } return $markup; - } - + } + protected function inlineColoredText($excerpt) { - if (preg_match('/^{c:([#\w]\w+)}(.*?){\/c}/', $excerpt['text'], $matches)) - { + if (preg_match('/^{c:([#\w]\w+)}(.*?){\/c}/', $excerpt['text'], $matches)) { return array( // How many characters to advance the Parsedown's // cursor after being done processing this tag. - 'extent' => strlen($matches[0]), + 'extent' => strlen($matches[0]), 'element' => array( 'name' => 'span', 'text' => $matches[2], @@ -88,8 +83,35 @@ class MyParsedown extends Parsedown ); } } - - // Добавим url домен в тело контента + + protected function inlineEmoji($Excerpt) + { + if (preg_match('/\:(\w+)\:/mUs', $Excerpt['text'], $matches)) { + $path = HLEB_PUBLIC_DIR . "/assets/images/emoji/" . $matches[1]; + $file_ext = ""; + if (file_exists($path . ".png")) + $file_ext = ".png"; + else if (file_exists($path . ".gif")) + $file_ext = ".gif"; + if ($file_ext === "") + return; + return [ + 'extent' => strlen($matches[0]), + 'element' => [ + 'name' => 'img', + 'handler' => 'line', + 'attributes' => [ + 'class' => 'w18 h18 inline', + 'src' => '/assets/images/emoji/' . $matches[1] . $file_ext, + 'alt' => ':' . $matches[1] . ':', + 'title' => ':' . $matches[1] . ':' + ], + ] + ]; + } + } + + // Добавим url домена в тело контента /* protected function inlineImage($excerpt) { $image = parent::inlineImage($excerpt); @@ -103,6 +125,4 @@ class MyParsedown extends Parsedown return $image; } */ - - -} \ No newline at end of file +} diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 6477dd76..c3f0f4da 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1,2 +1,5 @@ @charset "UTF-8"; -html{height:100%;overflow-y:scroll}*,*::before,*::after{box-sizing:border-box}:active,:hover,:focus{outline:0;outline-offset:0}body{line-height:1.375;font-family:-apple-system, BlinkMacSystemFont, Arial, sans-serif}a{color:#275ec2;cursor:pointer;text-decoration:none}a:hover,a:focus,a.active{color:#0085EE}img{border-radius:3px;vertical-align:middle}.top0{top:0}.top80{top:80px}.right0{right:0}.bottom0{bottom:0}.left0{left:0}.mr-auto{margin:0 auto}.ml-auto{margin-left:auto}.-mr-1{margin-right:-0.5rem}.-mt20{margin-top:-20px}.-mt50{margin-top:-50px}.m0{margin:0}.mt0{margin-top:0}.mr0{margin-right:0}.mb0{margin-bottom:0}.ml0{margin-left:0}.m5{margin:5px}.mt5{margin-top:5px}.mr5{margin-right:5px}.mb5{margin-bottom:5px}.ml5{margin-left:5px}.m10{margin:10px}.mt10{margin-top:10px}.mr10{margin-right:10px}.mb10{margin-bottom:10px}.ml10{margin-left:10px}.m115{margin:15px}.mt15{margin-top:15px}.mr15{margin-right:15px}.mb15{margin-bottom:15px}.ml15{margin-left:15px}.m120{margin:20px}.mt20{margin-top:20px}.mr20{margin-right:20px}.mb20{margin-bottom:20px}.ml20{margin-left:20px}.mt60{margin-top:60px}.mr30{margin-right:30px}.mr60{margin-right:60px}.ml30{margin-left:30px}.ml45{margin-left:45px}.ml60{margin-left:60px}.p0{padding:0}.pt0{padding-top:0}.pr0{padding-right:0}.pb0{padding-bottom:0}.pl0{padding-left:0}.p5{padding:5px}.pt5{padding-top:5px}.pr5{padding-right:5px}.pb5{padding-bottom:5px}.pl5{padding-left:5px}.p10{padding:10px}.pt10{padding-top:10px}.pr10{padding-right:10px}.pb10{padding-bottom:10px}.pl10{padding-left:10px}.p15{padding:15px}.pt15{padding-top:15px}.pr15{padding-right:15px}.pb15{padding-bottom:15px}.pl15{padding-left:15px}.p20{padding:20px}.pt20{padding-top:20px}.pr20{padding-right:20px}.pb20{padding-bottom:20px}.pl20{padding-left:20px}.pt60{padding-top:60px}.pt160{padding-top:160px}.black{color:#222}.gray{color:#5b7083}.gray-light{color:#666}.gray-light-2{color:#919191}.green{color:#318407}.blue{color:#0085EE}.white{color:#fff}.red{color:#e45735}.mazarine{color:#688ffb}.white-hover:hover{color:#fff}.blue-hover:hover{color:#0085EE}.gray-hover:hover{color:#ece5e5}.gray-light-hover:hover{color:#333}.bg-white{background-color:#fff}.bg-red-100{background-color:#fde7e9}.bg-red-300{background-color:#f7b1b1}.bg-red-500{background-color:#e85c61}.bg-orange-100{background-color:#fdeed1}.bg-orange-300{background-color:#f6b65c}.bg-yellow-100{background-color:#fffde4}.bg-yellow-300{background-color:#f6da52}.bg-yellow-500{background-color:#d29507}.bg-green-100{background-color:#e1f7eb}.bg-green-200{background-color:#f3f1ed}.bg-green-300{background-color:#98d9b7}.bg-green-400{background-color:#5cb379}.bg-green-500{background-color:#44a675}.bg-teal-100{background-color:#ddf2f5}.bg-teal-300{background-color:#7fced5}.bg-blue-100{background-color:#e1effc}.bg-blue-300{background-color:#8bc2f8}.bg-blue-400{background-color:#5fa7f3}.bg-blue-500{background-color:#3c91ec}.bg-blue-800{background-color:#0085EE}.bg-indigo-100{background-color:#e2efff}.bg-indigo-300{background-color:#a1befa}.bg-purple-100{background-color:#f0e9fb}.bg-purple-300{background-color:#cbb2f6}.bg-gray-000{background-color:#f8f9fa}.bg-gray-100{background-color:#f5f7fa}.bg-gray-200{background-color:#f2f2f2}.bg-gray-300{background-color:#dee2e6}.bg-gray-400{background-color:#ced4da}.bg-gray-700{background-color:#495057}.bg-gray-800{background-color:#343a40}.bg-gray-900{background-color:#212529}.box-shadow{box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2)}.box-shadow-all{box-shadow:0 4px 14px rgba(0, 0, 0, 0.15)}.br-box-gray{border:1px solid #ededed}.br-box-blue{border:1px solid #0085EE}.br-top-dotted{border:1px dotted #ddd}.br-bottom{border-bottom:1px solid #ddd}.border-bottom:last-child{border:0}.br-rd3{border-radius:3px}.br-rd5{border-radius:5px}.br-rd20{border-radius:20px}.br-rd-42{border-radius:42%}.br-rd-50{border-radius:50%}.bg-hover-green:hover{background-color:#5fb878}.bg-hover-gray:hover{background-color:#f5f7fa}.bg-hover-blue:hover{background-color:#0085EE}.bg-hover-light-blue:hover{background-color:#31A2FA}.bg-hover-light:hover{background-color:rgba(0, 154, 97, 0.08)}.w-auto{width:auto}.w-20{width:20%}.w-30{width:30%}.w-40{width:40%}.w-50{width:50%}.w-70{width:70%}.w-90{width:90%}.w-100{width:100%}.w10{width:10px}.w18{width:18px}.w21{width:21px}.w24{width:24px}.w30{width:30px}.w34{width:34px}.w44{width:44px}.w54{width:54px}.w64{width:64px}.w94{width:94px}.w110{width:110px}.w130{width:130px}.w160{width:160px}.w200{width:200px}.w400{width:400px}.max-w-100{max-width:100%}.min-w165{min-width:165px}.max-w200{max-width:200px}.max-w300{max-width:300px}.max-w460{max-width:460px}.max-w640{max-width:640px}.max-w780{max-width:780px}.max-width{max-width:1636px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.h10{height:10px}.h18{height:18px}.h20{height:20px}.h24{height:24px}.h30{height:30px}.h40{height:40px}.h44{height:44px}.h120{height:120px}.h150{height:150px}.size-13{font-size:0.8125rem}.size-14{font-size:0.875rem}.size-15{font-size:0.9375rem}.size-18{font-size:1.125rem}.size-21{font-size:1.3125rem}.size-24{font-size:1.5rem}.size-26{font-size:1.625rem}.size-31{font-size:1.9375rem}.size-110{font-size:6.875rem}.font-light{font-weight:300}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.grid{display:grid}.grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}.grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.grid-cols-6{grid-template-columns:repeat(6, minmax(0, 1fr))}.grid-cols-8{grid-template-columns:repeat(8, minmax(0, 1fr))}.grid-cols-12{grid-template-columns:repeat(12, minmax(0, 1fr))}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-5{grid-column:span 5 / span 5}.col-span-6{grid-column:span 6 / span 6}.col-span-7{grid-column:span 7 / span 7}.col-span-8{grid-column:span 8 / span 8}.col-span-9{grid-column:span 9 / span 9}.col-span-10{grid-column:span 10 / span 10}.col-span-12{grid-column:span 12 / span 12}.gap-2{gap:0.5rem}.gap-4{gap:1rem}.flex{display:flex}.fixed{position:fixed}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.flex-grow-0{flex-grow:0}.flex-auto{flex:1 1 0%}.clear{clear:both}.left{float:left}.right{float:right}.center{text-align:center}.align-right{text-align:right}.middle{vertical-align:middle}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.items-center{align-items:center}.italic{font-style:italic}.sticky{position:sticky}.absolute{position:absolute}.relative{position:relative}.hidden{overflow:hidden}.no-pc{display:none}.none{display:none}.block{display:block}.table{display:table}.inline{display:inline-block}.list-none{list-style:none}a:hover>img{opacity:0.8}.underline-hover:hover{text-decoration:underline}code{color:#9b4f5e;background-color:#f5f2f0;padding:3px;border-radius:3px;font-size:14px}pre{white-space:pre-wrap}pre code{background-color:#f0f0f0;padding:2px 14px 2px 10px;border-radius:3px;display:inline-block;max-width:100%}blockquote{margin-left:15px;background-color:#f3f3f6;padding:0.1rem 1rem;border-left:3px solid #d2d6dd;display:table}hr{border:none;clear:both;background-color:#ddd;height:1px}table{margin-bottom:1.5rem;width:100%;border-collapse:collapse;border-spacing:0}table td,table th{font-size:14px}table tr:nth-of-type(2n){background-color:#f3f3f6}table thead th{border-bottom:2px solid rgba(222, 226, 230, 0.5)}td,th{padding:5px}textarea{width:100%;font-size:16px;padding:1px 6px;border:1px solid #ebebeb}input{border:1px solid #e2e6ed}input:focus,textarea:focus{border:1px solid #9ccdf8}::placeholder{color:#919191}.shown_post img{width:100%}.post-body.full img:hover{box-shadow:0 1px 8px 0 rgba(0, 0, 0, 0.2)}.post-body .post-img img{margin-top:5px}.post-body.full img{max-width:100%;display:block}.answ-telo p img{max-width:99%;max-height:500px;display:block}.comment_subtree:target,.comment_subtree.edit,.answers_subtree:target,.answers_subtree.edit{-webkit-background-clip:content-box;background-clip:content-box;background-color:lightyellow;margin-top:-70px;padding-top:70px}.dark{background-color:#111;color:#ccc}.dark .bg-yellow-100,.dark .bg-white{background-color:#232626;color:#fff;border:1px solid #232626}.dark input,.dark textarea,.dark blockquote,.dark table tr:nth-of-type(2n){background-color:#111;color:#fff;border:1px solid #000}.dark .dark-br-black{border:1px solid #111}.dark .dark-bg-black,.dark .answers_subtree:target{background-color:#000}.dark .gray-light{color:#ccc}.dark .dark-white{color:#fff}.video-object{width:640px;height:360px}.answ-telo .video-object{width:290px;height:160px}.home-img,.thumb{width:260px;height:130px;object-fit:cover}.preview .home-img{display:none}.up_down_btn{bottom:40px;right:10px;line-height:30px;cursor:pointer}.up_down_btn:hover{text-decoration:none;background-color:#e9ebec}.up_down_btn-disabled{pointer-events:none;cursor:default;opacity:0}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;background-color:transparent;border:1px solid transparent;padding:0.25rem 0.5rem;font-size:0.875rem;line-height:1.5;border-radius:0.2rem}.btn-primary{color:#fff;background:#0085EE;border-color:#0085EE}.btn-outline-primary{color:#0085EE;background:#fff;border-color:#0085EE}.btn-primary:hover,.btn-primary:focus{color:#fff;opacity:0.8}.btn-outline-primary:hover,.btn-outline-primary:focus{color:#fff;background:#0085EE;border-color:#0085EE}.fon-rgba{background:rgba(0, 0, 0, 0.3);padding:1px 6px}.tags-look .tagify__dropdown__item{display:inline-block;border-radius:3px;padding:0.3em 0.5em;border:1px solid #CCC;background:#F3F3F3;margin:0.2em;font-size:0.85em;color:black;transition:0s}.tags-look .tagify__dropdown__item--active{color:black}.tags-look .tagify__dropdown__item:hover{background:lightyellow;border-color:gold}@media (min-width:910px){.pc-mr-20{margin-right:20px}}@media (max-width:1150px){.home-img{width:100%;height:auto}.flex-auto{flex-wrap:wrap;flex:1 1 auto}.no-mob-max{display:none}}@media (max-width:910px){.mb-col-2{grid-column:span 2 / span 2}.mb-col-12{grid-column:span 12 / span 12}.mb-size-13{font-size:0.8125rem}.mb-size-18{font-size:1.125rem}.mb-w-100{width:100%}.mb-w-50{width:50%}.mb-ml-10{margin-left:10px}.mb-mt-5{margin-top:5px}.mb-mr-5{margin-right:5px}.mb-mb-5{margin-bottom:5px}.mb-ml-0{margin-left:0}.mb-pl-0{padding-left:0}.mb-pr-0{padding-right:0}.gap-4{gap:0.5rem}.no-mob{display:none}.no-pc{display:block}.video-object{width:320px;height:210px}.answ-telo .video-object{width:280px;height:155px}}@font-face{font-family:"bootstrap-icons";src:url("./fonts/bootstrap-icons.woff2?a74547b2f0863226942ff8ded57db345") format("woff2"), url("./fonts/bootstrap-icons.woff?a74547b2f0863226942ff8ded57db345") format("woff");font-display:swap}.bi::before,[class^="bi-"]::before,[class*=" bi-"]::before{display:inline-block;font-family:bootstrap-icons !important;font-style:normal;font-weight:normal !important;font-variant:normal;text-transform:none;line-height:1;vertical-align:-0.125em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bi-sort-down::before{content:""}.bi-columns-gap::before{content:""}.bi-journal-text::before{content:""}.bi-chat-left-text::before{content:""}.bi-people::before{content:""}.bi-person::before{content:""}.bi-person-plus::before{content:""}.bi-chat-dots::before{content:""}.bi-chat-text::before{content:""}.bi-link-45deg::before{content:""}.bi-heart::before{content:""}.bi-bookmark::before{content:""}.bi-bookmark-plus::before{content:""}.bi-app::before{content:""}.bi-bar-chart::before{content:""}.bi-plus-lg::before{content:""}.bi-bell::before{content:""}.bi-bell-fill::before{content:""}.bi-brightness-high::before{content:""}.bi-gear::before{content:""}.bi-pencil-square::before{content:""}.bi-app-indicator::before{content:""}.bi-envelope::before{content:""}.bi-arrow-up::before{content:""}.bi-shield-exclamation::before{content:""}.bi-box-arrow-right::before{content:""}.bi-search::before{content:""}.bi-exclamation-diamond::before{content:""}.bi-reply::before{content:""}.bi-tools::before{content:""}.bi-badge-ad::before{content:""}.bi-award::before{content:""}.bi-patch-question::before{content:""}.bi-bug::before{content:""}.bi-mic::before{content:""}.bi-pencil::before{content:""}.bi-plus::before{content:""}.bi-journal::before{content:""}.bi-flag::before{content:""}.bi-calendar-week::before{content:""}.bi-person-x::before{content:""}.bi-folder-symlink::before{content:""}.bi-lightning::before{content:""}.bi-hash::before{content:""}.bi-trash::before{content:""}.bi-sort-up::before{content:""}.bi-record-circle::before{content:""}.bi-x-circle::before{content:""}.bi-vinyl-fill::before{content:""}.bi-vinyl::before{content:""}.bi-check2-square::before{content:""}.bi-emoji-wink::before{content:""}.bi-list::before{content:""}.bi-info-square::before{content:""}.bi-chevron-double-right::before{content:""}.bi-emoji-smile::before{content:""}.bi-lock::before{content:""}.bi-pin-angle::before{content:""}.bi-eye::before{content:""}.bi-gift::before{content:""}.bi-x-octagon::before{content:""}.bi-facebook::before{content:""}.bi-twitter::before{content:""}.bi-github::before{content:""}.bi-discord::before{content:""}.bi-info-lg::before{content:""} \ No newline at end of file +html{height:100%;overflow-y:scroll}*,*::before,*::after{box-sizing:border-box}:active,:hover,:focus{outline:0;outline-offset:0}body{line-height:1.375;font-family:-apple-system, BlinkMacSystemFont, Arial, sans-serif}a{color:#275ec2;cursor:pointer;text-decoration:none}a:hover,a:focus,a.active{color:#0085EE}img{border-radius:3px;vertical-align:middle}.top0{top:0}.top80{top:80px}.right0{right:0}.bottom0{bottom:0}.left0{left:0}.mr-auto{margin:0 auto}.ml-auto{margin-left:auto}.-mr-1{margin-right:-0.5rem}.-mt20{margin-top:-20px}.-mt50{margin-top:-50px}.m0{margin:0}.mt0{margin-top:0}.mr0{margin-right:0}.mb0{margin-bottom:0}.ml0{margin-left:0}.m5{margin:5px}.mt5{margin-top:5px}.mr5{margin-right:5px}.mb5{margin-bottom:5px}.ml5{margin-left:5px}.m10{margin:10px}.mt10{margin-top:10px}.mr10{margin-right:10px}.mb10{margin-bottom:10px}.ml10{margin-left:10px}.m115{margin:15px}.mt15{margin-top:15px}.mr15{margin-right:15px}.mb15{margin-bottom:15px}.ml15{margin-left:15px}.m120{margin:20px}.mt20{margin-top:20px}.mr20{margin-right:20px}.mb20{margin-bottom:20px}.ml20{margin-left:20px}.mt60{margin-top:60px}.mr30{margin-right:30px}.mr60{margin-right:60px}.ml30{margin-left:30px}.ml45{margin-left:45px}.ml60{margin-left:60px}.p0{padding:0}.pt0{padding-top:0}.pr0{padding-right:0}.pb0{padding-bottom:0}.pl0{padding-left:0}.p5{padding:5px}.pt5{padding-top:5px}.pr5{padding-right:5px}.pb5{padding-bottom:5px}.pl5{padding-left:5px}.p10{padding:10px}.pt10{padding-top:10px}.pr10{padding-right:10px}.pb10{padding-bottom:10px}.pl10{padding-left:10px}.p15{padding:15px}.pt15{padding-top:15px}.pr15{padding-right:15px}.pb15{padding-bottom:15px}.pl15{padding-left:15px}.p20{padding:20px}.pt20{padding-top:20px}.pr20{padding-right:20px}.pb20{padding-bottom:20px}.pl20{padding-left:20px}.pt60{padding-top:60px}.pt160{padding-top:160px}.black{color:#222}.gray{color:#5b7083}.gray-light{color:#666}.gray-light-2{color:#919191}.green{color:#318407}.blue{color:#0085EE}.white{color:#fff}.red{color:#e45735}.mazarine{color:#688ffb}.white-hover:hover{color:#fff}.blue-hover:hover{color:#0085EE}.gray-hover:hover{color:#ece5e5}.gray-light-hover:hover{color:#333}.bg-white{background-color:#fff}.bg-red-100{background-color:#fde7e9}.bg-red-300{background-color:#f7b1b1}.bg-red-500{background-color:#e85c61}.bg-orange-100{background-color:#fdeed1}.bg-orange-300{background-color:#f6b65c}.bg-yellow-100{background-color:#fffde4}.bg-yellow-300{background-color:#f6da52}.bg-yellow-500{background-color:#d29507}.bg-green-100{background-color:#e1f7eb}.bg-green-200{background-color:#f3f1ed}.bg-green-300{background-color:#98d9b7}.bg-green-400{background-color:#5cb379}.bg-green-500{background-color:#44a675}.bg-teal-100{background-color:#ddf2f5}.bg-teal-300{background-color:#7fced5}.bg-blue-100{background-color:#e1effc}.bg-blue-300{background-color:#8bc2f8}.bg-blue-400{background-color:#5fa7f3}.bg-blue-500{background-color:#3c91ec}.bg-blue-800{background-color:#0085EE}.bg-indigo-100{background-color:#e2efff}.bg-indigo-300{background-color:#a1befa}.bg-purple-100{background-color:#f0e9fb}.bg-purple-300{background-color:#cbb2f6}.bg-gray-000{background-color:#f8f9fa}.bg-gray-100{background-color:#f5f7fa}.bg-gray-200{background-color:#f2f2f2}.bg-gray-300{background-color:#dee2e6}.bg-gray-400{background-color:#ced4da}.bg-gray-700{background-color:#495057}.bg-gray-800{background-color:#343a40}.bg-gray-900{background-color:#212529}.box-shadow{box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2)}.box-shadow-all{box-shadow:0 4px 14px rgba(0, 0, 0, 0.15)}.br-box-gray{border:1px solid #ededed}.br-box-blue{border:1px solid #0085EE}.br-top-dotted{border:1px dotted #ddd}.br-bottom{border-bottom:1px solid #ddd}.border-bottom:last-child{border:0}.br-rd3{border-radius:3px}.br-rd5{border-radius:5px}.br-rd20{border-radius:20px}.br-rd-42{border-radius:42%}.br-rd-50{border-radius:50%}.bg-hover-green:hover{background-color:#5fb878}.bg-hover-gray:hover{background-color:#f5f7fa}.bg-hover-blue:hover{background-color:#0085EE}.bg-hover-light-blue:hover{background-color:#31A2FA}.bg-hover-light:hover{background-color:rgba(0, 154, 97, 0.08)}.w-auto{width:auto}.w-20{width:20%}.w-30{width:30%}.w-40{width:40%}.w-50{width:50%}.w-70{width:70%}.w-90{width:90%}.w-100{width:100%}.w10{width:10px}.w18{width:18px}.w21{width:21px}.w24{width:24px}.w30{width:30px}.w34{width:34px}.w44{width:44px}.w54{width:54px}.w64{width:64px}.w94{width:94px}.w110{width:110px}.w130{width:130px}.w160{width:160px}.w200{width:200px}.w400{width:400px}.max-w-100{max-width:100%}.min-w165{min-width:165px}.max-w200{max-width:200px}.max-w300{max-width:300px}.max-w460{max-width:460px}.max-w640{max-width:640px}.max-w780{max-width:780px}.max-width{max-width:1636px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.h10{height:10px}.h18{height:18px}.h20{height:20px}.h24{height:24px}.h30{height:30px}.h40{height:40px}.h44{height:44px}.h120{height:120px}.h150{height:150px}.size-13{font-size:0.8125rem}.size-14{font-size:0.875rem}.size-15{font-size:0.9375rem}.size-18{font-size:1.125rem}.size-21{font-size:1.3125rem}.size-24{font-size:1.5rem}.size-26{font-size:1.625rem}.size-31{font-size:1.9375rem}.size-110{font-size:6.875rem}.font-light{font-weight:300}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.grid{display:grid}.grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}.grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}.grid-cols-6{grid-template-columns:repeat(6, minmax(0, 1fr))}.grid-cols-8{grid-template-columns:repeat(8, minmax(0, 1fr))}.grid-cols-12{grid-template-columns:repeat(12, minmax(0, 1fr))}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-5{grid-column:span 5 / span 5}.col-span-6{grid-column:span 6 / span 6}.col-span-7{grid-column:span 7 / span 7}.col-span-8{grid-column:span 8 / span 8}.col-span-9{grid-column:span 9 / span 9}.col-span-10{grid-column:span 10 / span 10}.col-span-12{grid-column:span 12 / span 12}.gap-2{gap:0.5rem}.gap-4{gap:1rem}.flex{display:flex}.fixed{position:fixed}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.flex-grow-0{flex-grow:0}.flex-auto{flex:1 1 0%}.clear{clear:both}.left{float:left}.right{float:right}.center{text-align:center}.align-right{text-align:right}.middle{vertical-align:middle}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.items-center{align-items:center}.italic{font-style:italic}.sticky{position:sticky}.absolute{position:absolute}.relative{position:relative}.hidden{overflow:hidden}.no-pc{display:none}.none{display:none}.block{display:block}.table{display:table}.inline{display:inline-block}.list-none{list-style:none}a:hover>img{opacity:0.8}.underline-hover:hover{text-decoration:underline}code{color:#9b4f5e;background-color:#f5f2f0;padding:3px;border-radius:3px;font-size:14px}pre{white-space:pre-wrap}pre code{background-color:#f0f0f0;padding:2px 14px 2px 10px;border-radius:3px;display:inline-block;max-width:100%}blockquote{margin-left:15px;background-color:#f3f3f6;padding:0.1rem 1rem;border-left:3px solid #d2d6dd;display:table}hr{border:none;clear:both;background-color:#ddd;height:1px}table{margin-bottom:1.5rem;width:100%;border-collapse:collapse;border-spacing:0}table td,table th{font-size:14px}table tr:nth-of-type(2n){background-color:#f3f3f6}table thead th{border-bottom:2px solid rgba(222, 226, 230, 0.5)}td,th{padding:5px}textarea{width:100%;font-size:16px;padding:1px 6px;border:1px solid #ebebeb}input{border:1px solid #e2e6ed}input:focus,textarea:focus{border:1px solid #9ccdf8}::placeholder{color:#919191}.shown_post img{width:100%}.post-body.full img:hover{box-shadow:0 1px 8px 0 rgba(0, 0, 0, 0.2)}.post-body .post-img img{margin-top:5px}.post-body.full img{max-width:100%;display:block}.answ-telo p img{max-width:99%;max-height:500px;display:block}.comment_subtree:target,.comment_subtree.edit,.answers_subtree:target,.answers_subtree.edit{-webkit-background-clip:content-box;background-clip:content-box;background-color:lightyellow;margin-top:-70px;padding-top:70px}.dark{background-color:#111;color:#ccc}.dark .bg-yellow-100,.dark .bg-white{background-color:#232626;color:#fff;border:1px solid #232626}.dark input,.dark textarea,.dark blockquote,.dark table tr:nth-of-type(2n){background-color:#111;color:#fff;border:1px solid #000}.dark .dark-br-black{border:1px solid #111}.dark .dark-bg-black,.dark .answers_subtree:target{background-color:#000}.dark .gray-light{color:#ccc}.dark .dark-white{color:#fff}.video-object{width:640px;height:360px}.answ-telo .video-object{width:290px;height:160px}.home-img,.thumb{width:260px;height:130px;object-fit:cover}.preview .home-img{display:none}.up_down_btn{bottom:40px;right:10px;line-height:30px;cursor:pointer}.up_down_btn:hover{text-decoration:none;background-color:#e9ebec}.up_down_btn-disabled{pointer-events:none;cursor:default;opacity:0}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;background-color:transparent;border:1px solid transparent;padding:0.25rem 0.5rem;font-size:0.875rem;line-height:1.5;border-radius:0.2rem}.btn-primary{color:#fff;background:#0085EE;border-color:#0085EE}.btn-outline-primary{color:#0085EE;background:#fff;border-color:#0085EE}.btn-primary:hover,.btn-primary:focus{color:#fff;opacity:0.8}.btn-outline-primary:hover,.btn-outline-primary:focus{color:#fff;background:#0085EE;border-color:#0085EE}.fon-rgba{background:rgba(0, 0, 0, 0.3);padding:1px 6px}.tags-look .tagify__dropdown__item{display:inline-block;border-radius:3px;padding:0.3em 0.5em;border:1px solid #CCC;background:#F3F3F3;margin:0.2em;font-size:0.85em;color:black;transition:0s}.tags-look .tagify__dropdown__item--active{color:black}.tags-look .tagify__dropdown__item:hover{background:lightyellow;border-color:gold}@media (min-width:910px){.pc-mr-20{margin-right:20px}}@media (max-width:1150px){.home-img{width:100%;height:auto}.flex-auto{flex-wrap:wrap;flex:1 1 auto}.no-mob-max{display:none}}@media (max-width:910px){.mb-col-2{grid-column:span 2 / span 2}.mb-col-12{grid-column:span 12 / span 12}.mb-size-13{font-size:0.8125rem}.mb-size-18{font-size:1.125rem}.mb-w-100{width:100%}.mb-w-50{width:50%}.mb-ml-10{margin-left:10px}.mb-mt-5{margin-top:5px}.mb-mr-5{margin-right:5px}.mb-mb-5{margin-bottom:5px}.mb-ml-0{margin-left:0}.mb-pl-0{padding-left:0}.mb-pr-0{padding-right:0}.gap-4{gap:0.5rem}.no-mob{display:none}.no-pc{display:block}.video-object{width:320px;height:210px}.answ-telo .video-object{width:280px;height:155px}}@font-face{font-family:"bootstrap-icons";src:url("./fonts/bootstrap-icons.woff2?a74547b2f0863226942ff8ded57db345") format("woff2"), url("./fonts/bootstrap-icons.woff?a74547b2f0863226942ff8ded57db345") format("woff");font-display:swap}.bi::before,[class^="bi-"]::before,[class*=" bi-"]::before{display:inline-block;font-family:bootstrap-icons !important;font-style:normal;font-weight:normal !important;font-variant:normal;text-transform:none;line-height:1;vertical-align:-0.125em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bi-sort-down::before{content:""}.bi-columns-gap::before{content:""}.bi-journal-text::before{content:""}.bi-chat-left-text::before{content:""}.bi-people::before{content:""}.bi-person::before{content:""}.bi-person-plus::before{content:""}.bi-chat-dots::before{content:""}.bi-chat-text::before{content:""}.bi-link-45deg::before{content:""}.bi-heart::before{content:""}.bi-bookmark::before{content:""}.bi-bookmark-plus::before{content:""}.bi-app::before{content:""}.bi-bar-chart::before{content:""}.bi-plus-lg::before{content:""}.bi-bell::before{content:""}.bi-bell-fill::before{content:""}.bi-brightness-high::before{content:""}.bi-gear::before{content:""}.bi-pencil-square::before{content:""}.bi-app-indicator::before{content:""}.bi-envelope::before{content:""}.bi-arrow-up::before{content:""}.bi-shield-exclamation::before{content:""}.bi-box-arrow-right::before{content:""}.bi-search::before{content:""}.bi-exclamation-diamond::before{content:""}.bi-reply::before{content:""}.bi-tools::before{content:""}.bi-badge-ad::before{content:""}.bi-award::before{content:""}.bi-patch-question::before{content:""}.bi-bug::before{content:""}.bi-mic::before{content:""}.bi-pencil::before{content:""}.bi-plus::before{content:""}.bi-journal::before{content:""}.bi-flag::before{content:""}.bi-calendar-week::before{content:""}.bi-person-x::before{content:""}.bi-folder-symlink::before{content:""}.bi-lightning::before{content:""}.bi-hash::before{content:""}.bi-trash::before{content:""}.bi-sort-up::before{content:""}.bi-record-circle::before{content:""}.bi-x-circle::before{content:""}.bi-vinyl-fill::before{content:""}.bi-vinyl::before{content:""}.bi-check2-square::before{content:""}.bi-emoji-wink::before{content:""}.bi-list::before{content:""}.bi-info-square::before{content:""}.bi-chevron-double-right::before{content:""}.bi-emoji-smile::before{content:""}.bi-lock::before{content:""}.bi-pin-angle::before{content:""}.bi-eye::before{content:""}.bi-gift::before{content:""}.bi-x-octagon::before{content:""}.bi-facebook::before{content:""}.bi-twitter::before{content:""}.bi-github::before{content:""}.bi-discord::before{content:""}.bi-info-lg::before{content:""} + + + \ No newline at end of file diff --git a/public/assets/images/emoji/plus.png b/public/assets/images/emoji/plus.png new file mode 100644 index 00000000..5bae81d1 Binary files /dev/null and b/public/assets/images/emoji/plus.png differ diff --git a/resources/views/default/_block/editor/editor.php b/resources/views/default/_block/editor/editor.php index d7d79668..c85d89e8 100644 --- a/resources/views/default/_block/editor/editor.php +++ b/resources/views/default/_block/editor/editor.php @@ -12,8 +12,9 @@ let dark = document.querySelector('.bg-gray-100.dark'); let viewerEl = document.querySelector('.editorSection'); - let body = viewerEl.innerHTML; - + let body = viewerEl.innerHTML.trim(); + body = body.replace(/>/gi, ">"); + if (viewerEl == null) { return; } @@ -39,9 +40,10 @@ toolbarItems: [ ['heading', 'bold', 'italic', 'strike'], ['hr', 'quote'], - ['ul', 'ol'], + ['ul'], ['table', 'image', 'link'], ['code', 'codeblock'], + ], events: { change: function() { @@ -71,6 +73,5 @@ }); editor.getMarkdown(); - }); \ No newline at end of file diff --git a/resources/views/default/scss/components.scss b/resources/views/default/scss/components.scss index 50ac1969..528455eb 100644 --- a/resources/views/default/scss/components.scss +++ b/resources/views/default/scss/components.scss @@ -199,7 +199,7 @@ textarea:focus { border: 1px solid #9ccdf8; } } /* Tags */ -.tags-look .tagify__dropdown__item{ +.tags-look .tagify__dropdown__item { display: inline-block; border-radius: 3px; padding: .3em .5em; @@ -211,11 +211,30 @@ textarea:focus { border: 1px solid #9ccdf8; } transition: 0s; } -.tags-look .tagify__dropdown__item--active{ +.tags-look .tagify__dropdown__item--active { color: black; } -.tags-look .tagify__dropdown__item:hover{ +.tags-look .tagify__dropdown__item:hover { background: lightyellow; border-color: gold; } + +details { + border-radius: 0 0 3px 3px; + background-color: #f5f5fa; + padding: 2px 6px; + margin: 0; + box-shadow: 3px 3px 4px #eee; +} + +summary { + background-color: #f5f5fa; + color: #666; + font-size: 14px; +} + +details[open] > summary { + padding: 0 0 10px 0; + color: #666; +} \ No newline at end of file