diff --git a/.htaccess b/.htaccess index ec7ccbf..80ba481 100644 --- a/.htaccess +++ b/.htaccess @@ -68,7 +68,10 @@ DirectoryIndex index.php RewriteEngine on - + +# rule needed for sysmessages +RewriteRule ^(.*/)?system/resources/js/sysmessages-set\.js$ $1system/resources/php/sysmessages.php [L] + # Uncomment the following to redirect all visitors to the https version # RewriteCond %{HTTPS} off # RewriteRUle (.*) https://www.example.com/$1 [R=301,L] diff --git a/README.md b/README.md index 4328b62..72cc972 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ e.g. `www.yoursite.com/login` - Homepage: [HTMLy Homepage](https://www.htmly.com/) - Documentation: [HTMLy Docs](https://docs.htmly.com/) + - Comment system: [HTMLy Comment System Docs](https://github.com/danpros/htmly/blob/master/system/includes/comments_readme.md) - Themes: [HTMLy Themes](https://www.htmly.com/theme/) - Demo: [HTMLy Demo](http://demo.htmly.com/) - Repository: [Github](https://github.com/danpros/htmly/) diff --git a/lang/en_US.ini b/lang/en_US.ini index e1c41ae..0648e2a 100644 --- a/lang/en_US.ini +++ b/lang/en_US.ini @@ -407,3 +407,33 @@ backtotop = "Back to top" subpages = "Sub pages" getstarted = "Get started" onthispage = "On this page" +enable_jstime="Enable Javascript and timestamp anti-spam protection" +jstime_desc="Usually bots dont't use Javascript. Form also checks if submitted between 3 and 600 seconds (preventing bots fast submission)" +comment_email_admin_awaiting="New comment awaiting moderation" +comment_email_admin_new="New comment" +comment_email_subscription_subject = "Subscription confirmation to" +comment_email_new = "New comment on" +comment_email_from = "From" +comment_email_moderate = "Moderate comments" +comment_email_new_subscribed = "New reply on a subscribed thread" +comment_email_new_replied = "Someone replied to your comment on" +comment_email_view_comment = "View comment" +comment_subscribe_confirmation = "Subscription confirmation to" +comment_subscribe_thread = "Thread subscription at" +comment_subscribe_request = "We received a subscription request to a thread at" +comment_subscribe_never_requested = "If you never visited the site or requested to be notified on thread messages, please ignore this email." +comment_subscribe_click = "Click" +comment_subscribe_here = "HERE" +comment_subscribe_confirm_message = "to confirm your subscription and start receiving notification emails on replies on the thread." +comment_subscribe_unsubscribe_message = "You can unsubscribe all notifications from" +comment_subscribe_unsubscribe_anytime = "at any time using this link" +comment_unsubscribe = "unsubscribe" +sysmsg_subscribe_success = "Your will receive now new comment notifications on the subscribed threads." +sysmsg_subscribe_fail = "Something went wrong during subscription verification process." +sysmsg_unsubscribe_success = "You have successfully unsubscribed from notification emails." +sysmsg_unsubscribe_fail = "Something wrong during unsubscription process" + + +posts_not_found = "Posts not found!" +page_not_found = "Page not found!" + diff --git a/system/admin/views/comments.html.php b/system/admin/views/comments.html.php index e90f2fe..c608252 100644 --- a/system/admin/views/comments.html.php +++ b/system/admin/views/comments.html.php @@ -127,17 +127,9 @@ -
+ - -


