Poprawki bezpieczeństwa formularza i panelu ustawień
- wp_unslash dla pól formularza i opcji (koniec z \' w mailach) - panel: wymagany nonce i manage_options, sanityzacja, esc_attr - reCAPTCHA: oczekiwana akcja i próg wyniku 0.5 - From z domeny strony, adres nadawcy tylko w Reply-To - honeypot bez die(), walidacja JS nie jest omijana - komunikat o nieudanej wysyłce, zachowanie wpisanych pól - nowy wygląd formularza (klasy ic-*) i szablon maila Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
+210
-1
@@ -1 +1,210 @@
|
||||
form #website{ display:none; }
|
||||
/* ============================================================
|
||||
inContact — cform.css v0.3
|
||||
Dark, modern, photography-focused form styles
|
||||
Prefix: .ic- (inContact)
|
||||
============================================================ */
|
||||
|
||||
/* ---------- Tokeny ---------- */
|
||||
:root {
|
||||
--ic-bg: #ffffff;
|
||||
--ic-surface: #f8f8f8;
|
||||
--ic-border: #dde0e8;
|
||||
--ic-border-focus: #2563eb;
|
||||
--ic-text: #1a1d26;
|
||||
--ic-text-muted: #8a909e;
|
||||
--ic-accent: #2563eb;
|
||||
--ic-accent-dark: #1a4fc4;
|
||||
--ic-error: #dc2626;
|
||||
--ic-success-bg: #f0fdf4;
|
||||
--ic-success-txt: #166534;
|
||||
--ic-error-bg: #fef2f2;
|
||||
--ic-radius: 6px;
|
||||
--ic-transition: 200ms ease;
|
||||
--ic-font: inherit;
|
||||
}
|
||||
|
||||
/* ---------- Wrapper ---------- */
|
||||
.ic-wrap {
|
||||
max-width: 680px;
|
||||
margin: 0 auto;
|
||||
padding: 40px 48px;
|
||||
background: var(--ic-surface);
|
||||
border: 1px solid var(--ic-border);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
|
||||
/* ---------- Alerty ---------- */
|
||||
.ic-alert {
|
||||
padding: 14px 18px;
|
||||
border-radius: var(--ic-radius);
|
||||
margin-bottom: 28px;
|
||||
font-size: 0.92rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.ic-alert--success {
|
||||
background: var(--ic-success-bg);
|
||||
color: var(--ic-success-txt);
|
||||
border: 1px solid #1e5e38;
|
||||
}
|
||||
|
||||
.ic-alert--error {
|
||||
background: var(--ic-error-bg);
|
||||
color: var(--ic-error);
|
||||
border: 1px solid #5e1e1e;
|
||||
}
|
||||
|
||||
/* ---------- Pola formularza ---------- */
|
||||
.ic-field {
|
||||
margin-bottom: 22px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Honeypot — ukryte */
|
||||
.ic-field--honey {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.ic-field label {
|
||||
display: block;
|
||||
margin-bottom: 7px;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ic-text-muted);
|
||||
}
|
||||
|
||||
.ic-field input[type="text"],
|
||||
.ic-field input[type="email"],
|
||||
.ic-field textarea {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
background: var(--ic-bg);
|
||||
border: 1px solid var(--ic-border);
|
||||
border-radius: var(--ic-radius);
|
||||
color: var(--ic-text);
|
||||
font-size: 1rem;
|
||||
font-family: inherit;
|
||||
line-height: 1.5;
|
||||
transition:
|
||||
border-color var(--ic-transition),
|
||||
box-shadow var(--ic-transition);
|
||||
box-sizing: border-box;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.ic-field input::placeholder,
|
||||
.ic-field textarea::placeholder {
|
||||
color: var(--ic-text-muted);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.ic-field input:focus,
|
||||
.ic-field textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--ic-border-focus);
|
||||
box-shadow: 0 0 0 3px rgba(226, 176, 74, 0.15);
|
||||
}
|
||||
|
||||
.ic-field textarea {
|
||||
resize: vertical;
|
||||
min-height: 130px;
|
||||
}
|
||||
|
||||
/* ---------- Walidacja ---------- */
|
||||
.ic-field__error {
|
||||
display: none;
|
||||
margin-top: 6px;
|
||||
font-size: 0.8rem;
|
||||
color: var(--ic-error);
|
||||
}
|
||||
|
||||
.ic-field--invalid input,
|
||||
.ic-field--invalid textarea {
|
||||
border-color: var(--ic-error);
|
||||
box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.15);
|
||||
}
|
||||
|
||||
.ic-field--invalid .ic-field__error {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ---------- reCAPTCHA ---------- */
|
||||
.ic-field--captcha {
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
|
||||
/* reCAPTCHA ma własny iframe — filtrujemy tak żeby ciemne tło nie świeciło przez padding */
|
||||
.ic-field--captcha .g-recaptcha {
|
||||
display: inline-block;
|
||||
border-radius: var(--ic-radius);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ---------- Przycisk ---------- */
|
||||
.ic-field--submit {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#ic-submit {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 13px 32px;
|
||||
background: var(--ic-accent);
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: var(--ic-radius);
|
||||
font-size: 0.95rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.04em;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background var(--ic-transition),
|
||||
transform var(--ic-transition),
|
||||
box-shadow var(--ic-transition);
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
#ic-submit svg {
|
||||
flex-shrink: 0;
|
||||
transition: transform var(--ic-transition);
|
||||
}
|
||||
|
||||
#ic-submit:hover {
|
||||
background: var(--ic-accent-dark);
|
||||
box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
#ic-submit:hover svg {
|
||||
transform: translateX(2px) translateY(-2px);
|
||||
}
|
||||
|
||||
#ic-submit:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#ic-submit:focus-visible {
|
||||
outline: 2px solid var(--ic-accent);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
/* ---------- Responsywność ---------- */
|
||||
@media (max-width: 640px) {
|
||||
.ic-wrap {
|
||||
padding: 28px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user