diff --git a/assets/css/form.css b/assets/css/form.css new file mode 100644 index 00000000..6c049ec2 --- /dev/null +++ b/assets/css/form.css @@ -0,0 +1,71 @@ +{box-sizing: border-box;} + +/* Button used to open the contact form - fixed at the bottom of the page */ +.open-button { + z-index: 8; + background-color: #555; + color: white; + padding: 16px 20px; + border: none; + cursor: pointer; + opacity: 0.8; + position: fixed; + bottom: 23px; + right: 28px; + width: 280px; +} + +/* The popup form - hidden by default */ +.form-popup { + height: auto; + display: none; + position: fixed; + bottom: 0; + right: 15px; + border: 3px solid #f1f1f1; + z-index: 9; +} + +/* Add styles to the form container */ +.form-container { + max-width: 300px; + padding: 10px; + background-color: white; +} + +/* Full-width input fields */ +.form-container input[type=text], .form-container input[type=password] { + width: 100%; + padding: 15px; + margin: 5px 0 22px 0; + border: none; + background: #f1f1f1; +} + +/* When the inputs get focus, do something */ +.form-container input[type=text]:focus, .form-container input[type=password]:focus { + background-color: #ddd; + outline: none; +} + +/* Set a style for the submit/login button */ +.form-container .btn { + background-color: #4CAF50; + color: white; + padding: 16px 20px; + border: none; + cursor: pointer; + width: 100%; + margin-bottom:10px; + opacity: 0.8; +} + +/* Add a red background color to the cancel button */ +.form-container .cancel { + background-color: red; +} + +/* Add some hover effects to buttons */ +.form-container .btn:hover, .open-button:hover { + opacity: 1; +} diff --git a/assets/css/index.css b/assets/css/index.css index e7c282f2..95d8aec2 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -8,6 +8,10 @@ header { border-bottom: 2px black solid; padding: 25px; } + +main { + min-height: 100vh; +} #logo { font-size: 15px; margin: 20px; diff --git a/assets/js/form.js b/assets/js/form.js new file mode 100644 index 00000000..ab7ae1ba --- /dev/null +++ b/assets/js/form.js @@ -0,0 +1,7 @@ +function openForm() { + document.getElementById("myForm").style.display = "block"; +} + +function closeForm() { + document.getElementById("myForm").style.display = "none"; +} diff --git a/pages/main.html b/pages/main.html index c8d41a68..14107781 100644 --- a/pages/main.html +++ b/pages/main.html @@ -4,6 +4,8 @@