@@ -145,8 +137,8 @@
- > + >
@@ -157,15 +149,15 @@
- > + >
- > + >
@@ -179,8 +171,8 @@
- > + >
@@ -189,8 +181,8 @@
-
@@ -203,8 +195,8 @@
- > + >
@@ -213,8 +205,8 @@
-
@@ -222,8 +214,8 @@
- 587 (TLS) or 465 (SSL)
@@ -232,9 +224,9 @@
- + +
@@ -242,8 +234,8 @@
-
@@ -251,8 +243,8 @@
-
@@ -260,8 +252,8 @@
-
@@ -269,8 +261,8 @@
-
@@ -291,7 +283,6 @@ -
diff --git a/system/admin/views/layout.html.php b/system/admin/views/layout.html.php index 6df46d2..01d4a1c 100644 --- a/system/admin/views/layout.html.php +++ b/system/admin/views/layout.html.php @@ -150,7 +150,7 @@ if (isset($author[0])) { - +
  • " . $comment['name'] . ""; + $recent_comments .= "
    " . date(config('date.format'), $comment['timestamp']) . "
    "; + $recent_comments .= "
    " . $comment['comment'] . "
  • "; } - - return isset($_config[$key]) ? $_config[$key] : null; + $recent_comments .= ''; + return $recent_comments; } -/** - * Save comments configuration - * - * @param array $data Configuration data to save - * @return bool Success status - */ -function save_comments_config($data = array()) -{ - $config_file = 'config/comments.ini'; - if (!file_exists($config_file)) { - return false; - } - $string = file_get_contents($config_file); - - foreach ($data as $word => $value) { - // Ensure null and empty values are saved as empty strings - if ($value === null || $value === '') { - $value = '""'; - } else { - // Encode value - $value = json_encode($value, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); +function handle_comments_subscription() { + $subscription = null; + if (isset($_GET['unsubscribe'])) { + $subscription = getSubscription($_GET['unsubscribe']); + if ($subscription['status'] == 'no') { + $response['message'] = i18n('sysmsg_unsubscribe_success'); + $response['class'] = 'success'; } - - $map = array('\r\n' => ' \n ', '\r' => ' \n '); - $value = trim(strtr($value, $map)); - - // Escape dots in the key for regex - $escapedWord = str_replace('.', '\.', $word); - - // Try to replace existing line - $pattern = "/^" . $escapedWord . " = .*/m"; - if (preg_match($pattern, $string)) { - $string = preg_replace($pattern, $word . ' = ' . $value, $string); - } else { - // If line doesn't exist, add it at the end - $string = rtrim($string) . "\n" . $word . ' = ' . $value . "\n"; + else { + $response['message'] = i18n('sysmsg_unsubscribe_fail'); + $response['class'] = 'error'; } + $_SESSION['sysmessages'][] = $response; + // stash('subscription', $subscription); + } elseif (isset($_GET['subscribe'])) { + $subscription = setSubscription($_GET['subscribe'], 'confirm'); + if ($subscription['status'] == 'subscribed') { + $response['message'] = i18n('sysmsg_subscribe_success'); + $response['class'] = 'success'; + } + else { + $response['message'] = i18n('sysmsg_subscribe_fail'); + $response['class'] = 'error'; + } + $_SESSION['sysmessages'][] = $response; } - - $string = rtrim($string) . "\n"; - $result = file_put_contents($config_file, $string, LOCK_EX); - - // Clear PHP opcache for this file - if (function_exists('opcache_invalidate')) { - opcache_invalidate($config_file, true); - } - - // Clear cache after saving - if ($result !== false) { - comments_config('reload'); - } - - return $result; } + + + + + /** * Get comments file path for a post/page * Replicates content file path inside comments folder @@ -403,14 +376,14 @@ function validateComment($data) } // Validate honeypot (if enabled) - if (comments_config('comments.honeypot') === 'true') { + if (config('comments.honeypot') === 'true') { if (!empty($data['website'])) { $errors[] = 'comment_submission_error_spam'; } } // Validate js and time (if enabled) - minimum 2 seconds, maximum 600 seconds - if (comments_config('comments.jstime') === 'true') { + if (config('comments.jstime') === 'true') { if (!$data['company'] || secondsGenerationSubmit($data['company']) < 3 || secondsGenerationSubmit($data['company']) > 3600) { $errors[] = 'comment_submission_error_spam'; } @@ -464,7 +437,7 @@ function commentInsert($data, $url, $mdfile = null) 'date' => date('Y-m-d H:i:s', $timestamp), 'parent_id' => isset($data['parent_id']) && !empty($data['parent_id']) ? $data['parent_id'] : null, 'notify' => isset($data['notify']) && $data['notify'] === '1', - 'published' => comments_config('comments.moderation') !== 'true', // Auto-publish if moderation disabled + 'published' => config('comments.moderation') !== 'true', // Auto-publish if moderation disabled 'ip' => $_SERVER['REMOTE_ADDR'] ?? 'unknown' ); @@ -506,21 +479,29 @@ function commentInsert($data, $url, $mdfile = null) ); } - - // action can be subscribe, confirm, unsubscribe function setSubscription($email, $action) { $subscriptions_dir = 'content/comments/.subscriptions'; if (!is_dir($subscriptions_dir)) { mkdir($subscriptions_dir); } - $subscription_file = $subscriptions_dir . '/' . encryptEmailForFilename($email, comments_config('comments.salt')); + + + // Ensure config is loaded - if not loads it + $config_loaded = config('permalink.type'); + if (!$config_loaded) { + if (file_exists('config/config.ini')) { + config('source', 'config/config.ini'); + } + } + + $subscription_file = $subscriptions_dir . '/' . encryptEmailForFilename($email, config('comments.salt')); $subscription = getSubscription($email); if ($action == 'subscribe') { if ($subscription['status'] == 'subscribed') { - return true; + return $subscription; } elseif ($subscription['status'] == 'waiting') { sendSubscriptionEmail($email); @@ -530,7 +511,7 @@ function setSubscription($email, $action) { $json = json_encode($subscription, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); file_put_contents($subscription_file, $json); sendSubscriptionEmail($email); - return true; + return $subscription; } } @@ -538,15 +519,16 @@ function setSubscription($email, $action) { $subscription['status'] = 'subscribed'; $json = json_encode($subscription, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); file_put_contents($subscription_file, $json); - return true; + return $subscription; } elseif ($action == 'unsubscribe') { @unlink($subscription_file); - return true; + $subscription['status'] = 'no'; + return $subscription; } else { // nothing here - return false; + return $subscription; } } @@ -554,7 +536,7 @@ function setSubscription($email, $action) { // returns array function getSubscription($email) { $subscriptions_dir = 'content/comments/.subscriptions'; - $subscription_file = $subscriptions_dir . '/' . encryptEmailForFilename($email, comments_config('comments.salt')); + $subscription_file = $subscriptions_dir . '/' . encryptEmailForFilename($email, config('comments.salt')); if (!file_exists($subscription_file)) { $subscription['status'] = 'no'; $subscription['date'] = date('Y-m-d H:i:s'); @@ -643,13 +625,13 @@ function sendSubscriptionEmail($email) { // Server settings $mail->isSMTP(); - $mail->Host = comments_config('comments.mail.host'); + $mail->Host = config('comments.mail.host'); $mail->SMTPAuth = true; - $mail->Username = comments_config('comments.mail.username'); - $mail->Password = comments_config('comments.mail.password'); - $mail->Port = comments_config('comments.mail.port'); + $mail->Username = config('comments.mail.username'); + $mail->Password = config('comments.mail.password'); + $mail->Port = config('comments.mail.port'); - $encryption = comments_config('comments.mail.encryption'); + $encryption = config('comments.mail.encryption'); if ($encryption === 'tls') { $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; } elseif ($encryption === 'ssl') { @@ -658,8 +640,8 @@ function sendSubscriptionEmail($email) { // Recipients $mail->setFrom( - comments_config('comments.mail.from.email'), - comments_config('comments.mail.from.name') + config('comments.mail.from.email'), + config('comments.mail.from.name') ); $mail->addAddress($email); @@ -672,9 +654,9 @@ function sendSubscriptionEmail($email) {

    " . i18n('comment_subscribe_thread') . ": ".config('site.url')."

    " . i18n('comment_subscribe_request') . " ".config('blog.title')."

    " . i18n('comment_subscribe_never_requested') . "

    -

    " . i18n('comment_subscribe_click') . " " . i18n('comment_subscribe_here') . " " . i18n('comment_subscribe_confirm_message') . "

    +

    " . i18n('comment_subscribe_click') . " " . i18n('comment_subscribe_here') . " " . i18n('comment_subscribe_confirm_message') . "

     

    -

    " . i18n('comment_subscribe_unsubscribe_message') . " ".config('blog.title')." " . i18n('comment_subscribe_unsubscribe_anytime') . ": " . i18n('comment_unsubscribe') . ".

    +

    " . i18n('comment_subscribe_unsubscribe_message') . " ".config('blog.title')." " . i18n('comment_subscribe_unsubscribe_anytime') . ": " . i18n('comment_unsubscribe') . ".

     

    "; @@ -840,7 +822,7 @@ function commentModify($file, $commentId, $data) function sendCommentNotifications($url, $newComment, $allComments, $notifyAdmin = true, $notifySubscribers = true) { // Check if mail is enabled - if (comments_config('comments.mail.enabled') !== 'true') { + if (config('comments.mail.enabled') !== 'true') { return; } @@ -848,11 +830,11 @@ function sendCommentNotifications($url, $newComment, $allComments, $notifyAdmin // Add admin email - notify if comments.notifyadmin = "true" OR comments.moderation = "true" if ($notifyAdmin) { - $shouldNotifyAdmin = (comments_config('comments.notifyadmin') === 'true') || - (comments_config('comments.moderation') === 'true'); + $shouldNotifyAdmin = (config('comments.notifyadmin') === 'true') || + (config('comments.moderation') === 'true'); if ($shouldNotifyAdmin) { - $adminEmail = comments_config('comments.admin.email'); + $adminEmail = config('comments.admin.email'); if (!empty($adminEmail) && filter_var($adminEmail, FILTER_VALIDATE_EMAIL)) { $recipients[$adminEmail] = array( 'name' => 'Administrator', @@ -863,7 +845,7 @@ function sendCommentNotifications($url, $newComment, $allComments, $notifyAdmin } // Add subscribers only if notifySubscribers is true AND comments.notify is enabled - if ($notifySubscribers && comments_config('comments.notify') === 'true') { + if ($notifySubscribers && config('comments.notify') === 'true') { // Add parent comment author (if replying) if (!empty($newComment['parent_id'])) { foreach ($allComments as $comment) { @@ -920,13 +902,13 @@ function sendCommentEmail($to, $toName, $url, $comment, $type = 'admin') // Server settings $mail->isSMTP(); - $mail->Host = comments_config('comments.mail.host'); + $mail->Host = config('comments.mail.host'); $mail->SMTPAuth = true; - $mail->Username = comments_config('comments.mail.username'); - $mail->Password = comments_config('comments.mail.password'); - $mail->Port = comments_config('comments.mail.port'); + $mail->Username = config('comments.mail.username'); + $mail->Password = config('comments.mail.password'); + $mail->Port = config('comments.mail.port'); - $encryption = comments_config('comments.mail.encryption'); + $encryption = config('comments.mail.encryption'); if ($encryption === 'tls') { $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; } elseif ($encryption === 'ssl') { @@ -935,8 +917,8 @@ function sendCommentEmail($to, $toName, $url, $comment, $type = 'admin') // Recipients $mail->setFrom( - comments_config('comments.mail.from.email'), - comments_config('comments.mail.from.name') + config('comments.mail.from.email'), + config('comments.mail.from.name') ); $mail->addAddress($to, $toName); @@ -945,7 +927,7 @@ function sendCommentEmail($to, $toName, $url, $comment, $type = 'admin') $mail->CharSet = 'UTF-8'; if ($type === 'admin') { - if (comments_config('comments.moderation') === 'true') { + if (config('comments.moderation') === 'true') { $mail->Subject = i18n('comment_email_admin_awaiting') . " - " . config('blog.title'); } else { @@ -967,7 +949,7 @@ function sendCommentEmail($to, $toName, $url, $comment, $type = 'admin')

    " . nl2br(htmlspecialchars($comment['comment'])) . "

    " . i18n('comment_email_view_comment') . "

     

    -

    " . i18n('comment_subscribe_unsubscribe_message') . " ".config('blog.title')." " . i18n('comment_subscribe_unsubscribe_anytime') . ": " . i18n('comment_unsubscribe') . ".

    +

    " . i18n('comment_subscribe_unsubscribe_message') . " ".config('blog.title')." " . i18n('comment_subscribe_unsubscribe_anytime') . ": " . i18n('comment_unsubscribe') . ".

     

    "; } @@ -1028,6 +1010,364 @@ function formatCommentText($text) + + + + + + + + + +/** + * Display comments form + * + * @param string $postId Post or page ID + * @param string $parentId Parent comment ID for replies (optional) + * @return void + */ +function displayCommentsForm($url, $mdfile = null, $parentId = null) +{ + if (!comments()) { + return; + } + + $formId = $parentId ? 'reply-form-' . $parentId : 'comment-form'; + $submitUrl = site_url() . 'comments/submit'; + ?> + + + + + + + + + + + + +
    + + + + + +
    +
    +
    +
    + + + +
    +
    + + +
    +
    +
    + + + + +
    + + 0 ? '#ddd' : '#007bff'; + ?> +
    +
    + + + +
    +
    + +
    + + + + '; + foreach ($comment['children'] as $child) { + displayComment($child, $postId); + } + echo '
    '; + } + ?> +
    + +
    + + +
    + url; + $file = $a->file; + + $urlpath = ltrim(parse_url($url, PHP_URL_PATH), '/'); + + ?> +
    + + + + + +
    +

    + +
    +
    + + + { + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.json(); + }) + .then(data => { + // Parse the JSON string if needed + const messages = typeof data === 'string' ? JSON.parse(data) : data; + + if (!Array.isArray(messages) || messages.length === 0) return; + + const messagesDiv = document.getElementById('messages-div'); + const messagesTextDiv = document.getElementById('messages-text'); + // const innerDiv = messagesDiv.querySelector('.message-alert'); + const innerDiv = messagesDiv.querySelector('.message-alert') || messagesDiv; + + // Show messages one at a time, sequentially + let index = 0; + + function showMessage(msg) { + if (!msg.message || msg.message.trim() === '') return showNext(); + + messagesTextDiv.textContent = msg.message; + innerDiv.className = innerDiv.className + ' message-alert-' + msg.class; + + // Reset display and opacity + messagesDiv.style.transition = 'none'; + messagesDiv.style.opacity = '1'; + messagesDiv.style.display = 'block'; + + // Fade out after 5 seconds, then show next + setTimeout(() => { + messagesDiv.style.transition = 'opacity 0.8s ease'; + messagesDiv.style.opacity = '0'; + messagesDiv.addEventListener('transitionend', () => { + showNext(); + }, { once: true }); + }, 5000); + } + + function showNext() { + if (index < messages.length) { + showMessage(messages[index++]); + } else { + messagesDiv.style.display = 'none'; + } + } + + showNext(); + }); + } +}); \ No newline at end of file diff --git a/system/resources/php/sysmessages.php b/system/resources/php/sysmessages.php new file mode 100644 index 0000000..0dd9b7e --- /dev/null +++ b/system/resources/php/sysmessages.php @@ -0,0 +1,34 @@ +getMessage()); +} + +// Return JSON response +echo json_encode($response); +exit; + +?> \ No newline at end of file diff --git a/themes/blog/css/styles.css b/themes/blog/css/styles.css index 68cc07b..b92eb54 100644 --- a/themes/blog/css/styles.css +++ b/themes/blog/css/styles.css @@ -641,3 +641,73 @@ ul.month { .social-logo a:before { padding-top:6px; } + + +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.comment-alert-status { + padding: 5px; + margin-bottom: 20px; + border-radius: 5px; +} + +.comment-alert-status-success { + background-color: rgba(0, 128, 0, 0.2); + border-left: 3px solid rgba(0, 128, 0); +} + +.comment-alert-status-warning { + background-color: rgba(255, 204, 0, 0.2); + border-left: 3px solid rgba(255, 204, 0); +} + +.comment-alert-status-error { + background-color: rgba(191, 0, 0, 0.2); + border-left: 3px solid rgba(191, 0, 0); +} + + +.comments.aside.section li { + list-style: none; + margin-bottom: 10px; +} + +.comments.aside.section ul { + padding-left: 0px; +} + +.comments.aside.section a { + color: #5f6b77; + font-size: 16px; + line-height: 1.3; + font-family: 'Montserrat', sans-serif; + font-weight: 700; + margin-bottom: 10px; +} + +.comments.aside.section span { + font-style: italic; + font-size: small; +} + +.comment-item { + padding-left: 10px; +} + + +#messages-div { + display: none; +} + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2) !important; +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2) !important; +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2) !important; +} diff --git a/themes/blog/layout.html.php b/themes/blog/layout.html.php index 75fbb48..cb8f1d2 100644 --- a/themes/blog/layout.html.php +++ b/themes/blog/layout.html.php @@ -68,6 +68,16 @@
    + + +
    +
    +
    +
     
    +
    +
    +
    +
    @@ -131,6 +141,7 @@ + + + + +
    - +
    @@ -104,6 +104,9 @@
    + + +
    diff --git a/themes/clean/css/style.css b/themes/clean/css/style.css index ec04e06..d37fae6 100644 --- a/themes/clean/css/style.css +++ b/themes/clean/css/style.css @@ -954,4 +954,86 @@ ul.archivegroup { margin-top:-1rem; box-shadow: none; border: none; -} \ No newline at end of file +} + +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.comment-alert-status { + padding: 5px; + margin-bottom: 20px; + border-radius: 5px; +} + +.comment-alert-status-success { + background-color: rgba(0, 128, 0, 0.2); + border-left: 3px solid rgba(0, 128, 0); +} + +.comment-alert-status-warning { + background-color: rgba(255, 204, 0, 0.2); + border-left: 3px solid rgba(255, 204, 0); +} + +.comment-alert-status-error { + background-color: rgba(191, 0, 0, 0.2); + border-left: 3px solid rgba(191, 0, 0); +} + + + +.comment-item { + padding-left: 10px; + font-size: small; +} + + +.comments .btn { + background-color: white; + border: none; + font-family: Times New Roman; + color: #389dc1; + font-weight: bold; + cursor: pointer; +} + + + +.comments input:not([type="checkbox"]) { + width: 100%; +} + +.comments .form-check-input { + margin-right: 5px; +} + +.comments textarea { + width: 100%; +} + + +#messages-div { + display: none; + position: absolute; + margin-top: 10px; + width: 100%; +} + +#messages-text { + padding: 5px 10px 5px 10px; +} + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2) !important; +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2) !important; +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2) !important; +} + + + diff --git a/themes/clean/layout.html.php b/themes/clean/layout.html.php index ec73759..b63b77e 100644 --- a/themes/clean/layout.html.php +++ b/themes/clean/layout.html.php @@ -54,8 +54,19 @@
    + +
    +
    +
    +
     
    +
    +
    +
    + + + \ No newline at end of file diff --git a/themes/clean/post.html.php b/themes/clean/post.html.php index ce52637..23b8b07 100644 --- a/themes/clean/post.html.php +++ b/themes/clean/post.html.php @@ -67,6 +67,9 @@
    + + +
    diff --git a/themes/doks/css/style.css b/themes/doks/css/style.css index db93cfa..a4c8632 100644 --- a/themes/doks/css/style.css +++ b/themes/doks/css/style.css @@ -3580,4 +3580,63 @@ body.dark .social-logo a:hover, .dark .toc-wrapper a:hover { .list-unstyled li { margin: 0; -} \ No newline at end of file +} +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.comment-alert-status { + padding: 5px; + margin-bottom: 20px; + border-radius: 5px; +} + +.comment-alert-status-success { + background-color: rgba(0, 128, 0, 0.2); + border-left: 3px solid rgba(0, 128, 0); +} + +.comment-alert-status-warning { + background-color: rgba(255, 204, 0, 0.2); + border-left: 3px solid rgba(255, 204, 0); +} + +.comment-alert-status-error { + background-color: rgba(191, 0, 0, 0.2); + border-left: 3px solid rgba(191, 0, 0); +} + + +.comment-item { + padding-left: 10px; + border-left: 3px solid #49256a !important; +} + +.comments .form-check-input { + margin-right: 5px; +} + + +#messages-div { + display: none; + margin-top: 10px; + width: 100%; +} + +#messages-text { + padding: 5px 10px 5px 10px; +} + + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2) !important; +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2) !important; +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2) !important; +} + + diff --git a/themes/doks/layout.html.php b/themes/doks/layout.html.php index 32ad8e8..d82a90f 100644 --- a/themes/doks/layout.html.php +++ b/themes/doks/layout.html.php @@ -65,6 +65,14 @@ $front = get_frontpage(); ?>
    + + +
    +
    +
     
    +
    +
    +

    title;?>

    @@ -97,6 +105,14 @@ $front = get_frontpage(); ?>
    + + +
    +
    +
     
    +
    +
    +
    @@ -123,6 +139,7 @@ $front = get_frontpage(); ?>
    + diff --git a/themes/doks/post.html.php b/themes/doks/post.html.php index 3e31f06..02a1be1 100644 --- a/themes/doks/post.html.php +++ b/themes/doks/post.html.php @@ -73,7 +73,7 @@ title, $post->url) ?> - +
    @@ -81,6 +81,9 @@
    + + +
    diff --git a/themes/logs/css/style.css b/themes/logs/css/style.css index 1c059da..f861c23 100644 --- a/themes/logs/css/style.css +++ b/themes/logs/css/style.css @@ -983,4 +983,88 @@ ul.archivegroup { margin-top:-1rem; box-shadow: none; border: none; -} \ No newline at end of file +} + +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.comment-alert-status { + padding: 5px; + margin-bottom: 20px; + border-radius: 5px; +} + +.comment-alert-status-success { + background-color: rgba(0, 128, 0, 0.2); + border-left: 3px solid rgba(0, 128, 0); +} + +.comment-alert-status-warning { + background-color: rgba(255, 204, 0, 0.2); + border-left: 3px solid rgba(255, 204, 0); +} + +.comment-alert-status-error { + background-color: rgba(191, 0, 0, 0.2); + border-left: 3px solid rgba(191, 0, 0); +} + + +#comments { + width: 90%; +} + +.comments .btn { + background-color: white; + border: none; + font-family: Georgia, sans-serif; + font-size: 15px; + color: #21759B; + font-weight: bold; + cursor: pointer; +} + +.comments .btn:hover { + text-decoration: underline; + color: #D54E21; +} + +.comments input:not([type="checkbox"]) { + width: 100%; +} + +.comment-item { + padding-left: 10px; + border-left: 3px solid #21759B !important; +} + +.comments .form-check-input { + margin-right: 5px; +} + +.comments textarea { + width: 100%; +} + +#messages-div { + display: none; + margin-top: 10px; + width: 100%; +} + +#messages-text { + padding: 5px 10px 5px 10px; +} + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2); +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2); +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2); +} + diff --git a/themes/logs/layout.html.php b/themes/logs/layout.html.php index ffbfe24..b97da99 100644 --- a/themes/logs/layout.html.php +++ b/themes/logs/layout.html.php @@ -36,6 +36,14 @@
    + + +
    +
    +
     
    +
    +
    +
    +

    @@ -77,6 +86,15 @@
    + +
    +

    + + +
    + + +

    @@ -102,6 +120,7 @@
    + \ No newline at end of file diff --git a/themes/logs/post.html.php b/themes/logs/post.html.php index c22c918..d86e7cf 100644 --- a/themes/logs/post.html.php +++ b/themes/logs/post.html.php @@ -67,6 +67,9 @@
    + + +
    diff --git a/themes/readable/css/style.css b/themes/readable/css/style.css index e13b6ce..a05392a 100644 --- a/themes/readable/css/style.css +++ b/themes/readable/css/style.css @@ -1038,4 +1038,97 @@ ul.archivegroup { margin-top:-1rem; box-shadow: none; border: none; -} \ No newline at end of file +} + +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.comment-alert-status { + padding: 5px; + margin-bottom: 20px; + border-radius: 5px; +} + +.comment-alert-status-success { + background-color: rgba(0, 128, 0, 0.2); + border-left: 3px solid rgba(0, 128, 0); +} + +.comment-alert-status-warning { + background-color: rgba(255, 204, 0, 0.2); + border-left: 3px solid rgba(255, 204, 0); +} + +.comment-alert-status-error { + background-color: rgba(191, 0, 0, 0.2); + border-left: 3px solid rgba(191, 0, 0); +} + + +.comment-item { + padding-left: 10px; + font-size: small; + border-left: 3px solid #555 !important; +} + + +.comments input:not([type="checkbox"]) { + width: 100%; +} + +.comments .form-check-input { + margin-right: 5px; +} + +.comments textarea { + width: 100%; +} + + +.comments input[type="email"] { + padding: 4px 6px; + font-size: 14px; + background-color: #F6F7F9; + border: 1px solid #CFDAE5; +} + + +.comments .btn { + border-radius: 3px; + color: #555; + font-family: 'Source Sans', sans-serif; + font-size: 12px; + font-weight: bold; + color: #555; + padding: 5px 10px 5px 10px; + background: none repeat scroll 0 0 #E4E7EE; + border: none; + cursor: pointer; +} + + + +#messages-div { + display: none; + width: 100%; +} + +#messages-text { + padding: 5px 10px 5px 10px; +} + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2) !important; +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2) !important; +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2) !important; +} + + + + diff --git a/themes/readable/layout.html.php b/themes/readable/layout.html.php index 5baa99a..9f51afe 100644 --- a/themes/readable/layout.html.php +++ b/themes/readable/layout.html.php @@ -40,6 +40,16 @@
    + + +
    +
    +
    +
     
    +
    +
    +
    +
    @@ -52,6 +62,8 @@
    + + \ No newline at end of file diff --git a/themes/readable/post.html.php b/themes/readable/post.html.php index e981cbe..a782cfe 100644 --- a/themes/readable/post.html.php +++ b/themes/readable/post.html.php @@ -65,6 +65,9 @@
    + + +
    diff --git a/themes/tailwind/css/style.css b/themes/tailwind/css/style.css index 8852929..c41d630 100644 --- a/themes/tailwind/css/style.css +++ b/themes/tailwind/css/style.css @@ -147,4 +147,96 @@ .recent-posts > ul { padding-left: 15px; -} \ No newline at end of file +} +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.comment-alert-status { + padding: 5px; + margin-bottom: 20px; + border-radius: 5px; +} + +.comment-alert-status-success { + background-color: rgba(0, 128, 0, 0.2); + border-left: 3px solid rgba(0, 128, 0); +} + +.comment-alert-status-warning { + background-color: rgba(255, 204, 0, 0.2); + border-left: 3px solid rgba(255, 204, 0); +} + +.comment-alert-status-error { + background-color: rgba(191, 0, 0, 0.2); + border-left: 3px solid rgba(191, 0, 0); +} + + +.comment-form-section { + text-align: left; +} + + +.comment-form-section > h4 { + font-weight: bold; + margin-top: 10px; +} + +.comment-body { + font-style: italic; +} + +.comment-item { + padding-left: 10px; + font-size: small; + border-left: 3px solid #555 !important; + text-align: left; +} + + +.comments input:not([type="checkbox"]) { + width: 100%; +} + +.comments .form-check-input { + margin-right: 5px; +} + +.comments textarea { + width: 100%; +} + + +.comments .btn { +color: #ec4899; + text-decoration: underline; + font-weight: 500; + border: none; +} + + + +#messages-div { + display: none; + width: 100%; +} + +#messages-text { + padding: 5px 10px 5px 10px; + text-align: center; +} + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2) !important; +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2) !important; +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2) !important; +} + + diff --git a/themes/tailwind/layout.html.php b/themes/tailwind/layout.html.php index 66ff422..5b5c42d 100644 --- a/themes/tailwind/layout.html.php +++ b/themes/tailwind/layout.html.php @@ -79,9 +79,29 @@
    + + +
    +
    +
    +
     
    +
    +
    +
    +
    + + +
    +
    +
    +
     
    +
    +
    +
    +
    @@ -156,6 +176,8 @@ + + diff --git a/themes/tailwind/post.html.php b/themes/tailwind/post.html.php index b3afa3f..325326e 100644 --- a/themes/tailwind/post.html.php +++ b/themes/tailwind/post.html.php @@ -68,7 +68,7 @@

    related);?>
    - +
    @@ -77,6 +77,9 @@ title, $p->url) ?>
    + + +
    diff --git a/themes/twentyfifteen/css/style.css b/themes/twentyfifteen/css/style.css index d7de7c2..33d6407 100644 --- a/themes/twentyfifteen/css/style.css +++ b/themes/twentyfifteen/css/style.css @@ -6159,4 +6159,69 @@ ul.month { .social-logo a { height:35px; width:35px; -} \ No newline at end of file +} + + + + +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.widget.widget_meta span { + font-style: italic; + font-size: small; +} + +.comment-item { + padding-left: 10px; + font-size: small; + border-left: 3px solid #555 !important; + margin-top: 5px; + +} + + +.comments input:not([type="checkbox"]) { + width: 100%; +} + +.comments .form-check-input { + margin-right: 5px; + width: 5%; +} + +.comments textarea { + width: 100%; +} + +.comments .btn { + font-size: small; + +} + +.comment-form label { + display: inline; +} + + + +#messages-div { + display: none; +} + +#messages-text { + padding: 5px 10px 5px 10px; +} + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2) !important; +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2) !important; +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2) !important; +} + diff --git a/themes/twentyfifteen/css/style_v2.css b/themes/twentyfifteen/css/style_v2.css index 42893a7..d235a76 100644 --- a/themes/twentyfifteen/css/style_v2.css +++ b/themes/twentyfifteen/css/style_v2.css @@ -6166,4 +6166,88 @@ ul.month { .social-logo a { height:35px; width:35px; -} \ No newline at end of file +} + +/*-------------------------------------------------------------- +## - CSS comments +--------------------------------------------------------------*/ +.widget.widget_meta span { + font-style: italic; + font-size: small; +} + +.comment-alert-status { + padding: 5px; + margin-bottom: 20px; + border-radius: 5px; +} + +.comment-alert-status-success { + background-color: rgba(0, 128, 0, 0.2); + border-left: 3px solid rgba(0, 128, 0); +} + +.comment-alert-status-warning { + background-color: rgba(255, 204, 0, 0.2); + border-left: 3px solid rgba(255, 204, 0); +} + +.comment-alert-status-error { + background-color: rgba(191, 0, 0, 0.2); + border-left: 3px solid rgba(191, 0, 0); +} + + +.comment-item { + padding-left: 10px; + font-size: small; + border-left: 3px solid #555 !important; + margin-top: 5px; + +} + + +.comments input:not([type="checkbox"]) { + width: 100%; +} + +.comments .form-check-input { + margin-right: 5px; + width: 5%; +} + +.comments textarea { + width: 100%; +} + +.comments .btn { + font-size: small; + +} + +.comment-form label { + display: inline; +} + + + +#messages-div { + display: none; +} + +#messages-text { + padding: 5px 10px 5px 10px; +} + +.message-alert-success { + background-color: rgba(0, 128, 0, 0.2) !important; +} + +.message-alert-warning { + background-color: rgba(255, 204, 0, 0.2) !important; +} + +.message-alert-error { + background-color: rgba(191, 0, 0, 0.2) !important; +} + diff --git a/themes/twentyfifteen/post.html.php b/themes/twentyfifteen/post.html.php index 0f72eaa..0efa322 100644 --- a/themes/twentyfifteen/post.html.php +++ b/themes/twentyfifteen/post.html.php @@ -75,7 +75,7 @@ - +
    @@ -83,6 +83,9 @@
    + + +