rounded images on mobile and stylable text messages
This commit is contained in:
parent
3658d3cf9e
commit
611734331f
@ -17,7 +17,6 @@
|
|||||||
<form id="message-form" action="" accept-charset="utf-8">
|
<form id="message-form" action="" accept-charset="utf-8">
|
||||||
<textarea id="name" rows="1" placeholder="Your Name"></textarea>
|
<textarea id="name" rows="1" placeholder="Your Name"></textarea>
|
||||||
<textarea id="message" rows="2" placeholder="Your Message"></textarea>
|
<textarea id="message" rows="2" placeholder="Your Message"></textarea>
|
||||||
<!-- removed photo button from here, otherwise triggers sending (empty) messages... TO FIX-->
|
|
||||||
<br>
|
<br>
|
||||||
<input type="submit" class="send-button" value="Send">
|
<input type="submit" class="send-button" value="Send">
|
||||||
</form>
|
</form>
|
||||||
@ -54,7 +53,7 @@
|
|||||||
<div id="overview-page">
|
<div id="overview-page">
|
||||||
<div class="messages">
|
<div class="messages">
|
||||||
<ul id="inbox"></ul>
|
<ul id="inbox"></ul>
|
||||||
|
lol
|
||||||
<ul id="outbox"></ul>
|
<ul id="outbox"></ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="input-footer">
|
<div id="input-footer">
|
||||||
|
@ -80,7 +80,7 @@ function onSubmitMessage(){
|
|||||||
if ( !namm || namm === "" ) {
|
if ( !namm || namm === "" ) {
|
||||||
namm = "anonymous";
|
namm = "anonymous";
|
||||||
}
|
}
|
||||||
addOutboxItem( namm, msg );
|
addOutboxItem( namm, "<p class='text-message'>"+msg+"</p>" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +89,7 @@ function addOutboxItem( namm, message ){
|
|||||||
var newMsgs = {};
|
var newMsgs = {};
|
||||||
var ddata = new Date().getTime();
|
var ddata = new Date().getTime();
|
||||||
var alias = ownAlias;
|
var alias = ownAlias;
|
||||||
|
|
||||||
var contento = {
|
var contento = {
|
||||||
"time" : ddata,
|
"time" : ddata,
|
||||||
"message" : message,
|
"message" : message,
|
||||||
|
125
web/style.css
125
web/style.css
@ -15,8 +15,30 @@ body{
|
|||||||
|
|
||||||
/* resize images on mobile */
|
/* resize images on mobile */
|
||||||
@media all and (max-width: 768px) {
|
@media all and (max-width: 768px) {
|
||||||
|
|
||||||
|
.photo-message{ /* rounded corner imgs...*/
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
overflow:hidden;
|
||||||
|
line-height: 0;
|
||||||
|
-webkit-border-top-left-radius:123px;
|
||||||
|
-webkit-border-top-right-radius:123px;
|
||||||
|
-webkit-border-bottom-right-radius:123px;
|
||||||
|
-webkit-border-bottom-left-radius:123px;
|
||||||
|
-moz-border-radius-bottomright:123px;
|
||||||
|
-moz-border-radius-bottomleft:123px;
|
||||||
|
-moz-border-top-left-radius:123px;
|
||||||
|
-moz-border-top-right-radius:123px;
|
||||||
|
border-top-left-radius:123px;
|
||||||
|
border-top-right-radius:123px;
|
||||||
|
border-bottom-right-radius:123px;
|
||||||
|
border-bottom-left-radius:123px;
|
||||||
|
}
|
||||||
|
|
||||||
img.photo-message{
|
img.photo-message{
|
||||||
width:100%;
|
width:100%;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align:middle; /* otherwise produces bottom border the size of the body 'line-height' */
|
||||||
/* disable anti aliasing */
|
/* disable anti aliasing */
|
||||||
image-rendering: optimizeSpeed;
|
image-rendering: optimizeSpeed;
|
||||||
image-rendering: -moz-crisp-edges;
|
image-rendering: -moz-crisp-edges;
|
||||||
@ -28,7 +50,7 @@ body{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* resize images on mobile */
|
/* resize images on desktop */
|
||||||
@media all and (min-width: 768px) {
|
@media all and (min-width: 768px) {
|
||||||
img.photo-message{
|
img.photo-message{
|
||||||
width:50%;
|
width:50%;
|
||||||
@ -55,8 +77,27 @@ img.photo-message{
|
|||||||
image-rendering: pixelated;
|
image-rendering: pixelated;
|
||||||
image-rendering: optimize-contrast;
|
image-rendering: optimize-contrast;
|
||||||
-ms-interpolation-mode: nearest-neighbor;
|
-ms-interpolation-mode: nearest-neighbor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.photo-message{ /* rounded corner imgs on desktop...*/
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
overflow:hidden;
|
||||||
|
-webkit-border-top-left-radius:123px;
|
||||||
|
-webkit-border-top-right-radius:123px;
|
||||||
|
-webkit-border-bottom-right-radius:123px;
|
||||||
|
-webkit-border-bottom-left-radius:123px;
|
||||||
|
-moz-border-radius-bottomright:123px;
|
||||||
|
-moz-border-radius-bottomleft:123px;
|
||||||
|
-moz-border-top-left-radius:123px;
|
||||||
|
-moz-border-top-right-radius:123px;
|
||||||
|
border-top-left-radius:123px;
|
||||||
|
border-top-right-radius:123px;
|
||||||
|
border-bottom-right-radius:123px;
|
||||||
|
border-bottom-left-radius:123px;
|
||||||
|
}
|
||||||
|
|
||||||
img.emo {
|
img.emo {
|
||||||
width: 22px;
|
width: 22px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
@ -254,7 +295,7 @@ margin:10px;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo-name{
|
#photo-name{ /* text field */
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
|
|
||||||
@ -327,12 +368,14 @@ hr{
|
|||||||
|
|
||||||
.messages ul{
|
.messages ul{
|
||||||
padding:0px;
|
padding:0px;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
.messages li{
|
.messages li{
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
.messages .message-block {
|
.messages .message-block {
|
||||||
padding:30px;
|
margin:30px;
|
||||||
word-wrap:break-word;
|
word-wrap:break-word;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
-moz-box-shadow:0 0 23px #bbb;
|
-moz-box-shadow:0 0 23px #bbb;
|
||||||
@ -353,16 +396,16 @@ hr{
|
|||||||
background:#fff;
|
background:#fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.photoBox {
|
.photoBox {
|
||||||
width: 98%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
z-index:1002;
|
z-index:1002;
|
||||||
overflow: auto;
|
|
||||||
width: 100%;
|
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
background:#fff;
|
background:#fff;
|
||||||
}
|
}
|
||||||
@ -370,14 +413,82 @@ hr{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
.node, .hops {
|
.node {
|
||||||
font-size:10px;
|
font-size:10px;
|
||||||
|
margin-top:-30px;
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
word-wrap:break-word;
|
||||||
|
overflow: visible;
|
||||||
|
-moz-box-shadow:0 0 23px #bbb;
|
||||||
|
-webkit-box-shadow:0 0 23px #bbb;
|
||||||
|
box-shadow:0 0 23px #bbb;
|
||||||
|
-webkit-border-top-left-radius:123px;
|
||||||
|
-webkit-border-top-right-radius:123px;
|
||||||
|
-webkit-border-bottom-right-radius:123px;
|
||||||
|
-webkit-border-bottom-left-radius:123px;
|
||||||
|
-moz-border-radius-bottomright:123px;
|
||||||
|
-moz-border-radius-bottomleft:123px;
|
||||||
|
-moz-border-top-left-radius:123px;
|
||||||
|
-moz-border-top-right-radius:123px;
|
||||||
|
border-top-left-radius:123px;
|
||||||
|
border-top-right-radius:123px;
|
||||||
|
border-bottom-right-radius:123px;
|
||||||
|
border-bottom-left-radius:123px;
|
||||||
|
background:#fff;
|
||||||
}
|
}
|
||||||
|
.hops {
|
||||||
|
display: none;
|
||||||
|
font-size:10px;
|
||||||
|
//padding: 10px;
|
||||||
|
margin-top:-30px;
|
||||||
|
position: absolute;
|
||||||
|
word-wrap:break-word;
|
||||||
|
overflow: visible;
|
||||||
|
-moz-box-shadow:0 0 23px #bbb;
|
||||||
|
-webkit-box-shadow:0 0 23px #bbb;
|
||||||
|
box-shadow:0 0 23px #bbb;
|
||||||
|
-webkit-border-top-left-radius:123px;
|
||||||
|
-webkit-border-top-right-radius:123px;
|
||||||
|
-webkit-border-bottom-right-radius:123px;
|
||||||
|
-webkit-border-bottom-left-radius:123px;
|
||||||
|
-moz-border-radius-bottomright:123px;
|
||||||
|
-moz-border-radius-bottomleft:123px;
|
||||||
|
-moz-border-top-left-radius:123px;
|
||||||
|
-moz-border-top-right-radius:123px;
|
||||||
|
border-top-left-radius:123px;
|
||||||
|
border-top-right-radius:123px;
|
||||||
|
border-bottom-right-radius:123px;
|
||||||
|
border-bottom-left-radius:123px;
|
||||||
|
background:#fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.message-text {
|
.message-text {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
.date-sender {
|
.date-sender {
|
||||||
|
position: absolute;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
|
word-wrap:break-word;
|
||||||
|
overflow: visible;
|
||||||
|
-moz-box-shadow:0 0 23px #bbb;
|
||||||
|
-webkit-box-shadow:0 0 23px #bbb;
|
||||||
|
box-shadow:0 0 23px #bbb;
|
||||||
|
-webkit-border-top-left-radius:123px;
|
||||||
|
-webkit-border-top-right-radius:123px;
|
||||||
|
-webkit-border-bottom-right-radius:123px;
|
||||||
|
-webkit-border-bottom-left-radius:123px;
|
||||||
|
-moz-border-radius-bottomright:123px;
|
||||||
|
-moz-border-radius-bottomleft:123px;
|
||||||
|
-moz-border-top-left-radius:123px;
|
||||||
|
-moz-border-top-right-radius:123px;
|
||||||
|
border-top-left-radius:123px;
|
||||||
|
border-top-right-radius:123px;
|
||||||
|
border-bottom-right-radius:123px;
|
||||||
|
border-bottom-left-radius:123px;
|
||||||
|
background:#fff;
|
||||||
}
|
}
|
||||||
#outbox{
|
#outbox{
|
||||||
display:none;
|
display:none;
|
||||||
|
Loading…
Reference in New Issue
Block a user