Last active
August 22, 2018 10:11
-
-
Save gknasln/67dc8b87175e52ba60d6db5a136e0f9b to your computer and use it in GitHub Desktop.
Untitled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
box-sizing: border-box; | |
font-family: 'Helvetica'; | |
} | |
body{ | |
margin:0; | |
} | |
.tools{ | |
width: 100%; | |
height: 60px; | |
padding: 13px 30px 0 15%; | |
border-bottom: 1px solid gray; | |
background: lightgray; | |
background: linear-gradient(to right bottom, rgb(200,200,200), rgb(240,240,240), rgb(200,200,200)); | |
background: -ms-linear-gradient(to right bottom, rgb(200,200,200), rgb(240,240,240), rgb(200,200,200)); | |
background: -webkit-linear-gradient(to right bottom, rgb(200,200,200), rgb(240,240,240), rgb(200,200,200)); | |
background: -moz-linear-gradient(to right bottom, rgb(200,200,200), rgb(240,240,240), rgb(200,200,200)); | |
background: linear-gradient(170deg, rgb(200, 200, 200), rgb(250, 250, 250), rgb(200, 200, 200)); | |
} | |
.button{ | |
padding: 8px 20px; | |
border-radius: 3px; | |
border:none; | |
outline: none; | |
margin-left: 20px; | |
} | |
.button:active{ | |
transform: scale(0.92); | |
} | |
.tools .edit{ | |
background: mediumspringgreen; | |
border: 1px solid green; | |
} | |
.tools .edit:hover{ | |
background: mediumseagreen; | |
} | |
.tools .delete{ | |
background: red; | |
border: darkred 1px solid; | |
} | |
.tools .delete:hover{ | |
background: indianred; | |
} | |
.tools .send-mail{ | |
border: 1px solid gray; | |
margin-left: 40%; | |
} | |
.tools .send-mail:hover{ | |
background: rgb(140, 140, 140); | |
} | |
.tools .add-note{ | |
border: 1px solid gray; | |
} | |
.tools .add-note:hover{ | |
background: rgb(140, 140, 140); | |
} | |
.switch-pages{ | |
float: right; | |
display: flex; | |
} | |
.switch-pages a{ | |
text-decoration: none; | |
margin-right: 10px; | |
} | |
.switch-pages div{ | |
width: 25px; | |
height: 25px; | |
margin-top: 5px; | |
transform: rotate(45deg); | |
transition: transform 0.1s; | |
} | |
.switch-pages a #left{ | |
border-left: 2px solid black; | |
border-bottom: 2px solid black; | |
} | |
.switch-pages a #right{ | |
border-top: 2px solid black; | |
border-right: 2px solid black; | |
} | |
.switch-pages div:hover{ | |
transform: rotate(45deg) scale(1.15); | |
} | |
.switch-pages div:active{ | |
transform: rotate(45deg) scale(0.9); | |
} | |
section{ | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background: rgba(0, 0, 0, 0.2); | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
.modal{ | |
background: white; | |
border-radius: 15px; | |
border: lightgray 1px solid; | |
box-shadow: 1px 5px 25px 5px rgba(0, 0, 0, 0.4); | |
display: flex; | |
flex-direction: column; | |
justify-content: flex-start; | |
align-items: flex-end; | |
position: relative; | |
transform-origin: 100% 10%; | |
transition: transform 0.6s; | |
transform: scale(0); | |
} | |
.modal #title{ | |
width: 100%; | |
height: 50px; | |
line-height: 50px; | |
text-align: center; | |
font-size: 17px; | |
font-weight: 600; | |
} | |
.modal #button-container{ | |
position: absolute; | |
bottom: 20px; | |
right: 30px; | |
} | |
.modal .modal-cancel{ | |
background: red; | |
border: 1px solid darkred; | |
} | |
.modal .modal-cancel:hover{ | |
background: indianred; | |
} | |
.note-modal{ | |
width: 40%; | |
min-width: 400px; | |
height: 70%; | |
min-height: 500px; | |
} | |
.note-modal .notes-container{ | |
width: 100%; | |
position: relative; | |
} | |
.note-modal .note #note-title{ | |
position: absolute; | |
top: -10px; | |
left: 10px; | |
color: gray; | |
font-size: 13px; | |
padding-left: 10%; | |
} | |
.note-modal .note div{ | |
border : 1px solid lightgray; | |
width: 80%; | |
margin: 15px auto; | |
padding: 10px; | |
border-radius: 8px; | |
font-size: 14px; | |
} | |
.note-modal textarea{ | |
width: 80%; | |
height: 100px; | |
margin-right: 10%; | |
overflow: auto; | |
padding: 10px; | |
} | |
.add-new-note{ | |
background: mediumspringgreen; | |
border: 1px solid green; | |
margin-right: 12%; | |
margin-top: 10px; | |
} | |
.add-new-note:hover{ | |
background: mediumseagreen; | |
} | |
.mail-modal{ | |
min-width: 450px; | |
width: 40%; | |
min-height: 450px; | |
height: 50%; | |
} | |
.mail-modal textarea{ | |
width: 90%; | |
height: calc(80% - 50px); | |
padding: 10px; | |
margin: 0 5% 5% 0; | |
} | |
.mail-modal-send{ | |
background: lime; | |
border: 1px solid seagreen; | |
} | |
.mail-modal .mail-modal-send:hover{ | |
background: seagreen; | |
} | |
.animate-modal{ | |
transform: scale(1); | |
} | |
.open-mail-modal{ | |
display: flex !important; | |
} | |
.open-mail-modal .mail-modal{ | |
display: flex !important; | |
} | |
.open-note-modal{ | |
display: flex !important; | |
} | |
.open-note-modal .note-modal{ | |
display: flex !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="center"> | |
<div class="tools"> | |
<button class="button edit">Düzenle</button> | |
<button class="button delete">Sil</button> | |
<button class="button add-note">Not Ekle </button> | |
<button class="button send-mail">E-Posta </button> | |
<div class="switch-pages"> | |
<a href="#"> | |
<div id="left"></div> | |
</a> | |
<a href="#" style="transform: rotaeY(180deg)"> | |
<div id="right"></div></a></div> | |
</div> | |
<section style="display: none;"> | |
<div class="mail-modal modal" style="display: none;"> | |
<div id="title">E-Posta Gönder</div> | |
<textarea></textarea> | |
<div id="button-container" > | |
<input type="submit" class="button mail-modal-send" value="Ekle"/> | |
<input type="button" class="button modal-cancel" value="İptal" /> | |
</div> | |
</div> | |
<div class="note-modal modal" style="display: none;" > | |
<div id="title">Müşteri Notları</div> | |
<div class="notes-container"> | |
<div class="note"> | |
<span id="note-title">Gökhan Aslan<span> <div>Müşteri salı sabahı aranacak </div> | |
</div> | |
</div> | |
<textarea></textarea> | |
<input type="submit" class="button add-new-note" value="Ekle"/> | |
<div id="button-container" > | |
<input type="button" class="button modal-cancel" value="Çık" /> | |
</div> | |
</div> | |
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mailModalButton = document.querySelector('.send-mail'); | |
const noteModalButton = document.querySelector('.add-note'); | |
const modalContainer = document.querySelector('section'); | |
const mailModal = modalContainer.querySelector('.mail-modal'); | |
const mailCancelButton = mailModal.querySelector('.modal-cancel'); | |
const noteModal = modalContainer.querySelector('.note-modal'); | |
const noteCancelButton = noteModal.querySelector('.modal-cancel'); | |
//adding functionalty to add note | |
mailModalButton.onclick = function(){ | |
modalContainer.classList.add('open-mail-modal'); | |
setTimeout(function(){ | |
mailModal.classList.add('animate-modal'); | |
}, 100); | |
} | |
noteModalButton.onclick = function(){ | |
modalContainer.classList.add('open-note-modal'); | |
setTimeout(function(){ | |
noteModal.classList.add('animate-modal'); | |
}, 100); | |
} | |
//adding functionalty to canccel buttons | |
noteCancelButton.onclick = closeModal; | |
mailCancelButton.onclick = closeModal; | |
//when click on modal container close all modal | |
modalContainer.onclick = function(e){ | |
if(e.target.tagName === 'SECTION'){ | |
closeModal(); | |
} | |
} | |
function closeModal(){ | |
modalContainer.classList.remove('open-mail-modal'); | |
modalContainer.classList.remove('open-note-modal'); | |
mailModal.classList.remove('animate-modal'); | |
noteModal.classList.remove('animate-modal'); | |
} | |
const data = [ | |
{user: 'Gökhan Aslan', note: 'Salı günü müşteri yeni kampanyalar hakkında bilgilendirilecek'}, | |
{user: 'Sinan Odak', note: 'Çarşamba günü müşteri mağazaya davet edilecek'} ]; | |
/*function listData(){ | |
document.querySelector('.notes-container').innerHTML = " \ | |
< | |
"; | |
}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment