Estiliza pagina de upload externo - responsiva (novo3)

This commit is contained in:
rodrigo committed 2025-01-01 22:34:08 -03:00
1 parent 457c3d13d7
commit b804d0535e
1 file changed
+99 -92
+99 -92
View File
@@ -4,109 +4,116 @@
<meta charset="UTF-8">
<title>Upload de Arquivos</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
text-align: center;
}
h2 {
margin-bottom: 20px;
color: #333;
}
label {
display: block;
margin-bottom: 10px;
color: #555;
}
.custom-file-input {
position: relative;
display: inline-block;
width: 100%;
height: 40px;
margin-bottom: 20px;
}
.custom-file-input input[type="file"] {
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.custom-file-input::before {
content: 'Escolher arquivos';
display: inline-block;
background: #007bff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
text-align: center;
width: 100%;
height: 100%;
line-height: 20px;
}
.custom-file-input input[type="file"]:focus + ::before {
outline: 1px dotted #000;
outline: -webkit-focus-ring-color auto 5px;
}
.custom-file-input input[type="file"]::after {
content: 'Nenhum arquivo escolhido';
display: block;
margin-top: 10px;
color: #555;
}
button {
background-color: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
}
button:hover {
background-color: #0056b3;
}
@media (max-width: 600px) {
<?php
// Verificação de autenticação
$isAuthenticated = true; // Substitua isso pela sua lógica de autenticação
if (!$isAuthenticated) {
echo '<style>
body {
height: auto;
padding: 20px;
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
padding: 15px;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
text-align: center;
}
h2 {
font-size: 18px;
margin-bottom: 20px;
color: #333;
}
button {
label {
display: block;
margin-bottom: 10px;
color: #555;
}
.custom-file-input {
position: relative;
display: inline-block;
width: 100%;
padding: 12px;
font-size: 14px;
height: 40px;
margin-bottom: 20px;
}
.custom-file-input input[type="file"] {
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.custom-file-input::before {
padding: 12px;
font-size: 14px;
content: "Escolher arquivos";
display: inline-block;
background: #007bff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
text-align: center;
width: 100%;
height: 100%;
line-height: 20px;
}
}
</style>
.custom-file-input input[type="file"]:focus + ::before {
outline: 1px dotted #000;
outline: -webkit-focus-ring-color auto 5px;
}
.custom-file-input input[type="file"]::after {
content: "Nenhum arquivo escolhido";
display: block;
margin-top: 10px;
color: #555;
}
button {
background-color: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
}
button:hover {
background-color: #0056b3;
}
@media (max-width: 600px) {
body {
height: auto;
padding: 20px;
}
.container {
padding: 15px;
width: 100%;
}
h2 {
font-size: 18px;
}
button {
width: 100%;
padding: 12px;
font-size: 14px;
}
.custom-file-input::before {
padding: 12px;
font-size: 14px;
}
}
</style>';
}
?>
<script>
function addViewportDimensions() {
var form = document.getElementById('uploadForm');