mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-08 08:04:26 +00:00
display children count on minimize, block comments, reports, improved responsiveness. fixes #41
This commit is contained in:
parent
16f60211fb
commit
f09d7fba42
|
@ -1,4 +1,4 @@
|
||||||
body {
|
body, .blockpopup {
|
||||||
background-color: #262626;
|
background-color: #262626;
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@ input[type=text], input[type=password], textarea {
|
||||||
.post .score {
|
.post .score {
|
||||||
color: #646464;
|
color: #646464;
|
||||||
}
|
}
|
||||||
|
.post .thumb {
|
||||||
|
background-color: #424242;
|
||||||
|
}
|
||||||
.score form.link-btn input {
|
.score form.link-btn input {
|
||||||
color: #646464;
|
color: #646464;
|
||||||
}
|
}
|
||||||
|
|
BIN
public/link.png
BIN
public/link.png
Binary file not shown.
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
public/photo.png
BIN
public/photo.png
Binary file not shown.
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 6.6 KiB |
305
public/style.css
305
public/style.css
|
@ -24,54 +24,84 @@ summary {
|
||||||
transform: scale(1.03);
|
transform: scale(1.03);
|
||||||
}
|
}
|
||||||
.post {
|
.post {
|
||||||
margin: 8px 0px;
|
margin: 6px 0px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.post .p {
|
||||||
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
.post .thumb {
|
.post .thumb {
|
||||||
height: 52px;
|
margin: 2px 8px 0px 0px;
|
||||||
width: 70px;
|
|
||||||
margin: 0px 8px 0px 0px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
--background-color: #e7e7e7;
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
.post .thumb, .post .thumb div {
|
||||||
|
height: 47px;
|
||||||
|
width: 70px;
|
||||||
}
|
}
|
||||||
.post .thumb div {
|
.post .thumb div {
|
||||||
height: 52px;
|
|
||||||
width: 70px;
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
.rank {
|
.rank {
|
||||||
color: #c6c6c6;
|
color: #c6c6c6;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-top: 17px;
|
margin: 16px 0 0 0;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
min-width: 21px;
|
min-width: 19px;
|
||||||
}
|
}
|
||||||
.post .score {
|
.post .score {
|
||||||
color: #c6c6c6;
|
color: #c6c6c6;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.post .score div div,
|
||||||
|
.post .score form {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
min-width: 42px;
|
margin: 0 4px;
|
||||||
|
width: 38px;
|
||||||
}
|
}
|
||||||
.comment .score {
|
.post .score div div {
|
||||||
clear:left;
|
margin: 18px 2px;
|
||||||
margin-right: 4px;
|
|
||||||
overflow:hidden;
|
|
||||||
min-width: 3px;
|
|
||||||
min-height: 38px;
|
|
||||||
}
|
}
|
||||||
.comment .content, .expando .md {
|
.create_comment {
|
||||||
|
margin: 0 0 10px 0px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.expando .thumb, .expando .score, .expando .rank {
|
||||||
|
display: none;
|
||||||
|
background-color: unset !important;
|
||||||
|
}
|
||||||
|
.comment .content, .expando .md, .expando > div {
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
max-width: 840px;
|
max-width: 840px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.expando > div {
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.comment.hidden {
|
.comment.hidden {
|
||||||
padding-bottom:5px;
|
padding-bottom:5px;
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
.comment.hidden .score form input {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.comment .score {
|
||||||
|
min-height: 32px;
|
||||||
|
min-width: 4px;
|
||||||
}
|
}
|
||||||
.comment.hidden .score {
|
.comment.hidden .score {
|
||||||
visibility: hidden;
|
min-height: 1px;
|
||||||
|
}
|
||||||
|
.comment .score form {
|
||||||
|
margin-right: 2px;
|
||||||
|
min-width: 20px;
|
||||||
|
position: relative;
|
||||||
|
bottom: 2px;
|
||||||
}
|
}
|
||||||
.score form.link-btn input {
|
.score form.link-btn input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -113,7 +143,6 @@ summary {
|
||||||
.post .title {
|
.post .title {
|
||||||
color: #888;
|
color: #888;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
margin-bottom: 2px;
|
|
||||||
}
|
}
|
||||||
.post .title.visited a {
|
.post .title.visited a {
|
||||||
color: #551A8B;
|
color: #551A8B;
|
||||||
|
@ -132,6 +161,7 @@ summary {
|
||||||
}
|
}
|
||||||
.activity .post {
|
.activity .post {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
min-height: 50px;
|
||||||
}
|
}
|
||||||
.activity .comment {
|
.activity .comment {
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
|
@ -148,10 +178,10 @@ summary {
|
||||||
.comment {
|
.comment {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0px 0px 10px 0px;
|
margin: 5px 0px 8px 0px;
|
||||||
border: 1px solid #e6e6e6;
|
border: 1px solid #e6e6e6;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 10px 10px 0px 7px;
|
padding: 7px 8px 0px 4px;
|
||||||
}
|
}
|
||||||
.activity .comment {
|
.activity .comment {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
|
@ -159,8 +189,6 @@ summary {
|
||||||
.comment img {
|
.comment img {
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
}
|
}
|
||||||
.comment .comment {
|
|
||||||
}
|
|
||||||
.comment .comment,
|
.comment .comment,
|
||||||
.comment .comment .comment .comment,
|
.comment .comment .comment .comment,
|
||||||
.comment .comment .comment .comment .comment .comment,
|
.comment .comment .comment .comment .comment .comment,
|
||||||
|
@ -176,7 +204,8 @@ summary {
|
||||||
}
|
}
|
||||||
.comment .meta {
|
.comment .meta {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
margin-bottom: 6px;
|
overflow: hidden;
|
||||||
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
.preview h3 {
|
.preview h3 {
|
||||||
background-color: #f0f3fc;
|
background-color: #f0f3fc;
|
||||||
|
@ -232,20 +261,22 @@ summary {
|
||||||
.commentmenu div {
|
.commentmenu div {
|
||||||
border-top: 1px dotted gray;
|
border-top: 1px dotted gray;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
padding-top: 3px;
|
||||||
}
|
}
|
||||||
form.savecomment {
|
form.savecomment {
|
||||||
margin: 0px 0px 10px 0px;
|
max-width: 500px;
|
||||||
width: 500px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
.comment > .children > form.savecomment {
|
.comment > .children > form.savecomment {
|
||||||
margin: 0px 0px 10px 20px;
|
margin: 0px 0px 10px 20px;
|
||||||
}
|
}
|
||||||
.comment .children {
|
.comment .children {
|
||||||
margin: 5px 0px 5px 15px;
|
margin: 3px 0px 5px 21px;
|
||||||
}
|
}
|
||||||
.savecomment textarea {
|
.savecomment textarea {
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,8 +301,11 @@ form.savecomment {
|
||||||
.savecomment .right a {
|
.savecomment .right a {
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
.comment.hidden .meta span, .comment.hidden .meta b {
|
||||||
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment .meta a.minimize {
|
.comment .meta a.minimize {
|
||||||
color: #369;
|
color: #369;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
@ -281,15 +315,21 @@ form.savecomment {
|
||||||
color: gray;
|
color: gray;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
.comment.hidden .meta a:last-child {
|
.numChildren {
|
||||||
|
display: none;
|
||||||
|
color: gray;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.comment.hidden .numChildren {
|
||||||
|
display: inline
|
||||||
|
}
|
||||||
|
.comment.hidden .meta a.creator {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
.comment.hidden .content, .comment.hidden .children, .comment.hidden .morecomments {
|
.comment.hidden .content, .comment.hidden .children, .comment.hidden .morecomments {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.children .morecomments {
|
|
||||||
}
|
|
||||||
.morecomments {
|
.morecomments {
|
||||||
height: 15px;
|
height: 15px;
|
||||||
clear: left;
|
clear: left;
|
||||||
|
@ -417,7 +457,7 @@ form.nsfw div {
|
||||||
.buttons li {
|
.buttons li {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
.buttons, .buttons > form input, .buttons li form input {
|
.buttons, .buttons > form input, .buttons li > form input {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -426,7 +466,8 @@ form.nsfw div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.comment .buttons {
|
.comment .buttons {
|
||||||
margin: 3px 0px 0px 0px;
|
margin: 3px 0px 2px 0px;
|
||||||
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
.comment.hidden .buttons {
|
.comment.hidden .buttons {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -436,28 +477,39 @@ form.nsfw div {
|
||||||
border-left: 2px solid #c5c1ad;
|
border-left: 2px solid #c5c1ad;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
.buttons a, .buttons > form input, .comment .buttons form input {
|
.buttons a, .buttons > form input, .comment .buttons li > form input {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #888;
|
color: #888;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 5px !important;
|
margin-right: 5px !important;
|
||||||
}
|
}
|
||||||
.buttons a:hover, .buttons > form input:hover, .comment .buttons form input:hover {
|
.buttons a:hover, .buttons > form input:hover, .comment .buttons li > form input:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.entry {
|
.entry {
|
||||||
|
display: inline-block;
|
||||||
color: #888;
|
color: #888;
|
||||||
overflow:hidden;
|
overflow: hidden;
|
||||||
|
padding: 4px 0 0 0;
|
||||||
}
|
}
|
||||||
.entry .buttons .blockpopup {
|
.blockpopup {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
.blockpopup fieldset {
|
||||||
|
border-color: gray;
|
||||||
|
}
|
||||||
.entry .meta {
|
.entry .meta {
|
||||||
margin: -1px 0px 1px 0px;
|
margin: -1px 0px 1px 0px;
|
||||||
}
|
}
|
||||||
|
.entry .meta > span {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.entry > div:last-child {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
form.blockpost {
|
form.blockpost {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
border: 1px solid #888;
|
border: 1px solid #888;
|
||||||
|
@ -479,20 +531,22 @@ form.blockpost {
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 16px;
|
font-size: 12px;
|
||||||
left: 11px;
|
left: 12px;
|
||||||
top: 3px;
|
top: 7px;
|
||||||
}
|
}
|
||||||
.open.expando-button {
|
.open.expando-button {
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
}
|
}
|
||||||
.open.expando-button::before {
|
.open.expando-button::before {
|
||||||
content: "x";
|
content: "✖";
|
||||||
color: #fff;
|
color: #fff;
|
||||||
left: 7px;
|
|
||||||
top: 0px;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
|
left: 5px;
|
||||||
|
top: 1px;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
.expando-button:hover{
|
.expando-button:hover{
|
||||||
background-color: #466599;
|
background-color: #466599;
|
||||||
|
@ -506,7 +560,7 @@ form.blockpost {
|
||||||
.hidechildren.hidden .show {
|
.hidechildren.hidden .show {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
.hidechildren.hidden .hide {
|
.hidechildren.hidden span:first-child {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.hidechildren span {
|
.hidechildren span {
|
||||||
|
@ -518,7 +572,6 @@ form.blockpost {
|
||||||
.expando {
|
.expando {
|
||||||
display: none;
|
display: none;
|
||||||
max-width: 900px;
|
max-width: 900px;
|
||||||
margin-top: 5px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
@ -563,17 +616,19 @@ form.blockpost {
|
||||||
}
|
}
|
||||||
.expando.open{
|
.expando.open{
|
||||||
display: block;
|
display: block;
|
||||||
|
clear: left;
|
||||||
}
|
}
|
||||||
.expando .image {
|
.expando .image {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
cursor: nwse-resize;
|
cursor: nwse-resize;
|
||||||
|
margin-top:4px;
|
||||||
}
|
}
|
||||||
.expando .md {
|
.expando .md {
|
||||||
|
margin-top:4px;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
border: 1px solid #369;
|
border: 1px solid #369;
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
margin: 5px auto;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
@ -613,44 +668,30 @@ form.blockpost {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidetoggle button::before {
|
|
||||||
content: '[+]';
|
|
||||||
visibility: visible;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
top: 12px;
|
|
||||||
}
|
|
||||||
#sidetoggle.o button::before {
|
|
||||||
content: '[-]';
|
|
||||||
visibility: visible;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
top: 12px;
|
|
||||||
}
|
|
||||||
#sidetoggle button {
|
|
||||||
visibility: hidden;
|
|
||||||
width: 10px;
|
|
||||||
margin-right: 16px;
|
|
||||||
background: unset;
|
|
||||||
border: unset;
|
|
||||||
}
|
|
||||||
#sidetoggle {
|
#sidetoggle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
cursor: pointer;
|
|
||||||
right: 0;
|
right: 0;
|
||||||
display: inline-flex;
|
}
|
||||||
align-items: end;
|
#sidetoggle button {
|
||||||
height: 20px;
|
background: unset;
|
||||||
font-size: 12px;
|
border: unset;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
#sidetoggle span:last-child {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.sidetoggle #sidetoggle span:last-child {
|
||||||
|
display: inline
|
||||||
|
}
|
||||||
|
.sidetoggle #sidetoggle span:first-child {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
.side {
|
.side {
|
||||||
display: none;
|
display: none;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
width: 300px;
|
|
||||||
padding: 0 5px 0 10px;
|
padding: 0 5px 0 10px;
|
||||||
margin-bottom: 10px;
|
margin: 0px auto;
|
||||||
border-radius: 0px 0px 0px 4px;
|
border-radius: 0px 0px 0px 4px;
|
||||||
}
|
}
|
||||||
.side img, .md img{
|
.side img, .md img{
|
||||||
|
@ -658,37 +699,80 @@ form.blockpost {
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0px 10px;
|
margin: 0px 5px;
|
||||||
}
|
}
|
||||||
.wide .side {
|
.sidetoggle .side {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@media (min-width: 900px) {
|
#search input {
|
||||||
.wide .side {
|
width: 100%;
|
||||||
display: none !important;
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
#search {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
main > .community {
|
||||||
|
margin: 20px 50px;
|
||||||
}
|
}
|
||||||
#sidetoggle button::before {
|
.community .details {
|
||||||
content: '[-]';
|
margin-left: 36px;
|
||||||
}
|
}
|
||||||
#sidetoggle.o button::before {
|
.side {
|
||||||
content: '[+]';
|
float:right;
|
||||||
|
width: 300px;
|
||||||
}
|
}
|
||||||
.expando {
|
main {
|
||||||
text-align: left;
|
margin-right: 0px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
main > .comment, .commentmenu, #tagline, .menu, .activity, .expando {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.entry {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 800px) {
|
||||||
|
.expando .thumb, .expando .score, .expando .rank {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
.expando .image {
|
.expando .image {
|
||||||
max-width: 578px;
|
max-width: 578px;
|
||||||
}
|
}
|
||||||
|
.expando > div {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1064px) {
|
||||||
|
.signup > div:first-child {
|
||||||
|
position: unset !important;
|
||||||
|
}
|
||||||
|
.signup > div:first-child {
|
||||||
|
border-right: 1px solid #e0e0e0;
|
||||||
|
padding-right: 60px;
|
||||||
|
}
|
||||||
|
.sidetoggle .side {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
#sidetoggle span:last-child {
|
||||||
|
display: inline
|
||||||
|
}
|
||||||
|
#sidetoggle span:first-child {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
.sidetoggle #sidetoggle span:last-child {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.sidetoggle #sidetoggle span:first-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
.side {
|
.side {
|
||||||
display: block;
|
display: block;
|
||||||
float:right;
|
|
||||||
}
|
|
||||||
main {
|
|
||||||
margin-right: 0px;
|
|
||||||
}
|
|
||||||
main > .comment {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.side form {
|
.side form {
|
||||||
margin: 0px 0px 5px 0px;
|
margin: 0px 0px 5px 0px;
|
||||||
|
@ -781,7 +865,7 @@ h1, h2 {
|
||||||
color: #369;
|
color: #369;
|
||||||
}
|
}
|
||||||
main > .community {
|
main > .community {
|
||||||
margin: 20px 50px;
|
margin: 20px 5px;
|
||||||
max-width: 840px;
|
max-width: 840px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@ -795,15 +879,12 @@ main > .community {
|
||||||
max-height: 170px;
|
max-height: 170px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.community .details {
|
|
||||||
margin-left: 36px;
|
|
||||||
}
|
|
||||||
nav {
|
nav {
|
||||||
|
position: relative;
|
||||||
border-bottom: 1px solid #00a846;
|
border-bottom: 1px solid #00a846;
|
||||||
background-color: #9ad59b;
|
background-color: #9ad59b;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 8px;
|
||||||
position: relative;
|
|
||||||
}
|
}
|
||||||
nav .communities {
|
nav .communities {
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
|
@ -835,7 +916,7 @@ nav .communities a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
nav .title a:hover {
|
nav .title:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,7 +951,7 @@ nav .space a {
|
||||||
nav .icon {
|
nav .icon {
|
||||||
height: 54px;
|
height: 54px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
margin: 2px 5px;
|
margin: 2px 3px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-position: center bottom;
|
background-position: center bottom;
|
||||||
|
@ -902,6 +983,10 @@ nav li {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav li:nth-last-child(2) {
|
||||||
|
margin-right: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
nav ul a {
|
nav ul a {
|
||||||
color: #369;
|
color: #369;
|
||||||
background-color: #eff7ff;
|
background-color: #eff7ff;
|
||||||
|
@ -936,6 +1021,7 @@ body nav .right a.mailbox {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
color: gray;
|
color: gray;
|
||||||
|
line-height: 0;
|
||||||
}
|
}
|
||||||
nav .right a, nav .right input[type=submit] {
|
nav .right a, nav .right input[type=submit] {
|
||||||
color: #369;
|
color: #369;
|
||||||
|
@ -945,7 +1031,7 @@ nav .right form, .comment form, form.link-btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
nav .right form input, .comment .buttons input, form.link-btn input {
|
nav .right form input, .comment .buttons li > form input, form.link-btn input {
|
||||||
background-color: rgba(0, 0, 0, 0);
|
background-color: rgba(0, 0, 0, 0);
|
||||||
border: 0px;
|
border: 0px;
|
||||||
font-size: unset;
|
font-size: unset;
|
||||||
|
@ -958,6 +1044,10 @@ nav .right form input, .comment .buttons input, form.link-btn input {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
background-color: #fffcd4;
|
||||||
|
color: #000;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding: 0px 5px;
|
||||||
}
|
}
|
||||||
.menu {
|
.menu {
|
||||||
border-bottom: 1px dotted gray;
|
border-bottom: 1px dotted gray;
|
||||||
|
@ -1042,7 +1132,7 @@ form.create input[type=file], form.create select {
|
||||||
.signup {
|
.signup {
|
||||||
margin: 0px 30px;
|
margin: 0px 30px;
|
||||||
}
|
}
|
||||||
.signup h2 {
|
.signup h1 {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.signup > div {
|
.signup > div {
|
||||||
|
@ -1050,8 +1140,8 @@ form.create input[type=file], form.create select {
|
||||||
margin: 30px;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
.signup > div:first-child {
|
.signup > div:first-child {
|
||||||
border-right: 1px solid #e0e0e0;
|
position: absolute;
|
||||||
padding-right: 60px;
|
top: 316px;
|
||||||
}
|
}
|
||||||
.root label, .signup label {
|
.root label, .signup label {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
@ -1073,7 +1163,10 @@ form.create input[type=file], form.create select {
|
||||||
}
|
}
|
||||||
.signup input[type=submit] {
|
.signup input[type=submit] {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
float: right;
|
display: block;
|
||||||
|
}
|
||||||
|
.signup figure {
|
||||||
|
margin: 16px 0 4px 0;
|
||||||
}
|
}
|
||||||
.signup .question {
|
.signup .question {
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
|
|
BIN
public/text.png
BIN
public/text.png
Binary file not shown.
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -27,7 +27,6 @@ function postClick(e) {
|
||||||
btn.className = "expando-button"
|
btn.className = "expando-button"
|
||||||
targ.getElementsByClassName("embed")[0].innerHTML = ""
|
targ.getElementsByClassName("embed")[0].innerHTML = ""
|
||||||
} else {
|
} else {
|
||||||
if (window.innerWidth <= 800) targ.appendChild(bdy);
|
|
||||||
bdy.className = 'expando open';
|
bdy.className = 'expando open';
|
||||||
btn.className = "expando-button open"
|
btn.className = "expando-button open"
|
||||||
var url = targ.getElementsByClassName("url")[0].href
|
var url = targ.getElementsByClassName("url")[0].href
|
||||||
|
@ -68,13 +67,12 @@ function commentClick(e) {
|
||||||
var targ = e.currentTarget || e.srcElement || e;
|
var targ = e.currentTarget || e.srcElement || e;
|
||||||
if (targ.nodeType == 3) targ = targ.parentNode;
|
if (targ.nodeType == 3) targ = targ.parentNode;
|
||||||
if (e.target.name=="submit") {
|
if (e.target.name=="submit") {
|
||||||
e.preventDefault()
|
|
||||||
var form = uptil(e.target, function(el){ return el.tagName == "FORM" })
|
var form = uptil(e.target, function(el){ return el.tagName == "FORM" })
|
||||||
if (form) {
|
if (form) {
|
||||||
data = new FormData(form)
|
data = new FormData(form)
|
||||||
data.set(e.target.name, e.target.value)
|
data.set(e.target.name, e.target.value)
|
||||||
data.set("xhr", 1)
|
data.set("xhr", 1)
|
||||||
if (("c"+data.get("commentid")) == targ.id) {
|
if (("c"+data.get("commentid")) == targ.id && data.get("op") != "block_comment") {
|
||||||
targ.action = form.action
|
targ.action = form.action
|
||||||
if (e.target.value == "preview") {
|
if (e.target.value == "preview") {
|
||||||
targ = form
|
targ = form
|
||||||
|
@ -82,6 +80,8 @@ function commentClick(e) {
|
||||||
} else if (("c"+data.get("parentid")) == targ.id) {
|
} else if (("c"+data.get("parentid")) == targ.id) {
|
||||||
targ = form
|
targ = form
|
||||||
} else { return }
|
} else { return }
|
||||||
|
e.preventDefault()
|
||||||
|
e.target.style.cursor = 'wait'
|
||||||
e.target.disabled = "disabled"
|
e.target.disabled = "disabled"
|
||||||
if (data.get("op") == "delete_comment") {
|
if (data.get("op") == "delete_comment") {
|
||||||
if (!confirm("Are you sure?")) {
|
if (!confirm("Are you sure?")) {
|
||||||
|
@ -120,7 +120,7 @@ function commentClick(e) {
|
||||||
btn.innerHTML = "[+]"
|
btn.innerHTML = "[+]"
|
||||||
} else {
|
} else {
|
||||||
targ.className = "comment"
|
targ.className = "comment"
|
||||||
btn.innerHTML = "[-]"
|
btn.innerHTML = "[–]"
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -506,6 +506,10 @@ function setup() {
|
||||||
var comments = document.getElementsByClassName("comment")
|
var comments = document.getElementsByClassName("comment")
|
||||||
for (var i = 0; i < comments.length; i++) {
|
for (var i = 0; i < comments.length; i++) {
|
||||||
comments[i].addEventListener("click", commentClick)
|
comments[i].addEventListener("click", commentClick)
|
||||||
|
var forms = comments[i].getElementsByTagName("form")
|
||||||
|
for (var f = 0; f < forms.length; f++) {
|
||||||
|
forms[f].addEventListener("submit", formSubmit)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var links = document.getElementsByTagName("a")
|
var links = document.getElementsByTagName("a")
|
||||||
for (var i = 0; i < links.length; i++) {
|
for (var i = 0; i < links.length; i++) {
|
||||||
|
@ -521,8 +525,8 @@ function setup() {
|
||||||
function sideToggle(e) {
|
function sideToggle(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var side = document.getElementsByClassName("side")[0]
|
var side = document.getElementsByClassName("side")[0]
|
||||||
var main = document.getElementsByTagName("main")[0]
|
var body = document.getElementsByTagName("body")[0]
|
||||||
if (!side) return;
|
if (!side || !body) return;
|
||||||
var form = e.target
|
var form = e.target
|
||||||
if (form.tagName != "FORM") {
|
if (form.tagName != "FORM") {
|
||||||
form = uptil(e.target, function(el){ return el.tagName == "FORM" })
|
form = uptil(e.target, function(el){ return el.tagName == "FORM" })
|
||||||
|
@ -530,19 +534,10 @@ function sideToggle(e) {
|
||||||
var data = new FormData(form)
|
var data = new FormData(form)
|
||||||
data.append("xhr", "1")
|
data.append("xhr", "1")
|
||||||
request(form.target, data)
|
request(form.target, data)
|
||||||
console.log(e)
|
if (body.className == "sidetoggle") {
|
||||||
if (side.className == "side") {
|
body.className = ""
|
||||||
side.className = "side hide"
|
|
||||||
form.classList.add("o")
|
|
||||||
if (main) {
|
|
||||||
main.className = "wide"
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
side.className = "side"
|
body.className = "sidetoggle"
|
||||||
form.classList.remove("o")
|
|
||||||
if (main) {
|
|
||||||
main.className = ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
49
routes.go
49
routes.go
|
@ -134,9 +134,9 @@ var funcMap = template.FuncMap{
|
||||||
},
|
},
|
||||||
"thumbnail": func(p lemmy.Post) string {
|
"thumbnail": func(p lemmy.Post) string {
|
||||||
if pictrs.MatchString(p.ThumbnailURL.String()) {
|
if pictrs.MatchString(p.ThumbnailURL.String()) {
|
||||||
return p.ThumbnailURL.String() + "?format=jpg&thumbnail=64"
|
return p.ThumbnailURL.String() + "?format=jpg&thumbnail=96"
|
||||||
} else if pictrs.MatchString(p.URL.String()) {
|
} else if pictrs.MatchString(p.URL.String()) {
|
||||||
return p.URL.String() + "?format=jpg&thumbnail=64"
|
return p.URL.String() + "?format=jpg&thumbnail=96"
|
||||||
}
|
}
|
||||||
if imgur.MatchString(p.URL.String()) {
|
if imgur.MatchString(p.URL.String()) {
|
||||||
return imgur.ReplaceAllString(p.URL.String(), "https://i.imgur.com/${2}s.jpg")
|
return imgur.ReplaceAllString(p.URL.String(), "https://i.imgur.com/${2}s.jpg")
|
||||||
|
@ -661,10 +661,16 @@ func GetComment(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||||
}
|
}
|
||||||
commentid, _ := strconv.ParseInt(ps.ByName("commentid"), 10, 64)
|
commentid, _ := strconv.ParseInt(ps.ByName("commentid"), 10, 64)
|
||||||
state.GetComment(commentid)
|
state.GetComment(commentid)
|
||||||
|
if ps.ByName("op") == "block" {
|
||||||
|
state.Op = "block"
|
||||||
|
Render(w, "block.html", state)
|
||||||
|
return
|
||||||
|
}
|
||||||
if state.XHR && len(m["content"]) > 0 {
|
if state.XHR && len(m["content"]) > 0 {
|
||||||
Render(w, "create_comment.html", state)
|
Render(w, "create_comment.html", state)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
state.GetPost(state.PostID)
|
state.GetPost(state.PostID)
|
||||||
Render(w, "index.html", state)
|
Render(w, "index.html", state)
|
||||||
}
|
}
|
||||||
|
@ -1058,7 +1064,7 @@ func UserOp(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||||
}
|
}
|
||||||
state.Client.BlockPerson(context.Background(), lemmy.BlockPerson{
|
state.Client.BlockPerson(context.Background(), lemmy.BlockPerson{
|
||||||
PersonID: personId,
|
PersonID: personId,
|
||||||
Block: r.FormValue("submit") == "block",
|
Block: r.FormValue("submit") != "unblock",
|
||||||
})
|
})
|
||||||
if r.FormValue("xhr") == "1" {
|
if r.FormValue("xhr") == "1" {
|
||||||
w.Write([]byte{})
|
w.Write([]byte{})
|
||||||
|
@ -1337,6 +1343,43 @@ func UserOp(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||||
Block: true,
|
Block: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if reason := r.FormValue("reason"); reason != "" {
|
||||||
|
state.Client.CreatePostReport(context.Background(), lemmy.CreatePostReport{
|
||||||
|
PostID: postid,
|
||||||
|
Reason: reason,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if r.FormValue("xhr") != "" {
|
||||||
|
w.Write([]byte{})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
case "block_comment":
|
||||||
|
commentid, _ := strconv.ParseInt(r.FormValue("commentid"), 10, 64)
|
||||||
|
state.GetComment(commentid)
|
||||||
|
if r.FormValue("blockuser") != "" && len(state.Comments) > 0 {
|
||||||
|
fmt.Println("blockuser")
|
||||||
|
state.Client.BlockPerson(context.Background(), lemmy.BlockPerson{
|
||||||
|
PersonID: state.Comments[0].P.Creator.ID,
|
||||||
|
Block: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if r.FormValue("blockuserinstance") != "" && len(state.Comments) > 0 {
|
||||||
|
fmt.Println("blockuserinstance")
|
||||||
|
state.Client.BlockInstance(context.Background(), lemmy.BlockInstance{
|
||||||
|
InstanceID: state.Comments[0].P.Creator.InstanceID,
|
||||||
|
Block: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if reason := r.FormValue("reason"); reason != "" {
|
||||||
|
state.Client.CreateCommentReport(context.Background(), lemmy.CreateCommentReport{
|
||||||
|
CommentID: commentid,
|
||||||
|
Reason: r.FormValue("reason"),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if r.FormValue("xhr") != "" {
|
||||||
|
w.Write([]byte{})
|
||||||
|
return
|
||||||
|
}
|
||||||
case "read_post":
|
case "read_post":
|
||||||
postid, _ := strconv.ParseInt(r.FormValue("postid"), 10, 64)
|
postid, _ := strconv.ParseInt(r.FormValue("postid"), 10, 64)
|
||||||
post := lemmy.MarkPostAsRead{
|
post := lemmy.MarkPostAsRead{
|
||||||
|
|
|
@ -3,16 +3,25 @@
|
||||||
{{ template "nav.html" . }}
|
{{ template "nav.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<form method="POST" class="blockpost"{{ if not .XHR }} action="./"{{ end }}>
|
<form method="POST" class="blockpost"{{ if not .XHR }} action="./"{{ end }}>
|
||||||
|
<fieldset>
|
||||||
|
<legend>block</legend>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="blockuser" name="blockuser" checked>
|
<input type="checkbox" id="blockuser" name="blockuser" checked>
|
||||||
<label for="blockuser">u/{{ fullname (index .Posts 0).Creator }}</label>
|
<label for="blockuser">u/{{ if .Posts }}{{ fullname (index .Posts 0).Creator }}{{ else }}{{ fullname (index .Comments 0).P.Creator }}{{ end }}</label>
|
||||||
</div>
|
</div>
|
||||||
{{ if and (not (index .Posts 0).Creator.Local) (ne (index .Posts 0).Creator.InstanceID .Community.CommunityView.Community.InstanceID) }}
|
{{ if and .Comments (not (index .Comments 0).P.Creator.Local) }}
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="blockuserinstance" name="blockuserinstance">
|
||||||
|
<label for="blockuserinstance">{{ instance (index .Comments 0).P.Creator.ActorID }}</label>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ if and .Posts (not (index .Posts 0).Creator.Local) (ne (index .Posts 0).Creator.InstanceID .Community.CommunityView.Community.InstanceID) }}
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="blockuserinstance" name="blockuserinstance">
|
<input type="checkbox" id="blockuserinstance" name="blockuserinstance">
|
||||||
<label for="blockuserinstance">{{ instance (index .Posts 0).Creator.ActorID }}</label>
|
<label for="blockuserinstance">{{ instance (index .Posts 0).Creator.ActorID }}</label>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if .Community }}
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="blockcommunity" name="blockcommunity">
|
<input type="checkbox" id="blockcommunity" name="blockcommunity">
|
||||||
<label for="blockcommunity">c/{{ fullcname .Community.CommunityView.Community }}</label>
|
<label for="blockcommunity">c/{{ fullcname .Community.CommunityView.Community }}</label>
|
||||||
|
@ -23,12 +32,25 @@
|
||||||
<label for="blockpostinstance">{{ instance .Community.CommunityView.Community.ActorID }}</label>
|
<label for="blockpostinstance">{{ instance .Community.CommunityView.Community.ActorID }}</label>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</fieldset>
|
||||||
<div>
|
<div>
|
||||||
|
<fieldset>
|
||||||
|
<legend>report {{ if .Posts }}post{{ else }}comment{{ end }}</legend>
|
||||||
|
<textarea name="reason"></textarea>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ if .Posts }}
|
||||||
<input type="hidden" name="op" value="block_post">
|
<input type="hidden" name="op" value="block_post">
|
||||||
<input type="hidden" name="postid" value="{{(index .Posts 0).Post.ID}}">
|
<input type="hidden" name="postid" value="{{(index .Posts 0).Post.ID}}">
|
||||||
<input type="hidden" name="userinstanceid" value="{{(index .Posts 0).Creator.InstanceID}}">
|
<input type="hidden" name="userinstanceid" value="{{(index .Posts 0).Creator.InstanceID}}">
|
||||||
<input type="hidden" name="postinstanceid" value="{{.Community.CommunityView.Community.InstanceID}}">
|
<input type="hidden" name="postinstanceid" value="{{.Community.CommunityView.Community.InstanceID}}">
|
||||||
<input type="submit" value="block" name="submit">
|
{{ else }}
|
||||||
|
<input type="hidden" name="op" value="block_comment">
|
||||||
|
<input type="hidden" name="commentid" value="{{(index .Comments 0).P.Comment.ID}}">
|
||||||
|
{{ end }}
|
||||||
|
<input type="submit" value="submit" name="submit">
|
||||||
<input type="submit" value="cancel" name="submit">
|
<input type="submit" value="cancel" name="submit">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<a class="minimize" href="" for="c{{.P.Comment.ID}}">
|
<a class="minimize" href="" for="c{{.P.Comment.ID}}">
|
||||||
{{- if or (lt .P.Counts.Score -5) .P.Comment.Deleted -}}
|
{{- if or (lt .P.Counts.Score -5) .P.Comment.Deleted .P.Comment.Removed -}}
|
||||||
[+]
|
[+]
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
[-]
|
[–]
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</a>
|
</a>
|
||||||
<a class="creator{{ if .P.Comment.Distinguished}}{{if false}} admin{{end}} distinguished{{ else if .Submitter }} submitter{{end}}" href="/{{.State.Host}}/u/{{fullname .P.Creator}}">
|
<a class="creator{{ if .P.Comment.Distinguished}}{{if false}} admin{{end}} distinguished{{ else if .Submitter }} submitter{{end}}" href="/{{.State.Host}}/u/{{fullname .P.Creator}}">
|
||||||
|
@ -32,6 +32,9 @@
|
||||||
{{- if gt .P.Comment.Updated.ValueOrZero.Time.Unix .P.Comment.Published.Time.Unix -}}
|
{{- if gt .P.Comment.Updated.ValueOrZero.Time.Unix .P.Comment.Published.Time.Unix -}}
|
||||||
* (last edited <span title="{{.P.Comment.Updated.ValueOrZero.Time}}">{{ humanize .P.Comment.Updated.ValueOrZero.Time }}</span>)
|
* (last edited <span title="{{.P.Comment.Updated.ValueOrZero.Time}}">{{ humanize .P.Comment.Updated.ValueOrZero.Time }}</span>)
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if .P.Counts.ChildCount }}
|
||||||
|
<span class="numChildren">({{ .P.Counts.ChildCount }} children)</span>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{- if eq .Op "edit" }}
|
{{- if eq .Op "edit" }}
|
||||||
|
@ -83,12 +86,16 @@
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<form class="link-btn" method="POST">
|
<!--form class="link-btn" method="POST">
|
||||||
<input type="hidden" name="commentid" value="{{.P.Comment.ID}}">
|
<input type="hidden" name="commentid" value="{{.P.Comment.ID}}">
|
||||||
<input type="hidden" name="op" value="block_user">
|
<input type="hidden" name="op" value="block_user">
|
||||||
<input type="hidden" name="user_id" value="{{.P.Creator.ID}}">
|
<input type="hidden" name="user_id" value="{{.P.Creator.ID}}">
|
||||||
<input type="submit" name="submit" value="block">
|
<input type="submit" name="submit" value="block">
|
||||||
</form>
|
</form-->
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/{{ .State.Host }}/comment/{{ .P.Comment.ID }}/block" rel="xhr" target="block{{ .P.Comment.ID }}">block</a>
|
||||||
|
<span class="blockpopup" name="block{{.P.Comment.ID}}"></span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="reply" for="c{{.P.Comment.ID}}" href="/{{.State.Host}}/comment/{{.P.Comment.ID}}?reply">
|
<a class="reply" for="c{{.P.Comment.ID}}" href="/{{.State.Host}}/comment/{{.P.Comment.ID}}?reply">
|
||||||
|
@ -107,7 +114,7 @@
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .State.PostID (gt (add .P.Counts.ChildCount .ChildCount) 0) }}
|
{{- if and .State.PostID (gt (add .P.Counts.ChildCount .ChildCount) 0) }}
|
||||||
<li><a class="hidechildren" for="c{{.P.Comment.ID}}" href=""><span class="hide">hide</span><span class="show">show {{add .P.Counts.ChildCount .ChildCount }}</span> child comments</a></li>
|
<li><a class="hidechildren" for="c{{.P.Comment.ID}}" href=""><span>hide</span><span class="show">show {{add .P.Counts.ChildCount .ChildCount }}</span> child comments</a></li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,15 +8,13 @@
|
||||||
<input class="imgupload" type="file" name="file" accept="image/*">
|
<input class="imgupload" type="file" name="file" accept="image/*">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<textarea name="content" {{ if .XHR }}autofocus{{ end }}>
|
||||||
<textarea name="content" {{ if .XHR }}autofocus{{ end }}>
|
{{- if .Content }}
|
||||||
{{- if .Content }}
|
{{- .Content -}}
|
||||||
{{- .Content -}}
|
{{ else if and (eq .Op "edit") .Comments }}
|
||||||
{{ else if and (eq .Op "edit") .Comments }}
|
{{- (index .Comments 0).P.Comment.Content -}}
|
||||||
{{- (index .Comments 0).P.Comment.Content -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
</textarea>
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
{{- if eq .Op "edit" }}
|
{{- if eq .Op "edit" }}
|
||||||
<input type="hidden" name="op" value="edit_comment">
|
<input type="hidden" name="op" value="edit_comment">
|
||||||
<input type="hidden" name="commentid" value="{{.CommentID}}">
|
<input type="hidden" name="commentid" value="{{.CommentID}}">
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<link rel="stylesheet" href="/_/static/dark.css?v={{ .Version }}" {{ if not .Dark }}media="(prefers-color-scheme:dark)"{{ end }}>
|
<link rel="stylesheet" href="/_/static/dark.css?v={{ .Version }}" {{ if not .Dark }}media="(prefers-color-scheme:dark)"{{ end }}>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body{{ if .HideSidebar }} class="sidetoggle"{{ end }}>
|
||||||
<noscript>
|
<noscript>
|
||||||
<link rel="stylesheet" href="/_/static/noscript.css?v={{ .Version }}">
|
<link rel="stylesheet" href="/_/static/noscript.css?v={{ .Version }}">
|
||||||
</noscript>
|
</noscript>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
{{- if and (not .ShowNSFW) .Community .Community.CommunityView.Community.NSFW }}
|
{{- if and (not .ShowNSFW) .Community .Community.CommunityView.Community.NSFW }}
|
||||||
{{ template "nsfw.html" }}
|
{{ template "nsfw.html" }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<main{{ if .HideSidebar }} class="wide"{{ end }}>
|
<main>
|
||||||
{{ template "sidebar.html" . }}
|
{{ template "sidebar.html" . }}
|
||||||
{{- if and (not .Community) .Tagline }}
|
{{- if and (not .Community) .Tagline }}
|
||||||
<div id="tagline">
|
<div id="tagline">
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<img class="icon" src="{{ if and .Site .Site.SiteView.Site.Icon.IsValid }}{{ shrink .Site.SiteView.Site.Icon.String }}{{else}}/{{ .Host}}/icon.jpg{{end}}">
|
<img class="icon" src="{{ if and .Site .Site.SiteView.Site.Icon.IsValid }}{{ shrink .Site.SiteView.Site.Icon.String }}{{else}}/{{ .Host}}/icon.jpg{{end}}">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<a class="title" href="/{{.Host}}">{{ host .Host}}</a><span class="title"> - sign up or login</span>
|
<a class="title" href="/{{.Host}}">{{ host .Host}}</a>
|
||||||
<span class="spacer"></span>
|
<span class="spacer"></span>
|
||||||
</nav>
|
</nav>
|
||||||
{{ if .Alert }}
|
{{ if .Alert }}
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<div class="signup">
|
<div class="signup">
|
||||||
{{ if ne .Op "2fa" }}
|
{{ if ne .Op "2fa" }}
|
||||||
<div>
|
<div>
|
||||||
<h2>create a new account</h2>
|
<h1>create a new account</h1>
|
||||||
<form method="POST" action="/{{ .Host}}/login">
|
<form method="POST" action="/{{ .Host}}/login">
|
||||||
<label>
|
<label>
|
||||||
username
|
username
|
||||||
|
@ -69,8 +69,9 @@
|
||||||
</label>
|
</label>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if and .Site .Site.SiteView.LocalSite.CaptchaEnabled .Captcha }}
|
{{ if and .Site .Site.SiteView.LocalSite.CaptchaEnabled .Captcha }}
|
||||||
<figure><img src="data:image/png;base64,{{ .Captcha.PNG }}"></figure>
|
<figure>
|
||||||
<figure><audio controls src="data:audio/wav;base64,{{ .Captcha.WAV }}"></audio></figure>
|
<img src="data:image/png;base64,{{ .Captcha.PNG }}">
|
||||||
|
<figcaption><audio controls src="data:audio/wav;base64,{{ .Captcha.WAV }}"></audio></figcaption></figure>
|
||||||
<label>
|
<label>
|
||||||
enter code
|
enter code
|
||||||
<div><input required name="captchaanswer" type="text"></div>
|
<div><input required name="captchaanswer" type="text"></div>
|
||||||
|
@ -88,7 +89,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div>
|
<div>
|
||||||
<h2>login</h2>
|
<h1>login</h1>
|
||||||
<form method="POST" action="/{{ .Host}}/login">
|
<form method="POST" action="/{{ .Host}}/login">
|
||||||
<label>
|
<label>
|
||||||
username
|
username
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<link rel="stylesheet" href="/_/static/dark.css?v={{ .Version }}" {{ if not .Dark }}media="(prefers-color-scheme:dark)"{{ end }}>
|
<link rel="stylesheet" href="/_/static/dark.css?v={{ .Version }}" {{ if not .Dark }}media="(prefers-color-scheme:dark)"{{ end }}>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body{{ if .HideSidebar }} class="sidetoggle"{{ end }}>
|
||||||
<noscript>
|
<noscript>
|
||||||
<link rel="stylesheet" href="/_/static/noscript.css?v={{ .Version }}">
|
<link rel="stylesheet" href="/_/static/noscript.css?v={{ .Version }}">
|
||||||
</noscript>
|
</noscript>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
{{- if and (not .ShowNSFW) .Community .Community.CommunityView.Community.NSFW }}
|
{{- if and (not .ShowNSFW) .Community .Community.CommunityView.Community.NSFW }}
|
||||||
{{ template "nsfw.html" }}
|
{{ template "nsfw.html" }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<main{{ if .HideSidebar }} class="wide"{{ end }}>
|
<main>
|
||||||
{{- template "sidebar.html" . }}
|
{{- template "sidebar.html" . }}
|
||||||
{{- if or (.Query) (.SearchType) (and (not .PostID) (not .User) (not .Activities) (eq .Op ""))}}
|
{{- if or (.Query) (.SearchType) (and (not .PostID) (not .User) (not .Activities) (eq .Op ""))}}
|
||||||
{{ template "menu.html" . }}
|
{{ template "menu.html" . }}
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<span>: search</span>
|
<span>: search</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<ul>
|
<ul>
|
||||||
{{- if eq .Op "block" }}<li class="selected"><a href="/{{ .Host }}/post/{{ (index .Posts 0).Post.ID}}">block</a></li>
|
{{- if eq .Op "block" }}<li class="selected"><a href="/{{ .Host }}{{ if .Posts }}/post/{{ (index .Posts 0).Post.ID}}{{ end}}">block</a></li>
|
||||||
{{ else if and .User (not .Query)}}
|
{{ else if and .User (not .Query)}}
|
||||||
<li {{if eq .Op "" }}class="selected"{{end}}><a href="?">overview</a></li>
|
<li {{if eq .Op "" }}class="selected"{{end}}><a href="?">overview</a></li>
|
||||||
{{ if and .Session (eq .User.PersonView.Person.ID .Session.UserID) }}
|
{{ if and .Session (eq .User.PersonView.Person.ID .Session.UserID) }}
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
{{- end }}{{ end }}
|
{{- end }}{{ end }}
|
||||||
<form id="sidetoggle" class="link-btn{{ if .HideSidebar }} o{{end}}" method="POST">
|
<form id="sidetoggle" class="link-btn{{ if .HideSidebar }} o{{end}}" method="POST">
|
||||||
<input type="hidden" name="op" value="sidetoggle">
|
<input type="hidden" name="op" value="sidetoggle">
|
||||||
<button title="Toggle Sidebar">{{ if .HideSidebar }}[+]{{ else }}[-]{{ end }}</button>
|
<button title="Toggle Sidebar"><span>[+]</span><span>[–]</span></button>
|
||||||
</form>
|
</form>
|
||||||
</ul>
|
</ul>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{{- if gt .Rank 0 }}
|
{{- if gt .Rank 0 }}
|
||||||
<div class="rank"> {{ .Rank }} </div>
|
<div class="rank"> {{ .Rank }} </div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
<div class="p">
|
||||||
<div class="score">
|
<div class="score">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or (ne .State.Op "save_post") (eq .State.Op "vote_post") }}
|
{{- if or (ne .State.Op "save_post") (eq .State.Op "vote_post") }}
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
<input type="submit" name="vote" value="▼">
|
<input type="submit" name="vote" value="▼">
|
||||||
</form>
|
</form>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<div style="margin-top: 19px;">{{ .Counts.Score }}</div>
|
<div><div>{{ .Counts.Score }}</div></div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and (ne .State.Op "vote_post") (ne .State.Op "save_post") }}
|
{{- if and (ne .State.Op "vote_post") (ne .State.Op "save_post") }}
|
||||||
|
@ -31,7 +32,6 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="entry">
|
|
||||||
<div class="title{{ if .Read}} visited{{end}}">
|
<div class="title{{ if .Read}} visited{{end}}">
|
||||||
<a class="url" href="{{ if .Post.URL.IsValid }}{{ .Post.URL }}{{ else }}/{{ .State.Host }}/post/{{ .Post.ID }}{{ end }}"
|
<a class="url" href="{{ if .Post.URL.IsValid }}{{ .Post.URL }}{{ else }}/{{ .State.Host }}/post/{{ .Post.ID }}{{ end }}"
|
||||||
{{- if .State.LinksInNewWindow }} target="_blank" {{ end }}>
|
{{- if .State.LinksInNewWindow }} target="_blank" {{ end }}>
|
||||||
|
@ -39,29 +39,32 @@
|
||||||
</a>
|
</a>
|
||||||
({{ domain . }})
|
({{ domain . }})
|
||||||
</div>
|
</div>
|
||||||
|
<div class="entry">
|
||||||
<div class="expando-button{{ if and (not (and .Post.Body.IsValid .Post.Body.String )) (not (isImage .Post.URL.String)) (not (isYoutube .Post.URL.String)) }} hidden{{else if eq .Rank 0}} open{{ end }}"></div>
|
<div class="expando-button{{ if and (not (and .Post.Body.IsValid .Post.Body.String )) (not (isImage .Post.URL.String)) (not (isYoutube .Post.URL.String)) }} hidden{{else if eq .Rank 0}} open{{ end }}"></div>
|
||||||
|
<div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
|
<span>
|
||||||
submitted
|
submitted
|
||||||
<span title="{{.Post.Published.Time}}">{{ humanize .Post.Published.Time -}}</span>
|
<span title="{{.Post.Published.Time}}">{{ humanize .Post.Published.Time -}}</span></span>
|
||||||
{{- if gt .Post.Updated.ValueOrZero.Time.Unix .Post.Published.Time.Unix -}}
|
{{- if gt .Post.Updated.ValueOrZero.Time.Unix .Post.Published.Time.Unix -}}
|
||||||
* (last edited <span title="{{.Post.Updated.ValueOrZero.Time}}">{{ humanize .Post.Updated.ValueOrZero.Time }}</span>)
|
<span>* (last edited <span title="{{.Post.Updated.ValueOrZero.Time}}">{{ humanize .Post.Updated.ValueOrZero.Time }}</span>)</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
by
|
<span>by
|
||||||
<a class="submitter{{ if false}} admin{{end}}" href="/{{ .State.Host }}/u/{{ fullname .Creator }}">
|
<a class="submitter{{ if false}} admin{{end}}" href="/{{ .State.Host }}/u/{{ fullname .Creator }}">
|
||||||
{{- if .State.HideInstanceNames -}}
|
{{- if .State.HideInstanceNames -}}
|
||||||
{{ .Creator.Name }}
|
{{ .Creator.Name }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{ fullname .Creator }}
|
{{ fullname .Creator }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</a>
|
</a></span>
|
||||||
to
|
<span>to
|
||||||
<a class="community" href="/{{ .State.Host }}/c/{{ fullcname .Community }}">
|
<a class="community" href="/{{ .State.Host }}/c/{{ fullcname .Community }}">
|
||||||
c/{{ if .State.HideInstanceNames -}}
|
c/{{ if .State.HideInstanceNames -}}
|
||||||
{{ .Community.Name }}
|
{{ .Community.Name }}
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{ fullcname .Community }}
|
{{ fullcname .Community }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
{{- if .Post.NSFW }}
|
{{- if .Post.NSFW }}
|
||||||
|
@ -70,8 +73,8 @@
|
||||||
<a href="{{ .Post.ApID}}">fedilink</a>
|
<a href="{{ .Post.ApID}}">fedilink</a>
|
||||||
{{- if .State.Session }}
|
{{- if .State.Session }}
|
||||||
<a href="/{{ .State.Host }}/post/{{ .Post.ID }}/block" rel="xhr" target="block{{ .Post.ID }}">block</a>
|
<a href="/{{ .State.Host }}/post/{{ .Post.ID }}/block" rel="xhr" target="block{{ .Post.ID }}">block</a>
|
||||||
{{- end }}
|
|
||||||
<span class="blockpopup" name="block{{.Post.ID}}"></span>
|
<span class="blockpopup" name="block{{.Post.ID}}"></span>
|
||||||
|
{{- end }}
|
||||||
{{- if and .State.Session (eq .State.Session.UserID .Post.CreatorID) }}
|
{{- if and .State.Session (eq .State.Session.UserID .Post.CreatorID) }}
|
||||||
{{- if not .Post.Deleted }}<a href="/{{ .State.Host }}/post/{{ .Post.ID }}?edit">edit</a>{{end}}
|
{{- if not .Post.Deleted }}<a href="/{{ .State.Host }}/post/{{ .Post.ID }}?edit">edit</a>{{end}}
|
||||||
<form class="link-btn" method="POST">
|
<form class="link-btn" method="POST">
|
||||||
|
@ -115,7 +118,20 @@
|
||||||
</form>
|
</form>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="expando{{ if eq .Rank 0 }} open{{ end}}">
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="expando{{ if eq .Rank 0 }} open{{ end}}">
|
||||||
|
{{- if or ((and .Post.Body.IsValid (ne .Post.Body.String ""))) (isImage .Post.URL.String)}}
|
||||||
|
{{- if gt .Rank 0 }}
|
||||||
|
<div class="rank"> </div>
|
||||||
|
{{- end }}
|
||||||
|
<div class="score"><div><div> </div></div></div>
|
||||||
|
{{ if not .State.HideThumbnails }}
|
||||||
|
<div class="thumb"></div>
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
<div>
|
||||||
{{- if (and .Post.Body.IsValid (ne .Post.Body.String "")) }}
|
{{- if (and .Post.Body.IsValid (ne .Post.Body.String "")) }}
|
||||||
<div class="md">{{ markdown .State.Host .Post.Body.String }}</div>
|
<div class="md">{{ markdown .State.Host .Post.Body.String }}</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -125,6 +141,5 @@
|
||||||
<div class="embed"></div>
|
<div class="embed"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearleft"></div>
|
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{- $host := .Host }}
|
{{- $host := .Host }}
|
||||||
<div class="{{ if .User }}user {{end}}side{{ if .HideSidebar }} hide{{ end }}">
|
<div class="{{ if .User }}user {{end}}side">
|
||||||
<form method="GET" action="/{{.Host}}/search">
|
<form id="search" method="GET" action="/{{.Host}}/search">
|
||||||
<input type="text" placeholder="search" name="q" value="">
|
<input type="text" placeholder="search" name="q" value="">
|
||||||
{{- if eq .Listing "Local" }}
|
{{- if eq .Listing "Local" }}
|
||||||
<input type="hidden" placeholder="search" name="listingType" value="Local">
|
<input type="hidden" placeholder="search" name="listingType" value="Local">
|
||||||
|
|
Loading…
Reference in a new issue