mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(CaptchaModal): improve captcha visibility by fixing margin
This commit is contained in:
@@ -1,97 +1,95 @@
|
|||||||
import styled from "styled-components";
|
import styled from 'styled-components';
|
||||||
import Modal from 'react-modal';
|
import Modal from 'react-modal';
|
||||||
|
|
||||||
export const StyledModal = styled(Modal)`
|
export const StyledModal = styled(Modal)`
|
||||||
.hide-modal-overlay {
|
.hide-modal-overlay {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: calc(50% - 150px);
|
top: calc(50% - 150px);
|
||||||
left: calc(50% - 150px);
|
left: calc(50% - 150px);
|
||||||
display: block;
|
display: block;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header {
|
.modal-header {
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
all: unset;
|
all: unset;
|
||||||
float: right;
|
float: right;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-bottom: -4px;
|
margin-bottom: -4px;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#field {
|
#field {
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
outline: medium none;
|
outline: medium none;
|
||||||
width: 298px;
|
width: 298px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
min-width: 296px;
|
min-width: 296px;
|
||||||
float: left;
|
float: left;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
#captcha-container {
|
#captcha-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
clear: both;
|
width: 302px;
|
||||||
width: 302px;
|
height: 100px;
|
||||||
height: 100px;
|
overflow: hidden;
|
||||||
overflow: hidden;
|
margin-bottom: 17px;
|
||||||
margin-bottom: 3px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#response {
|
#response {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px 2px;
|
padding: 0px 2px;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 2px;
|
position: relative;
|
||||||
position: relative;
|
display: block;
|
||||||
display: block;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#nav {
|
#nav {
|
||||||
float: right;
|
float: right;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
${({ selectedStyle }) => {
|
${({ selectedStyle }) => {
|
||||||
switch (selectedStyle) {
|
switch (selectedStyle) {
|
||||||
case 'Yotsuba':
|
case 'Yotsuba':
|
||||||
return `
|
return `
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #f0e0d6;
|
background-color: #f0e0d6;
|
||||||
border: 1px solid #d9bfb7;
|
border: 1px solid #d9bfb7;
|
||||||
@@ -111,8 +109,8 @@ export const StyledModal = styled(Modal)`
|
|||||||
color: maroon;
|
color: maroon;
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
case 'Yotsuba-B':
|
case 'Yotsuba-B':
|
||||||
return `
|
return `
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #d6daf0;
|
background-color: #d6daf0;
|
||||||
border: 1px solid #b7c5d9;
|
border: 1px solid #b7c5d9;
|
||||||
@@ -132,8 +130,8 @@ export const StyledModal = styled(Modal)`
|
|||||||
color: #000;
|
color: #000;
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
case 'Futaba':
|
case 'Futaba':
|
||||||
return `
|
return `
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #f0e0d6;
|
background-color: #f0e0d6;
|
||||||
border: 1px solid #d9bfb7;
|
border: 1px solid #d9bfb7;
|
||||||
@@ -153,8 +151,8 @@ export const StyledModal = styled(Modal)`
|
|||||||
color: maroon;
|
color: maroon;
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
case 'Burichan':
|
case 'Burichan':
|
||||||
return `
|
return `
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #d6daf0;
|
background-color: #d6daf0;
|
||||||
border: 1px solid #b7c5d9;
|
border: 1px solid #b7c5d9;
|
||||||
@@ -174,8 +172,8 @@ export const StyledModal = styled(Modal)`
|
|||||||
color: #000;
|
color: #000;
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
case 'Tomorrow':
|
case 'Tomorrow':
|
||||||
return `
|
return `
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #282a2e;
|
background-color: #282a2e;
|
||||||
border: 1px solid #111;
|
border: 1px solid #111;
|
||||||
@@ -218,8 +216,8 @@ export const StyledModal = styled(Modal)`
|
|||||||
filter: brightness(80%);
|
filter: brightness(80%);
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
case 'Photon':
|
case 'Photon':
|
||||||
return `
|
return `
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
@@ -236,10 +234,10 @@ export const StyledModal = styled(Modal)`
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
color: #333;
|
color: #333;
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user