CSS for comments
This commit is contained in:
parent
8912a4999d
commit
eb4c991c33
4 changed files with 35 additions and 11 deletions
|
@ -39,9 +39,3 @@ Placeholder for comments:
|
||||||
<div id ="comments"></div>
|
<div id ="comments"></div>
|
||||||
```
|
```
|
||||||
|
|
||||||
## TODO ##
|
|
||||||
* connection to friendica via https
|
|
||||||
* CSS for
|
|
||||||
```html
|
|
||||||
<a href class="contact-photo-link">, <div class="wall-item-actions-author">, <div class="wall-item-content">
|
|
||||||
```
|
|
||||||
|
|
|
@ -34,14 +34,12 @@ function SearchComments() {
|
||||||
var arr = new Array();
|
var arr = new Array();
|
||||||
arr = CommentsResult.split("wall-item-container comment");
|
arr = CommentsResult.split("wall-item-container comment");
|
||||||
for (i=1;i<arr.length;i++){
|
for (i=1;i<arr.length;i++){
|
||||||
// var start = arr[i].indexOf('wall-item-container comment');
|
|
||||||
var photo = arr[i].substring(arr[i].indexOf('<a href'),arr[i].indexOf('</a>')+4);
|
var photo = arr[i].substring(arr[i].indexOf('<a href'),arr[i].indexOf('</a>')+4);
|
||||||
var start = arr[i].indexOf('<div class=\"wall-item-actions-author\">');
|
var start = arr[i].indexOf('<div class=\"wall-item-actions-author\">');
|
||||||
var end = arr[i].indexOf('<div class=\"wall-item-bottom\">',start);
|
var end = arr[i].indexOf('<div class=\"wall-item-bottom\">',start);
|
||||||
var comment = arr[i].substring(start,end-1);
|
var comment = arr[i].substring(start,end-1);
|
||||||
var endcomment = comment.slice(comment.indexOf('onmouseover'),comment.indexOf('<a href')-1);
|
var endcomment = comment.slice(comment.indexOf('onmouseover'),comment.indexOf('<a href')-1);
|
||||||
ergebnisse = ergebnisse + photo + comment;
|
ergebnisse = ergebnisse + '<div class=\"comment-container\">' + photo + comment + '</div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
document.getElementById("comments").innerHTML = ergebnisse;
|
document.getElementById("comments").innerHTML = ergebnisse;
|
||||||
}
|
}
|
||||||
|
|
32
style.css
Normal file
32
style.css
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#comments {
|
||||||
|
border-top: thin solid #eeeeee;
|
||||||
|
padding-top: 15px;
|
||||||
|
display: table;
|
||||||
|
margin-left: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-container {
|
||||||
|
display: table-cell;
|
||||||
|
float: right;
|
||||||
|
min-width: 100%;
|
||||||
|
padding: 5px;
|
||||||
|
border-bottom: thin solid #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-photo {
|
||||||
|
float: left;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
margin-left: 16px;
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wall-item-actions-author {
|
||||||
|
height: 10px;
|
||||||
|
font-size: 70%;
|
||||||
|
}
|
||||||
|
.wall-item-content {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 90%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="">
|
<html lang="">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="./main.css" type="text/css" />
|
<link rel="stylesheet" href="./style.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
var friendica_domain = "http://ixsm07yclq3gsdgw.myfritz.net"
|
var friendica_domain = "http://ixsm07yclq3gsdgw.myfritz.net"
|
||||||
|
@ -9,7 +9,7 @@ var friendica_domain = "http://ixsm07yclq3gsdgw.myfritz.net"
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<article>
|
<article>
|
||||||
<h1>Test</h1>
|
<h1>Verkehrsbericht gültig ab Montag, 25. Mai 2015</h1>
|
||||||
<p>test text</p>
|
<p>test text</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue