FastComments.com

Custom Styling Guide

Αυτός ο οδηγός παρέχει το πλήρες προεπιλεγμένο CSS που χρησιμοποιείται από το FastComments commenting widget (v2) και μερικές οδηγίες για την παρακάμψη των στυλ.

Η κατανόηση του προεπιλεγμένου CSS σας επιτρέπει να:

  • Προσαρμόσετε την εμφάνιση παρακάμπτοντας συγκεκριμένα στυλ
  • Αντιμετωπίσετε προβλήματα στυλ βλέποντας ποιες κλάσεις και επιλογείς είναι διαθέσιμοι
  • Δημιουργήσετε προσαρμοσμένα θέματα που λειτουργούν με τη δομή του widget
  • Χρησιμοποιήσετε με βοηθούς AI για να δημιουργήσετε προσαρμοσμένες τροποποιήσεις CSS.

Πώς να παρακάμψετε τα στυλ

Ο τρόπος παρακάμψης των στυλ διαφέρει ανάλογα με το widget. Για το comment widget, πρέπει να χρησιμοποιήσετε την παράμετρο ρύθμισης customCSS για να περάσετε το CSS στο iframe, ή να προσδιορίσετε το CSS στη σελίδα Προσαρμογής στον πίνακα διαχείρισης η οποία θα σερβίρει το CSS από το CDN μας.

Αναφορά Στυλ Widget Σχολίων (v2, πιο πρόσφατη έκδοση) Internal Link

