initial commit
484
static/css/main.css
Normal file
|
|
@ -0,0 +1,484 @@
|
|||
/*
|
||||
Colors :
|
||||
- #40403F
|
||||
- #4D4D4C
|
||||
- #7F7F7E
|
||||
- #E5E5E3
|
||||
- #F0F0F0
|
||||
*/
|
||||
|
||||
/* Imports */
|
||||
|
||||
@import url("pygment.css");
|
||||
|
||||
|
||||
/* Layout */
|
||||
|
||||
article,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section{
|
||||
display: block;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Verdana', sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 150%;
|
||||
text-align: left;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
margin:0
|
||||
}
|
||||
|
||||
[role=banner]{
|
||||
background-image: linear-gradient(#54b4eb, #2FA4E7 60%, #1d9ce5);
|
||||
height: auto; /*50px;*/
|
||||
line-height: 50px;
|
||||
padding: 0 1%;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin-top: 0;
|
||||
padding: 50px 0 0 0;
|
||||
display:flex;
|
||||
flex-flow: row wrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content {
|
||||
border-left: 1px solid #d6d6d6;
|
||||
border-right: 1px dotted #D6D6D6;
|
||||
padding: 0 20px 1em 20px;
|
||||
width: calc(70% - 50px - 10em);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 30%;
|
||||
border-right: 1px solid #d6d6d6;
|
||||
padding: 0 10px 1em 0;
|
||||
}
|
||||
|
||||
.left-sidebar {
|
||||
min-width: 8em;
|
||||
width: 8em;
|
||||
border-right: 1px solid #d6d6d6;
|
||||
padding: 0 10px 1em 10px;
|
||||
height: inherit;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.left-sidebar nav {
|
||||
position:fixed;
|
||||
}
|
||||
|
||||
.left-sidebar ul {
|
||||
list-style-type: none;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.left-sidebar li a{
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.left-sidebar li a.active{
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.left-sidebar li a.:hover:not(.active){
|
||||
background-color: #555;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
footer {
|
||||
border-top: 1px dotted #D6D6D6;
|
||||
line-height: 80%;
|
||||
padding: 0 1em;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
|
||||
/* Header */
|
||||
|
||||
header a {
|
||||
color: #E5E5E3;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
header a.title {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
header .feeds {
|
||||
float: right;
|
||||
text-align: right;
|
||||
width: 25%;
|
||||
height: 41px;
|
||||
padding-top: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
|
||||
header .feeds a {
|
||||
display: block;
|
||||
float: right;
|
||||
padding-right: 5px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
header .feeds a:hover,
|
||||
header .feeds a:active {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
header .pages {
|
||||
float: right;
|
||||
}
|
||||
|
||||
header .pages a {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar */
|
||||
|
||||
/* Titles */
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "Verdana",sans-serif;
|
||||
font-weight: 400;
|
||||
text-shadow: 0.1em 0.1em 0.1em #EFEFEF;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
padding: 0.7em 0 0.3em;
|
||||
}
|
||||
|
||||
h1 a {
|
||||
color: inherit;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
||||
/* Texts */
|
||||
|
||||
p {
|
||||
margin: 0.8em 0 0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #4D4D4C;
|
||||
color: #4D4D4C;
|
||||
}
|
||||
|
||||
a:hover, a:active {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #4271AE;
|
||||
color: #4271AE;
|
||||
}
|
||||
|
||||
.literal {
|
||||
font-size: 0.9em;
|
||||
border: 1px solid #F0F0F0;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: 'Verdana',monospace;
|
||||
background: none repeat scroll 0 0 #F0F0F0;
|
||||
border-radius: 2px;
|
||||
font-size: 0.9em;
|
||||
font-style: normal;
|
||||
letter-spacing: 0.015em;
|
||||
line-height: 130%;
|
||||
padding: 0.7em;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 40px 5% 60px 5%;
|
||||
color: #d6d6d6;
|
||||
box-shadow: 0.1em 0.1em 0.1em #EFEFEF;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Article */
|
||||
|
||||
article.summary {
|
||||
margin-bottom: 40px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
article.full .metadata,
|
||||
article.summary .metadata {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.metadata p {
|
||||
margin: 0;
|
||||
}
|
||||
*/
|
||||
/* Listings */
|
||||
|
||||
ol.archive li {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
ol.archive li time,
|
||||
ol.archive li .tags
|
||||
{
|
||||
line-height: 140%;
|
||||
font-size: 0.8em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Social */
|
||||
|
||||
.social {
|
||||
list-style-type: none;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.social li {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.social a {}
|
||||
|
||||
.social i {
|
||||
float: left;
|
||||
margin-right: 3px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.social a[id*='Buddycloud'] + i:before {content: url('../images/icons/buddycloud-18px.png'); }
|
||||
.social a[id*='Diaspora'] + i:before {content: url('../images/icons/Diaspora-18px.png'); }
|
||||
.social a[id*='Friendica'] + i:before {content: url('../images/icons/friendica-18px.png'); }
|
||||
.social a[id*='Forgejo'] + i:before {content: url('../images/icons/forgejo-18px.png'); }
|
||||
.social a[id*='Funkwhale'] + i:before {content: url('../images/icons/funkwhale-16.png'); }
|
||||
.social a[id*='Gitea'] + i:before {content: url('../images/icons/gitea-18px.png'); }
|
||||
.social a[id*='Github'] + i:before {content: url('../images/icons/github-18px.png'); }
|
||||
.social a[id*='Gitlab'] + i:before {content: url('../images/icons/gitlab-18px.png'); }
|
||||
.social a[id*='Gnusocial'] + i:before {content: url('../images/icons/gnusocial-18px.png'); }
|
||||
.social a[id*='Hubzilla'] + i:before {content: url('../images/icons/hubzilla-16.png'); }
|
||||
.social a[id*='Mastodon'] + i:before {content: url('../images/icons/mastodon-18px.png'); }
|
||||
.social a[id*='Matrix'] + i:before {content: url('../images/icons/matrix-16.png'); }
|
||||
.social a[id*='Misskey'] + i:before {content: url('../images/icons/misskey-18px.png'); }
|
||||
.social a[id*='Movim'] + i:before {content: url('../images/icons/movim-18px.png'); }
|
||||
.social a[id*='Peertube'] + i:before {content: url('../images/icons/peertube-18px.png'); }
|
||||
.social a[id*='Pixelfed'] + i:before {content: url('../images/icons/pixelfed-18px.png'); }
|
||||
.social a[id*='Pleroma'] + i:before {content: url('../images/icons/pleroma-18px.png'); }
|
||||
.social a[id*='Plume'] + i:before {content: url('../images/icons/plume-16.png'); }
|
||||
.social a[id*='Pump.io'] + i:before {content: url('../images/icons/pumpio-18px.png'); }
|
||||
.social a[id*='RedMatrix'] + i:before {content: url('../images/icons/redmatrix-18px.png'); }
|
||||
.social a[id*='XMPP'] + i:before {content: url('../images/icons/xmpp-18px.png'); }
|
||||
.social a[href*='rss.xml']:before {content: url('../images/icons/feed-18px.png'); }
|
||||
.social a[href*='atom.xml']:before {content: url('../images/icons/feed-18px.png'); }
|
||||
|
||||
|
||||
/* Tag cloud */
|
||||
|
||||
ul.tagcloud {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
line-height: 200%;
|
||||
}
|
||||
|
||||
ul.tagcloud li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
li.tag-1 { font-size: 100%; margin: 0 1em; }
|
||||
li.tag-2 { font-size: 80%; margin: 0 1em; }
|
||||
li.tag-3 { font-size: 70%; margin: 0 1em; }
|
||||
li.tag-4 { font-size: 60%; margin: 0 1em; }
|
||||
|
||||
/* Pagination */
|
||||
|
||||
.pagination {
|
||||
width: 100px;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
/* Federation Social Widget */
|
||||
#federation_widget {
|
||||
font-size: 0.7em;
|
||||
margin-top: 20px;
|
||||
height: 350px;
|
||||
width: 230px;
|
||||
padding: 0;
|
||||
border-radius: 5px;
|
||||
background-color: #FcFcFc;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#federation_widget header {
|
||||
padding-bottom: 8px;
|
||||
text-align: left;
|
||||
font-size: 1.5em;
|
||||
border-bottom: 3px solid #EEEEEE;
|
||||
background-color: #FcFcFc;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
}
|
||||
|
||||
#federation_widget header a {
|
||||
text-decoration: none;
|
||||
color:black
|
||||
}
|
||||
|
||||
#federation_widget header img {
|
||||
margin: 5px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
#federation_widget header p {
|
||||
margin: 0px;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
#federation_widget article {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px;
|
||||
border-bottom: thin solid #eeeeee;
|
||||
overflow: hidden; /* For too long link: hide but enable click on it */
|
||||
}
|
||||
|
||||
#federation_widget article img {
|
||||
margin: 5px;
|
||||
max-width: 230px;
|
||||
}
|
||||
|
||||
#federation_widget article p {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.groupmember img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tooltip {position: relative;}
|
||||
.tooltip span {display: none;}
|
||||
.tooltip:hover span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0; top: 10%;
|
||||
margin: 20px 0 0;
|
||||
width: 200px;
|
||||
font-size: 0.7em;
|
||||
color: #4D4D4C;
|
||||
border: thin solid #eeeeee;
|
||||
padding: 4px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Friendica Comments */
|
||||
#comments {
|
||||
border-top: thin solid #eeeeee;
|
||||
padding-top: 15px;
|
||||
display: table;
|
||||
margin-left: 60px;
|
||||
width: calc(100% - 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;
|
||||
}
|
||||
|
||||
|
||||
/* Responsive */
|
||||
|
||||
@media (max-width: 900px) {
|
||||
|
||||
body {
|
||||
min-width: 300px;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.container {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
padding: 100px 20px 20px 20px;
|
||||
float: none;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.wrapper .sidebar,
|
||||
.wrapper .left-sidebar,
|
||||
.wrapper .content {
|
||||
display: block;
|
||||
position: static;
|
||||
padding: 0px 5px 1em;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-sidebar nav {
|
||||
position: static;
|
||||
}
|
||||
|
||||
ul.tagcloud {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
205
static/css/pygment.css
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
.hll {
|
||||
background-color:#FFFFCC;
|
||||
}
|
||||
.c {
|
||||
color:#408090;
|
||||
font-style:italic;
|
||||
}
|
||||
.err {
|
||||
border:1px solid #FF0000;
|
||||
}
|
||||
.k {
|
||||
color:#007020;
|
||||
font-weight:bold;
|
||||
}
|
||||
.o {
|
||||
color:#666666;
|
||||
}
|
||||
.cm {
|
||||
color:#408090;
|
||||
font-style:italic;
|
||||
}
|
||||
.cp {
|
||||
color:#007020;
|
||||
}
|
||||
.c1 {
|
||||
color:#408090;
|
||||
font-style:italic;
|
||||
}
|
||||
.cs {
|
||||
background-color:#FFF0F0;
|
||||
color:#408090;
|
||||
}
|
||||
.gd {
|
||||
color:#A00000;
|
||||
}
|
||||
.ge {
|
||||
font-style:italic;
|
||||
}
|
||||
.gr {
|
||||
color:#FF0000;
|
||||
}
|
||||
.gh {
|
||||
color:#000080;
|
||||
font-weight:bold;
|
||||
}
|
||||
.gi {
|
||||
color:#00A000;
|
||||
}
|
||||
.go {
|
||||
color:#303030;
|
||||
}
|
||||
.gp {
|
||||
color:#C65D09;
|
||||
font-weight:bold;
|
||||
}
|
||||
.gs {
|
||||
font-weight:bold;
|
||||
}
|
||||
.gu {
|
||||
color:#800080;
|
||||
font-weight:bold;
|
||||
}
|
||||
.gt {
|
||||
color:#0040D0;
|
||||
}
|
||||
.kc {
|
||||
color:#007020;
|
||||
font-weight:bold;
|
||||
}
|
||||
.kd {
|
||||
color:#007020;
|
||||
font-weight:bold;
|
||||
}
|
||||
.kn {
|
||||
color:#007020;
|
||||
font-weight:bold;
|
||||
}
|
||||
.kp {
|
||||
color:#007020;
|
||||
}
|
||||
.kr {
|
||||
color:#007020;
|
||||
font-weight:bold;
|
||||
}
|
||||
.kt {
|
||||
color:#902000;
|
||||
}
|
||||
.m {
|
||||
color:#208050;
|
||||
}
|
||||
.s {
|
||||
color:#4070A0;
|
||||
}
|
||||
.na {
|
||||
color:#4070A0;
|
||||
}
|
||||
.nb {
|
||||
color:#007020;
|
||||
}
|
||||
.nc {
|
||||
color:#0E84B5;
|
||||
font-weight:bold;
|
||||
}
|
||||
.no {
|
||||
color:#60ADD5;
|
||||
}
|
||||
.nd {
|
||||
color:#555555;
|
||||
font-weight:bold;
|
||||
}
|
||||
.ni {
|
||||
color:#D55537;
|
||||
font-weight:bold;
|
||||
}
|
||||
.ne {
|
||||
color:#007020;
|
||||
}
|
||||
.nf {
|
||||
color:#06287E;
|
||||
}
|
||||
.nl {
|
||||
color:#002070;
|
||||
font-weight:bold;
|
||||
}
|
||||
.nn {
|
||||
color:#0E84B5;
|
||||
font-weight:bold;
|
||||
}
|
||||
.nt {
|
||||
color:#062873;
|
||||
font-weight:bold;
|
||||
}
|
||||
.nv {
|
||||
color:#BB60D5;
|
||||
}
|
||||
.ow {
|
||||
color:#007020;
|
||||
font-weight:bold;
|
||||
}
|
||||
.w {
|
||||
color:#BBBBBB;
|
||||
}
|
||||
.mf {
|
||||
color:#208050;
|
||||
}
|
||||
.mh {
|
||||
color:#208050;
|
||||
}
|
||||
.mi {
|
||||
color:#208050;
|
||||
}
|
||||
.mo {
|
||||
color:#208050;
|
||||
}
|
||||
.sb {
|
||||
color:#4070A0;
|
||||
}
|
||||
.sc {
|
||||
color:#4070A0;
|
||||
}
|
||||
.sd {
|
||||
color:#4070A0;
|
||||
font-style:italic;
|
||||
}
|
||||
.s2 {
|
||||
color:#4070A0;
|
||||
}
|
||||
.se {
|
||||
color:#4070A0;
|
||||
font-weight:bold;
|
||||
}
|
||||
.sh {
|
||||
color:#4070A0;
|
||||
}
|
||||
.si {
|
||||
color:#70A0D0;
|
||||
font-style:italic;
|
||||
}
|
||||
.sx {
|
||||
color:#C65D09;
|
||||
}
|
||||
.sr {
|
||||
color:#235388;
|
||||
}
|
||||
.s1 {
|
||||
color:#4070A0;
|
||||
}
|
||||
.ss {
|
||||
color:#517918;
|
||||
}
|
||||
.bp {
|
||||
color:#007020;
|
||||
}
|
||||
.vc {
|
||||
color:#BB60D5;
|
||||
}
|
||||
.vg {
|
||||
color:#BB60D5;
|
||||
}
|
||||
.vi {
|
||||
color:#BB60D5;
|
||||
}
|
||||
.il {
|
||||
color:#208050;
|
||||
}
|
||||
BIN
static/images/icons/Diaspora-18px.png
Normal file
|
After Width: | Height: | Size: 763 B |
BIN
static/images/icons/Diaspora-32px.png
Normal file
|
After Width: | Height: | Size: 974 B |
BIN
static/images/icons/Pleroma_logo.svg.png
Normal file
|
After Width: | Height: | Size: 846 B |
BIN
static/images/icons/buddycloud-18px.png
Normal file
|
After Width: | Height: | Size: 998 B |
BIN
static/images/icons/buddycloud-30px.png
Normal file
|
After Width: | Height: | Size: 901 B |
BIN
static/images/icons/feed-18px.png
Normal file
|
After Width: | Height: | Size: 634 B |
BIN
static/images/icons/feed-32px.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/images/icons/forgejo-18px.png
Normal file
|
After Width: | Height: | Size: 416 B |
BIN
static/images/icons/friendica-18px.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/images/icons/friendica-32.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/images/icons/funkwhale-16.png
Normal file
|
After Width: | Height: | Size: 723 B |
BIN
static/images/icons/gitea-18px.png
Normal file
|
After Width: | Height: | Size: 542 B |
BIN
static/images/icons/github-18px.png
Normal file
|
After Width: | Height: | Size: 779 B |
BIN
static/images/icons/github-32px.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/images/icons/gitlab-18px.png
Normal file
|
After Width: | Height: | Size: 383 B |
BIN
static/images/icons/gnusocial-18px.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/images/icons/gnusocial-32px.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/images/icons/hubzilla-16.png
Normal file
|
After Width: | Height: | Size: 559 B |
BIN
static/images/icons/mastodon-18px.png
Normal file
|
After Width: | Height: | Size: 1,014 B |
BIN
static/images/icons/matrix-16.png
Normal file
|
After Width: | Height: | Size: 219 B |
BIN
static/images/icons/misskey-18px.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/images/icons/movim-18px.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
static/images/icons/peertube-18px.png
Normal file
|
After Width: | Height: | Size: 778 B |
BIN
static/images/icons/pixelfed-18px.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/images/icons/pleroma-18px.png
Normal file
|
After Width: | Height: | Size: 660 B |
BIN
static/images/icons/plume-16.png
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
static/images/icons/pumpio-18px.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/images/icons/redmatrix-18.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/images/icons/redmatrix-32.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/images/icons/xmpp-18px.png
Normal file
|
After Width: | Height: | Size: 655 B |
BIN
static/images/licenses/cc-by-88x31.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/images/licenses/cc-by-nc-88x31.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/images/licenses/cc-by-nc-sa-88x31.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/images/licenses/cc-by-sa-88x31.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
1
static/js/federation_widget.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
function getAtom(){window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp.open("GET",url,!0),xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState===XMLHttpRequest.DONE)try{(xmlhttp.status=200)&&updateWidget(xmlhttp.responseXML)}catch(t){}},xmlhttp.send()}function updateWidget(t){"hubzilla"==servertype?userinfo=t.getElementsByTagNameNS("http://purl.org/zot","owner")[0]:userinfo=t.getElementsByTagName("author")[0];try{if("hubzilla"==servertype)for(var e=userinfo.getElementsByTagName("link"),a=0;a<e.length;a++)"avatar"==e[a].getAttribute("rel")&&(img=e[a].getAttribute("href"));else img=t.getElementsByTagName("logo")[0].firstChild.data}catch(t){img=""}try{profile=userinfo.getElementsByTagName("uri")[0].firstChild.data}catch(t){profile=""}try{displayname=userinfo.getElementsByTagName("name")[0].firstChild.data}catch(t){displayname=""}content='<div id="federation_widget"><header>',""!=img&&(content+='<a target= "_blank" href="'+profile+'"><img src="'+img+'" title="Avatar"/></a>'),content+=' <p><a target= "_blank" href="'+profile+'">'+displayname+"</a></p></header>";for(var r=t.getElementsByTagName("entry"),n=max-1,l=0;l<r.length;l++){try{var i="",s="",o="",m="";if("group"==type){s=r[l].getElementsByTagName("author")[0].getElementsByTagNameNS("http://portablecontacts.net/spec/1.0","displayName")[0].firstChild.data;var g=r[l].getElementsByTagName("link");for(a=0;a<g.length;a++)if("avatar"==g[a].getAttribute("rel"))o=g[a].getAttribute("href");i='<span class="groupmember"><a class="tooltip" target= "_blank" href="'+(m=r[l].getElementsByTagName("uri")[0].firstChild.data)+'"><img style="max-width:50px;" alt="Profile" align="left" src="'+o+'" />'+s+" <span>"+m+"</span> </a> </span>"}}catch(t){i="",o="",m=""}try{var p=r[l].getElementsByTagName("content")[0].firstChild.data}catch(t){p=""}try{var d="";d=new Date(r[l].getElementsByTagName("updated")[0].firstChild.data).toLocaleString(),d='<span class="tooltip">⌛<span>'+posttime_label+" "+d+"</span> </span>"}catch(t){d=""}content+="<article>"+i+d+"<br />"+p+"</article>",n<r.length&&l==n&&(l=r.length)}content+="<footer></footer></div>",document.getElementById(tag).innerHTML=content}"diaspora"==servertype?url=domain+"/public/"+user+".atom":"mastodon"==servertype?url=domain+"/@"+user+".atom":url=domain+"/feed/"+user,window.onload=getAtom;
|
||||
46
static/js/friendica_comments.js
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
var article = document.getElementsByTagName("article")[0].innerHTML;
|
||||
var article_name= article.substring(article.indexOf('<p>')+3,article.indexOf('<p>')+33);
|
||||
var search = friendica_domain + "/search?search=" + article_name.replace(/ /gi,'+');
|
||||
var http, http2 = null;
|
||||
var ergebnis = "";
|
||||
|
||||
http = new XMLHttpRequest();
|
||||
if (http !== null) {
|
||||
http.open("GET", search, true);
|
||||
http.onreadystatechange = SearchFriendica;
|
||||
http.send(null);
|
||||
}
|
||||
|
||||
function SearchFriendica() {
|
||||
if (http.readyState == 4 && http.status==200) {
|
||||
var SearchResult= http.responseText;
|
||||
var start = SearchResult.indexOf('wall-item-bottom');
|
||||
var start2 = SearchResult.indexOf('a href=\'http',start);
|
||||
var end = SearchResult.indexOf('id',start);
|
||||
ergebnis = SearchResult.substring(start2+8,end-2);
|
||||
}
|
||||
|
||||
http2 = new XMLHttpRequest();
|
||||
if (http2 !== null) {
|
||||
http2.open("GET", ergebnis, true);
|
||||
http2.onreadystatechange = SearchComments;
|
||||
http2.send(null);
|
||||
}
|
||||
|
||||
function SearchComments() {
|
||||
if (http.readyState == 4 && http.status == 200) {
|
||||
var CommentsResult = http2.responseText;
|
||||
var ergebnisse = ("<div class='comment'> <a href='" + ergebnis +"'> Comments</a> powered by Friendica</div>" );
|
||||
var arr = new Array();
|
||||
arr = CommentsResult.split("wall-item-container comment");
|
||||
for (i=1;i<arr.length;i++){
|
||||
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 end = arr[i].indexOf('<div class=\"wall-item-bottom\">',start);
|
||||
var comment = arr[i].substring(start,end-1);
|
||||
ergebnisse = ergebnisse + '<div class=\"comment-container\">' + photo + comment + '</div>';
|
||||
}
|
||||
document.getElementById("comments").innerHTML = ergebnisse;
|
||||
}
|
||||
}
|
||||
}
|
||||