Skip to content

Commit

Permalink
feat: Changed favicon and index button
Browse files Browse the repository at this point in the history
  • Loading branch information
dlv237 committed Jul 13, 2024
1 parent 41a5245 commit 022052e
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 22 deletions.
10 changes: 10 additions & 0 deletions my-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions my-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"browser-image-compression": "^2.0.2",
"chokidar": "^3.6.0",
"dotenv": "^16.4.5",
"emailjs-com": "^3.2.0",
"next": "14.2.3",
"nodemailer": "^6.9.14",
"prisma": "^5.16.1",
Expand Down
Binary file added my-app/public/LOGO_SILLA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed my-app/public/PINTEREST_LOGO.png
Binary file not shown.
Binary file removed my-app/public/SILLA_TABLE.png
Binary file not shown.
Binary file added my-app/public/SILLA_TABLE_BLACK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added my-app/public/SILLA_TABLE_WHITE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion my-app/src/app/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.DropdownMenuCheckboxItem,
.DropdownMenuRadioItem,
.DropdownMenuSubTrigger {
font-size: 13px;
font-size: 15px;
line-height: 1;
color: var(--black-a7);
border-radius: 3px;
Expand All @@ -48,6 +48,7 @@
padding-left: 25px;
user-select: none;
outline: none;
cursor: pointer;
}
.DropdownMenuSubTrigger[data-state='open'] {
background-color: var(--black-a7);
Expand Down
2 changes: 2 additions & 0 deletions my-app/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class MyDocument extends Document {
<Html>
<Head>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap" rel="stylesheet" />
<link rel="icon" type="image/png" href="/LOGO_SILLA.png" />

</Head>
<body>
<Main />
Expand Down
47 changes: 28 additions & 19 deletions my-app/src/pages/architects/[architect_id].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { useRouter } from 'next/router';
import Footer from '../../components/general/footer';
import emailjs from 'emailjs-com';

type ArchitectData = {
id: number;
Expand Down Expand Up @@ -117,24 +118,32 @@ export default function ArchitectProfile() {

const data = { name, email, phone, message, architectEmail };

fetch('/api/mailer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
.then((response) => response.json())
.then((data) => {
console.log('Success:', data);
alert('Correo enviado exitosamente');
handleCloseForm();
})
.catch((error) => {
console.error('Error:', error);
alert('Error al enviar el correo');
}
);
if (name === "" || email === "" || phone === "" || message === "") {
alert("Por favor, llena todos los campos");
return;
}
const service_id = 'service_83u8xtd';
const template_id = 'template_3gzu4nr';
const user_id = 'J5OiJF8YKYWP74I0w';
const templateParams = {
from_name: name,
to_name: architectData?.name,
message: `${message}\n\nMis datos de contacto son:\n\n \tCorreo: ${email}\n \tTeléfono: ${phone}`,
to_email: architectEmail,
};
emailjs.send(
service_id,
template_id,
templateParams,
user_id
).then(() => {
alert("Correo enviado exitosamente");
handleCloseForm();
}).catch((error: any) => {
alert("Error al enviar el correo");
console.error('Error:', error as string);
});


};

Expand Down Expand Up @@ -236,7 +245,7 @@ export default function ArchitectProfile() {
</div>
<div className='scaleDataContainer' style={{display: "flex", justifyContent: "space-between", position: "relative"}}>
<button style={{width: '6rem', color:'black', height: '2rem', background:'rgb(230, 230, 230)', borderRadius: '33px'}} onClick={handleCloseForm}>Cancelar</button>
<button style={{width: '6rem', color:'white', height: '2rem', background:'#211f26', borderRadius: '33px'}}>Enviar</button>
<button style={{width: '6rem', color:'white', height: '2rem', background:'#211f26', borderRadius: '33px'}} onClick={handleContactSender}>Enviar</button>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions my-app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export default function Home() {
<DropdownMenu.Root>
<h2 style={{position: "absolute", right: "50px", top: "16px", fontSize: "13px"}}>{user ? user.emailAddresses[0].emailAddress : ''}</h2>
<DropdownMenu.Trigger asChild>
<button className="IconButton" aria-label="Customise options" style={{boxShadow: "unset"}}>
<img src="/SILLA_TABLE.png" alt="Logo" className="centeredImage" style={{position: "absolute", bottom: "3px"}}/>
<button className="IconButton" aria-label="Customise options" style={{boxShadow: "unset", background: "black"}}>
<img src="/SILLA_TABLE_WHITE.png" alt="Logo" className="centeredImage" style={{position: "absolute", bottom: "3px"}}/>
</button>
</DropdownMenu.Trigger>

Expand Down

0 comments on commit 022052e

Please sign in to comment.