Comment Widget Default CSS
Copy Copy
1
2body { margin: 0; padding: 0; }
3 d { display: block }
4 @keyframes pop-in { 0% { transform: scale(0.3); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
5 @keyframes placeHolderShimmer { 0% { background-position: 0 0 } 100% { background-position: 100% 0 } }
6 /* shimmer skeleton for in-flight saves and lazy avatar loads. To restyle the loading state, target .animated-background. */
7 .comment-reply .comment-input.animated-background, .comment-reply input.animated-background, .animated-background { animation-duration: 1s; animation-iteration-count: infinite; animation-name: placeHolderShimmer; background: #f6f7f8; background: linear-gradient(to right, #eee 8%, #dddddd 18%, #eee 33%); background-size: 50% 50%; }
8 .comment-reply .tos-checkbox { display: flex; align-items: center; gap: 8px; margin: 8px 0; cursor: pointer }
9 .comment-reply .tos-checkbox a { color: inherit }
10 .comment-reply > .tos-checkbox { margin: 8px }
11 .comment-reply .tos-checkbox input[type=checkbox] { margin: 0; width: auto; box-shadow: none }
12 @keyframes backgroundToNormal { from { background: lightblue } to { background: inherit } }
13 /* widget root. Scope custom rules under .fast-comments. Config-driven modifier classes also land here: .readonly, .hide-avatars, .disable-image-redirect, .single-line-comment-input, .vote-style-1, .new-to-bottom -- use them as conditional ancestors. */
14 .fast-comments { position: relative; width: 100%; font-size: 13px }
15 .hidden { display: none }
16 .invisible { visibility: hidden }
17 .inline-block { display: inline-block }
18 .icon { display: inline-block; width: 24px; height: 24px; vertical-align: middle; image-rendering: -webkit-optimize-contrast; }
19 .icon.bubble { background: url("${FC_CDN}/images/svg/v2/text_bubble_dark.svg") no-repeat center; background-size: 22px 22px; }
20 .icon.bubble-white { background: url("${FC_CDN}/images/svg/v2/text_bubble_white.svg") no-repeat center; background-size: 22px 22px; }
21 .icon.cross { background: url("${FC_CDN}/images/svg/v2/close.svg") no-repeat center; background-size: 9px 9px; }
22 .icon.reply-arrow-inactive { background: url("${FC_CDN}/images/svg/v2/reply_inactive.svg") no-repeat center; background-size: 15px 15px; }
23 .icon.reply-arrow-active { background: url("${FC_CDN}/images/svg/v2/reply.svg") no-repeat center; background-size: 15px 15px; }
24 .icon.up { background: url("${FC_CDN}/images/svg/v2/thumbs_up_light.svg") no-repeat center; background-size: 12px 12px; }
25 .icon.up.active, .icon.up:hover { background: url("${FC_CDN}/images/svg/v2/thumbs_up_dark.svg") no-repeat center; background-size: 12px 12px; }
26 .icon.down { background: url("${FC_CDN}/images/svg/v2/thumbs_down_light.svg") no-repeat center; background-size: 12px 12px; }
27 .icon.down.active, .icon.down:hover { background: url("${FC_CDN}/images/svg/v2/thumbs_down_dark.svg") no-repeat center; background-size: 12px 12px; }
28 .icon.pin-small { background: url("${FC_CDN}/images/svg/v2/pin.svg") no-repeat center; background-size: 15px 15px; }
29 .icon.lock-small { background: url("${FC_CDN}/images/padlock.svg") no-repeat center; background-size: 15px 15px; }
30 .icon.logo { width: 27px; height: 33px; background: url("${FC_CDN}/images/svg/v2/logo.svg") no-repeat center; background-size: 22px; }
31 .icon.edit-small { background: url("${FC_CDN}/images/svg/menu.svg") no-repeat center; background-size: 17px 17px; }
32 .icon.edit-big { background: url("${FC_CDN}/images/svg/v2/edit.svg") no-repeat center; background-size: 22px 22px; }
33 .icon.trash { background: url("${FC_CDN}/images/svg/v2/trash_thin.svg") no-repeat center; background-size: 22px 22px; }
34 .icon.eye { background: url("${FC_CDN}/images/svg/v2/view.svg") no-repeat center; background-size: 22px 22px; }
35 .icon.eye-slash { background: url("${FC_CDN}/images/svg/v2/view_hide.svg") no-repeat center; background-size: 22px 22px; }
36 .icon.replied { background: url("${FC_CDN}/images/svg/v2/replied.svg") no-repeat center; background-size: 22px 22px; }
37 .icon.bold { background: url("${FC_CDN}/images/svg/v2/editor_bold.svg") no-repeat center; background-size: 9px; }
38 .icon.ul { position: relative; top: 1px; background: url("${FC_CDN}/images/svg/v2/editor_underline.svg") no-repeat center; background-size: 10px; }
39 .icon.it { background: url("${FC_CDN}/images/svg/v2/editor_itallic.svg") no-repeat center; background-size: 7px; }
40 .icon.s { background: url("${FC_CDN}/images/svg/v2/editor_strike.svg") no-repeat center; background-size: 10px; }
41 .icon.code { background: url("${FC_CDN}/images/svg/v2/editor_embed.svg") no-repeat center; background-size: 16px; }
42 .icon.link { position: relative; top: -1px; background: url("${FC_CDN}/images/svg/v2/editor_link.svg") no-repeat center; background-size: 14px; }
43 .icon.img-up { background: url("${FC_CDN}/images/svg/v2/editor_image.svg") no-repeat center; background-size: 16px; }
44 .icon.img-btn-wrap { position: relative; }
45 .icon.return { background: url("${FC_CDN}/images/svg/return.svg") no-repeat center; background-size: 22px; margin-left: 6px; }
46 .icon.gif { width: auto; height: auto; font-size: 0; }
47 .icon.gif::before { content: "GIF"; font-size: 12px; }
48 .icon.spoiler { font-size: 12px; }
49 .icon.gif::before, .t-btn.txt { display: inline-block; width: auto; height: auto; margin-right: 3px; text-align: center; vertical-align: middle; font-weight: 500; }
50 .icon.bell { background: url("${FC_CDN}/images/svg/v2/bell.svg") no-repeat center; background-size: 22px; }
51 .icon.bell-red { background: url("${FC_CDN}/images/svg/v2/bell-red.svg") no-repeat center; background-size: 22px; }
52 .divider { display: inline-block; height: 25px; margin: 0 10px; vertical-align: middle; border-right: 1px solid #c2c2c2; }
53 .icon.block { background: url("${FC_CDN}/images/svg/v2/ban.svg") no-repeat; background-size: 22px 22px; }
54 .icon.flag { background: url("${FC_CDN}/images/svg/flag.svg") no-repeat; background-size: 22px 22px; }
55 .icon.flag-small { background: url("${FC_CDN}/images/svg/flag.svg") no-repeat center; background-size: 15px 15px; }
56 .select-dir-wrapper { clear: both; text-align: right; border-bottom: 1px solid #afafaf; }
57 .select-dir-wrapper .comment-count { float: left; font-weight: 500; }
58 .select-dir-wrapper > * { margin: 9px; height: 16px }
59 .select-dir { display: inline-block }
60 .dropdown { position: relative; z-index: 3; text-align: right }
61 .dropdown .drop-label { padding: 0 0 7px 0; cursor: pointer; font-weight: 500 }
62 .dropdown .drop-label i { position: relative; display: inline-block; top: -2px; font-size: 7px }
63 .dropdown .items { position: absolute; display: none; top: 20px; right: 0; width: 150px; overflow: hidden; border-radius: 0 0 4px 4px; background: #fff; }
64 .dropdown:hover .items { position: absolute; display: block }
65 .dropdown .items > * { padding: 5px 9px; cursor: pointer; font-weight: 500; text-align: left; font-size: 13px }
66 .no-comments { clear: both; text-align: center; font-weight: 500; font-size: 16px; }
67 .new-comments-message { width: fit-content; margin: 20px auto 0; padding: 5px 10px; text-align: center; cursor: pointer; font-weight: 500 }
68 .new-comments-message .new-comments-count { pointer-events: none; position: relative; top: 1px; display: inline-block; min-width: 12px; padding: 2px 5px 4px 5px; margin-right: 3px; border: 1px solid #a2a2a2; border-radius: 4px 0 4px 4px; }
69 .new-comments-message span { pointer-events: none; padding-bottom: 2px; border-bottom: 1px solid #a3a3a3; }
70 .comment .new-comments-message { margin: 10px auto 0; }
71 .sso-login-wrapper, .fastcomments-message-wrapper { display: flex; height: fit-content; min-height: 130px; padding: 30px 0; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid #bfbfbf; border-radius: 0 11px 11px 11px; }
72 .sso-login-wrapper .message-text, .fastcomments-message-wrapper .message-text { display: inline; pointer-events: none; }
73 .fastcomments-message-wrapper .message-text a { color: #fff; pointer-events: all; }
74 .sso-login-wrapper .sso-login, .fastcomments-message-wrapper .fastcomments-message { display: inline-block; animation: pop-in 0.5s; animation-timing-function: ease; padding: 10px 17px 10px 27px; border-radius: 0 7px 7px 7px; background: #333; color: #fff; text-decoration: none; font-size: 17px; font-weight: 500; }
75 .fastcomments-message-wrapper .fastcomments-message { margin: 0 5%; cursor: default; }
76 .sso-login-wrapper .sso-login[href] { cursor: pointer; }
77 .sso-login-wrapper .sso-login .message-text, .fastcomments-message-wrapper .fastcomments-message .message-text { margin-right: 10px; }
78 .sso-login-wrapper .sso-login .icon, .fastcomments-message-wrapper .fastcomments-message .icon { pointer-events: none; }
79 .sso-login-wrapper .sso-login.clickable { cursor: pointer; }
80 .comment .sso-login-wrapper { padding: 7px 0; text-align: left }
81 .comment .sso-login-wrapper .sso-login { font-size: 16px }
82 /* Toolbar, auth fields, and cancel button carry .default-hidden -- they're collapsed (height:0, opacity:0) until the user focuses the input, which adds .show-default-hidden to the .comment-reply form. When styling these elements, account for the collapsed state. */
83 .default-hidden { transition-duration: 300ms }
84 .comment-input:not(.show-default-hidden) .default-hidden { height: 0; margin: 0 !important; opacity: 0; pointer-events: none; transition-duration: 200ms }
85 .loading .pagination { opacity: 0.5; pointer-events: none; }
86 .card { border: 1px solid #d0d0d0; background: #fdfdfd; border-radius: 3px; box-shadow: 5px 5px 7px rgba(0,0,0,.1) }
87 button, .button { display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 0 7px 7px 7px; font-size: 15px; background: #fbfbfb; color: #333; text-decoration: none; border: 1px solid #a2a2a2; cursor: pointer }
88 .fast-comments, textarea { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif }
89 textarea::placeholder { font-size: 13px; font-weight: 500; transition-duration: 150ms }
90 textarea:focus::placeholder { color: transparent }
91 .fc-red { display: inline-block; margin: 5px; color: #ff0000 }
92 .comment-error { padding: 10px }
93 /* Brand shape: square top-left, rounded other 3 corners (border-radius: 0 N N N). Match this when adding new buttons/inputs/cards to stay on-theme. */
94 input, textarea { padding: 12px 20px; border: 1px solid #bfbfbf; border-radius: 0 11px 11px 11px; box-sizing: border-box; outline: none; background: transparent; }
95 input { padding: 9px 12px; border-radius: 0 6px 6px 6px; }
96 /* Focus state must be applied to BOTH the textarea border and the sibling .horizontal-border-wrapper (faux border around .comment-input -- see below). Override both selectors when changing focus color. */
97 input:focus, textarea:focus, textarea:focus + .horizontal-border-wrapper, .comment-input textarea:focus { border-color: #555 } /* .comment-reply textarea:focus for ssr */
98 .pagination { margin-top: 50px; line-height: 19px; text-align: center; user-select: none; }
99 .pagination > * { display: inline-block; cursor: pointer; font-weight: 700; }
100 .pagination > * > span { font-weight: normal; pointer-events: none; }
101 .pagination > * > span::before { content: "("; }
102 .pagination > * > span::after { content: ")"; }
103 .pagination .load-next-page { padding-right: 25px; }
104 .pagination .load-all { padding-left: 25px; border-left: 2px solid #555; } /* important that border is on the one to the right, as it doesn't always show */
105 .comments-toggle { display: block; width: fit-content; margin: 20px auto; cursor: pointer; padding: 10px 17px 10px 27px; border-radius: 7px; background: #333; color: #fff; text-decoration: none; font-size: 17px; font-weight: 500; user-select: none; }
106 .replying-to { margin-bottom: 5px }
107 .comment-reply { position: relative; width: 100%; margin: 10px 0 15px 0; }
108 .comment-reply.root { padding: 15px; box-sizing: border-box; }
109 @media(max-width: 500px) { .comment-reply.root { padding: 15px 5px 15px 5px; } }
110 .comment-reply .fast-comments-waiting { display: block; margin: 5px 0 }
111 .comment-reply .comment-reply-top-bar { position: relative; min-height: 25px; margin: 0 26px 15px 26px; line-height: 25px; } /* relative positioned for things like notifications list */
112 .comment-reply .comment-reply-top-bar .logged-in-info { display: inline-block; width: calc(100% - 60px); min-width: 150px; }
113 .comment-reply .comment-reply-top-bar .logged-in-info .avatar { display: inline-block; height: 25px; vertical-align: middle; margin-right: 5px; border-radius: 25px; overflow: hidden; box-shadow: 3px 3px 3px 0 rgba(0, 0, 0, 0.07); font-size: 0; }
114 .comment-reply .comment-reply-top-bar .logged-in-info .avatar .open-profile { cursor: pointer; }
115 .comment-reply .comment-reply-top-bar .logged-in-info .avatar.animated-background img { opacity: 0.1; }
116 .comment-reply .comment-reply-top-bar .logged-in-info .avatar img { width: 25px; height: 25px; object-fit: cover; }
117 .comment-reply .comment-reply-top-bar .logged-in-info .username { display: inline-block; max-width: calc(50% - 25px); overflow: hidden; vertical-align: middle; text-overflow: ellipsis; font-weight: 700; white-space: nowrap; }
118 .comment-reply .comment-reply-top-bar .logged-in-info .badges { display: inline-block; margin-left: 5px; }
119 .comment-reply .comment-reply-top-bar .right { float: right; }
120 .comment-reply .comment-reply-top-bar .right > * { display: inline-block; }
121 .comment-reply .comment-reply-top-bar .right .menu { font-weight: 500; font-size: 11px; }
122 .comment-reply .comment-reply-top-bar .right .menu:hover { z-index: 9002; }
123 .comment-reply .comment-reply-top-bar .right .menu .drop-label i { display: inline-block; width: 4px; height: 4px; background: #333; border-radius: 4px; margin: 0 2px; }
124 .comment-reply .comment-reply-top-bar .right .menu .items { top: 25px; padding: 20px; box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.1); border-radius: 10px 0 10px 10px; }
125 .comment-reply .comment-reply-top-bar .right .menu .items > * { font-weight: 700; }
126 .comment-reply .comment-reply-top-bar .right .notification-bell { position: relative; margin-left: 5px; cursor: pointer; }
127 .comment-reply .comment-reply-top-bar .right .notification-bell .count { position: absolute; top: -3px; left: 19px; min-width: 15px; height: 15px; text-align: center; font-size: 11px; pointer-events: none; color: red; display: none; }
128 .comment-reply .comment-reply-top-bar .right .notification-bell .icon.bell-red { display: none; }
129 .comment-reply .comment-reply-top-bar .right .notification-bell > * { pointer-events: none; }
130 .comment-reply .comment-reply-top-bar .right .notification-bell.has-notifications .icon.bell { display: none; }
131 .comment-reply .comment-reply-top-bar .right .notification-bell.has-notifications .icon.bell-red { display: inline-block; }
132 .comment-reply .comment-reply-top-bar .right .notification-bell.has-notifications .count { display: block; }
133 .toolbar { position: relative; display: inline-block; margin: 5px 0 0 0; font-size: 13px }
134 .toolbar .t-btn { display: inline-block; margin: 0 1px; vertical-align: middle; cursor: pointer; transition-duration: 200ms; user-select: none; }
135 .toolbar .t-btn:hover { opacity: 0.7; }
136 .toolbar .img-btn-wrap { display: inline-block; overflow: hidden }
137 .toolbar .t-btn input[type=file] { position: absolute; padding: 40px; font-size: 100px; top: 0; left: 0; opacity: 0; cursor: pointer }
138 .commenty-input:not(.show-default-hidden) .toolbar { width: 100%; margin-top: -50px; }
139 @media(max-width: 500px) { .toolbar { display: flex; width: 100%; padding-bottom: 12px; justify-content: space-evenly; } }
140 @media(max-width: 500px) { .comment-input .toolbar { margin-top: 50px; border-bottom: 1px solid #bfbfbf; } }
141 .comment-reply .auth-input, .comment-vote-auth.auth-input { margin: 10px 0; font-size: 13px }
142 .comment-reply .auth-input .fc-login { margin: 10px 0 0; }
143 .comment-reply .auth-input .reasoning, .comment-vote-auth.auth-input .reasoning { font-weight: 600; }
144 .comment-reply .auth-input .fc-red, .comment-vote-auth.auth-input .fc-red { display: block }
145 .comment-reply .auth-input input, .comment-vote-auth.auth-input input { width: 100%; margin-top: 10px; padding: 9px 12px; border-radius: 0 6px 6px 6px; font-size: 14px; border: 1px solid #a2a2a2; }
146 .comment-reply .auth-input .solicitation-info, .comment-vote-auth.auth-input .solicitation-info { margin-top: 10px; }
147 .comment-reply .auth-input .fast-comments-reply { margin-top: 10px; padding: 10px 45px; border-radius: 5px 0 5px 5px; background: #333; color: #fff; border: none; }
148 /* padding-bottom reserves space for the absolute toolbar/submit button. Don't remove it without also repositioning those elements. */
149 .comment-input, .comment-edit { position: relative; padding-bottom: 30px; border-radius: 0 11px 11px 11px; }
150 /* The textarea has no bottom border or bottom radius -- the bottom edge is drawn by .horizontal-border-bottom-* divs. To restyle the bottom of the input, target those, not the textarea. */
151 .comment-input textarea { display: block; width: 100%; height: 130px; padding: 15px 25px 15px 15px; resize: none; font-size: 16px; border-bottom: none; border-radius: 0 11px 0 0; }
152 .comment-input textarea::placeholder { font-size: 16px; font-weight: 400; }
153 .comment-input input { display: block; width: 100%; font-size: 14px; }
154 .comment-input .fastcomments-message-wrapper { border: 1px solid #bfbfbf; border-bottom: none; border-radius: 0 11px 0 0; }
155 .comment-input input[name=fastcomments-link] { display: block; width: 100%; margin: 10px 0; }
156 /*
157 * COMMENT INPUT BORDER: drawn by 6 absolutely-positioned divs inside .horizontal-border-wrapper (top-left, top-right, left, right, bottom-left, bottom-right), NOT by the textarea's border. To change the input's border color, width, or radius, target .horizontal-border-wrapper (sets border-color, inherited by all 6 pieces) and the individual .horizontal-border-* rules. The bottom-center is intentionally open so the submit button can overlap it. Top pieces are display:none on the root reply box and re-shown only for nested reply boxes (rule near end of block).
158 */
159 .comment-input .horizontal-border-wrapper { pointer-events: none; border-color: #bfbfbf; }
160 .comment-input .horizontal-border { position: absolute; height: 20px; border-bottom: 1px solid; border-color: inherit; }
161 .comment-input .horizontal-border-left { bottom: 0; left: 0; border-radius: 0 0 0 11px; }
162 .comment-input .horizontal-border-right { bottom: 0; right: 0; width: 20px; border-radius: 0 0 11px 0; }
163 .comment-input .horizontal-border-top-left, .comment-input .horizontal-border-top-right { display: none; position: absolute; top: 20px; border-bottom: 0; border-top: 1px solid; border-color: inherit; }
164 .comment-input .horizontal-border-top-right { top: 0; right: 0; border-radius: 0 11px 0 0; width: 20px; }
165 .comment-input .horizontal-border-top-left { top: 0; left: 0; }
166 .comment-input .horizontal-border-bottom-left { position: absolute; height: 30px; width: 15px; left: 0; bottom: 0; border-color: inherit; border-left-width: 1px; border-left-style: solid; border-radius: 0 0 0 11px; }
167 .comment-input .horizontal-border-bottom-right { position: absolute; height: 30px; width: 15px; right: 0; bottom: 0; border-color: inherit; border-right-width: 1px; border-right-style: solid; border-radius: 0 0 11px 0; }
168 /* Re-shows top border pieces for nested reply boxes (input rendered inside a .comment) so the input gets a full frame. */
169 .comment .comment-input .horizontal-border-top-left, .comment .comment-input .horizontal-border-top-right { display: block }
170 @media(max-width: 500px) { .comment-input textarea, .comment-input .fastcomments-message-wrapper { height: 130px; } }
171 /* Submit button. Sits in the gap between the .horizontal-border-bottom-left/right pieces -- if you change the input's bottom border layout, retune top/right here too. */
172 .comment .reply-button-wrapper { position: relative; float: right; top: -19px; right: 26px; border-radius: 0 7px 7px 7px; }
173 .comment .fast-comments-reply, .comment .edit-save { padding: 10px 27px; border-radius: 0 7px 7px 7px; background: #333; color: #fff; text-decoration: none; }
174 /* X cancel button. Only rendered for nested replies, not the root reply box. */
175 .comment .cancel-button-wrapper { position: absolute; top: 9px; right: 25px; border-radius: 4px; }
176 .comment .comment-edit .cancel-button-wrapper { top: -13px }
177 .comment .fast-comments-reply-cancel { margin-bottom: 0; padding: 1px 1px; border-radius: 4px; }
178 .comment .fast-comments-reply-cancel .cross { pointer-events: none; }
179 .comment-reply.root .reply-button-wrapper { position: relative; float: right; top: -20px; right: 27px; margin-bottom: 10px; border-radius: 0 7px 7px 7px; }
180 .comment-reply.root button { margin-bottom: 0; padding: 7px 20px; font-weight: 600; }
181 .comment-reply.root button .bubble { margin-left: 10px; pointer-events: none; }
182 .comments { clear: both; padding: 15px 0; }
183 @media(max-width: 500px) { .comments { padding: 15px 5px; } }
184 .comment { position: relative; margin-top: 15px }
185 @media(max-width: 500px) { .comment { margin-top: 5px; } }
186 .comment .comment-text spoiler:not(:hover) { background: #eee; color: #eee; border: 1px dotted #a2a2a2; }
187 .comment .comment-text .inline-image { display: block; max-width: 500px; margin: 3px 0 3px 0 } /* must not select inline-image in wysiwyg */
188 .comment .comment-text .inline-image img { max-width: 100%; max-height: 400px } /* must not select inline-image in wysiwyg */
189 .disable-image-redirect .comment .inline-image { cursor: default; }
190 /*
191 * Comment state classes on .comment -- target these to restyle moderation/state visuals:
192 * .is-live newly streamed-in comment (flash animation)
193 * .is-unread not yet seen by current user (avatar glow)
194 * .unverified commenter hasn't clicked email confirmation (dimmed)
195 * .is-spam flagged as spam (red border)
196 * .is-unapproved awaiting moderation (orange border)
197 * .is-blocked from a blocked user (text truncated to 40px)
198 * .is-deleted, .is-admin, .is-own, .24hr, .readonly are also added but not styled by default.
199 */
200 .comment.is-live > .inner { animation: backgroundToNormal 1.5s }
201 .comment.is-unread > .inner .avatar-wrapper { box-shadow: 0 0 20px #89f796; }
202 .comment.unverified > .commenter-name, .comment.unverified > .comment-content .commenter-name { opacity: 0.7 }
203 .comment.unverified > .comment-content > .comment-text { opacity: 0.7 }
204 .comment.is-spam > .comment-content { border: 1px solid red; } /* can be set when saving comment initially */
205 .comment.is-unapproved > .comment-content { border: 1px solid #ffa700; } /* can be set when saving comment initially */
206 .comment.is-blocked > .inner > .comment-content > .comment-text { max-height: 40px; overflow: hidden; }
207 .comment > .requires-verification-approval { margin: 3px 0 6px }
208 .comment > .inner > .spam-notice { margin: 0 0 10px 0; font-size: 12px; color: red }
209 @media(max-width: 500px) { .comment > .inner > .spam-notice { margin-top: 18px; } }
210 .comment .avatar-wrapper { position: relative; display: inline-block; width: 56px; height: 56px; overflow: hidden; box-shadow: 3px 3px 5px 0 rgba(0, 0, 0, 0.10); border-radius: 15px 0 15px 15px; vertical-align: top; }
211 /* .anon = placeholder avatar (no custom default configured + anonymous user). Style this to change how unidentified commenters appear. */
212 .comment .avatar-wrapper.anon { border: 1px solid #3f3f3f; }
213 .comment .avatar-wrapper .open-profile { cursor: pointer; }
214 .comment .avatar-wrapper.animated-background img { opacity: 0.1; }
215 @media(max-width: 500px) { .comment .avatar-wrapper { width: 36px; height: 36px; } }
216 .comment .avatar { width: 100%; height: 100%; object-fit: cover; }
217 @media(max-width: 500px) { .comment .avatar { vertical-align: middle } }
218 .comment .commenter-name .badges { margin-bottom: 5px; }
219 .badges .badge { display: inline-block; vertical-align: middle; line-height: initial; margin: 3px 5px 3px 0; padding: 5px 7px; cursor: default; font-size: 12px; white-space: nowrap; border-radius: 4px; color: #000; }
220 .badges .badge img { max-width: 22px; }
221 .badges .badge.ib { padding: 0; }
222 .comment .commenter-name { font-size: 14px }
223 .comment > .commenter-name { display: none; vertical-align: middle; color: #000 }
224 @media(max-width: 500px) { .comment > .commenter-name { display: inline-block; margin-left: 5px; vertical-align: middle } }
225 .comment > .commenter-name a { display: block; color: #000; text-decoration: none }
226 .comment .commenter-name .website-url { color: #000; text-decoration: underline }
227 .comment .commenter-name .label { font-size: 10px; text-transform: uppercase; font-weight: 500; color: #666666; } /* common label styling (unverified label, admin label, custom labels, etc) */
228 .comment > .inner { position: relative; padding: 8px 8px 10px 8px; } /* relative is required for blocked message */
229 @media(max-width: 500px) { .comment > .inner { padding: 5px 5px 5px 5px; } }
230 .comment > .inner > .comment-content { position: relative; display: inline-block; width: calc(99% - 101px); margin-left: 15px; }
231 .hide-avatars .comment > .inner > .comment-content { margin-left: 0; }
232 .hide-avatars .comments > .comment > .inner > .comment-content > .commenter-name, .hide-avatars .comments > .comment > .inner > .comment-content > .comment-text { padding-left: 0; }
233 @media(max-width: 500px) { .comment > .inner > .comment-content { display: inline; margin-left: 3px; background: transparent } }
234 .comment > .inner > .comment-content .commenter-name { display: inline-block; max-width: 50%; vertical-align: middle; padding: 5px 0 0 2px; color: #171717 }
235 .comment > .inner > .comment-content .commenter-name > .username { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
236 @media(max-width: 500px) { .comment > .inner > .comment-content .commenter-name { padding: 5px 0 0 4px; } }
237 .comment > .inner > .comment-content .comment-text { padding: 5px 2px; color: #000; line-height: 22px; font-size: 14px; word-break: break-word; white-space: pre-line; overflow-y: auto }
238 .comment > .inner > .comment-content .comment-text ol, .comment > .inner > .comment-content .comment-text ul { white-space: normal; }
239 .comment > .inner > .comment-content .comment-text .react { display: inline; max-height: 20px; margin: 0 3px; vertical-align: text-top; }
240 .comment > .inner > .comment-content > .comment-text b > a { color: #000; text-decoration: none; }
241 .comment > .inner > .comment-content > .comment-text blockquote { margin: 15px 0; padding: 0 20px; border-left: 1px solid #e5e5e5; }
242 .comment > .inner > .comment-content .comment-text-edit { width: 100%; margin-top: 15px; }
243 @media(max-width: 500px) { .comment > .children .comment-text { margin-left: 27px; } }
244 .comment > .inner > .comment-content .comment-text br { line-height: 0.5em }
245 .comment > .inner > .comment-content textarea.comment-text, .comment > .inner > .comment-content input.comment-text { display: block; width: calc(100% - 20px); height: fit-content; margin: 10px 10px 0 10px; padding: 5px 11px; resize: vertical }
246 .comment > .inner > .comment-content .edit-failure { display: block; margin: 10px 0; text-align: center }
247 .comment > .inner > .comment-content .comment-toolbar-vote { position: relative; margin-left: 8px }
248 @media(max-width: 500px) { .comment > .inner > .comment-content .comment-toolbar-vote { margin-left: 0 } }
249 .comment > .inner > .comment-content .comment-toolbar-vote .vote-awaiting-verification { padding: 5px 0; font-weight: 500 }
250 .comment > .inner > .comment-bottom { margin-top: 25px; border-bottom: 1px solid #e5e5e5; }
251 @media(max-width: 500px) { .comment > .inner > .comment-bottom { margin-top: 10px; } }
252 .children .comment > .inner > .comment-bottom { margin-left: 28px; }
253 @media(max-width: 500px) { .children .comment > .inner > .comment-bottom { margin-left: 21px; } }
254 @media(min-width: 500px) { .hide-avatars .children .comment > .inner > .comment-bottom { margin-left: 33px; } }
255 /* min-height reserves space for the absolutely-positioned reply button (.comment-toolbar-reply, top:-4px below). */
256 .comment > .inner > .comment-bottom > .comment-bottom-toolbar { position: relative; min-height: 36px; }
257 .comment > .inner > .comment-bottom .comment-vote-options .votes-up, .comment > .inner > .comment-bottom .comment-vote-options .votes-down { position: relative; top: 1px; vertical-align: middle; font-size: 12px; font-weight: 500; }
258 .comment > .inner > .comment-bottom .comment-vote-options .votes-up { margin-right: 5px; }
259 .comment > .inner > .comment-bottom .comment-vote-options .votes-down { margin-left: 5px; }
260 .comment > .inner > .comment-bottom .comment-toolbar-vote .comment-votes .divider { height: 20px; }
261 .comment > .inner > .comment-bottom .comment-vote-options { display: inline-block; margin: 0 7px 0 2px; font-size: 12px; }
262 .comment > .inner > .comment-bottom .comment-vote-options > span { cursor: pointer }
263 .comment > .inner > .comment-bottom .comment-votes, .comment > .inner > .comment-bottom .comment-reply-start { display: inline-block; margin: 5px 2px; font-size: 12px }
264 .comment > .inner > .comment-bottom .comment-vote-options button { margin: 0 3px }
265 .comment > .inner > .comment-bottom .comment-vote-options .view-count { display: inline-flex; align-items: center; vertical-align: middle; gap: 3px; margin-left: 3px; color: #828282; }
266 .comment > .inner > .comment-bottom .comment-vote-options .view-count .icon { opacity: 0.7; }
267 .comment > .inner > .comment-bottom .comment-toolbar-reply { position: absolute; right: 0; top: -4px; }
268 .comment > .inner > .comment-bottom .comment-reply-start { border: none; background: none; font-weight: 600; }
269 .comment > .inner > .comment-bottom .comment-reply-start i { position: relative; top: -2px; pointer-events: none; }
270 .comment > .inner > .comment-bottom .comment-vote-auth { width: 100%; max-width: 400px }
271 .comment > .inner > .comment-bottom .comment-vote-auth .fast-comments-waiting { float: left }
272 .comment > .inner > .comment-bottom .comment-vote-auth .buttons { text-align: right }
273 .comment > .inner > .comment-bottom .comment-vote-auth button { margin: 5px 0 0 5px; padding: 10px 35px; background: #333; color: #fff; border: none; }
274 .comment > .inner > .comment-bottom .reply-form-wrapper { padding: 5px }
275 .comment > .toggle-replies { margin: 0 0 0 15px; line-height: 24px; font-weight: 500; font-size: 11px; color: #666; cursor: pointer; user-select: none; }
276 .children .comment > .toggle-replies { margin-left: 41px; }
277 @media(max-width: 500px) { .children .comment > .toggle-replies { margin-left: 12px; } }
278 .comment > .toggle-replies > * { vertical-align: middle; pointer-events: none; }
279 .comment > .toggle-replies > i { margin-right: 5px; }
280 .comment > .toggle-replies > span > .count { color: #1f1f1f; }
281 .comment > .toggle-replies > span > .count:before { content: "("; }
282 .comment > .toggle-replies > span > .count:after { content: ")"; }
283 .comment .prompt { position: absolute; top: -2px; left: 0; width: 100%; height: 100%; padding: 10px; box-sizing: border-box; background: rgba(255, 255, 255, 0.9); text-align: center } /* -2px to ensure covers up arrow */
284 .comment .prompt p { font-weight: 500; }
285 .comment .prompt button { user-select: none; }
286 .comment .prompt button:not(:last-child) { margin-right: 10px }
287 .comment .comment-error p:before { padding-right: 5px; content: "❗" }
288 @media(max-width: 500px) { .comment .prompt { padding: 5px } }
289 @media(max-width: 500px) { .comment .prompt p { margin: 0 0 .4em 0 } }
290 .comment > .inner > .requires-verification-approval, .comment > .inner > .awaiting-approval-notice { margin: 15px 0; }
291 /* Date + flag/pin/lock icons + menu (3-dot/edit). On hover, z-index jumps so the open menu can overlap sibling comments. Match this when styling custom menu overlays. */
292 .comment .top-right { position: absolute; top: 0; right: 0; z-index: 2; }
293 .comment .top-right:hover { z-index: 9001; }
294 .comment .jump-link { padding-right: 5px; vertical-align: baseline; font-size: 12px; text-decoration: none; color: #4f4f4f }
295 .comment .jump-link .abs-date { margin-left: 5px; }
296 @media(max-width: 500px) { .comment > .inner > .top-right { top: -10px; } } /* if top is too low, will go above highlighting for admin actions */
297 .comment .top-right > * { display: inline-block; vertical-align: middle }
298 .comment > .inner > .replied { display: inline-block; margin: -7px 5px 0 0; vertical-align: top; }
299 .hide-avatars .comment > .inner > .replied { margin: 0 5px 0 0; }
300 .children > .comment:not(:first-child) > .replied { opacity: 0.5; }
301 .comment .menu { position: relative; padding: 10px 10px 10px 0; user-select: none }
302 .comment .menu .menu-btn { cursor: pointer }
303 .comment .menu .menu-btn i { display: inline-block; width: 4px; height: 4px; margin: 2px; background: #333; border-radius: 10px }
304 /* .menu.empty rendered when no actions are available -- kept in DOM to preserve layout, dimmed and non-clickable. */
305 .comment .menu.empty .menu-btn { cursor: default; opacity: 0.5; }
306 .menu-content { position: absolute; width: 130px; min-width: max-content; padding: 20px; background-color: #fff; box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.10); border-radius: 10px 0 10px 10px; z-index: 9001; }
307 .menu-content div { padding: 3px; font-weight: 700; cursor: pointer; font-size: 13px }
308 .menu-content div > * { vertical-align: middle; pointer-events: none; }
309 .menu-content div > i { margin: 0 5px 0 0; }
310 .menu-content div > span { display: inline-block; width: calc(100% - 29px); padding: 7px 10px; box-sizing: border-box; }
311 .menu-content div:not(:last-child) > span { border-bottom: 1px solid #dcdcdc; }
312 .menu-content.corner-bottom-right { border-radius: 10px 10px 0 10px; }
313 @media(max-width: 500px) { .comment .menu { padding: 10px 5px 10px 0; } } /* if top is too low, will go above highlighting for admin actions */
314 .comment > .children { margin: 15px 0 0 15px }
315 /* "Powered by FastComments" footer. White-labeled tenants get .empty (no content, no border). To restyle/hide the footer for white-label, scope via .footer.empty. */
316 .footer { height: 65px; margin-top: 25px; padding-top: 20px; text-align: center; font-size: 12px; }
317 .footer:not(.empty) { border-top: 1px solid #ccc }
318 .footer a, .footer .logo { vertical-align: top; text-decoration: none; color: #201600; font-weight: bold; font-size: 14px }
319 .footer .logo { margin-top: -2px; padding-right: 2px; }
320 .comment.readonly .comment-vote-options { display: none }
321 /* Autocomplete dropdown for @mentions and #hashtags inside the comment input. Anchored relative to .comment-input. */
322 .search-list { position: absolute; z-index: 4; width: 100%; margin-top: -9px; box-sizing: border-box; border-radius: 0 0 11px 11px; background: #fff; border: 1px solid #bfbfbf; }
323 .search-list .cross { position: absolute; top: -11px; right: 0; width: 20px; height: 20px; background-color: #fff; border: 1px solid #bfbfbf; border-right: 0; border-radius: 16px 0 0 16px; cursor: pointer; }
324 .search-list .search-entry { padding: 5px 10px; cursor: pointer; }
325 .search-list .search-entry.last { border-radius: 0 0 11px 11px }
326 .search-list .search-entry img { width: 20px; height: 20px; margin-right: 3px; vertical-align: middle; border-radius: 20px; }
327 .search-list .search-entry > * { pointer-events: none; }
328 .search-list .search-entry:hover, .search-list .search-entry.kb-select, .search-list .cross:hover { background-color: #eee; }
329 .search-list .search-section-header { padding: 4px 10px; font-size: 11px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; pointer-events: none; user-select: none; }
330 .search-list .search-section-loading { padding: 4px 10px; font-size: 11px; color: #888; font-style: italic; pointer-events: none; user-select: none; }
331 /* .search-list-open is added to .comment-input while the @/# autocomplete is showing -- hides the submit button so it doesn't collide with the dropdown. */
332 .comment-input.search-list-open .reply-button-wrapper { display: none; }
333 .avatar-wrapper .activity-icon { position: absolute; top: 4px; right: 4px; }
334 .activity-icon { width: 8px; height: 8px; border-radius: 10px; }
335 .username .activity-icon { position: relative; top: 2px; display: none; margin-right: 5px; }
336 .activity-icon.online { display: inline-block; background: lime; box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.2); }
337 .hide-avatars .activity-icon.online { top: -1px; }
338 @media(max-width: 500px) { .activity-icon { width: 5px; height: 5px; } }
339

Στυλ Widget για Πρόσφατα Σχόλια Internal Link

Το Recent Comments Widget εμφανίζει μια λίστα με τα πιο πρόσφατα σχόλια σε ολόκληρο τον ιστότοπό σας ή για μια συγκεκριμένη σελίδα. Περιλαμβάνει μια επικεφαλίδα, στρογγυλεμένα avatars, προεπισκοπήσεις σχολίων, ημερομηνίες στις οποίες μπορείτε να κάνετε κλικ που οδηγούν απευθείας στο σχόλιο, και αυτόματη ανίχνευση σκοτεινής λειτουργίας.

Βασική Εγκατάσταση

Εγκατάσταση του Recent Comments Widget
Copy CopyRun External Link
1
2<script src="https://cdn.fastcomments.com/js/widget-recent-comments-v2.min.js"></script>
3<div id="fastcomments-widget-recent-comments"></div>
4<script>
5 FastCommentsRecentCommentsV2(document.getElementById('fastcomments-widget-recent-comments'), {
6 tenantId: 'demo'
7 });
8</script>
9

Επιλογές Διαμόρφωσης

  • tenantId (required): Το tenant ID του FastComments σας
  • urlId (optional): Φιλτράρει σε μία σελίδα. Αφήστε null για όλες τις σελίδες
  • count (optional): Αριθμός σχολίων προς εμφάνιση. Η προεπιλεγμένη τιμή είναι 10
  • hasDarkBackground (optional): Επιβάλλει στυλ σκοτεινής λειτουργίας. Αν δεν οριστεί, ανιχνεύεται αυτόματα από το φόντο της σελίδας

Δομή του Widget

Το widget αποδίδει την ακόλουθη δομή HTML:

Δομή HTML του Recent Comments Widget
Copy Copy
1
2<div class="fc-rc2">
3 <div class="fc-rc2-heading">Recent Comments</div>
4 <div class="fc-rc2-list">
5 <div class="fc-rc2-card">
6 <div class="fc-rc2-header">
7 <img class="fc-rc2-avatar" src="..." alt="Avatar" />
8 <div class="fc-rc2-meta">
9 <span class="fc-rc2-name">Username</span>
10 <a class="fc-rc2-date" href="...">2 hours ago</a>
11 </div>
12 </div>
13 <div class="fc-rc2-body">Comment preview...</div>
14 <a class="fc-rc2-page-link" href="...">Page Title</a>
15 </div>
16 </div>
17</div>
18

Αναφορά Προεπιλεγμένου CSS

Προεπιλεγμένο CSS του Recent Comments Widget
Copy Copy
1
2.fc-rc2 {
3 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
4 text-align: left;
5 line-height: 1.5;
6 color: #1a1a1a;
7 border: 1px solid #e0e0e0;
8 border-radius: 12px;
9 padding: 20px;
10 background: #fff;
11}
12.fc-rc2-heading { font-size: 16px; font-weight: 700; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
13.fc-rc2-card { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
14.fc-rc2-card:last-child { border-bottom: none; }
15.fc-rc2-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
16.fc-rc2-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
17.fc-rc2-name { font-size: 13px; font-weight: 600; }
18.fc-rc2-date { font-size: 11.5px; color: #999; text-decoration: none; }
19.fc-rc2-body { font-size: 14px; line-height: 1.55; color: #444; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
20.fc-rc2-page-link { display: inline-block; margin-top: 6px; font-size: 12px; color: #777; text-decoration: none; }
21.fc-rc2-page-link:hover { color: #0066cc; text-decoration: underline; }
22

Παραδείγματα Προσαρμογής

Αλλαγή μεγέθους avatar

Προσαρμοσμένο μέγεθος avatar
Copy Copy
1
2.fc-rc2-avatar {
3 width: 40px !important;
4 height: 40px !important;
5}
6

Εμφάνιση περισσότερων γραμμών σχολίου

Εμφάνιση περισσότερων γραμμών σχολίου
Copy Copy
1
2.fc-rc2-body {
3 -webkit-line-clamp: 5 !important;
4}
5

Κατάργηση περιγράμματος κοντέινερ

Κατάργηση περιγράμματος κοντέινερ
Copy Copy
1
2.fc-rc2 {
3 border: none !important;
4 box-shadow: none !important;
5}
6

Στυλ Widget για τις Πιο Συζητημένες Σελίδες Internal Link

Το widget Most Discussed Pages εμφανίζει μια ταξινομημένη λίστα με τις σελίδες σας που έχουν τα περισσότερα σχόλια. Περιλαμβάνει μια κεφαλίδα, αριθμημένες θέσεις κατάταξης, μετρήσεις σχολίων με εικονίδια, ημερομηνίες τελευταίας δραστηριότητας και αυτόματη ανίχνευση dark mode.

Βασική Εγκατάσταση

Εγκατάσταση widget Πιο Σχολιασμένων Σελίδων
Copy CopyRun External Link
1
2<script src="https://cdn.fastcomments.com/js/widget-top-pages-v2.min.js"></script>
3<div id="fastcomments-widget-top-pages"></div>
4<script>
5 FastCommentsTopPagesV2(document.getElementById('fastcomments-widget-top-pages'), {
6 tenantId: 'demo'
7 });
8</script>
9

Επιλογές Διαμόρφωσης

  • tenantId (απαιτείται): Το tenant ID του FastComments
  • hasDarkBackground (προαιρετικό): Επιβάλλει το στυλ dark mode. Αν δεν οριστεί, ανιχνεύεται αυτόματα από το φόντο της σελίδας

Δομή του Widget

Το widget αποδίδεται με την ακόλουθη δομή HTML:

Δομή HTML του widget Πιο Σχολιασμένων Σελίδων
Copy Copy
1
2<div class="fc-tp2">
3 <div class="fc-tp2-heading">Most Discussed Pages</div>
4 <div class="fc-tp2-list">
5 <div class="fc-tp2-item">
6 <div class="fc-tp2-rank">1</div>
7 <div class="fc-tp2-detail">
8 <a class="fc-tp2-title" href="...">Page Title</a>
9 <span class="fc-tp2-activity">Last activity Mar 21, 2026</span>
10 </div>
11 <div class="fc-tp2-count">42</div>
12 </div>
13 </div>
14</div>
15

Αναφορά Προεπιλεγμένου CSS

Προεπιλεγμένο CSS του widget Πιο Σχολιασμένων Σελίδων
Copy Copy
1
2.fc-tp2 {
3 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
4 text-align: left;
5 line-height: 1.5;
6 color: #1a1a1a;
7 border: 1px solid #e0e0e0;
8 border-radius: 12px;
9 padding: 20px;
10 background: #fff;
11}
12.fc-tp2-heading { font-size: 16px; font-weight: 700; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
13.fc-tp2-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
14.fc-tp2-item:last-child { border-bottom: none; }
15.fc-tp2-rank { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; font-weight: 700; background: #f0f0f0; color: #888; }
16.fc-tp2-title { font-size: 13px; font-weight: 500; color: #1a1a1a; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
17.fc-tp2-activity { font-size: 11px; color: #999; }
18.fc-tp2-count { font-size: 12px; font-weight: 600; color: #666; }
19

Παραδείγματα Προσαρμογής

Αφαίρεση ετικετών κατάταξης

Αφαίρεση ετικετών κατάταξης
Copy Copy
1
2.fc-tp2-rank {
3 display: none !important;
4}
5

Αφαίρεση περιγράμματος κοντέινερ

Αφαίρεση περιγράμματος κοντέινερ
Copy Copy
1
2.fc-tp2 {
3 border: none !important;
4 box-shadow: none !important;
5}
6

Στυλ Widget για Πρόσφατες Συζητήσεις Internal Link

Το Widget Πρόσφατων Συζητήσεων εμφανίζει μια λίστα σελίδων ταξινομημένη με βάση τη νεότερη δραστηριότητα σχολίων. Περιλαμβάνει μια επικεφαλίδα, τις ημερομηνίες τελευταίας δραστηριότητας, τους αριθμούς σχολίων με εικονίδια και αυτόματη ανίχνευση σκοτεινής λειτουργίας.

Βασική Εγκατάσταση

Εγκατάσταση Widget Πρόσφατων Συζητήσεων
Copy CopyRun External Link
1
2<script src="https://cdn.fastcomments.com/js/widget-recent-discussions-v2.min.js"></script>
3<div id="fastcomments-widget-recent-discussions"></div>
4<script>
5 FastCommentsRecentDiscussionsV2(document.getElementById('fastcomments-widget-recent-discussions'), {
6 tenantId: 'demo'
7 });
8</script>
9

Επιλογές Διαμόρφωσης

  • tenantId (απαραίτητο): Το tenant ID σας στο FastComments
  • count (προαιρετικό): Αριθμός σελίδων προς εμφάνιση. Προεπιλογή 20, μέγιστο 100
  • hasDarkBackground (προαιρετικό): Εξαναγκάστε το στυλ σκοτεινής λειτουργίας. Αν δεν οριστεί, ανιχνεύεται αυτόματα από το φόντο της σελίδας

Δομή του Widget

Το widget αποδίδεται με την ακόλουθη δομή HTML:

Δομή HTML Widget Πρόσφατων Συζητήσεων
Copy Copy
1
2<div class="fc-rd2">
3 <div class="fc-rd2-heading">Recent Discussions</div>
4 <div class="fc-rd2-list">
5 <div class="fc-rd2-item">
6 <div class="fc-rd2-detail">
7 <a class="fc-rd2-title" href="...">Page Title</a>
8 <span class="fc-rd2-activity">Last activity Mar 21, 2026</span>
9 </div>
10 <div class="fc-rd2-count">42</div>
11 </div>
12 </div>
13</div>
14

Προεπιλεγμένη Αναφορά CSS

Προεπιλεγμένο CSS του Widget Πρόσφατων Συζητήσεων
Copy Copy
1
2.fc-rd2 {
3 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
4 text-align: left;
5 line-height: 1.5;
6 color: #1a1a1a;
7 border: 1px solid #e0e0e0;
8 border-radius: 12px;
9 padding: 20px;
10 background: #fff;
11}
12.fc-rd2-heading { font-size: 16px; font-weight: 700; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
13.fc-rd2-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
14.fc-rd2-item:last-child { border-bottom: none; }
15.fc-rd2-title { font-size: 13px; font-weight: 500; color: #1a1a1a; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
16.fc-rd2-activity { font-size: 11px; color: #999; }
17.fc-rd2-count { font-size: 12px; font-weight: 600; color: #666; }
18

Παραδείγματα Προσαρμογής

Κατάργηση περιγράμματος κοντέινερ

Κατάργηση περιγράμματος κοντέινερ
Copy Copy
1
2.fc-rd2 {
3 border: none !important;
4 box-shadow: none !important;
5}
6

Προσαρμοσμένο Χρώμα Συνδέσμου

Προσαρμοσμένο Χρώμα Συνδέσμου
Copy Copy
1
2a.fc-rd2-title:hover {
3 color: #e63946 !important;
4}
5

Άλλες βιβλιοθήκες frontend Internal Link

Όλες οι επίσημες frontend βιβλιοθήκες του FastComments για React, Angular, Vue, και άλλα, δέχονται το customCSS διαμόρφωσης παράμετρο και είναι περιτυλίγματα γύρω από τη βιβλιοθήκη vanilla js με την ίδια δομή HTML.