mirror of
https://github.com/moparisthebest/mail
synced 2024-11-11 19:55:06 -05:00
add mobile support css media query and touch events
This commit is contained in:
parent
62ff544934
commit
06033604a7
@ -55,6 +55,11 @@ body {
|
|||||||
padding: 46px 15px;
|
padding: 46px 15px;
|
||||||
width: 314px;
|
width: 314px;
|
||||||
|
|
||||||
|
/* Landscape phone to portrait tablet */
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
@ -69,7 +74,7 @@ body {
|
|||||||
|
|
||||||
@mixin read-bubble {
|
@mixin read-bubble {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: 1.85em;
|
margin-top: 1.95em;
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
width: 0.9em;
|
width: 0.9em;
|
||||||
height: 0.9em;
|
height: 0.9em;
|
||||||
@ -138,4 +143,3 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,37 +23,37 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li class="selected">
|
<li class="selected">
|
||||||
<div class="unread"></div>
|
<div class="unread"></div>
|
||||||
<p class="from">Max Mustermann</p>
|
<p class="from">Whiteout Support</p>
|
||||||
<p class="subject">Welcome Nico</p>
|
<p class="subject">Welcome Nico</p>
|
||||||
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="unread"></div>
|
<div class="unread"></div>
|
||||||
<p class="from">Max Mustermann</p>
|
<p class="from">Whiteout Support</p>
|
||||||
<p class="subject">Welcome Nico</p>
|
<p class="subject">Welcome Nico</p>
|
||||||
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="read"></div>
|
<div class="read"></div>
|
||||||
<p class="from">Max Mustermann</p>
|
<p class="from">Whiteout Support</p>
|
||||||
<p class="subject">Welcome Nico</p>
|
<p class="subject">Welcome Nico</p>
|
||||||
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="read"></div>
|
<div class="read"></div>
|
||||||
<p class="from">Max Mustermann</p>
|
<p class="from">Whiteout Support</p>
|
||||||
<p class="subject">Welcome Nico</p>
|
<p class="subject">Welcome Nico</p>
|
||||||
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="read"></div>
|
<div class="read"></div>
|
||||||
<p class="from">Max Mustermann</p>
|
<p class="from">Whiteout Support</p>
|
||||||
<p class="subject">Welcome Nico</p>
|
<p class="subject">Welcome Nico</p>
|
||||||
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="read"></div>
|
<div class="read"></div>
|
||||||
<p class="from">Max Mustermann</p>
|
<p class="from">Whiteout Support</p>
|
||||||
<p class="subject">Welcome Nico</p>
|
<p class="subject">Welcome Nico</p>
|
||||||
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
<p class="text-preview">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -7,10 +7,14 @@ $(document).ready(function() {
|
|||||||
function setListeners() {
|
function setListeners() {
|
||||||
var li = $('li');
|
var li = $('li');
|
||||||
|
|
||||||
li.mousedown(function() {
|
if ("ontouchstart" in window) {
|
||||||
|
li.on('touchstart', select);
|
||||||
|
} else {
|
||||||
|
li.mousedown(select);
|
||||||
|
}
|
||||||
|
|
||||||
|
function select() {
|
||||||
li.toggleClass('selected', false);
|
li.toggleClass('selected', false);
|
||||||
$(this).toggleClass('selected');
|
$(this).toggleClass('selected');
|
||||||
});
|
}
|
||||||
|
|
||||||
li.mouseup(function() {});
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user