Replaced some more whitespace

This commit is contained in:
rr- 2015-06-28 12:25:35 +02:00
parent fd448bac87
commit 77e51c2e10
55 changed files with 2507 additions and 2507 deletions

View file

@ -1,105 +1,105 @@
.comment-form { .comment-form {
margin: 1em 0 2em; margin: 1em 0 2em;
} }
.comment-form .preview { .comment-form .preview {
background: lemonchiffon; background: lemonchiffon;
padding: 0.5em; padding: 0.5em;
margin-bottom: 1em; margin-bottom: 1em;
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5) inset; box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5) inset;
display: none; display: none;
} }
.comments ul { .comments ul {
list-style-type: none; list-style-type: none;
margin: 1em 0; margin: 1em 0;
padding: 0; padding: 0;
} }
.comment { .comment {
margin: 0 0 1em 0; margin: 0 0 1em 0;
padding: 0; padding: 0;
display: flex; display: flex;
} }
.comment .avatar { .comment .avatar {
margin-right: 0.5em; margin-right: 0.5em;
flex-shrink: 0; flex-shrink: 0;
vertical-align: top; vertical-align: top;
} }
.comment .content { .comment .content {
margin-top: 0.25em; margin-top: 0.25em;
} }
.comment .content p:first-child { .comment .content p:first-child {
margin-top: 0; margin-top: 0;
} }
.comment .header { .comment .header {
line-height: 16pt; line-height: 16pt;
vertical-align: middle; vertical-align: middle;
} }
.comment .score, .comment .score,
.comment .date { .comment .date {
color: silver; color: silver;
font-size: 90%; font-size: 90%;
padding-left: 0.5em; padding-left: 0.5em;
} }
.comment .score-up.active, .comment .score-up.active,
.comment .score-down.active { .comment .score-down.active {
font-weight: bold; font-weight: bold;
} }
.comment .header .ops a { .comment .header .ops a {
color: silver; color: silver;
font-size: 80%; font-size: 80%;
} }
.comment .header .ops a:first-of-type:before { .comment .header .ops a:first-of-type:before {
margin-left: 0.5em; margin-left: 0.5em;
content: '['; content: '[';
} }
.comment .header .ops a:not(:first-of-type):before { .comment .header .ops a:not(:first-of-type):before {
content: '|'; content: '|';
margin: 0 0.3em; margin: 0 0.3em;
} }
.comment .header .ops a:last-of-type:after { .comment .header .ops a:last-of-type:after {
content: ']'; content: ']';
} }
#global-comment-list { #global-comment-list {
text-align: center; text-align: center;
} }
#global-comment-list .pagination-content { #global-comment-list .pagination-content {
text-align: left; text-align: left;
} }
#global-comment-list .comments>ul { #global-comment-list .comments>ul {
margin-top: 0; margin-top: 0;
} }
#global-comment-list ul.posts { #global-comment-list ul.posts {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#global-comment-list ul.posts>li { #global-comment-list ul.posts>li {
margin-bottom: 2em; margin-bottom: 2em;
} }
#global-comment-list .post-comment { #global-comment-list .post-comment {
display: flex; display: flex;
} }
@media all and (max-width: 40em) { @media all and (max-width: 40em) {
#global-comment-list .post-comment { #global-comment-list .post-comment {
flex-direction: column; flex-direction: column;
} }
} }
#global-comment-list .post { #global-comment-list .post {
flex-shrink: 0; flex-shrink: 0;
flex-grow: 0; flex-grow: 0;
margin-right: 1em; margin-right: 1em;
margin-bottom: 1em; margin-bottom: 1em;
} }
#global-comment-list .comment-add, #global-comment-list .comment-add,
#global-comment-list .comments>h1 { #global-comment-list .comments>h1 {
display: none; display: none;
} }
#global-comment-list .post-small .link { #global-comment-list .post-small .link {
margin: 0; margin: 0;
} }

View file

@ -1,124 +1,124 @@
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
text-align: center; text-align: center;
background: #fff; background: #fff;
color: #555; color: #555;
font-family: 'Droid Sans', sans-serif; font-family: 'Droid Sans', sans-serif;
font-size: 15px; font-size: 15px;
overflow-y: scroll; overflow-y: scroll;
} }
@media all and (max-width: 40em) { @media all and (max-width: 40em) {
body { body {
font-size: 13px; font-size: 13px;
} }
} }
h1 { h1 {
font-weight: normal; font-weight: normal;
font-size: 160%; font-size: 160%;
} }
h2 { h2 {
font-variant: small-caps; font-variant: small-caps;
font-weight: normal; font-weight: normal;
} }
h3 { h3 {
font-weight: normal; font-weight: normal;
font-size: 120%; font-size: 120%;
} }
small { small {
font-size: 87%; font-size: 87%;
} }
#middle { #middle {
padding: 0 2em; padding: 0 2em;
position: relative; position: relative;
} }
#content { #content {
margin: 1.5em 0; margin: 1.5em 0;
padding: 0; padding: 0;
display: inline-block; display: inline-block;
text-align: left; text-align: left;
width: 100%; width: 100%;
} }
a { a {
color: #24A2DD; color: #24A2DD;
text-decoration: none; text-decoration: none;
cursor: pointer; /* for links without [href] */ cursor: pointer; /* for links without [href] */
} }
a:focus { a:focus {
outline: 2px solid #64C2ED; outline: 2px solid #64C2ED;
} }
a:hover { a:hover {
color: #34B2ED; color: #34B2ED;
} }
hr { hr {
margin: 1.5em auto; margin: 1.5em auto;
height: 1px; height: 1px;
border: 0; border: 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
border-top: 1px solid #eee; border-top: 1px solid #eee;
box-sizing: content-box; box-sizing: content-box;
} }
.big-button { .big-button {
color: #aaa; color: #aaa;
} }
.big-button.active { .big-button.active {
background: #f7fbfc; background: #f7fbfc;
color: #24A2DD !important; color: #24A2DD !important;
} }
.big-button:focus, .big-button:focus,
.big-button:hover { .big-button:hover {
background: #f7fbfc; background: #f7fbfc;
color: #34B2ED !important; color: #34B2ED !important;
outline: 0; outline: 0;
} }
span.spoiler:before { span.spoiler:before {
content: '['; content: '[';
color: #000; color: #000;
} }
span.spoiler:after { span.spoiler:after {
content: ']'; content: ']';
color: #000; color: #000;
} }
span.spoiler { span.spoiler {
background: #eee; background: #eee;
color: #eee; color: #eee;
} }
span.spoiler:hover { span.spoiler:hover {
color: dimgray; color: dimgray;
} }
blockquote { blockquote {
border-left: 3px solid #eee; border-left: 3px solid #eee;
margin-left: 0; margin-left: 0;
padding: 0.3em 0.3em 0.3em 0.7em; padding: 0.3em 0.3em 0.3em 0.7em;
background: #fafafa; background: #fafafa;
color: #444; color: #444;
} }
blockquote :last-child { blockquote :last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.draggable { .draggable {
cursor: move; cursor: move;
} }
.resizer { .resizer {
position: absolute; position: absolute;
cursor: nwse-resize; cursor: nwse-resize;
border: 0.25em solid rgba(0, 0, 0, 0.3); border: 0.25em solid rgba(0, 0, 0, 0.3);
border-top: 0.25em solid transparent; border-top: 0.25em solid transparent;
border-left: 0.25em solid transparent; border-left: 0.25em solid transparent;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }

View file

@ -1,260 +1,260 @@
.form-wrapper { .form-wrapper {
display: table; display: table;
margin: 0 auto; margin: 0 auto;
text-align: left !important; text-align: left !important;
width: 30em; width: 30em;
} }
.form-row { .form-row {
display: table-row; display: table-row;
} }
.form-label { .form-label {
width: 1%; width: 1%;
white-space: pre; white-space: pre;
} }
.form-label, .form-label,
.form-input { .form-input {
display: table-cell; display: table-cell;
line-height: 37px; line-height: 37px;
vertical-align: text-bottom; vertical-align: text-bottom;
} }
.form-input { .form-input {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.form-row label { .form-row label {
padding-right: 1em; padding-right: 1em;
text-align: right; text-align: right;
} }
.tag-input, .tag-input,
textarea, textarea,
input[type=text], input[type=text],
input[type=password] { input[type=password] {
padding: 3px 6px 4px 6px; padding: 3px 6px 4px 6px;
border: 1px solid #eee; border: 1px solid #eee;
box-shadow: 0 1px 2px -1px #e0e0e0 inset; box-shadow: 0 1px 2px -1px #e0e0e0 inset;
background: #fafafa; background: #fafafa;
font-family: 'Inconsolata', monospace; font-family: 'Inconsolata', monospace;
font-size: 100%; font-size: 100%;
text-overflow: ellipsis; text-overflow: ellipsis;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
/* remove chrome yellow background for inputs with autocompletion */ /* remove chrome yellow background for inputs with autocompletion */
input:-webkit-autofill { input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px #fafafa inset; -webkit-box-shadow: 0 0 0px 1000px #fafafa inset;
} }
button::before, button::before,
input[type=button]::before { input[type=button]::before {
z-index: -1; z-index: -1;
background: linear-gradient(#f5f5f5, #e5e5e5); background: linear-gradient(#f5f5f5, #e5e5e5);
display: block; display: block;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
content: '\a0'; content: '\a0';
} }
button, button,
input[type=button] { input[type=button] {
vertical-align: middle; vertical-align: middle;
line-height: normal; line-height: normal;
background: transparent; background: transparent;
position: relative; position: relative;
padding: 2px 15px 3px 15px; padding: 2px 15px 3px 15px;
border: 0; border: 0;
box-shadow: 0 1px 1px 0 #e5e5e5, box-shadow: 0 1px 1px 0 #e5e5e5,
0 0 0 1px rgba(0, 0, 0, 0.15) inset, 0 0 0 1px rgba(0, 0, 0, 0.15) inset,
0 5px 1px -4px white inset; 0 5px 1px -4px white inset;
color: #444; color: #444;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 1px rgba(255, 255, 255, 0.5); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 1px rgba(255, 255, 255, 0.5);
font-family: 'Droid Sans', sans-serif; font-family: 'Droid Sans', sans-serif;
font-size: 17px; font-size: 17px;
} }
button:not(:disabled), button:not(:disabled),
input[type=button]:not(:disabled) { input[type=button]:not(:disabled) {
cursor: pointer; cursor: pointer;
} }
button:not(:disabled):hover::before, button:not(:disabled):hover::before,
input[type=button]:not(:disabled):hover::before { input[type=button]:not(:disabled):hover::before {
opacity: .65; opacity: .65;
} }
button:not(:disabled):active, button:not(:disabled):active,
input[type=button]:not(:disabled):active { input[type=button]:not(:disabled):active {
padding: 3px 15px 2px 15px; padding: 3px 15px 2px 15px;
} }
button:not(:disabled):active::before, button:not(:disabled):active::before,
input[type=button]:not(:disabled):active::before { input[type=button]:not(:disabled):active::before {
transform: rotate(180deg); transform: rotate(180deg);
} }
button:not(:disabled):focus, button:not(:disabled):focus,
input[type=button]:not(:disabled):focus { input[type=button]:not(:disabled):focus {
box-shadow: 0 1px 1px 0 #e5e5e5, 0 0 0 2px #64C2ED inset; box-shadow: 0 1px 1px 0 #e5e5e5, 0 0 0 2px #64C2ED inset;
} }
button:disabled { button:disabled {
color: gray; color: gray;
} }
button.highlight::before, button.highlight::before,
input[type=button].highlight::before { input[type=button].highlight::before {
background: linear-gradient(rgb(160, 221, 251), rgb(101, 188, 239)); background: linear-gradient(rgb(160, 221, 251), rgb(101, 188, 239));
} }
button.highlight-red::before, button.highlight-red::before,
input[type=button].highlight-red::before { input[type=button].highlight-red::before {
background: linear-gradient(rgba(255, 181, 143, 1), rgba(255, 148, 122, 1)); background: linear-gradient(rgba(255, 181, 143, 1), rgba(255, 148, 122, 1));
} }
button:focus, button:focus,
textarea:focus, textarea:focus,
input:focus { input:focus {
outline: none; outline: none;
} }
button::-moz-focus-inner, button::-moz-focus-inner,
input::-moz-focus-inner { input::-moz-focus-inner {
border: 0; border: 0;
} }
.tag-input.focused, .tag-input.focused,
textarea:focus, textarea:focus,
input:not([type=button]):not(.tag-real-input):focus { input:not([type=button]):not(.tag-real-input):focus {
box-shadow: 0 0 0 1px #64C2ED inset; box-shadow: 0 0 0 1px #64C2ED inset;
border-color: #64C2ED; border-color: #64C2ED;
} }
input[type=radio], input[type=radio],
input[type=checkbox] { input[type=checkbox] {
opacity: 0; opacity: 0;
position: absolute; position: absolute;
} }
input[type=radio] + label, input[type=radio] + label,
input[type=checkbox] + label { input[type=checkbox] + label {
-webkit-user-select: none; -webkit-user-select: none;
-khtml-user-select: none; -khtml-user-select: none;
-moz-user-select: none; -moz-user-select: none;
-o-user-select: none; -o-user-select: none;
user-select: none; user-select: none;
} }
input[type=radio] + label::before, input[type=radio] + label::before,
input[type=checkbox] + label::before { input[type=checkbox] + label::before {
font-family: 'FontAwesome'; font-family: 'FontAwesome';
display: inline-block; display: inline-block;
width: 1em; width: 1em;
text-align: left; text-align: left;
} }
input[type=radio] + label::before { input[type=radio] + label::before {
content: "\f1db"; content: "\f1db";
} }
input[type=radio]:checked + label::before { input[type=radio]:checked + label::before {
content: "\f192"; content: "\f192";
} }
input[type=checkbox] + label::before { input[type=checkbox] + label::before {
content: "\f096"; content: "\f096";
} }
input[type=checkbox]:checked + label::before { input[type=checkbox]:checked + label::before {
content: "\f046"; content: "\f046";
} }
input[type=radio]:focus + label, input[type=radio]:focus + label,
input[type=checkbox]:focus + label { input[type=checkbox]:focus + label {
color: #64C2ED; color: #64C2ED;
} }
.file-handler::before { .file-handler::before {
background: none; background: none;
} }
.file-handler { .file-handler {
box-shadow: none !important; box-shadow: none !important;
outline: none !important; outline: none !important;
border: 3px dashed #eee !important; border: 3px dashed #eee !important;
padding: 0.3em 0.5em !Important; padding: 0.3em 0.5em !Important;
line-height: 140% !important; line-height: 140% !important;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
} }
.file-handler.active { .file-handler.active {
border-color: #64C2ED !important; border-color: #64C2ED !important;
background-color: #eeffcc; background-color: #eeffcc;
} }
.tag-input { .tag-input {
padding: 1px; padding: 1px;
line-height: normal !important; line-height: normal !important;
cursor: text; cursor: text;
} }
.tag-input ul { .tag-input ul {
list-style-type: none; list-style-type: none;
display: inline; display: inline;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.tag-input li { .tag-input li {
background: #ddd; background: #ddd;
display: inline-block; display: inline-block;
font-family: 'Droid Sans', sans-serif; font-family: 'Droid Sans', sans-serif;
margin: 1px; margin: 1px;
padding: 2px 4px; padding: 2px 4px;
} }
.tag-input input { .tag-input input {
border: none; border: none;
width: auto; width: auto;
} }
.tag-input li a { .tag-input li a {
color: black; color: black;
} }
.tag-input li a.close { .tag-input li a.close {
font-size: 85%; font-size: 85%;
margin-left: 0.5em; margin-left: 0.5em;
} }
.related-tags { .related-tags {
line-height: 200%; line-height: 200%;
font-size: 95%; font-size: 95%;
display: none; display: none;
margin: 0.5em 0.5em 1em 0.5em; margin: 0.5em 0.5em 1em 0.5em;
} }
.related-tags span { .related-tags span {
float: left; float: left;
} }
.related-tags ul { .related-tags ul {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
} }
.related-tags li { .related-tags li {
display: inline-block; display: inline-block;
margin: 0 0.5em; margin: 0 0.5em;
padding: 0; padding: 0;
} }
.autocomplete { .autocomplete {
position: absolute; position: absolute;
display: none; display: none;
z-index: 10; z-index: 10;
} }
.autocomplete ul { .autocomplete ul {
list-style-type: none; list-style-type: none;
padding: 0 0 !important; padding: 0 0 !important;
margin: 0 !important; margin: 0 !important;
border: 2px solid #64C2ED; border: 2px solid #64C2ED;
background: white; background: white;
display: block !important; display: block !important;
text-align: left; text-align: left;
} }
.autocomplete li { .autocomplete li {
margin: 0; margin: 0;
padding: 0.1em 0.5em !important; padding: 0.1em 0.5em !important;
cursor: pointer; cursor: pointer;
} }
.autocomplete li.active { .autocomplete li.active {
background: #64C2ED; background: #64C2ED;
} }

View file

@ -1,32 +1,32 @@
#help-view { #help-view {
max-width: 40em; max-width: 40em;
margin: 0 auto; margin: 0 auto;
} }
#help-view div[data-tab] { #help-view div[data-tab] {
display: none; display: none;
} }
#help-view ul.tabs { #help-view ul.tabs {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
#help-view ul.tabs { #help-view ul.tabs {
margin: -0.5em -0.5em 0.5em -0.5em; margin: -0.5em -0.5em 0.5em -0.5em;
} }
#help-view ul.tabs li { #help-view ul.tabs li {
display: inline-block; display: inline-block;
margin: 0 0.5em; margin: 0 0.5em;
} }
#help-view ul.tabs a { #help-view ul.tabs a {
display: inline-block; display: inline-block;
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
} }
#help-view table td, #help-view table td,
#help-view table th { #help-view table th {
padding-right: 1.5em; padding-right: 1.5em;
} }

View file

@ -1,78 +1,78 @@
table.history { table.history {
font-size: 80%; font-size: 80%;
border-spacing: 0; border-spacing: 0;
} }
table.history .addition { table.history .addition {
color: #228022; color: #228022;
} }
table.history .addition:before { table.history .addition:before {
content: '+'; content: '+';
} }
table.history .removal { table.history .removal {
color: #e02222; color: #e02222;
} }
table.history .removal:before { table.history .removal:before {
content: '-'; content: '-';
} }
table.history .user img { table.history .user img {
vertical-align: middle; vertical-align: middle;
} }
table.history .time, table.history .time,
table.history .user, table.history .user,
table.history .subject { table.history .subject {
white-space: nowrap; white-space: nowrap;
} }
table.history .difference { table.history .difference {
word-break: break-all; word-break: break-all;
} }
table.history td { table.history td {
padding: 0.3em 0.5em 0.3em 0.25em; padding: 0.3em 0.5em 0.3em 0.25em;
word-break: break-word; word-break: break-word;
word-wrap: break-word; word-wrap: break-word;
vertical-align: top; vertical-align: top;
} }
table.history tr:nth-child(2n+1) td { table.history tr:nth-child(2n+1) td {
background: #fafafa; background: #fafafa;
} }
table.history ul { table.history ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style-type: none; list-style-type: none;
display: inline; display: inline;
} }
table.history ul:before { table.history ul:before {
content: ' ('; content: ' (';
} }
table.history ul:after { table.history ul:after {
content: ')'; content: ')';
} }
table.history li { table.history li {
display: inline; display: inline;
} }
table.history li:not(:last-of-type):after { table.history li:not(:last-of-type):after {
content: ', '; content: ', ';
} }
#history-wrapper { #history-wrapper {
text-align: center; text-align: center;
} }
#history-wrapper table { #history-wrapper table {
margin: 0 auto; margin: 0 auto;
text-align: left; text-align: left;
} }
@media all and (min-width: 77em) { @media all and (min-width: 77em) {
#history-wrapper table { #history-wrapper table {
width: 70em; width: 70em;
} }
} }
@media all and (max-width: 77em) { @media all and (max-width: 77em) {
#history-wrapper table { #history-wrapper table {
width: 100%; width: 100%;
} }
} }

View file

@ -1,44 +1,44 @@
#home { #home {
text-align: center; text-align: center;
} }
#home h1 { #home h1 {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
#home h1+p { #home h1+p {
margin-top: 0; margin-top: 0;
} }
#home .post { #home .post {
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
display: inline-block; display: inline-block;
max-width: 60%; max-width: 60%;
min-width: 40em; min-width: 40em;
} }
#home .post .left { #home .post .left {
display: inline-block; display: inline-block;
float: left; float: left;
margin-right: 0.5em; margin-right: 0.5em;
} }
#home .post .right { #home .post .right {
display: inline-block; display: inline-block;
float: right; float: right;
margin-left: 0.5em; margin-left: 0.5em;
} }
#home .post-footer, #home .post-footer,
#home .post-footer img { #home .post-footer img {
vertical-align: middle; vertical-align: middle;
} }
#home .post-footer img { #home .post-footer img {
margin-left: 0.5em; margin-left: 0.5em;
} }
#home .version { #home .version {
opacity: .4; opacity: .4;
} }
#home .subheader, #home .post-footer { #home .subheader, #home .post-footer {
font-size: 85%; font-size: 85%;
} }

View file

@ -1,6 +1,6 @@
.http-error { .http-error {
text-align: center; text-align: center;
} }
.http-error img { .http-error img {
margin: 0 auto; margin: 0 auto;
} }

View file

@ -1,22 +1,22 @@
#login-form p { #login-form p {
text-align: center; text-align: center;
} }
#login-form form { #login-form form {
width: 22.5em; width: 22.5em;
} }
#login-form .help { #login-form .help {
text-align: center; text-align: center;
} }
#login-form .help ul { #login-form .help ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
display: inline-block; display: inline-block;
text-align: left; text-align: left;
list-style-position: inside; list-style-position: inside;
white-space: nowrap; white-space: nowrap;
} }
#login-form .messages { #login-form .messages {
margin: 0 auto; margin: 0 auto;
} }

View file

@ -1,16 +1,16 @@
.message { .message {
margin: 0 auto 0.2em auto; margin: 0 auto 0.2em auto;
padding: 0.4em 0.5em; padding: 0.4em 0.5em;
text-align: center; text-align: center;
max-width: 40em; max-width: 40em;
} }
.message.error { .message.error {
background: #fdd; background: #fdd;
box-shadow: 0 0 0 1px #fcc inset; box-shadow: 0 0 0 1px #fcc inset;
} }
.message.info { .message.info {
background: #def; background: #def;
box-shadow: 0 0 0 1px #cdf inset; box-shadow: 0 0 0 1px #cdf inset;
} }

View file

@ -1,16 +1,16 @@
.page-list { .page-list {
text-align: center; text-align: center;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 1em auto 0 auto; margin: 1em auto 0 auto;
display: inline-block; display: inline-block;
} }
.page-list li { .page-list li {
display: inline-block; display: inline-block;
} }
.page-list li a { .page-list li a {
display: inline-block; display: inline-block;
padding: 0.4em 1.2em; padding: 0.4em 1.2em;
} }

View file

@ -1,48 +1,48 @@
.post-list { .post-list {
text-align: center; text-align: center;
} }
.post-list .search { .post-list .search {
margin: 0 auto 1em auto; margin: 0 auto 1em auto;
text-align: left; text-align: left;
} }
@media all and (min-width: 57em) { @media all and (min-width: 57em) {
.post-list .search { .post-list .search {
min-width: 50em; min-width: 50em;
} }
} }
@media all and (max-width: 57em) { @media all and (max-width: 57em) {
.post-list .search { .post-list .search {
min-width: 100%; min-width: 100%;
} }
} }
.post-list .search:after { .post-list .search:after {
display: block; display: block;
content: ''; content: '';
clear: both; clear: both;
} }
.post-list .search input { .post-list .search input {
max-width: 20em; max-width: 20em;
} }
.post-list .search button { .post-list .search button {
margin-left: 0.25em; margin-left: 0.25em;
} }
.post-list .search .mass-tag-wrapper { .post-list .search .mass-tag-wrapper {
float: right; float: right;
} }
.post-list .search .mass-tag-wrapper p { .post-list .search .mass-tag-wrapper p {
display: inline; display: inline;
margin-right: 1em; margin-right: 1em;
} }
.post-list ul.safety { .post-list ul.safety {
display: inline-block; display: inline-block;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.post-list ul.safety li { .post-list ul.safety li {
display: inline-block; display: inline-block;
} }
.post-list ul.safety .safety-safe:before { background: linear-gradient(rgb(224, 248, 218), rgb(213, 233, 208)); } .post-list ul.safety .safety-safe:before { background: linear-gradient(rgb(224, 248, 218), rgb(213, 233, 208)); }
.post-list ul.safety .safety-sketchy:before { background: linear-gradient(rgb(252, 252, 230), rgb(245, 236, 194)); } .post-list ul.safety .safety-sketchy:before { background: linear-gradient(rgb(252, 252, 230), rgb(245, 236, 194)); }
@ -52,158 +52,158 @@
.post-list ul.safety .safety-unsafe.disabled:before { background: linear-gradient(#DDB7B7, #C9A195); } .post-list ul.safety .safety-unsafe.disabled:before { background: linear-gradient(#DDB7B7, #C9A195); }
.post-list ul.posts { .post-list ul.posts {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-content: center; align-content: center;
flex-wrap: wrap; flex-wrap: wrap;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.post-list ul.posts .post-small { .post-list ul.posts .post-small {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.post-small { .post-small {
position: relative; position: relative;
} }
.post-small .link { .post-small .link {
display: block; display: block;
margin: 0.3em; margin: 0.3em;
border: 1px solid #999; border: 1px solid #999;
z-index: 1; z-index: 1;
position: relative; position: relative;
} }
.post-small img { .post-small img {
display: block; display: block;
border: 0; border: 0;
background: white; background: white;
} }
.post-small .link:focus, .post-small .link:focus,
.post-small .link:hover { .post-small .link:hover {
background: #64C2ED; background: #64C2ED;
border-color: #64C2ED; border-color: #64C2ED;
box-shadow: 0 0 0 2px #64C2ED; box-shadow: 0 0 0 2px #64C2ED;
outline: 0; outline: 0;
} }
.post-small .link:focus img:not(.loading), .post-small .link:focus img:not(.loading),
.post-small .link:hover img:not(.loading) { .post-small .link:hover img:not(.loading) {
opacity: .8 !important; opacity: .8 !important;
} }
.post-small .link .info { .post-small .link .info {
display: none; display: none;
text-align: center; text-align: center;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
background: #64C2ED; background: #64C2ED;
color: black; color: black;
} }
.post-small .link .info ul { .post-small .link .info ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.post-small .link .info li { .post-small .link .info li {
display: inline-block; display: inline-block;
margin: 0.1em 0.5em; margin: 0.1em 0.5em;
padding: 0; padding: 0;
} }
.post-small .link:focus .info, .post-small .link:focus .info,
.post-small .link:hover .info { .post-small .link:hover .info {
display: block; display: block;
} }
.post-small:not(.post-type-image) .link::before { .post-small:not(.post-type-image) .link::before {
display: block; display: block;
content: ''; content: '';
z-index: 2; z-index: 2;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
width: 0; width: 0;
height: 0; height: 0;
border-top: 50px solid red; border-top: 50px solid red;
border-left: 50px solid transparent; border-left: 50px solid transparent;
} }
.post-small:not(.post-type-image) .link::after { .post-small:not(.post-type-image) .link::after {
pointer-events: none; pointer-events: none;
display: block; display: block;
content: '...'; content: '...';
z-index: 3; z-index: 3;
position: absolute; position: absolute;
top: -35px; /* 50 * sqrt(2) / 2 */ top: -35px; /* 50 * sqrt(2) / 2 */
right: -35px; right: -35px;
width: 71px; /* 50 * sqrt(2) */ width: 71px; /* 50 * sqrt(2) */
height: 71px; height: 71px;
line-height: 122px; /* 71 * 2 - 11 (font-size) - padding */ line-height: 122px; /* 71 * 2 - 11 (font-size) - padding */
transform: rotate(45deg); transform: rotate(45deg);
text-align: center; text-align: center;
color: white; color: white;
font-size: 15px; font-size: 15px;
} }
.post-small.post-type-youtube .link::after { .post-small.post-type-youtube .link::after {
font-size: 13px; font-size: 13px;
content: 'youtube'; content: 'youtube';
} }
.post-small.post-type-video .link::after { .post-small.post-type-video .link::after {
content: 'video'; content: 'video';
} }
.post-small.post-type-flash .link::after { .post-small.post-type-flash .link::after {
content: 'flash'; content: 'flash';
} }
.post-small.post-type-animation .link::after { .post-small.post-type-animation .link::after {
content: 'anim'; content: 'anim';
} }
.post-small .action { .post-small .action {
display: none; display: none;
position: absolute; position: absolute;
z-index: 3; z-index: 3;
left: 0; left: 0;
right: 0; right: 0;
top: 50%; top: 50%;
bottom: 0; bottom: 0;
pointer-events: none; pointer-events: none;
} }
.post-small .action button { .post-small .action button {
padding: 0.5em 1em; padding: 0.5em 1em;
height: 1em; height: 1em;
line-height: 1em; line-height: 1em;
display: block; display: block;
margin: -1em auto 0 auto; margin: -1em auto 0 auto;
box-sizing: content-box; box-sizing: content-box;
opacity: .7; opacity: .7;
box-shadow: none; box-shadow: none;
pointer-events: auto; pointer-events: auto;
} }
.post-small .action button:focus { .post-small .action button:focus {
box-shadow: 0 0 0 2px #64C2ED inset !important; box-shadow: 0 0 0 2px #64C2ED inset !important;
} }
.tagged .action button, .tagged .action button,
.untagged .action button { .untagged .action button {
border: 1px solid black; border: 1px solid black;
font-weight: bold; font-weight: bold;
text-shadow: none; text-shadow: none;
} }
.untagged .action button::before { .untagged .action button::before {
background: red; background: red;
} }
.untagged .action button { .untagged .action button {
color: white; color: white;
} }
.tagged .action button::before { .tagged .action button::before {
background: lime; background: lime;
} }
.tagged .action button { .tagged .action button {
color: black; color: black;
} }

View file

@ -1,146 +1,146 @@
#post-upload-step1 { #post-upload-step1 {
display: table; display: table;
width: 30em; width: 30em;
margin: 0 auto; margin: 0 auto;
} }
#post-upload-step1 .file-handler { #post-upload-step1 .file-handler {
padding: 3.5em !important; padding: 3.5em !important;
width: 100%; width: 100%;
} }
#post-upload-step1 .url-handler { #post-upload-step1 .url-handler {
margin-top: 0.5em; margin-top: 0.5em;
position: relative; position: relative;
} }
#post-upload-step1 .url-handler .input-wrapper { #post-upload-step1 .url-handler .input-wrapper {
margin-right: 9.5em; margin-right: 9.5em;
} }
#post-upload-step1 .url-handler button { #post-upload-step1 .url-handler button {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
width: 8em; width: 8em;
} }
#post-upload-step2 .hybrid-view { #post-upload-step2 .hybrid-view {
text-align: center; text-align: center;
} }
@media all and (min-width: 62.5em) { @media all and (min-width: 62.5em) {
#post-upload-step2 .hybrid-window:first-child { #post-upload-step2 .hybrid-window:first-child {
width: 40%; width: 40%;
margin-right: 1em; margin-right: 1em;
float: left; float: left;
} }
#post-upload-step2 .hybrid-window:last-child { #post-upload-step2 .hybrid-window:last-child {
display: inline-block; display: inline-block;
width: 57.5%; width: 57.5%;
} }
} }
#post-upload-step2 .thumbnail img { #post-upload-step2 .thumbnail img {
border: 1px solid black; border: 1px solid black;
vertical-align: middle; vertical-align: middle;
display: block; display: block;
} }
#post-upload-step2 table { #post-upload-step2 table {
border-spacing: 0; border-spacing: 0;
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
} }
#post-upload-step2 table td, #post-upload-step2 table td,
#post-upload-step2 table th { #post-upload-step2 table th {
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
text-align: center; text-align: center;
} }
#post-upload-step2 table th { #post-upload-step2 table th {
font-weight: normal; font-weight: normal;
} }
#post-upload-step2 table tr.selected { #post-upload-step2 table tr.selected {
background: #f7fbfc; background: #f7fbfc;
} }
#post-upload-step2 table .checkbox { #post-upload-step2 table .checkbox {
width: 30px; width: 30px;
padding: 0.2em 0; padding: 0.2em 0;
} }
#post-upload-step2 table .checkbox input { #post-upload-step2 table .checkbox input {
margin: 0 auto; margin: 0 auto;
} }
#post-upload-step2 table .thumbnail { #post-upload-step2 table .thumbnail {
width: 40px; width: 40px;
padding: 0.2em 0; padding: 0.2em 0;
} }
#post-upload-step2 table .safety { #post-upload-step2 table .safety {
width: 60px; width: 60px;
padding: 0.2em 0; padding: 0.2em 0;
} }
#post-upload-step2 table .tags { #post-upload-step2 table .tags {
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
#post-upload-step2 table .safety { #post-upload-step2 table .safety {
text-align: center; text-align: center;
} }
#post-upload-step2 table .safety [class^=safety-] { #post-upload-step2 table .safety [class^=safety-] {
box-shadow: inset 0 0 0 3px rgba(0,0,0,0.1); box-shadow: inset 0 0 0 3px rgba(0,0,0,0.1);
width: 25px; width: 25px;
height: 25px; height: 25px;
margin: 0 auto; margin: 0 auto;
} }
#post-upload-step2 table .safety-safe { background: #b2efa2; } #post-upload-step2 table .safety-safe { background: #b2efa2; }
#post-upload-step2 table .safety-sketchy { background: #f0e4a8; } #post-upload-step2 table .safety-sketchy { background: #f0e4a8; }
#post-upload-step2 table .safety-unsafe { background: #fbc6b6; } #post-upload-step2 table .safety-unsafe { background: #fbc6b6; }
#post-upload-step2 table .thumbnail img { #post-upload-step2 table .thumbnail img {
width: 30px; width: 30px;
height: 30px; height: 30px;
display: inline-block; display: inline-block;
background-size: 30px 30px; background-size: 30px 30px;
} }
#post-upload-step2 .operations { #post-upload-step2 .operations {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#post-upload-step2 .operations li { #post-upload-step2 .operations li {
display: inline-block; display: inline-block;
margin: 0.3em 0.3em 0 0; margin: 0.3em 0.3em 0 0;
} }
#post-upload-step2 .operations .stop { #post-upload-step2 .operations .stop {
display: none; display: none;
} }
#post-upload-step2 form { #post-upload-step2 form {
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;
overflow: hidden; overflow: hidden;
text-align: left; text-align: left;
} }
#post-upload-step2 .messages { #post-upload-step2 .messages {
margin: 1em 0; margin: 1em 0;
} }
#post-upload-step2 .form-slider { #post-upload-step2 .form-slider {
text-align: center; text-align: center;
} }
#post-upload-step2 .form-slider .thumbnail img { #post-upload-step2 .form-slider .thumbnail img {
max-width: 100%; max-width: 100%;
max-height: 450px; max-height: 450px;
margin: 0 auto 1em auto; margin: 0 auto 1em auto;
} }
#post-upload-step2 .file-name .form-input { #post-upload-step2 .file-name .form-input {
word-break: break-all; word-break: break-all;
} }
#post-upload-step2, #post-upload-step2,
.template { .template {
display: none; display: none;
} }
#uploading-alert { #uploading-alert {
display: none; display: none;
text-align: left; text-align: left;
} }

View file

@ -1,262 +1,262 @@
#post-current-search-wrapper { #post-current-search-wrapper {
text-align: center; text-align: center;
} }
#post-current-search { #post-current-search {
margin: 0 auto 1em auto; margin: 0 auto 1em auto;
display: inline-block; display: inline-block;
} }
#post-current-search a { #post-current-search a {
margin: 0 2em; margin: 0 2em;
} }
#post-current-search a, #post-current-search a,
#post-current-search div { #post-current-search div {
display: inline-block; display: inline-block;
} }
#post-current-search a:not(.enabled) { #post-current-search a:not(.enabled) {
color: silver; color: silver;
cursor: text; cursor: text;
} }
#post-view-wrapper #sidebar { #post-view-wrapper #sidebar {
line-height: 1.33em; line-height: 1.33em;
} }
#post-view-wrapper #sidebar h1 { #post-view-wrapper #sidebar h1 {
margin-top: 1.5em; margin-top: 1.5em;
} }
#post-view-wrapper #sidebar h1:first-of-type { #post-view-wrapper #sidebar h1:first-of-type {
margin-top: 0; margin-top: 0;
} }
@media all and (min-width: 62.5em) { @media all and (min-width: 62.5em) {
#post-view-wrapper { #post-view-wrapper {
display: flex; display: flex;
} }
#post-view-wrapper #sidebar { #post-view-wrapper #sidebar {
min-width: 15em; min-width: 15em;
margin-right: 1em; margin-right: 1em;
flex: 1; flex: 1;
} }
#post-view-wrapper #post-view { #post-view-wrapper #post-view {
flex: 5; flex: 5;
} }
} }
@media all and (max-width: 62.5em) { @media all and (max-width: 62.5em) {
#post-view-wrapper { #post-view-wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
#post-view-wrapper #sidebar { #post-view-wrapper #sidebar {
order: 2; order: 2;
margin-bottom: 1em; margin-bottom: 1em;
} }
#post-view-wrapper #post-view { #post-view-wrapper #post-view {
margin: 0 auto; margin: 0 auto;
max-width: 100%; max-width: 100%;
order: 1; order: 1;
} }
} }
#post-view-wrapper .favorites li { #post-view-wrapper .favorites li {
display: inline-block; display: inline-block;
margin: 0 0.25em 0.25em 0; margin: 0 0.25em 0.25em 0;
} }
#sidebar ul { #sidebar ul {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#sidebar .other-info li { #sidebar .other-info li {
display: block; display: block;
word-break: break-all; word-break: break-all;
padding-left: 1em; padding-left: 1em;
text-indent: -1em; text-indent: -1em;
} }
#sidebar .tags li { #sidebar .tags li {
display: block; display: block;
word-break: break-all; word-break: break-all;
padding-left: 20px; padding-left: 20px;
text-indent: -20px; text-indent: -20px;
} }
#sidebar .tags .tag-wrapper { #sidebar .tags .tag-wrapper {
max-width: 100%; max-width: 100%;
position: relative; position: relative;
display: inline-block; display: inline-block;
} }
#sidebar .tags li a.tag-edit { #sidebar .tags li a.tag-edit {
margin-left: 20px; margin-left: 20px;
} }
#sidebar .tags li .tag-name { #sidebar .tags li .tag-name {
margin-right: 0.8em; margin-right: 0.8em;
} }
#sidebar .tags li .usages { #sidebar .tags li .usages {
color: silver; color: silver;
} }
#sidebar .author-box img { #sidebar .author-box img {
float: left; float: left;
margin-right: 0.5em; margin-right: 0.5em;
} }
#sidebar .author-box .author-name { #sidebar .author-box .author-name {
font-weight: bold; font-weight: bold;
} }
#sidebar .other-info { #sidebar .other-info {
margin-top: 1em; margin-top: 1em;
line-height: 150%; line-height: 150%;
} }
#sidebar .essential { #sidebar .essential {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin-bottom: 2em; margin-bottom: 2em;
max-width: 30em; max-width: 30em;
} }
#sidebar .essential li { #sidebar .essential li {
display: block; display: block;
margin: 0 0.25em; margin: 0 0.25em;
vertical-align: top; vertical-align: top;
} }
#sidebar .essential li i.fa { #sidebar .essential li i.fa {
font-size: 200%; font-size: 200%;
} }
#sidebar .essential li a { #sidebar .essential li a {
display: block; display: block;
text-align: center; text-align: center;
font-size: 87%; font-size: 87%;
} }
#post-view #post-edit-target { #post-view #post-edit-target {
padding: 1em; padding: 1em;
width: 50%; width: 50%;
min-width: 30em; min-width: 30em;
position: absolute; position: absolute;
background: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.8);
box-shadow: 0 0 1em 0.5em rgba(255, 255, 255, 0.8); box-shadow: 0 0 1em 0.5em rgba(255, 255, 255, 0.8);
z-index: 2; z-index: 2;
display: none; display: none;
} }
#post-edit-target .form-wrapper { #post-edit-target .form-wrapper {
min-width: 100%; min-width: 100%;
} }
#post-view>* { #post-view>* {
z-index: -1; z-index: -1;
} }
#post-edit-target .file-handler { #post-edit-target .file-handler {
margin: 0.5em 0; margin: 0.5em 0;
} }
#post-view-wrapper .post-history-wrapper { #post-view-wrapper .post-history-wrapper {
padding: 1em 0; padding: 1em 0;
display: none; display: none;
word-break: break-all; word-break: break-all;
} }
.post-content { .post-content {
position: relative; position: relative;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
.post-content .object-wrapper { .post-content .object-wrapper {
max-width: 100%; max-width: 100%;
position: relative; position: relative;
} }
.post-content .object-wrapper img, .post-content .object-wrapper img,
.post-content .object-wrapper object, .post-content .object-wrapper object,
.post-content .object-wrapper iframe, .post-content .object-wrapper iframe,
.post-content .object-wrapper video { .post-content .object-wrapper video {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
border: 0; border: 0;
} }
.post-content .object-wrapper video { .post-content .object-wrapper video {
background: black; background: black;
} }
.post-notes-target { .post-notes-target {
position: absolute; position: absolute;
pointer-events: none; pointer-events: none;
z-index: 1; z-index: 1;
} }
.post-notes { .post-notes {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.post-note-edit { .post-note-edit {
pointer-events: auto; pointer-events: auto;
display: none; display: none;
position: fixed; position: fixed;
z-index: 3; z-index: 3;
background: white; background: white;
border: 1px solid black; border: 1px solid black;
padding: 1em; padding: 1em;
left: 30%; left: 30%;
top: 20%; top: 20%;
} }
.post-note-edit textarea { .post-note-edit textarea {
width: 25em; width: 25em;
height: 5em; height: 5em;
display: block; display: block;
} }
.post-note-edit .actions { .post-note-edit .actions {
pointer-events: none; pointer-events: none;
} }
.post-note-edit button { .post-note-edit button {
pointer-events: auto; pointer-events: auto;
margin-top: 0.5em; margin-top: 0.5em;
} }
.post-note-edit .actions button:not(:last-child) { .post-note-edit .actions button:not(:last-child) {
margin-right: 0.5em; margin-right: 0.5em;
} }
.post-note { .post-note {
outline: 0; outline: 0;
pointer-events: auto; pointer-events: auto;
position: absolute; position: absolute;
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
border: 1px solid rgba(0, 0, 0, 0.3); border: 1px solid rgba(0, 0, 0, 0.3);
font-size: 12pt; font-size: 12pt;
} }
.post-note:focus { .post-note:focus {
border-color: rgba(255, 0, 0, 0.3); border-color: rgba(255, 0, 0, 0.3);
background-color: rgba(255, 225, 225, 0.3); background-color: rgba(255, 225, 225, 0.3);
} }
.post-note .text-wrapper { .post-note .text-wrapper {
position: absolute; position: absolute;
display: none; display: none;
z-index: 1; z-index: 1;
top: calc(100%); top: calc(100%);
left: -1px; left: -1px;
padding-top: 0.5em; padding-top: 0.5em;
cursor: pointer; cursor: pointer;
width: -webkit-max-content; width: -webkit-max-content;
width: -moz-max-content; width: -moz-max-content;
width: max-content; width: max-content;
} }
.post-note .text { .post-note .text {
padding: 0.5em; padding: 0.5em;
background: lemonchiffon; background: lemonchiffon;
border: 1px solid black; border: 1px solid black;
} }
.post-note:hover .text-wrapper { .post-note:hover .text-wrapper {
display: block; display: block;
} }
.post-note .text p:first-of-type { .post-note .text p:first-of-type {
margin-top: 0; margin-top: 0;
} }
.post-note .text p:last-of-type { .post-note .text p:last-of-type {
margin-bottom: 0; margin-bottom: 0;
} }

View file

@ -1,10 +1,10 @@
#registration-form p { #registration-form p {
text-align: center; text-align: center;
} }
#registration-form form { #registration-form form {
width: 25em; width: 25em;
} }
#registration-form .messages { #registration-form .messages {
margin: 0 auto; margin: 0 auto;
} }

View file

@ -1,96 +1,96 @@
#tag-list-wrapper { #tag-list-wrapper {
text-align: center; text-align: center;
} }
#tag-list { #tag-list {
width: 100%; width: 100%;
display: inline-block; display: inline-block;
margin: 0 auto; margin: 0 auto;
} }
@media all and (min-width: 67em) { @media all and (min-width: 67em) {
#tag-list { #tag-list {
width: 60em; width: 60em;
} }
} }
@media all and (max-width: 40em) { @media all and (max-width: 40em) {
#tag-list .implications, #tag-list .implications,
#tag-list .suggestions { #tag-list .suggestions {
display: none; display: none;
} }
} }
#tag-list form { #tag-list form {
float: left; float: left;
white-space: nowrap; white-space: nowrap;
} }
#tag-list form input { #tag-list form input {
width: 15em; width: 15em;
} }
#tag-list ul.order { #tag-list ul.order {
float: right; float: right;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0 -0.5em 0 0; margin: 0 -0.5em 0 0;
} }
#tag-list .search:after { #tag-list .search:after {
display: block; display: block;
content: ''; content: '';
clear: both; clear: both;
} }
#ta-list ul.order { #ta-list ul.order {
margin: -0.5em -0.5em 0.5em -0.5em; margin: -0.5em -0.5em 0.5em -0.5em;
} }
#tag-list ul.order li { #tag-list ul.order li {
display: inline-block; display: inline-block;
margin: 0 0.5em; margin: 0 0.5em;
} }
#tag-list ul.order a { #tag-list ul.order a {
display: inline-block; display: inline-block;
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
} }
#tag-list table { #tag-list table {
width: 100%; width: 100%;
text-align: left; text-align: left;
margin: 1em auto; margin: 1em auto;
} }
#tag-list th:not(:last-child), #tag-list th:not(:last-child),
#tag-list td:not(:last-child) { #tag-list td:not(:last-child) {
padding-right: 1.5em; padding-right: 1.5em;
} }
#tag-list th { #tag-list th {
font-weight: normal; font-weight: normal;
} }
#tag-list .fa-check { #tag-list .fa-check {
opacity: .2; opacity: .2;
} }
#tag-list .banned, #tag-list .banned,
#tag-list .usages { #tag-list .usages {
text-align: center; text-align: center;
} }
#tag-list .implications, #tag-list .implications,
#tag-list .suggestions { #tag-list .suggestions {
word-break: break-all; word-break: break-all;
} }
.tag-category-character, .tag-category-character,
.tag-category-character a { .tag-category-character a {
color: #0a0; color: #0a0;
} }
.tag-category-copyright, .tag-category-copyright,
.tag-category-copyright a { .tag-category-copyright a {
color: #a0a; color: #a0a;
} }
.tag-category-artist, .tag-category-artist,
.tag-category-artist a { .tag-category-artist a {
color: #a00; color: #a00;
} }
.tag-category-meta, .tag-category-meta,
.tag-category-meta a { .tag-category-meta a {
color: #aaa; color: #aaa;
} }

View file

@ -1,43 +1,43 @@
#tag-view { #tag-view {
margin: 0 auto; margin: 0 auto;
max-width: 45em; max-width: 45em;
text-align: center; text-align: center;
} }
#tav-view .header { #tav-view .header {
text-align: left; text-align: left;
display: inline-block; display: inline-block;
margin: 0 auto; margin: 0 auto;
} }
#tag-view .header h1 { #tag-view .header h1 {
margin-top: 0; margin-top: 0;
} }
#tag-view h3 { #tag-view h3 {
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
#tag-view form { #tag-view form {
text-align: left; text-align: left;
max-width: 30em; max-width: 30em;
margin: 0 auto; margin: 0 auto;
} }
#tag-view p { #tag-view p {
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
line-height: normal; line-height: normal;
} }
#tag-view small { #tag-view small {
font-size: 0.85em; font-size: 0.85em;
} }
#tag-view .siblings ul { #tag-view .siblings ul {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#tag-view .siblings ul li { #tag-view .siblings ul li {
display: inline-block; display: inline-block;
margin: 0em 0.5em; margin: 0em 0.5em;
line-height: normal; line-height: normal;
} }

View file

@ -1,54 +1,54 @@
#top-navigation { #top-navigation {
width: 100%; width: 100%;
} }
#top-navigation ul { #top-navigation ul {
list-style-type: none; list-style-type: none;
padding: 0 2em; padding: 0 2em;
margin: 0; margin: 0;
} }
#top-navigation li { #top-navigation li {
display: inline-block; display: inline-block;
} }
#top-navigation li a { #top-navigation li a {
display: inline-block; display: inline-block;
text-transform: lowercase; text-transform: lowercase;
font-variant: small-caps; font-variant: small-caps;
padding: 0.5em 1em; padding: 0.5em 1em;
font-size: 0.9em; font-size: 0.9em;
} }
#top-navigation li a:focus, #top-navigation li a:focus,
#top-navigation li a:hover { #top-navigation li a:hover {
outline: 0; outline: 0;
} }
#top-navigation li:first-child a { #top-navigation li:first-child a {
margin-left: -1em; margin-left: -1em;
} }
#top-navigation li:last-child a { #top-navigation li:last-child a {
margin-right: -1em; margin-right: -1em;
} }
#top-navigation i { #top-navigation i {
font-size: 3em; font-size: 3em;
margin: 0 10px 5px; margin: 0 10px 5px;
} }
#top-navigation .accesskey:before { #top-navigation .accesskey:before {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
right: 0; right: 0;
left: 0; left: 0;
content: '\a0'; content: '\a0';
border-bottom: 1px solid; border-bottom: 1px solid;
opacity: .35; opacity: .35;
height: 90%; height: 90%;
} }
#top-navigation .accesskey { #top-navigation .accesskey {
position: relative; position: relative;
text-decoration: none; text-decoration: none;
} }

View file

@ -1,60 +1,60 @@
#user-list { #user-list {
min-width: 20em; min-width: 20em;
text-align: center; text-align: center;
} }
#user-list ul { #user-list ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
#user-list ul.order { #user-list ul.order {
margin: -0.5em -0.5em 0.5em -0.5em; margin: -0.5em -0.5em 0.5em -0.5em;
} }
#user-list ul.order li { #user-list ul.order li {
display: inline-block; display: inline-block;
margin: 0 0.5em; margin: 0 0.5em;
} }
#user-list ul.order a { #user-list ul.order a {
display: inline-block; display: inline-block;
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
} }
#user-list .users { #user-list .users {
display: inline-block; display: inline-block;
margin: 0 auto; margin: 0 auto;
} }
#user-list .users li { #user-list .users li {
text-align: left; text-align: left;
margin: 0.5em 0; margin: 0.5em 0;
} }
#user-list li:after { #user-list li:after {
clear: left; clear: left;
content: ''; content: '';
display: block; display: block;
} }
#user-list .user img { #user-list .user img {
vertical-align: top; vertical-align: top;
display: block; display: block;
} }
#user-list .user .avatar { #user-list .user .avatar {
float: left; float: left;
margin-right: 1em; margin-right: 1em;
} }
#user-list .user .avatar a { #user-list .user .avatar a {
display: block; display: block;
} }
#user-list .user .details { #user-list .user .details {
float: left; float: left;
vertical-align: top; vertical-align: top;
} }
#user-list .user h1 { #user-list .user h1 {
margin-top: 0; margin-top: 0;
font-weight: normal; font-weight: normal;
font-size: 1.25em; font-size: 1.25em;
} }

View file

@ -1,57 +1,57 @@
#user-view { #user-view {
min-width: 30em; min-width: 30em;
text-align: center; text-align: center;
} }
#user-view .side { #user-view .side {
text-align: center; text-align: center;
width: 150px; width: 150px;
float: left; float: left;
} }
#user-view .top { #user-view .top {
display: inline-block; display: inline-block;
margin: 0 auto; margin: 0 auto;
} }
#user-view ul { #user-view ul {
display: inline-block; display: inline-block;
list-style-type: none; list-style-type: none;
text-align: left; text-align: left;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#user-view ul.links { #user-view ul.links {
list-style-type: disc; list-style-type: disc;
list-style-position: inside; list-style-position: inside;
white-space: nowrap; white-space: nowrap;
} }
#user-view ul.links li a { #user-view ul.links li a {
padding-left: 0; padding-left: 0;
margin-left: 0; margin-left: 0;
} }
#user-view ul a { #user-view ul a {
display: inline-block; display: inline-block;
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
} }
#user-view .tab { #user-view .tab {
display: none; display: none;
margin-top: 1.5em; margin-top: 1.5em;
clear: both; clear: both;
} }
#user-view .tab.active { #user-view .tab.active {
display: block; display: block;
} }
#user-view .tab.basic-info table { #user-view .tab.basic-info table {
margin: 0 auto; margin: 0 auto;
text-align: left; text-align: left;
} }
#user-view .tab.basic-info td { #user-view .tab.basic-info td {
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
vertical-align: top; vertical-align: top;
} }

View file

@ -1,5 +1,5 @@
<div class="http-error"> <div class="http-error">
<img src="/img/404.png" alt="404 Not found"/> <img src="/img/404.png" alt="404 Not found"/>
<br/> <br/>
<a href="#/">Back to main page</a> <a href="#/">Back to main page</a>
</div> </div>

View file

@ -1,20 +1,20 @@
<div class="messages"></div> <div class="messages"></div>
<form class="form-wrapper account-removal"> <form class="form-wrapper account-removal">
<div class="form-row"> <div class="form-row">
<label class="form-label" for="account-removal-confirmation">Confirmation:</label> <label class="form-label" for="account-removal-confirmation">Confirmation:</label>
<div class="form-input"> <div class="form-input">
<input type="checkbox" id="account-removal-confirmation" name="confirmation"/> <input type="checkbox" id="account-removal-confirmation" name="confirmation"/>
<label for="account-removal-confirmation"> <label for="account-removal-confirmation">
I confirm that I want to delete this account. I confirm that I want to delete this account.
</label> </label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit">Delete account</button> <button type="submit">Delete account</button>
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,114 +1,114 @@
<div class="messages"></div> <div class="messages"></div>
<form class="form-wrapper account-settings"> <form class="form-wrapper account-settings">
<% if (canChangeAvatarStyle) { %> <% if (canChangeAvatarStyle) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label">User picture:</label> <label class="form-label">User picture:</label>
<div class="form-input"> <div class="form-input">
<% <%
var avatarStyles = { var avatarStyles = {
gravatar: 'Gravatar', gravatar: 'Gravatar',
manual: 'Custom', manual: 'Custom',
blank: 'Blank', blank: 'Blank',
}; };
%> %>
<% _.each(avatarStyles, function(v, k) { %> <% _.each(avatarStyles, function(v, k) { %>
<input <% print(user.avatarStyle == k ? 'checked="checked"' : '') %> type="radio" name="avatar-style" id="account-settings-avatar-<%= k %>" value="<%= k %>"/> <input <% print(user.avatarStyle == k ? 'checked="checked"' : '') %> type="radio" name="avatar-style" id="account-settings-avatar-<%= k %>" value="<%= k %>"/>
<label for="account-settings-avatar-<%= k %>"> <label for="account-settings-avatar-<%= k %>">
<%= v %> <%= v %>
</label> </label>
<% }) %> <% }) %>
</div> </div>
</div> </div>
<div class="form-row avatar-content"> <div class="form-row avatar-content">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<input type="file" name="avatar-content" id="account-settings-avatar-content"/> <input type="file" name="avatar-content" id="account-settings-avatar-content"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (canChangeName) { %> <% if (canChangeName) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="account-settings-name">Name:</label> <label class="form-label" for="account-settings-name">Name:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="text" name="userName" id="account-settings-name" placeholder="New name&hellip;" value="<%= user.name %>"/> <input autocomplete="off" type="text" name="userName" id="account-settings-name" placeholder="New name&hellip;" value="<%= user.name %>"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (canChangeEmailAddress) { %> <% if (canChangeEmailAddress) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="account-settings-email">E-mail:</label> <label class="form-label" for="account-settings-email">E-mail:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="text" name="email" id="account-settings-email" placeholder="New e-mail&hellip;" value="<%= user.email %>"/> <input autocomplete="off" type="text" name="email" id="account-settings-email" placeholder="New e-mail&hellip;" value="<%= user.email %>"/>
<% if (user.emailUnconfirmed) { %> <% if (user.emailUnconfirmed) { %>
<br/> <br/>
<span class="account-settings-email-unconfirmed">(unconfirmed) <%= user.emailUnconfirmed %></span> <span class="account-settings-email-unconfirmed">(unconfirmed) <%= user.emailUnconfirmed %></span>
<% } %> <% } %>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (canChangePassword) { %> <% if (canChangePassword) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="account-settings-password">New password:</label> <label class="form-label" for="account-settings-password">New password:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="password" name="password" id="account-settings-password" placeholder="New password&hellip;" value=""/> <input autocomplete="off" type="password" name="password" id="account-settings-password" placeholder="New password&hellip;" value=""/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="account-settings-password-confirmation"></label> <label class="form-label" for="account-settings-password-confirmation"></label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="password" name="passwordConfirmation" id="account-settings-password-confirmation" placeholder="New password&hellip; (repeat)" value=""/> <input autocomplete="off" type="password" name="passwordConfirmation" id="account-settings-password-confirmation" placeholder="New password&hellip; (repeat)" value=""/>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (canBan) { %> <% if (canBan) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="account-settings-ban">Ban:</label> <label class="form-label" for="account-settings-ban">Ban:</label>
<div class="form-input"> <div class="form-input">
<input name="ban" type="checkbox" id="ban" <% print(user.banned ? 'checked="checked"' : '') %>> <input name="ban" type="checkbox" id="ban" <% print(user.banned ? 'checked="checked"' : '') %>>
<label for="ban"> <label for="ban">
Enabled Enabled
</label> </label>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (canChangeAccessRank) { %> <% if (canChangeAccessRank) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="account-settings-access-rank">Access rank:</label> <label class="form-label" for="account-settings-access-rank">Access rank:</label>
<div class="form-input"> <div class="form-input">
<% <%
var accessRanks = { var accessRanks = {
anonymous: 'Anonymous', anonymous: 'Anonymous',
restrictedUser: 'Restricted user', restrictedUser: 'Restricted user',
regularUser: 'Regular user', regularUser: 'Regular user',
powerUser: 'Power user', powerUser: 'Power user',
moderator: 'Moderator', moderator: 'Moderator',
administrator: 'Administrator' administrator: 'Administrator'
}; };
%> %>
<% _.each(accessRanks, function(v, k) { %> <% _.each(accessRanks, function(v, k) { %>
<input name="access-rank" type="radio" value="<%= k %>" id="access-rank-<%= k %>" <% print(user.accessRank == k ? 'checked="checked"' : '') %>> <input name="access-rank" type="radio" value="<%= k %>" id="access-rank-<%= k %>" <% print(user.accessRank == k ? 'checked="checked"' : '') %>>
<label for="access-rank-<%= k %>"> <label for="access-rank-<%= k %>">
<% print(user.accessRank == k ? v + ' (current)' : v) %> <% print(user.accessRank == k ? v + ' (current)' : v) %>
</label> </label>
<br/> <br/>
<% }) %> <% }) %>
</div> </div>
</div> </div>
<% } %> <% } %>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit">Update settings</button> <button type="submit">Update settings</button>
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,62 +1,62 @@
<div class="messages"></div> <div class="messages"></div>
<form class="form-wrapper browsing-settings"> <form class="form-wrapper browsing-settings">
<div class="form-row"> <div class="form-row">
<label class="form-label">Safety:</label> <label class="form-label">Safety:</label>
<div class="form-input"> <div class="form-input">
<input <% print(settings.listPosts.safe ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-safety-safe" name="listSafePosts" value="safe"/> <input <% print(settings.listPosts.safe ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-safety-safe" name="listSafePosts" value="safe"/>
<label for="browsing-settings-safety-safe"> <label for="browsing-settings-safety-safe">
Safe Safe
</label> </label>
<input <% print(settings.listPosts.sketchy ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-safety-sketchy" name="listSketchyPosts" value="sketchy"/> <input <% print(settings.listPosts.sketchy ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-safety-sketchy" name="listSketchyPosts" value="sketchy"/>
<label for="browsing-settings-safety-sketchy"> <label for="browsing-settings-safety-sketchy">
Sketchy Sketchy
</label> </label>
<input <% print(settings.listPosts.unsafe ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-safety-unsafe" name="listUnsafePosts" value="unsafe"/> <input <% print(settings.listPosts.unsafe ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-safety-unsafe" name="listUnsafePosts" value="unsafe"/>
<label for="browsing-settings-safety-unsafe"> <label for="browsing-settings-safety-unsafe">
Unsafe Unsafe
</label> </label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="browsing-settings-endless-scroll">Endless scroll:</label> <label class="form-label" for="browsing-settings-endless-scroll">Endless scroll:</label>
<div class="form-input"> <div class="form-input">
<input <% print(settings.endlessScroll ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-endless-scroll" name="endlessScroll"/> <input <% print(settings.endlessScroll ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-endless-scroll" name="endlessScroll"/>
<label for="browsing-settings-endless-scroll"> <label for="browsing-settings-endless-scroll">
Enabled Enabled
</label> </label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="browsing-settings-hide-downvoted">Hide down-voted:</label> <label class="form-label" for="browsing-settings-hide-downvoted">Hide down-voted:</label>
<div class="form-input"> <div class="form-input">
<input <% print(settings.hideDownvoted ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-hide-downvoted" name="hideDownvoted"/> <input <% print(settings.hideDownvoted ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-hide-downvoted" name="hideDownvoted"/>
<label for="browsing-settings-hide-downvoted"> <label for="browsing-settings-hide-downvoted">
Enabled Enabled
</label> </label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="browsing-settings-keyboard-shortcuts">Keyboard shortcuts:</label> <label class="form-label" for="browsing-settings-keyboard-shortcuts">Keyboard shortcuts:</label>
<div class="form-input"> <div class="form-input">
<input <% print(settings.keyboardShortcuts ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-keyboard-shortcuts" name="keyboardShortcuts"/> <input <% print(settings.keyboardShortcuts ? 'checked="checked"' : '') %> type="checkbox" id="browsing-settings-keyboard-shortcuts" name="keyboardShortcuts"/>
<label for="browsing-settings-keyboard-shortcuts"> <label for="browsing-settings-keyboard-shortcuts">
Enabled Enabled
</label> </label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit">Update settings</button> <button type="submit">Update settings</button>
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,17 +1,17 @@
<form class="comment-form"> <form class="comment-form">
<h1><%= title %></h1> <h1><%= title %></h1>
<div class="preview"></div> <div class="preview"></div>
<div class="form-row text"> <div class="form-row text">
<div class="input-wrapper"> <div class="input-wrapper">
<textarea name="text" cols="50" rows="3"><% if (typeof(text) !== 'undefined') { print(text) } %></textarea> <textarea name="text" cols="50" rows="3"><% if (typeof(text) !== 'undefined') { print(text) } %></textarea>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<button type="submit" name="sender" value="preview">Preview</button>&nbsp; <button type="submit" name="sender" value="preview">Preview</button>&nbsp;
<button type="submit" name="sender" value="submit">Submit</button> <button type="submit" name="sender" value="submit">Submit</button>
</div> </div>
</form> </form>

View file

@ -1,66 +1,66 @@
<div class="comment"> <div class="comment">
<div class="avatar"> <div class="avatar">
<% if (comment.user.name && canViewUsers) { %> <% if (comment.user.name && canViewUsers) { %>
<a href="#/user/<%= comment.user.name %>"> <a href="#/user/<%= comment.user.name %>">
<% } %> <% } %>
<img width="40" height="40" class="author-avatar" <img width="40" height="40" class="author-avatar"
src="/data/thumbnails/40x40/avatars/<%= comment.user.name || '!' %>" src="/data/thumbnails/40x40/avatars/<%= comment.user.name || '!' %>"
alt="<%= comment.user.name || 'Anonymous user' %>"/> alt="<%= comment.user.name || 'Anonymous user' %>"/>
<% if (comment.user.name && canViewUsers) { %> <% if (comment.user.name && canViewUsers) { %>
</a> </a>
<% } %> <% } %>
</div> </div>
<div class="body"> <div class="body">
<div class="header"> <div class="header">
<span class="nickname"> <span class="nickname">
<% if (comment.user.name && canViewUsers) { %> <% if (comment.user.name && canViewUsers) { %>
<a href="#/user/<%= comment.user.name %>"> <a href="#/user/<%= comment.user.name %>">
<% } %> <% } %>
<%= comment.user.name || 'Anonymous user' %> <%= comment.user.name || 'Anonymous user' %>
<% if (comment.user.name && canViewUsers) { %> <% if (comment.user.name && canViewUsers) { %>
</a> </a>
<% } %> <% } %>
</span> </span>
<span class="date" title="<%= util.formatAbsoluteTime(comment.creationTime) %>"> <span class="date" title="<%= util.formatAbsoluteTime(comment.creationTime) %>">
<%= util.formatRelativeTime(comment.creationTime) %> <%= util.formatRelativeTime(comment.creationTime) %>
</span> </span>
<span class="score"> <span class="score">
Score: <%= comment.score %> Score: <%= comment.score %>
</span> </span>
<span class="ops"><!-- <span class="ops"><!--
--><% if (canVote) { %><!-- --><% if (canVote) { %><!--
--><a href="#" class="score-up <% print(comment.ownScore === 1 ? 'active' : '') %>"><!-- --><a href="#" class="score-up <% print(comment.ownScore === 1 ? 'active' : '') %>"><!--
-->vote up<!-- -->vote up<!--
--></a><!-- --></a><!--
--><a href="#" class="score-down <% print(comment.ownScore === -1 ? 'active' : '') %>"><!-- --><a href="#" class="score-down <% print(comment.ownScore === -1 ? 'active' : '') %>"><!--
-->vote down<!-- -->vote down<!--
--></a><!-- --></a><!--
--><% } %><!-- --><% } %><!--
--><% if (canEditComment) { %><!-- --><% if (canEditComment) { %><!--
--><a href="#" class="edit"><!-- --><a href="#" class="edit"><!--
-->edit<!-- -->edit<!--
--></a><!-- --></a><!--
--><% } %><!-- --><% } %><!--
--><% if (canDeleteComment) { %><!-- --><% if (canDeleteComment) { %><!--
--><a href="#" class="delete"><!-- --><a href="#" class="delete"><!--
-->delete<!-- -->delete<!--
--></a><!-- --></a><!--
--><% } %><!-- --><% } %><!--
--></span> --></span>
</div> </div>
<div class="content"> <div class="content">
<%= util.formatMarkdown(comment.text) %> <%= util.formatMarkdown(comment.text) %>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,13 +1,13 @@
<% if (canListComments && comments.length) { %> <% if (canListComments && comments.length) { %>
<div class="comments"> <div class="comments">
<h1>Comments</h1> <h1>Comments</h1>
<ul class="comments"> <ul class="comments">
</ul> </ul>
</div> </div>
<% } %> <% } %>
<% if (canAddComments) { %> <% if (canAddComments) { %>
<div class="comment-add"> <div class="comment-add">
<%= commentFormTemplate({title: 'Add comment'}) %> <%= commentFormTemplate({title: 'Add comment'}) %>
</div> </div>
<% } %> <% } %>

View file

@ -1,8 +1,8 @@
<div class="post-comment"> <div class="post-comment">
<div class="post"> <div class="post">
<%= postTemplate({post: post, util: util, canViewPosts: canViewPosts}) %> <%= postTemplate({post: post, util: util, canViewPosts: canViewPosts}) %>
</div> </div>
<div class="post-comments-target"> <div class="post-comments-target">
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
<div id="global-comment-list"> <div id="global-comment-list">
<div class="pagination-target"> <div class="pagination-target">
<ul class="posts"> <ul class="posts">
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -1,4 +1,4 @@
<div id="history-wrapper"> <div id="history-wrapper">
<div class="pagination-target"> <div class="pagination-target">
</div> </div>
</div> </div>

View file

@ -1,279 +1,279 @@
<div id="help-view"> <div id="help-view">
<ul class="tabs"> <ul class="tabs">
<li> <li>
<a class="big-button" href="#/help/about">About</a> <a class="big-button" href="#/help/about">About</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/help/keyboard">Keyboard</a> <a class="big-button" href="#/help/keyboard">Keyboard</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/help/search-syntax">Search syntax</a> <a class="big-button" href="#/help/search-syntax">Search syntax</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/help/comments">Comments</a> <a class="big-button" href="#/help/comments">Comments</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/help/tos">Terms of service</a> <a class="big-button" href="#/help/tos">Terms of service</a>
</li> </li>
</ul> </ul>
<div data-tab="about"> <div data-tab="about">
<h1>About</h1> <h1>About</h1>
<p>Szurubooru is an image board engine inspired by services such as <p>Szurubooru is an image board engine inspired by services such as
Danbooru, Gelbooru and Moebooru. Its name <a Danbooru, Gelbooru and Moebooru. Its name <a
href="http://sjp.pwn.pl/sjp/;2527372">has its roots in Polish language and href="http://sjp.pwn.pl/sjp/;2527372">has its roots in Polish language and
has onomatopeic meaning of scraping or scrubbing</a>. It is pronounced as has onomatopeic meaning of scraping or scrubbing</a>. It is pronounced as
<em>shoorubooru</em>.</p> <em>shoorubooru</em>.</p>
<h1>Registration</h1> <h1>Registration</h1>
<p>By default, szurubooru is shipped as an invite-only app. In other words, <p>By default, szurubooru is shipped as an invite-only app. In other words,
in order to use the service, you need to register and have someone inside in order to use the service, you need to register and have someone inside
accept your registration. The e-mail you enter during account creation is accept your registration. The e-mail you enter during account creation is
only used to retrieve your Gravatar and activate your account. Only you can only used to retrieve your Gravatar and activate your account. Only you can
see it (well, except the database staff&hellip; we won&rsquo;t spam your see it (well, except the database staff&hellip; we won&rsquo;t spam your
mailbox anyway).</p> mailbox anyway).</p>
<p>Oh, and you can delete your account at any time. Posts you uploaded will <p>Oh, and you can delete your account at any time. Posts you uploaded will
stay, unless some angry admin removes them.</p> stay, unless some angry admin removes them.</p>
</div> </div>
<div data-tab="keyboard"> <div data-tab="keyboard">
<h1>Keyboard shortcuts</h1> <h1>Keyboard shortcuts</h1>
<p>You can use your keyboard to navigate around the site. There are a few <p>You can use your keyboard to navigate around the site. There are a few
shortcuts:</p> shortcuts:</p>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Hotkey</th> <th>Hotkey</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td><code>[Q]</code></td> <td><code>[Q]</code></td>
<td>Focus search field, if available</td> <td>Focus search field, if available</td>
</tr> </tr>
<tr> <tr>
<td><code>[A]</code> and <code>[D]</code></td> <td><code>[A]</code> and <code>[D]</code></td>
<td>Go to newer/older page or post</td> <td>Go to newer/older page or post</td>
</tr> </tr>
<tr> <tr>
<td><code>[F]</code></td> <td><code>[F]</code></td>
<td>Toggle full post size</td> <td>Toggle full post size</td>
</tr> </tr>
<tr> <tr>
<td><code>[E]</code></td> <td><code>[E]</code></td>
<td>Edit post</td> <td>Edit post</td>
</tr> </tr>
<tr> <tr>
<td><code>[P]</code></td> <td><code>[P]</code></td>
<td>Focus first post in post list</td> <td>Focus first post in post list</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>Additionally, each item in top navigation can be accessed using feature <p>Additionally, each item in top navigation can be accessed using feature
called &ldquo;access keys&rdquo;. Pressing underlined letter while holding called &ldquo;access keys&rdquo;. Pressing underlined letter while holding
Shfit or Alt+Shift (depending on your browser) will go to the desired page Shfit or Alt+Shift (depending on your browser) will go to the desired page
(most browsers) or focus the link (IE).</p> (most browsers) or focus the link (IE).</p>
</div> </div>
<div data-tab="search-syntax"> <div data-tab="search-syntax">
<h1>Search syntax</h1> <h1>Search syntax</h1>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Command</th> <th>Command</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% <%
var table = [ var table = [
{search: 'Haruhi', description: 'containing tag &ldquo;Haruhi&rdquo;'}, {search: 'Haruhi', description: 'containing tag &ldquo;Haruhi&rdquo;'},
{search: '-Kyon', description: 'not containing tag &ldquo;Kyon&rdquo;'}, {search: '-Kyon', description: 'not containing tag &ldquo;Kyon&rdquo;'},
{search: 'uploader:David', description: 'uploaded by user David'}, {search: 'uploader:David', description: 'uploaded by user David'},
{search: 'comment:David', description: 'commented by David'}, {search: 'comment:David', description: 'commented by David'},
{search: 'fav:David', description: 'favorited by David'}, {search: 'fav:David', description: 'favorited by David'},
{search: 'fav_count:4', description: 'favorited by exactly four users'}, {search: 'fav_count:4', description: 'favorited by exactly four users'},
{search: 'fav_count:4,5', description: 'favorited by four or five users'}, {search: 'fav_count:4,5', description: 'favorited by four or five users'},
{search: 'fav_count:4..', description: 'favorited by at least four users'}, {search: 'fav_count:4..', description: 'favorited by at least four users'},
{search: 'fav_count:..4', description: 'favorited by at most four users'}, {search: 'fav_count:..4', description: 'favorited by at most four users'},
{search: 'fav_count:4..6', description: 'favorited by at least four, but no more than six users'}, {search: 'fav_count:4..6', description: 'favorited by at least four, but no more than six users'},
{search: 'comment_count:3', description: 'having exactly three comments'}, {search: 'comment_count:3', description: 'having exactly three comments'},
{search: 'score:4', description: 'having score of 4'}, {search: 'score:4', description: 'having score of 4'},
{search: 'tag_count:7', description: 'tagged with exactly seven tags'}, {search: 'tag_count:7', description: 'tagged with exactly seven tags'},
{search: 'date:today', description: 'posted today'}, {search: 'date:today', description: 'posted today'},
{search: 'date:yesterday', description: 'posted yesterday'}, {search: 'date:yesterday', description: 'posted yesterday'},
{search: 'date:2000', description: 'posted in year 2000'}, {search: 'date:2000', description: 'posted in year 2000'},
{search: 'date:2000-01', description: 'posted in January, 2000'}, {search: 'date:2000-01', description: 'posted in January, 2000'},
{search: 'date:2000-01-01', description: 'posted on January 1st, 2000'}, {search: 'date:2000-01-01', description: 'posted on January 1st, 2000'},
{search: 'id:1', description: 'having specific post ID'}, {search: 'id:1', description: 'having specific post ID'},
{search: 'name:<em>hash</em>', description: 'having specific post name (hash in full URLs)'}, {search: 'name:<em>hash</em>', description: 'having specific post name (hash in full URLs)'},
{search: 'type:image', description: 'only image posts'}, {search: 'type:image', description: 'only image posts'},
{search: 'type:flash', description: 'only Flash posts'}, {search: 'type:flash', description: 'only Flash posts'},
{search: 'type:youtube', description: 'only Youtube posts'}, {search: 'type:youtube', description: 'only Youtube posts'},
{search: 'type:video', description: 'only video posts'}, {search: 'type:video', description: 'only video posts'},
{search: 'special:liked', description: 'posts liked by currently logged in user'}, {search: 'special:liked', description: 'posts liked by currently logged in user'},
{search: 'special:disliked', description: 'posts disliked by currently logged in user'}, {search: 'special:disliked', description: 'posts disliked by currently logged in user'},
{search: 'special:fav', description: 'posts added to favorites by currently logged in user'}, {search: 'special:fav', description: 'posts added to favorites by currently logged in user'},
]; ];
_.each(table, function(row) { %> _.each(table, function(row) { %>
<tr> <tr>
<td><a href="#/posts/query=<%= row.search %>"><code><%= row.search %></code></a></td> <td><a href="#/posts/query=<%= row.search %>"><code><%= row.search %></code></a></td>
<td><%= row.description %></td> <td><%= row.description %></td>
</tr> </tr>
<% }) %> <% }) %>
</tbody> </tbody>
</table> </table>
<p>Most of the commands support ranged and composites values, e.g. <p>Most of the commands support ranged and composites values, e.g.
<code>id:<em>number</em></code> operator supports respectively <a <code>id:<em>number</em></code> operator supports respectively <a
href="#/posts/query=id:5..7"><code>id:5..7</code></a> and <a href="#/posts/query=id:5..7"><code>id:5..7</code></a> and <a
href="#/posts/query=id:5,10,15"><code>id:5,10,15</code></a>. You can href="#/posts/query=id:5,10,15"><code>id:5,10,15</code></a>. You can
combine tags and negate any of them for interesting results. <a combine tags and negate any of them for interesting results. <a
href="#/posts/query=sea -fav_count:..8 type:flash href="#/posts/query=sea -fav_count:..8 type:flash
uploader:Pirate"><code>sea -fav_count:8.. type:swf uploader:Pirate"><code>sea -fav_count:8.. type:swf
uploader:Pirate</code></a> will show you flash files tagged as sea, that uploader:Pirate</code></a> will show you flash files tagged as sea, that
were liked by seven people at most, uploaded by user Pirate.</p> were liked by seven people at most, uploaded by user Pirate.</p>
<p>All of the above can be sorted using additional tag in form of <p>All of the above can be sorted using additional tag in form of
<code>order:<em>keyword</em></code>:</p> <code>order:<em>keyword</em></code>:</p>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Command</th> <th>Command</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% <%
var table = [ var table = [
{search: 'order:random', description: 'as random as it can get'}, {search: 'order:random', description: 'as random as it can get'},
{search: 'order:id', description: 'highest to lowest post ID (default browse view)'}, {search: 'order:id', description: 'highest to lowest post ID (default browse view)'},
{search: 'order:date', description: 'newest to oldest (pretty much same as above)'}, {search: 'order:date', description: 'newest to oldest (pretty much same as above)'},
{search: '-order:date', description: 'oldest to newest'}, {search: '-order:date', description: 'oldest to newest'},
{search: 'order:date,asc', description: 'oldest to newest (ascending order, default = descending)'}, {search: 'order:date,asc', description: 'oldest to newest (ascending order, default = descending)'},
{search: 'order:score', description: 'highest scored'}, {search: 'order:score', description: 'highest scored'},
{search: 'order:file_size', description: 'largest files first'}, {search: 'order:file_size', description: 'largest files first'},
{search: 'order:tag_count', description: 'with most tags'}, {search: 'order:tag_count', description: 'with most tags'},
{search: 'order:fav_count', description: 'loved by most'}, {search: 'order:fav_count', description: 'loved by most'},
{search: 'order:comment_count', description: 'most commented first'}, {search: 'order:comment_count', description: 'most commented first'},
{search: 'order:fav_date', description: 'recently added to favorites'}, {search: 'order:fav_date', description: 'recently added to favorites'},
{search: 'order:comment_date', description: 'recently commented'}, {search: 'order:comment_date', description: 'recently commented'},
{search: 'order:feature_date', description: 'recently featured'}, {search: 'order:feature_date', description: 'recently featured'},
]; ];
_.each(table, function(row) { %> _.each(table, function(row) { %>
<tr> <tr>
<td><a href="#/posts/query=<%= row.search %>"><code><%= row.search %></code></a></td> <td><a href="#/posts/query=<%= row.search %>"><code><%= row.search %></code></a></td>
<td><%= row.description %></td> <td><%= row.description %></td>
</tr> </tr>
<% }) %> <% }) %>
</tbody> </tbody>
</table> </table>
<p>As shown with <a <p>As shown with <a
href="#/posts/query=-order:date"><code>-order:date</code></a>, any of them href="#/posts/query=-order:date"><code>-order:date</code></a>, any of them
can be reversed in the same way as negating other tags: by placing a dash can be reversed in the same way as negating other tags: by placing a dash
before the tag.</p> before the tag.</p>
</div> </div>
<div data-tab="comments"> <div data-tab="comments">
<h1>Comments</h1> <h1>Comments</h1>
<p>Comments support Markdown syntax, extended by some handy tags:</p> <p>Comments support Markdown syntax, extended by some handy tags:</p>
<table> <table>
<tbody> <tbody>
<tr> <tr>
<td><code>@426</code></td> <td><code>@426</code></td>
<td>links to post number 426</td> <td>links to post number 426</td>
</tr> </tr>
<tr> <tr>
<td><code>#Dragon_Ball</code></td> <td><code>#Dragon_Ball</code></td>
<td>links to tag &ldquo;Dragon_Ball&rdquo;</td> <td>links to tag &ldquo;Dragon_Ball&rdquo;</td>
</tr> </tr>
<tr> <tr>
<td><code>+Pirate</code></td> <td><code>+Pirate</code></td>
<td>links to user &ldquo;Pirate&rdquo;</td> <td>links to user &ldquo;Pirate&rdquo;</td>
</tr> </tr>
<tr> <tr>
<td><code>~~new~~</code></td> <td><code>~~new~~</code></td>
<td>adds strike-through</td> <td>adds strike-through</td>
</tr> </tr>
<tr> <tr>
<td><code>[spoiler]Lelouch survives[/spoiler]</td> <td><code>[spoiler]Lelouch survives[/spoiler]</td>
<td>marks text as spoiler and hides it</td> <td>marks text as spoiler and hides it</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div data-tab="tos"> <div data-tab="tos">
<h1>Terms of service</h1> <h1>Terms of service</h1>
<p>By accessing <%= title %> (&ldquo;Site&rdquo;) you agree to the <p>By accessing <%= title %> (&ldquo;Site&rdquo;) you agree to the
following Terms of Service. If you do not agree to these terms, then please following Terms of Service. If you do not agree to these terms, then please
do not access the Site.</p> do not access the Site.</p>
<ul> <ul>
<li>The Site is presented to you AS IS, without any warranty, express <li>The Site is presented to you AS IS, without any warranty, express
or implied. You will not hold the Site or its staff members liable for or implied. You will not hold the Site or its staff members liable for
damages caused by the use of the site.</li> damages caused by the use of the site.</li>
<li>The Site reserves the right to delete or modify your account, or <li>The Site reserves the right to delete or modify your account, or
any content you have posted to the site.</li> any content you have posted to the site.</li>
<li>The Site reserves the right to change these Terms of Service <li>The Site reserves the right to change these Terms of Service
without prior notice.</li> without prior notice.</li>
<li>If you are a minor, then you will not use the Site.</li> <li>If you are a minor, then you will not use the Site.</li>
<li>You are using the Site only for personal use.</li> <li>You are using the Site only for personal use.</li>
<li>You will not spam, troll or offend anyone.</li> <li>You will not spam, troll or offend anyone.</li>
<li>You accept that the Site is not liable for any content that you may stumble upon.</li> <li>You accept that the Site is not liable for any content that you may stumble upon.</li>
</ul> </ul>
<p><strong>Prohibited content</strong></p> <p><strong>Prohibited content</strong></p>
<ul> <ul>
<li>Child pornography: any photograph or photorealistic drawing or <li>Child pornography: any photograph or photorealistic drawing or
movie that depicts children in a sexual manner. This includes nudity, movie that depicts children in a sexual manner. This includes nudity,
explicit sex, implied sex, or sexually persuasive positions.</li> explicit sex, implied sex, or sexually persuasive positions.</li>
<li>Bestiality: any photograph or photorealistic drawing or movie that <li>Bestiality: any photograph or photorealistic drawing or movie that
depicts humans having sex (either explicit or implied) with other depicts humans having sex (either explicit or implied) with other
non-human animals.</li> non-human animals.</li>
<li>Any depiction of extreme mutilation, extreme bodily distension, <li>Any depiction of extreme mutilation, extreme bodily distension,
feces.</li> feces.</li>
<li>Personal images: any image that is suspected to be uploaded for <li>Personal images: any image that is suspected to be uploaded for
personal use. This includes, but is not limited to, avatars and forum personal use. This includes, but is not limited to, avatars and forum
signatures.</li> signatures.</li>
</ul> </ul>
<h1>Privacy policy</h1> <h1>Privacy policy</h1>
<p>The Site will not disclose the IP address or email address of any user <p>The Site will not disclose the IP address or email address of any user
except to the staff.</p> except to the staff.</p>
Posts, comments, favorites, ratings and other actions linked to your Posts, comments, favorites, ratings and other actions linked to your
account will be stored in the Site&rsquo;s database. The &ldquo;Upload account will be stored in the Site&rsquo;s database. The &ldquo;Upload
anonymously&rdquo; option allows you to post content without linking it to anonymously&rdquo; option allows you to post content without linking it to
your account&nbsp;&ndash; meaning your nickname will not be stored in the your account&nbsp;&ndash; meaning your nickname will not be stored in the
database nor shown in the &ldquo;Uploader&rdquo; field.</p> database nor shown in the &ldquo;Uploader&rdquo; field.</p>
<p>Cookies are used to store your session data in order to keep you logged <p>Cookies are used to store your session data in order to keep you logged
in and personalize your web experience.</p> in and personalize your web experience.</p>
</div> </div>
</div> </div>

View file

@ -1,82 +1,82 @@
<% <%
var reprValue = function(value) { var reprValue = function(value) {
if (typeof(value) === 'string' || value instanceof String) { if (typeof(value) === 'string' || value instanceof String) {
return value; return value;
} }
return JSON.stringify(value); return JSON.stringify(value);
}; };
var showDifference = function(className, difference) { var showDifference = function(className, difference) {
_.each(difference, function(value, key) { _.each(difference, function(value, key) {
if (!Array.isArray(value)) { if (!Array.isArray(value)) {
value = [value]; value = [value];
} }
_.each(value, function(v) { _.each(value, function(v) {
%><li class="<%= className %> difference-<%= key %>"><%= key + ':' + reprValue(v) %></li><% %><li class="<%= className %> difference-<%= key %>"><%= key + ':' + reprValue(v) %></li><%
}); });
}); });
}; };
%> %>
<table class="history"> <table class="history">
<tbody> <tbody>
<% _.each(history, function( historyEntry) { %> <% _.each(history, function( historyEntry) { %>
<tr> <tr>
<td class="time" title="<%= util.formatAbsoluteTime(historyEntry.time) %>"> <td class="time" title="<%= util.formatAbsoluteTime(historyEntry.time) %>">
<%= util.formatRelativeTime(historyEntry.time) %> <%= util.formatRelativeTime(historyEntry.time) %>
</td> </td>
<td class="user"> <td class="user">
<% var userName = historyEntry.user && historyEntry.user.name || '' %> <% var userName = historyEntry.user && historyEntry.user.name || '' %>
<% if (userName) { %> <% if (userName) { %>
<a href="#/user/<%= userName %>"> <a href="#/user/<%= userName %>">
<% } %> <% } %>
<img width="20" height="20" class="author-avatar" <img width="20" height="20" class="author-avatar"
src="/data/thumbnails/20x20/avatars/<%= userName || '!' %>" src="/data/thumbnails/20x20/avatars/<%= userName || '!' %>"
alt="<%= userName || 'Anonymous user' %>"/> alt="<%= userName || 'Anonymous user' %>"/>
<%= userName || 'Anonymous user' %> <%= userName || 'Anonymous user' %>
<% if (userName) { %> <% if (userName) { %>
</a> </a>
<% } %> <% } %>
</td> </td>
<td class="subject"> <td class="subject">
<% if (historyEntry.type === 0) { %> <% if (historyEntry.type === 0) { %>
<a href="#/post/<%= historyEntry.primaryKey %>"> <a href="#/post/<%= historyEntry.primaryKey %>">
@<%= historyEntry.primaryKey %> @<%= historyEntry.primaryKey %>
</a> </a>
<% } else if (historyEntry.type === 1) { %> <% } else if (historyEntry.type === 1) { %>
<a href="#/tag/<%= historyEntry.data.name %>"> <a href="#/tag/<%= historyEntry.data.name %>">
#<%= historyEntry.data.name %> #<%= historyEntry.data.name %>
</a> </a>
<% } else { %> <% } else { %>
? ?
<% } %> <% } %>
</td> </td>
<td class="difference"> <td class="difference">
<% if (historyEntry.operation == 2) { %> <% if (historyEntry.operation == 2) { %>
deleted deleted
<% } else { %> <% } else { %>
<% if (historyEntry.operation == 0) { %> <% if (historyEntry.operation == 0) { %>
added added
<% } else { %> <% } else { %>
changed changed
<% } %> <% } %>
<% if (historyEntry.dataDifference) { %> <% if (historyEntry.dataDifference) { %>
<ul><!-- <ul><!--
--><% showDifference('addition', historyEntry.dataDifference['+']) %><!-- --><% showDifference('addition', historyEntry.dataDifference['+']) %><!--
--><% showDifference('removal', historyEntry.dataDifference['-']) %><!-- --><% showDifference('removal', historyEntry.dataDifference['-']) %><!--
--></ul> --></ul>
<% } %> <% } %>
<% } %> <% } %>
</td> </td>
</tr> </tr>
<% }) %> <% }) %>
</tbody> </tbody>
</table> </table>

View file

@ -1,69 +1,69 @@
<% function showUser(name) { %> <% function showUser(name) { %>
<% var showLink = typeof(canViewUsers) !== 'undefined' && canViewUsers && name %> <% var showLink = typeof(canViewUsers) !== 'undefined' && canViewUsers && name %>
<% if (showLink) { %> <% if (showLink) { %>
<a href="#/user/<%= name %>"> <a href="#/user/<%= name %>">
<% } %> <% } %>
<img width="25" height="25" class="author-avatar" <img width="25" height="25" class="author-avatar"
src="/data/thumbnails/25x25/avatars/<%= name || '!' %>" src="/data/thumbnails/25x25/avatars/<%= name || '!' %>"
alt="<%= name || 'Anonymous user' %>"/> alt="<%= name || 'Anonymous user' %>"/>
<%= name || 'Anonymous user' %> <%= name || 'Anonymous user' %>
<% if (showLink) { %> <% if (showLink) { %>
</a> </a>
<% } %> <% } %>
<% } %> <% } %>
<div id="home"> <div id="home">
<h1><%= title %></h1> <h1><%= title %></h1>
<p class="subheader"> <p class="subheader">
Serving <%= globals.postCount || 0 %> posts (<%= util.formatFileSize(globals.postSize || 0) %>) Serving <%= globals.postCount || 0 %> posts (<%= util.formatFileSize(globals.postSize || 0) %>)
</p> </p>
<% if (post && post.id) { %> <% if (post && post.id) { %>
<div class="post" style="width: <%= post.imageWidth || 800 %>px"> <div class="post" style="width: <%= post.imageWidth || 800 %>px">
<div id="post-content-target"> <div id="post-content-target">
</div> </div>
<div class="post-footer"> <div class="post-footer">
<span class="left"> <span class="left">
<% var showLink = canViewPosts %> <% var showLink = canViewPosts %>
<% if (showLink) { %> <% if (showLink) { %>
<a href="#/post/<%= post.id %>"> <a href="#/post/<%= post.id %>">
<% } %> <% } %>
<%= post.idMarkdown %> <%= post.idMarkdown %>
<% if (showLink) { %> <% if (showLink) { %>
</a> </a>
<% } %> <% } %>
uploaded uploaded
<%= util.formatRelativeTime(post.uploadTime) %> <%= util.formatRelativeTime(post.uploadTime) %>
by by
<% showUser(post.user.name) %> <% showUser(post.user.name) %>
</span> </span>
<span class="right"> <span class="right">
featured featured
<%= util.formatRelativeTime(post.lastFeatureTime) %> <%= util.formatRelativeTime(post.lastFeatureTime) %>
by by
<% showUser(user.name) %> <% showUser(user.name) %>
</span> </span>
</div> </div>
</div> </div>
<% } %> <% } %>
<p> <p>
<small class="version"> <small class="version">
Version: <a href="//github.com/rr-/szurubooru/commits/master"><%= version %></a> (built <%= util.formatRelativeTime(buildTime) %>) Version: <a href="//github.com/rr-/szurubooru/commits/master"><%= version %></a> (built <%= util.formatRelativeTime(buildTime) %>)
| |
<a href="#/history">Recent tag and post edits</a> <a href="#/history">Recent tag and post edits</a>
</small> </small>
</p> </p>
</div> </div>

View file

@ -1,45 +1,45 @@
<div id="login-form"> <div id="login-form">
<p> <p>
If you don't have an account yet,<br/> If you don't have an account yet,<br/>
<a href="#/register">click here</a> to create a new one. <a href="#/register">click here</a> to create a new one.
</p> </p>
<div class="messages"></div> <div class="messages"></div>
<form class="form-wrapper"> <form class="form-wrapper">
<div class="form-row"> <div class="form-row">
<label class="form-label" for="login-user">User name:</label> <label class="form-label" for="login-user">User name:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="text" name="user" id="login-user"/> <input autocomplete="off" type="text" name="user" id="login-user"/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="login-password">Password:</label> <label class="form-label" for="login-password">Password:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="password" name="password" id="login-password"/> <input autocomplete="off" type="password" name="password" id="login-password"/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit">Log in</button> <button type="submit">Log in</button>
&nbsp; &nbsp;
<input type="checkbox" name="remember" id="login-remember"/> <input type="checkbox" name="remember" id="login-remember"/>
<label for="login-remember"> <label for="login-remember">
Remember me Remember me
</label> </label>
</div> </div>
</div> </div>
</form> </form>
<div class="help"> <div class="help">
<p>Problems logging in?</p> <p>Problems logging in?</p>
<ul> <ul>
<li><a href="#/password-reset">I don't remember my password</a></li> <li><a href="#/password-reset">I don't remember my password</a></li>
<li><a href="#/activate">I haven't received activation e-mail</a></li> <li><a href="#/activate">I haven't received activation e-mail</a></li>
<li><a href="#/register">I don't have an account</a></li> <li><a href="#/register">I don't have an account</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -2,6 +2,6 @@
</div> </div>
<ul class="page-list"> <ul class="page-list">
<li class="prev"><a href="#">Prev</a></li> <li class="prev"><a href="#">Prev</a></li>
<li class="next"><a href="#">Next</a></li> <li class="next"><a href="#">Next</a></li>
</ul> </ul>

View file

@ -1,61 +1,61 @@
<% <%
var postContentUrl = '/data/posts/' + post.name + '?' + Math.round(Math.random() * 1000) /* reset gif animations */ var postContentUrl = '/data/posts/' + post.name + '?' + Math.round(Math.random() * 1000) /* reset gif animations */
var width; var width;
var height; var height;
if (post.contentType === 'image' || post.contentType === 'animation' || post.contentType === 'flash') { if (post.contentType === 'image' || post.contentType === 'animation' || post.contentType === 'flash') {
width = post.imageWidth; width = post.imageWidth;
height = post.imageHeight; height = post.imageHeight;
} else { } else {
width = 800; width = 800;
height = 600; height = 600;
} }
%> %>
<div class="post-content post-type-<%= post.contentType %>"> <div class="post-content post-type-<%= post.contentType %>">
<div class="post-notes-target"> <div class="post-notes-target">
</div> </div>
<div <div
class="object-wrapper" class="object-wrapper"
data-width="<%= width %>" data-width="<%= width %>"
data-height="<%= height %>" data-height="<%= height %>"
style="max-width: <%= width %>px"> style="max-width: <%= width %>px">
<% if (post.contentType === 'image' || post.contentType === 'animation') { %> <% if (post.contentType === 'image' || post.contentType === 'animation') { %>
<img alt="<%= post.name %>" src="<%= postContentUrl %>"/> <img alt="<%= post.name %>" src="<%= postContentUrl %>"/>
<% } else if (post.contentType === 'youtube') { %> <% } else if (post.contentType === 'youtube') { %>
<iframe src="//www.youtube.com/embed/<%= post.contentChecksum %>?wmode=opaque" allowfullscreen></iframe> <iframe src="//www.youtube.com/embed/<%= post.contentChecksum %>?wmode=opaque" allowfullscreen></iframe>
<% } else if (post.contentType === 'flash') { %> <% } else if (post.contentType === 'flash') { %>
<object <object
type="<%= post.contentMimeType %>" type="<%= post.contentMimeType %>"
width="<%= width %>" width="<%= width %>"
height="<%= height %>" height="<%= height %>"
data="<%= postContentUrl %>"> data="<%= postContentUrl %>">
<param name="wmode" value="opaque"/> <param name="wmode" value="opaque"/>
<param name="movie" value="<%= postContentUrl %>"/> <param name="movie" value="<%= postContentUrl %>"/>
</object> </object>
<% } else if (post.contentType === 'video') { %> <% } else if (post.contentType === 'video') { %>
<% if (post.flags.loop) { %> <% if (post.flags.loop) { %>
<video id="video" controls loop="loop"> <video id="video" controls loop="loop">
<% } else { %> <% } else { %>
<video id="video" controls> <video id="video" controls>
<% } %> <% } %>
<source type="<%= post.contentMimeType %>" src="<%= postContentUrl %>"/> <source type="<%= post.contentMimeType %>" src="<%= postContentUrl %>"/>
Your browser doesn't support HTML5 videos. Your browser doesn't support HTML5 videos.
</video> </video>
<% } else { console.log(new Error('Unknown post type')) } %> <% } else { console.log(new Error('Unknown post type')) } %>
<div class="padding-fix" style="padding-bottom: calc(100% * <%= height %> / <%= width %>)"></div> <div class="padding-fix" style="padding-bottom: calc(100% * <%= height %> / <%= width %>)"></div>
</div> </div>
</div> </div>

View file

@ -1,87 +1,87 @@
<form class="form-wrapper post-edit"> <form class="form-wrapper post-edit">
<% if (privileges.canChangeSafety) { %> <% if (privileges.canChangeSafety) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label">Safety:</label> <label class="form-label">Safety:</label>
<div class="form-input"> <div class="form-input">
<input type="radio" id="post-safety-safe" name="safety" value="safe" <%= post.safety === 'safe' ? 'checked="checked"' : '' %>/> <input type="radio" id="post-safety-safe" name="safety" value="safe" <%= post.safety === 'safe' ? 'checked="checked"' : '' %>/>
<label for="post-safety-safe"> <label for="post-safety-safe">
Safe Safe
</label> </label>
<input type="radio" id="post-safety-sketchy" name="safety" value="sketchy" <%= post.safety === 'sketchy' ? 'checked="checked"' : '' %>/> <input type="radio" id="post-safety-sketchy" name="safety" value="sketchy" <%= post.safety === 'sketchy' ? 'checked="checked"' : '' %>/>
<label for="post-safety-sketchy"> <label for="post-safety-sketchy">
Sketchy Sketchy
</label> </label>
<input type="radio" id="post-safety-unsafe" name="safety" value="unsafe" <%= post.safety === 'unsafe' ? 'checked="checked"' : '' %>/> <input type="radio" id="post-safety-unsafe" name="safety" value="unsafe" <%= post.safety === 'unsafe' ? 'checked="checked"' : '' %>/>
<label for="post-safety-unsafe"> <label for="post-safety-unsafe">
Unsafe Unsafe
</label> </label>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (privileges.canChangeTags) { %> <% if (privileges.canChangeTags) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-tags">Tags:</label> <label class="form-label" for="post-tags">Tags:</label>
<div class="form-input"> <div class="form-input">
<input type="text" name="tags" id="post-tags" placeholder="Enter some tags&hellip;" value="<%= _.pluck(post.tags, 'name').join(' ') %>"/> <input type="text" name="tags" id="post-tags" placeholder="Enter some tags&hellip;" value="<%= _.pluck(post.tags, 'name').join(' ') %>"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (privileges.canChangeSource) { %> <% if (privileges.canChangeSource) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-source">Source:</label> <label class="form-label" for="post-source">Source:</label>
<div class="form-input"> <div class="form-input">
<input maxlength="200" type="text" name="source" id="post-source" placeholder="Where did you get this? (optional)" value="<%= post.source %>"/> <input maxlength="200" type="text" name="source" id="post-source" placeholder="Where did you get this? (optional)" value="<%= post.source %>"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (privileges.canChangeRelations) { %> <% if (privileges.canChangeRelations) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-relations">Relations:</label> <label class="form-label" for="post-relations">Relations:</label>
<div class="form-input"> <div class="form-input">
<input maxlength="200" type="text" name="relations" id="post-relations" placeholder="Post ids, separated with space" value="<%= _.pluck(post.relations, 'id').join(' ') %>"/> <input maxlength="200" type="text" name="relations" id="post-relations" placeholder="Post ids, separated with space" value="<%= _.pluck(post.relations, 'id').join(' ') %>"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (privileges.canChangeFlags && post.contentType === 'video') { %> <% if (privileges.canChangeFlags && post.contentType === 'video') { %>
<div class="form-row"> <div class="form-row">
<label class="form-label">Loop:</label> <label class="form-label">Loop:</label>
<div class="form-input"> <div class="form-input">
<input type="checkbox" id="post-loop" name="loop" value="loop" <%= post.flags.loop ? 'checked="checked"' : '' %>/> <input type="checkbox" id="post-loop" name="loop" value="loop" <%= post.flags.loop ? 'checked="checked"' : '' %>/>
<label for="post-loop"> <label for="post-loop">
Automatically repeat video after playback Automatically repeat video after playback
</label> </label>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (privileges.canChangeContent) { %> <% if (privileges.canChangeContent) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-content">Content:</label> <label class="form-label" for="post-content">Content:</label>
<div class="form-input"> <div class="form-input">
<input type="file" id="post-content" name="content"/> <input type="file" id="post-content" name="content"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<% if (privileges.canChangeThumbnail) { %> <% if (privileges.canChangeThumbnail) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-thumbnail">Thumbnail:</label> <label class="form-label" for="post-thumbnail">Thumbnail:</label>
<div class="form-input"> <div class="form-input">
<input type="file" id="post-thumbnail" name="thumbnail"/> <input type="file" id="post-thumbnail" name="thumbnail"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit">Update</button> <button type="submit">Update</button>
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,49 +1,49 @@
<div class="post-small post-type-<%= post.contentType %> "> <div class="post-small post-type-<%= post.contentType %> ">
<% if (canViewPosts) { %> <% if (canViewPosts) { %>
<a class="link" <a class="link"
href="<%= util.appendComplexRouteParam('#/post/' + post.id, util.simplifySearchQuery(typeof(query) !== 'undefined' ? query : {})) %>" href="<%= util.appendComplexRouteParam('#/post/' + post.id, util.simplifySearchQuery(typeof(query) !== 'undefined' ? query : {})) %>"
title="<%= _.map(post.tags, function(tag) { return '#' + tag.name; }).join(', ') %>"> title="<%= _.map(post.tags, function(tag) { return '#' + tag.name; }).join(', ') %>">
<% } else { %> <% } else { %>
<span class="link"> <span class="link">
<% } %> <% } %>
<img width="160" height="160" class="thumb" src="/data/thumbnails/160x160/posts/<%= post.name %>" alt="<%= post.idMarkdown %>"/> <img width="160" height="160" class="thumb" src="/data/thumbnails/160x160/posts/<%= post.name %>" alt="<%= post.idMarkdown %>"/>
<% if (post.favoriteCount || post.score || post.commentCount) { %> <% if (post.favoriteCount || post.score || post.commentCount) { %>
<div class="info"> <div class="info">
<ul> <ul>
<% if (post.favoriteCount) { %> <% if (post.favoriteCount) { %>
<li> <li>
<i class="fa fa-heart"></i> <i class="fa fa-heart"></i>
<%= post.favoriteCount %> <%= post.favoriteCount %>
</li> </li>
<% } %> <% } %>
<% if (post.score) { %> <% if (post.score) { %>
<li> <li>
<i class="fa fa-thumbs-up"></i> <i class="fa fa-thumbs-up"></i>
<%= post.score %> <%= post.score %>
</li> </li>
<% } %> <% } %>
<% if (post.commentCount) { %> <% if (post.commentCount) { %>
<li> <li>
<i class="fa fa-comments"></i> <i class="fa fa-comments"></i>
<%= post.commentCount %> <%= post.commentCount %>
</li> </li>
<% } %> <% } %>
</ul> </ul>
</div> </div>
<% } %> <% } %>
<% if (canViewPosts) { %> <% if (canViewPosts) { %>
</a> </a>
<% } else { %> <% } else { %>
</span> </span>
<% } %> <% } %>
<div class="action"> <div class="action">
<button>Action</button> <button>Action</button>
</div> </div>
</div> </div>

View file

@ -1,32 +1,32 @@
<div class="post-list"> <div class="post-list">
<form class="search"> <form class="search">
<input type="text" name="query" placeholder="Search query..."/> <input type="text" name="query" placeholder="Search query..."/>
<button type="submit" name="search">Search</button> <button type="submit" name="search">Search</button>
<ul class="safety"> <ul class="safety">
<li> <li>
<button class="safety-safe <%= browsingSettings.listPosts.safe ? '' : 'disabled' %>">&nbsp;</button> <button class="safety-safe <%= browsingSettings.listPosts.safe ? '' : 'disabled' %>">&nbsp;</button>
</li> </li>
<li> <li>
<button class="safety-sketchy <%= browsingSettings.listPosts.sketchy ? '' : 'disabled' %>">&nbsp;</button> <button class="safety-sketchy <%= browsingSettings.listPosts.sketchy ? '' : 'disabled' %>">&nbsp;</button>
</li> </li>
<li> <li>
<button class="safety-unsafe <%= browsingSettings.listPosts.unsafe ? '' : 'disabled' %>">&nbsp;</button> <button class="safety-unsafe <%= browsingSettings.listPosts.unsafe ? '' : 'disabled' %>">&nbsp;</button>
</li> </li>
</ul> </ul>
<% if (privileges.canMassTag) { %> <% if (privileges.canMassTag) { %>
<div class="mass-tag-wrapper"> <div class="mass-tag-wrapper">
<p class="mass-tag-info">Tagging with <span class="mass-tag"><%= massTag %></span></p><!-- <p class="mass-tag-info">Tagging with <span class="mass-tag"><%= massTag %></span></p><!--
--><button name="mass-tag">Mass tag</button> --><button name="mass-tag">Mass tag</button>
</div> </div>
<% } %> <% } %>
</form> </form>
<div class="pagination-target"> <div class="pagination-target">
<div class="wrapper"> <div class="wrapper">
<ul class="posts"> <ul class="posts">
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,31 +1,31 @@
<div class="post-notes"> <div class="post-notes">
<% _.each(notes, function(note) { %> <% _.each(notes, function(note) { %>
<div tabindex="0" class="post-note" <div tabindex="0" class="post-note"
style="left: <%= note.left %>%; style="left: <%= note.left %>%;
top: <%= note.top %>%; top: <%= note.top %>%;
width: <%= note.width %>%; width: <%= note.width %>%;
height: <%= note.height %>%"> height: <%= note.height %>%">
<div class="text-wrapper"> <div class="text-wrapper">
<div class="text"> <div class="text">
<%= util.formatMarkdown(note.text) %> <%= util.formatMarkdown(note.text) %>
</div> </div>
</div> </div>
</div> </div>
<% }) %> <% }) %>
</div> </div>
<form class="post-note-edit"> <form class="post-note-edit">
<textarea></textarea> <textarea></textarea>
<div class="actions"><!-- <div class="actions"><!--
--><% if (privileges.canEditPostNotes) { %><!-- --><% if (privileges.canEditPostNotes) { %><!--
--><button type="submit" name="sender" value="save">Save</button><!-- --><button type="submit" name="sender" value="save">Save</button><!--
--><button type="submit" name="sender" value="preview">Preview</button><!-- --><button type="submit" name="sender" value="preview">Preview</button><!--
--><% } %><!-- --><% } %><!--
--><button type="submit" name="sender" value="cancel">Cancel</button><!-- --><button type="submit" name="sender" value="cancel">Cancel</button><!--
--><% if (privileges.canDeletePostNotes) { %><!-- --><% if (privileges.canDeletePostNotes) { %><!--
--><button type="submit" name="sender" value="remove">Remove</button><!-- --><button type="submit" name="sender" value="remove">Remove</button><!--
--><% } %><!-- --><% } %><!--
--></div> --></div>
</form> </form>

View file

@ -1,146 +1,146 @@
<div id="post-upload-step1"> <div id="post-upload-step1">
<input name="post-content" multiple type="file"/> <input name="post-content" multiple type="file"/>
<div class="url-handler"> <div class="url-handler">
<div class="input-wrapper"> <div class="input-wrapper">
<input type="text" placeholder="Alternatively, paste an URL here." name="url"/> <input type="text" placeholder="Alternatively, paste an URL here." name="url"/>
</div> </div>
<button type="submit">Add URL</button> <button type="submit">Add URL</button>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div id="post-upload-step2"> <div id="post-upload-step2">
<hr> <hr>
<div class="hybrid-view"> <div class="hybrid-view">
<div class="hybrid-window"> <div class="hybrid-window">
<table> <table>
<thead> <thead>
<tr> <tr>
<th class="checkbox"> <th class="checkbox">
<input id="post-upload-select-all" type="checkbox" name="select-all"/> <input id="post-upload-select-all" type="checkbox" name="select-all"/>
<label for="post-upload-select-all"></label> <label for="post-upload-select-all"></label>
</th> </th>
<th class="thumbnail"></th> <th class="thumbnail"></th>
<th class="tags">Tags</th> <th class="tags">Tags</th>
<th class="safety">Safety</th> <th class="safety">Safety</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
<tfoot> <tfoot>
<tr class="template"> <tr class="template">
<td class="checkbox"> <td class="checkbox">
<input type="checkbox"/> <input type="checkbox"/>
<label></label> <label></label>
</td> </td>
<td class="thumbnail"> <td class="thumbnail">
<a href="#"/> <a href="#"/>
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="Thumbnail"/> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="Thumbnail"/>
</a> </a>
</td> </td>
<td class="tags"></td> <td class="tags"></td>
<td class="safety"><div class="safety-template"></div></td> <td class="safety"><div class="safety-template"></div></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
<ul class="operations"><!-- <ul class="operations"><!--
--><li> --><li>
<button class="post-table-op remove"><i class="fa fa-remove"></i> Remove</button> <button class="post-table-op remove"><i class="fa fa-remove"></i> Remove</button>
</li><!-- </li><!--
--><li> --><li>
<button class="post-table-op previous"><i class="fa fa-chevron-up"></i> Previous</button> <button class="post-table-op previous"><i class="fa fa-chevron-up"></i> Previous</button>
</li><!-- </li><!--
--><li> --><li>
<button class="post-table-op next"><i class="fa fa-chevron-down"></i> Next</button> <button class="post-table-op next"><i class="fa fa-chevron-down"></i> Next</button>
</li><!-- </li><!--
--><li> --><li>
<button class="post-table-op move-up"><i class="fa fa-arrow-up"></i> Move up</button> <button class="post-table-op move-up"><i class="fa fa-arrow-up"></i> Move up</button>
</li><!-- </li><!--
--><li> --><li>
<button class="post-table-op move-down"><i class="fa fa-arrow-down"></i> Move down</button> <button class="post-table-op move-down"><i class="fa fa-arrow-down"></i> Move down</button>
</li><!-- </li><!--
--><li> --><li>
<button class="upload highlight" type="submit"><i class="fa fa-upload"></i> Submit</button> <button class="upload highlight" type="submit"><i class="fa fa-upload"></i> Submit</button>
</li><!-- </li><!--
--><li> --><li>
<button class="stop highlight-red" type="submit"><i class="fa fa-times-circle"></i> Stop</button> <button class="stop highlight-red" type="submit"><i class="fa fa-times-circle"></i> Stop</button>
</li><!-- </li><!--
--></ul> --></ul>
</div> </div>
<div class="hybrid-window"> <div class="hybrid-window">
<div class="messages"></div> <div class="messages"></div>
<div class="form-slider"> <div class="form-slider">
<div class="thumbnail"> <div class="thumbnail">
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="Thumbnail"/> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="Thumbnail"/>
<a href="#" target="_blank">Open preview in a new tab</a> <a href="#" target="_blank">Open preview in a new tab</a>
</div> </div>
<form class="form-wrapper"> <form class="form-wrapper">
<div class="form-row file-name"> <div class="form-row file-name">
<label class="form-label">File:</label> <label class="form-label">File:</label>
<div class="form-input"> <div class="form-input">
<strong>filename.jpg</strong> <strong>filename.jpg</strong>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label">Safety:</label> <label class="form-label">Safety:</label>
<div class="form-input"> <div class="form-input">
<input type="radio" id="post-safety-safe" name="safety" value="safe"/> <input type="radio" id="post-safety-safe" name="safety" value="safe"/>
<label for="post-safety-safe"> <label for="post-safety-safe">
Safe Safe
</label> </label>
<input type="radio" id="post-safety-sketchy" name="safety" value="sketchy"/> <input type="radio" id="post-safety-sketchy" name="safety" value="sketchy"/>
<label for="post-safety-sketchy"> <label for="post-safety-sketchy">
Sketchy Sketchy
</label> </label>
<input type="radio" id="post-safety-unsafe" name="safety" value="unsafe"/> <input type="radio" id="post-safety-unsafe" name="safety" value="unsafe"/>
<label for="post-safety-unsafe"> <label for="post-safety-unsafe">
Unsafe Unsafe
</label> </label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-tags">Tags:</label> <label class="form-label" for="post-tags">Tags:</label>
<div class="form-input"> <div class="form-input">
<input type="text" name="tags" id="post-tags" placeholder="Enter some tags&hellip;" value=""/> <input type="text" name="tags" id="post-tags" placeholder="Enter some tags&hellip;" value=""/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-source">Source:</label> <label class="form-label" for="post-source">Source:</label>
<div class="form-input"> <div class="form-input">
<input maxlength="200" type="text" name="source" id="post-source" placeholder="Where did you get this? (optional)" value=""/> <input maxlength="200" type="text" name="source" id="post-source" placeholder="Where did you get this? (optional)" value=""/>
</div> </div>
</div> </div>
<% if (canUploadPostsAnonymously) { %> <% if (canUploadPostsAnonymously) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="post-anonymous">Anonymity:</label> <label class="form-label" for="post-anonymous">Anonymity:</label>
<div class="form-input"> <div class="form-input">
<input type="checkbox" id="post-anonymous" name="anonymous"/> <input type="checkbox" id="post-anonymous" name="anonymous"/>
<label for="post-anonymous"> <label for="post-anonymous">
Don't show my name in this post Don't show my name in this post
</label> </label>
</div> </div>
</div> </div>
<% } %> <% } %>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,288 +1,288 @@
<% var permaLink = (window.location.origin + '/' + window.location.pathname + '/data/posts/' + post.name).replace(/([^:])\/+/g, '$1/') %> <% var permaLink = (window.location.origin + '/' + window.location.pathname + '/data/posts/' + post.name).replace(/([^:])\/+/g, '$1/') %>
<div id="post-current-search-wrapper"> <div id="post-current-search-wrapper">
<div id="post-current-search"> <div id="post-current-search">
<div class="left"> <div class="left">
<a class="enabled"> <a class="enabled">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
Next Next
</a> </a>
</div> </div>
<div class="search"> <div class="search">
<a class="enabled" href="<%= util.appendComplexRouteParam('#/posts', util.simplifySearchQuery({query: query.query, order: query.order})) %>"> <a class="enabled" href="<%= util.appendComplexRouteParam('#/posts', util.simplifySearchQuery({query: query.query, order: query.order})) %>">
Current search: <%= query.query || '-' %> Current search: <%= query.query || '-' %>
</a> </a>
</div> </div>
<div class="right"> <div class="right">
<a class="enabled"> <a class="enabled">
Previous Previous
<i class="fa fa-chevron-right"></i> <i class="fa fa-chevron-right"></i>
</a> </a>
</div> </div>
</div> </div>
</div> </div>
<div id="post-view-wrapper"> <div id="post-view-wrapper">
<div id="sidebar"> <div id="sidebar">
<ul class="essential"> <ul class="essential">
<% if (post.contentType !== 'youtube') { %> <% if (post.contentType !== 'youtube') { %>
<li> <li>
<a class="download" href="<%= permaLink %>"> <a class="download" href="<%= permaLink %>">
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
<br/> <br/>
<%= post.contentExtension + ', ' + util.formatFileSize(post.originalFileSize) %> <%= post.contentExtension + ', ' + util.formatFileSize(post.originalFileSize) %>
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (isLoggedIn) { %> <% if (isLoggedIn) { %>
<li> <li>
<% if (hasFav) { %> <% if (hasFav) { %>
<a class="delete-favorite" href="#"> <a class="delete-favorite" href="#">
<i class="fa fa-heart"></i> <i class="fa fa-heart"></i>
</a> </a>
<% } else { %> <% } else { %>
<a class="add-favorite" href="#"> <a class="add-favorite" href="#">
<i class="fa fa-heart-o"></i> <i class="fa fa-heart-o"></i>
</a> </a>
<% } %> <% } %>
</li> </li>
<li> <li>
<a class="score-up <% print(ownScore === 1 ? 'active' : '') %>" href="#"> <a class="score-up <% print(ownScore === 1 ? 'active' : '') %>" href="#">
<% if (ownScore === 1) { %> <% if (ownScore === 1) { %>
<i class="fa fa-thumbs-up"></i> <i class="fa fa-thumbs-up"></i>
<% } else { %> <% } else { %>
<i class="fa fa-thumbs-o-up"></i> <i class="fa fa-thumbs-o-up"></i>
<% } %> <% } %>
</a> </a>
</li> </li>
<li> <li>
<a class="score-down <% print(ownScore === -1 ? 'active' : '') %>" href="#"> <a class="score-down <% print(ownScore === -1 ? 'active' : '') %>" href="#">
<% if (ownScore === -1) { %> <% if (ownScore === -1) { %>
<i class="fa fa-thumbs-down"></i> <i class="fa fa-thumbs-down"></i>
<% } else { %> <% } else { %>
<i class="fa fa-thumbs-o-down"></i> <i class="fa fa-thumbs-o-down"></i>
<% } %> <% } %>
</a> </a>
</li> </li>
<% } %> <% } %>
</ul> </ul>
<h1>Tags (<%= _.size(post.tags) %>)</h1> <h1>Tags (<%= _.size(post.tags) %>)</h1>
<ul class="tags"> <ul class="tags">
<% _.each(post.tags, function(tag) { %> <% _.each(post.tags, function(tag) { %>
<li class="tag-category-<%= tag.category %>"><!-- <li class="tag-category-<%= tag.category %>"><!--
--><a class="tag-edit" href="#/tag/<%= tag.name %>"><!-- --><a class="tag-edit" href="#/tag/<%= tag.name %>"><!--
--><i class="fa fa-tag"></i><!-- --><i class="fa fa-tag"></i><!--
--></a><!-- --></a><!--
--><a class="post-search" href="#/posts/query=<%= tag.name %>"><!-- --><a class="post-search" href="#/posts/query=<%= tag.name %>"><!--
--><span class="tag-name"><%= tag.name %></span><!-- --><span class="tag-name"><%= tag.name %></span><!--
--><span class="usages"><%= (tag.usages) %></span> --><span class="usages"><%= (tag.usages) %></span>
</a> </a>
</li> </li>
<% }) %> <% }) %>
</ul> </ul>
<h1>Details</h1> <h1>Details</h1>
<div class="author-box"> <div class="author-box">
<% if (post.user.name) { %> <% if (post.user.name) { %>
<a href="#/user/<%= post.user.name %>"> <a href="#/user/<%= post.user.name %>">
<% } %> <% } %>
<img width="40" height="40" class="author-avatar" <img width="40" height="40" class="author-avatar"
src="/data/thumbnails/40x40/avatars/<%= post.user.name || '!' %>" src="/data/thumbnails/40x40/avatars/<%= post.user.name || '!' %>"
alt="<%= post.user.name || 'Anonymous user' %>"/> alt="<%= post.user.name || 'Anonymous user' %>"/>
<span class="author-name"> <span class="author-name">
<%= post.user.name || 'Anonymous user' %> <%= post.user.name || 'Anonymous user' %>
</span> </span>
<% if (post.user.name) { %> <% if (post.user.name) { %>
</a> </a>
<% } %> <% } %>
<br/> <br/>
<span class="date" title="<%= util.formatAbsoluteTime(post.uploadTime) %>"> <span class="date" title="<%= util.formatAbsoluteTime(post.uploadTime) %>">
<%= util.formatRelativeTime(post.uploadTime) %> <%= util.formatRelativeTime(post.uploadTime) %>
</span> </span>
</div> </div>
<ul class="other-info"> <ul class="other-info">
<li> <li>
Rating: Rating:
<span class="safety-<%= post.safety %>"> <span class="safety-<%= post.safety %>">
<%= post.safety %> <%= post.safety %>
</span> </span>
</li> </li>
<% if (post.originalFileSize) { %> <% if (post.originalFileSize) { %>
<li> <li>
File size: File size:
<%= util.formatFileSize(post.originalFileSize) %> <%= util.formatFileSize(post.originalFileSize) %>
</li> </li>
<% } %> <% } %>
<% if (post.contentType == 'image') { %> <% if (post.contentType == 'image') { %>
<li> <li>
Image size: Image size:
<%= post.imageWidth + 'x' + post.imageHeight %> <%= post.imageWidth + 'x' + post.imageHeight %>
</li> </li>
<% } %> <% } %>
<% if (post.lastEditTime !== post.uploadTime) { %> <% if (post.lastEditTime !== post.uploadTime) { %>
<li> <li>
Edited: Edited:
<span title="<%= util.formatAbsoluteTime(post.lastEditTime) %>"> <span title="<%= util.formatAbsoluteTime(post.lastEditTime) %>">
<%= util.formatRelativeTime(post.lastEditTime) %> <%= util.formatRelativeTime(post.lastEditTime) %>
</span> </span>
</li> </li>
<% } %> <% } %>
<% if (post.featureCount > 0) { %> <% if (post.featureCount > 0) { %>
<li> <li>
Featured: <%= post.featureCount %> <%= post.featureCount < 2 ? 'time' : 'times' %> Featured: <%= post.featureCount %> <%= post.featureCount < 2 ? 'time' : 'times' %>
<small>(<%= util.formatRelativeTime(post.lastFeatureTime) %>)</small> <small>(<%= util.formatRelativeTime(post.lastFeatureTime) %>)</small>
</li> </li>
<% } %> <% } %>
<% if (post.source) { %> <% if (post.source) { %>
<li><!-- <li><!--
--><% var link = post.source.match(/^(\/\/|https?:\/\/)/); %><!-- --><% var link = post.source.match(/^(\/\/|https?:\/\/)/); %><!--
-->Source:&nbsp;<!-- -->Source:&nbsp;<!--
--><% if (link) { %><!-- --><% if (link) { %><!--
--><a href="<%= post.source %>"><!-- --><a href="<%= post.source %>"><!--
--><% } %><!-- --><% } %><!--
--><%= post.source.trim() %><!-- --><%= post.source.trim() %><!--
--><% if (link) { %><!-- --><% if (link) { %><!--
--></a><!-- --></a><!--
--><% } %><!-- --><% } %><!--
--></li> --></li>
<% } %> <% } %>
<li> <li>
Score: <%= post.score %> Score: <%= post.score %>
</li> </li>
</ul> </ul>
<% if (_.any(postFavorites)) { %> <% if (_.any(postFavorites)) { %>
<p>Favorites:</p> <p>Favorites:</p>
<ul class="favorites"> <ul class="favorites">
<% _.each(postFavorites, function(user) { %> <% _.each(postFavorites, function(user) { %>
<li> <li>
<a href="#/user/<%= user.name %>"> <a href="#/user/<%= user.name %>">
<img class="fav-avatar" <img class="fav-avatar"
src="/data/thumbnails/25x25/avatars/<%= user.name || '!' %>" src="/data/thumbnails/25x25/avatars/<%= user.name || '!' %>"
alt="<%= user.name || 'Anonymous user' %>"/> alt="<%= user.name || 'Anonymous user' %>"/>
</a> </a>
</li> </li>
<% }) %> <% }) %>
</ul> </ul>
<% } %> <% } %>
<% if (_.any(post.relations)) { %> <% if (_.any(post.relations)) { %>
<h1>Related posts</h1> <h1>Related posts</h1>
<ul class="related"> <ul class="related">
<% _.each(post.relations, function(relatedPost) { %> <% _.each(post.relations, function(relatedPost) { %>
<li> <li>
<a href="#/post/<%= relatedPost.id %>"> <a href="#/post/<%= relatedPost.id %>">
<%= relatedPost.idMarkdown %> <%= relatedPost.idMarkdown %>
</a> </a>
</li> </li>
<% }) %> <% }) %>
</ul> </ul>
<% } %> <% } %>
<% if (_.any(privileges) || _.any(editPrivileges) || post.contentType === 'image') { %> <% if (_.any(privileges) || _.any(editPrivileges) || post.contentType === 'image') { %>
<h1>Options</h1> <h1>Options</h1>
<ul class="operations"> <ul class="operations">
<% if (_.any(editPrivileges)) { %> <% if (_.any(editPrivileges)) { %>
<li> <li>
<a class="edit" href="#"> <a class="edit" href="#">
Edit Edit
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (privileges.canAddPostNotes) { %> <% if (privileges.canAddPostNotes) { %>
<li> <li>
<a class="add-note" href="#"> <a class="add-note" href="#">
Add new note Add new note
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (privileges.canDeletePosts) { %> <% if (privileges.canDeletePosts) { %>
<li> <li>
<a class="delete" href="#"> <a class="delete" href="#">
Delete Delete
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (privileges.canFeaturePosts) { %> <% if (privileges.canFeaturePosts) { %>
<li> <li>
<a class="feature" href="#"> <a class="feature" href="#">
Feature Feature
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (privileges.canViewHistory) { %> <% if (privileges.canViewHistory) { %>
<li> <li>
<a class="history" href="#"> <a class="history" href="#">
History History
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (post.contentType === 'image') { %> <% if (post.contentType === 'image') { %>
<li> <li>
<a href="http://iqdb.org/?url=<%= permaLink %>"> <a href="http://iqdb.org/?url=<%= permaLink %>">
Search on IQDB Search on IQDB
</a> </a>
</li> </li>
<li> <li>
<a href="https://www.google.com/searchbyimage?&image_url=<%= permaLink %>"> <a href="https://www.google.com/searchbyimage?&image_url=<%= permaLink %>">
Search on Google Images Search on Google Images
</a> </a>
</li> </li>
<% } %> <% } %>
</ul> </ul>
<% } %> <% } %>
</div> </div>
<div id="post-view"> <div id="post-view">
<div class="messages"></div> <div class="messages"></div>
<div id="post-edit-target"> <div id="post-edit-target">
</div> </div>
<div id="post-content-target"> <div id="post-content-target">
</div> </div>
<% if (privileges.canViewHistory) { %> <% if (privileges.canViewHistory) { %>
<div class="post-history-wrapper"> <div class="post-history-wrapper">
<h1>History</h1> <h1>History</h1>
<%= historyTemplate({ <%= historyTemplate({
history: postHistory, history: postHistory,
util: util, util: util,
}) %> }) %>
</div> </div>
<% } %> <% } %>
<div id="post-comments-target"> <div id="post-comments-target">
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,50 +1,50 @@
<div id="registration-form"> <div id="registration-form">
<p> <p>
Registered users can view more content,<br/> Registered users can view more content,<br/>
upload files and add posts to favorites. upload files and add posts to favorites.
</p> </p>
<div class="messages"></div> <div class="messages"></div>
<form class="form-wrapper"> <form class="form-wrapper">
<div class="form-row"> <div class="form-row">
<label class="form-label" for="registration-user">User name:</label> <label class="form-label" for="registration-user">User name:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="text" name="userName" id="registration-user" placeholder="e.g. darth_vader" value=""/> <input autocomplete="off" type="text" name="userName" id="registration-user" placeholder="e.g. darth_vader" value=""/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="registration-password">Password:</label> <label class="form-label" for="registration-password">Password:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="password" name="password" id="registration-password" placeholder="e.g. &#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;" value=""/> <input autocomplete="off" type="password" name="password" id="registration-password" placeholder="e.g. &#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;" value=""/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="registration-password-confirmation">Password (repeat):</label> <label class="form-label" for="registration-password-confirmation">Password (repeat):</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="password" name="passwordConfirmation" id="registration-password-confirmation" placeholder="e.g. &#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;" value=""/> <input autocomplete="off" type="password" name="passwordConfirmation" id="registration-password-confirmation" placeholder="e.g. &#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;&#x25cf;" value=""/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="registration-email">E-mail address:</label> <label class="form-label" for="registration-email">E-mail address:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="text" name="email" id="registration-email" placeholder="e.g. vader@empire.gov" value=""/> <input autocomplete="off" type="text" name="email" id="registration-email" placeholder="e.g. vader@empire.gov" value=""/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit">Register</button> <button type="submit">Register</button>
</div> </div>
</div> </div>
</form> </form>
<p id="email-info"> <p id="email-info">
Your e-mail will be used to show your <a href="http://gravatar.com/">Gravatar</a>.<br/> Your e-mail will be used to show your <a href="http://gravatar.com/">Gravatar</a>.<br/>
Leave blank for random Gravatar. Leave blank for random Gravatar.
</p> </p>
</div> </div>

View file

@ -1,21 +1,21 @@
<tr class="tag"> <tr class="tag">
<td class="name tag-category-<%= tag.category %>"> <td class="name tag-category-<%= tag.category %>">
<a href="#/tag/<%= tag.name %>"><%= tag.name %></a> <a href="#/tag/<%= tag.name %>"><%= tag.name %></a>
</td> </td>
<td class="implications"> <td class="implications">
<%= _.pluck(tag.implications, 'name').join(' ') || '-' %> <%= _.pluck(tag.implications, 'name').join(' ') || '-' %>
</td> </td>
<td class="suggestions"> <td class="suggestions">
<%= _.pluck(tag.suggestions, 'name').join(' ') || '-' %> <%= _.pluck(tag.suggestions, 'name').join(' ') || '-' %>
</td> </td>
<td class="usages"> <td class="usages">
<%= tag.usages %> <%= tag.usages %>
</td> </td>
<td class="banned"> <td class="banned">
<% if (tag.banned) { %> <% if (tag.banned) { %>
<i class="fa fa-times"></i> <i class="fa fa-times"></i>
<% } else { %> <% } else { %>
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
<% } %> <% } %>
</td> </td>
</tr> </tr>

View file

@ -1,36 +1,36 @@
<div id="tag-list-wrapper"> <div id="tag-list-wrapper">
<div id="tag-list"> <div id="tag-list">
<div class="search"> <div class="search">
<form> <form>
<input type="text" name="query" placeholder="Search tags..."/> <input type="text" name="query" placeholder="Search tags..."/>
<button type="submit" name="search">Search</button> <button type="submit" name="search">Search</button>
</form> </form>
<ul class="order"> <ul class="order">
<li> <li>
<a class="big-button" href="#/tags/order=name,asc">Tags</a> <a class="big-button" href="#/tags/order=name,asc">Tags</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/tags/order=creation_time,desc">Recent</a> <a class="big-button" href="#/tags/order=creation_time,desc">Recent</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/tags/order=usage_count,desc">Popular</a> <a class="big-button" href="#/tags/order=usage_count,desc">Popular</a>
</li> </li>
</ul> </ul>
</div> </div>
<div class="pagination-target"> <div class="pagination-target">
<table class="tags"> <table class="tags">
<thead> <thead>
<th class="name">Tag name</th> <th class="name">Tag name</th>
<th class="implications">Implications</th> <th class="implications">Implications</th>
<th class="suggestions">Suggestions</th> <th class="suggestions">Suggestions</th>
<th class="usages">Usages</th> <th class="usages">Usages</th>
<th class="banned">Usable?</th> <th class="banned">Usable?</th>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,119 +1,119 @@
<div id="tag-view"> <div id="tag-view">
<div class="header"> <div class="header">
<h1><%= tag.name %></h1> <h1><%= tag.name %></h1>
</div> </div>
<form class="edit"> <form class="edit">
<% if (privileges.canChangeName) { %> <% if (privileges.canChangeName) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="tag-name">Name:</label> <label class="form-label" for="tag-name">Name:</label>
<div class="form-input"> <div class="form-input">
<input maxlength="200" type="text" name="name" id="tag-name" placeholder="New tag name" value="<%= tag.name %>"/> <input maxlength="200" type="text" name="name" id="tag-name" placeholder="New tag name" value="<%= tag.name %>"/>
</div> </div>
</div> </div>
<% } %> <% } %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="tag-implications">Implications:</label> <label class="form-label" for="tag-implications">Implications:</label>
<div class="form-input"> <div class="form-input">
<% if (privileges.canChangeImplications) { %> <% if (privileges.canChangeImplications) { %>
<input maxlength="200" type="text" name="implications" id="tag-implications" placeholder="some tag&hellip;" value="<%= _.pluck(tag.implications, 'name').join(' ') %>"/> <input maxlength="200" type="text" name="implications" id="tag-implications" placeholder="some tag&hellip;" value="<%= _.pluck(tag.implications, 'name').join(' ') %>"/>
<p><small>Added automatically when tagging with <strong><%= tag.name %></strong>.</small></p> <p><small>Added automatically when tagging with <strong><%= tag.name %></strong>.</small></p>
<% } else { %> <% } else { %>
<%= _.pluck(tag.implications, 'name').join(' ') || '-' %></p> <%= _.pluck(tag.implications, 'name').join(' ') || '-' %></p>
<% } %> <% } %>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="tag-suggestions">Suggestions:</label> <label class="form-label" for="tag-suggestions">Suggestions:</label>
<div class="form-input"> <div class="form-input">
<% if (privileges.canChangeSuggestions) { %> <% if (privileges.canChangeSuggestions) { %>
<input maxlength="200" type="text" name="suggestions" id="tag-suggestions" placeholder="some tag&hellip;" value="<%= _.pluck(tag.suggestions, 'name').join(' ') %>"/> <input maxlength="200" type="text" name="suggestions" id="tag-suggestions" placeholder="some tag&hellip;" value="<%= _.pluck(tag.suggestions, 'name').join(' ') %>"/>
<p><small>Suggested when tagging with <strong><%= tag.name %></strong>.</small></p> <p><small>Suggested when tagging with <strong><%= tag.name %></strong>.</small></p>
<% } else { %> <% } else { %>
<%= _.pluck(tag.suggestions, 'name').join(' ') || '-' %> <%= _.pluck(tag.suggestions, 'name').join(' ') || '-' %>
<% } %> <% } %>
</div> </div>
</div> </div>
<% if (privileges.canChangeCategory) { %> <% if (privileges.canChangeCategory) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="tag-category">Category:</label> <label class="form-label" for="tag-category">Category:</label>
<div class="form-input"> <div class="form-input">
<% _.each(_.extend({'default': 'default'}, _.object(tagCategories, tagCategories)), function(v, k) { %> <% _.each(_.extend({'default': 'default'}, _.object(tagCategories, tagCategories)), function(v, k) { %>
<input name="category" type="radio" value="<%= k %>" id="category-<%= k %>" <% print(tag.category === k ? 'checked="checked"' : '') %>> <input name="category" type="radio" value="<%= k %>" id="category-<%= k %>" <% print(tag.category === k ? 'checked="checked"' : '') %>>
<label for="category-<%= k %>"> <label for="category-<%= k %>">
<% print(tag.category === k ? v + ' (current)' : v) %> <% print(tag.category === k ? v + ' (current)' : v) %>
</label> </label>
<br/> <br/>
<% }) %> <% }) %>
</div> </div>
</div> </div>
<% } %> <% } %>
<div class="form-row"> <div class="form-row">
<label class="form-label" for="tag-ban">Ban:</label> <label class="form-label" for="tag-ban">Ban:</label>
<div class="form-input"> <div class="form-input">
<% if (privileges.canBan) { %> <% if (privileges.canBan) { %>
<input name="ban" type="checkbox" id="ban" <% print(tag.banned ? 'checked="checked"' : '') %>> <input name="ban" type="checkbox" id="ban" <% print(tag.banned ? 'checked="checked"' : '') %>>
<label for="ban"> <label for="ban">
Prevent tag from being used Prevent tag from being used
</label> </label>
<% } else { %> <% } else { %>
<%= tag.banned ? 'This is banned and cannot cannot be used in posts.' : 'This tag is not banned and can be used in posts.' %> <%= tag.banned ? 'This is banned and cannot cannot be used in posts.' : 'This tag is not banned and can be used in posts.' %>
<% } %> <% } %>
</div> </div>
</div> </div>
<% if (_.any(privileges)) { %> <% if (_.any(privileges)) { %>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit" name="update">Update</button> <button type="submit" name="update">Update</button>
<% if (privileges.canDelete) { %> <% if (privileges.canDelete) { %>
<button type="submit" name="delete">Delete</button> <button type="submit" name="delete">Delete</button>
<% } %> <% } %>
<% if (privileges.canMerge) { %> <% if (privileges.canMerge) { %>
<button type="submit" name="merge">Merge with&hellip;</button> <button type="submit" name="merge">Merge with&hellip;</button>
<% } %> <% } %>
</div> </div>
</div> </div>
<% } %> <% } %>
</form> </form>
<% if (siblings.length) { %> <% if (siblings.length) { %>
<div class="siblings"> <div class="siblings">
<h3>Siblings</h3> <h3>Siblings</h3>
<ul> <ul>
<% _.each(siblings.slice(0, 50), function(tag) { %> <% _.each(siblings.slice(0, 50), function(tag) { %>
<li class="tag-category-<%= tag.category %>"> <li class="tag-category-<%= tag.category %>">
<a href="#/tag/<%= tag.name %> <a href="#/tag/<%= tag.name %>
"><%= tag.name %> "><%= tag.name %>
</a> </a>
</li> </li>
<% }) %> <% }) %>
</ul> </ul>
</div> </div>
<% } %> <% } %>
<% if (privileges.canViewHistory) { %> <% if (privileges.canViewHistory) { %>
<div class="post-history-wrapper"> <div class="post-history-wrapper">
<h3>History</h3> <h3>History</h3>
<%= historyTemplate({ <%= historyTemplate({
history: tag.history, history: tag.history,
util: util, util: util,
}) %> }) %>
</div> </div>
<% } %> <% } %>
<div class="post-list"> <div class="post-list">
<h3>Example usages</h3> <h3>Example usages</h3>
<ul class="posts"> <ul class="posts">
</ul> </ul>
<a href="#/posts/query=<%= tag.name %>">Search for more</a> <a href="#/posts/query=<%= tag.name %>">Search for more</a>
</div> </div>
</div> </div>

View file

@ -1,101 +1,101 @@
<ul> <ul>
<% <%
var links = []; var links = [];
links.push({ links.push({
target: '#/home', target: '#/home',
title: 'Home', title: 'Home',
icon: 'fa-home'}); icon: 'fa-home'});
if (canListPosts) { if (canListPosts) {
links.push({ links.push({
target: '#/posts', target: '#/posts',
title: 'Posts', title: 'Posts',
icon: 'fa-th'}); icon: 'fa-th'});
if (canUploadPosts) { if (canUploadPosts) {
links.push({ links.push({
target: '#/upload', target: '#/upload',
title: 'Upload', title: 'Upload',
icon: 'fa-upload'}); icon: 'fa-upload'});
} }
} }
if (canListComments) { if (canListComments) {
links.push({ links.push({
target: '#/comments', target: '#/comments',
title: 'Comments', title: 'Comments',
icon: 'fa-comments'}); icon: 'fa-comments'});
} }
if (canListTags) { if (canListTags) {
links.push({ links.push({
target: '#/tags', target: '#/tags',
title: 'Tags', title: 'Tags',
icon: 'fa-tags'}); icon: 'fa-tags'});
} }
if (canListUsers) { if (canListUsers) {
links.push({ links.push({
target: '#/users', target: '#/users',
title: 'Users', title: 'Users',
icon: 'fa-users'}); icon: 'fa-users'});
} }
if (!loggedIn) { if (!loggedIn) {
links.push({ links.push({
target: '#/login', target: '#/login',
title: 'Login', title: 'Login',
icon: 'fa-sign-in'}); icon: 'fa-sign-in'});
links.push({ links.push({
target: '#/register', target: '#/register',
title: 'Register', title: 'Register',
icon: 'fa-file-text-o'}); icon: 'fa-file-text-o'});
} else { } else {
links.push({ links.push({
className: 'my-account', className: 'my-account',
target: '#/user/' + user.name, target: '#/user/' + user.name,
title: 'Account', title: 'Account',
icon: 'fa-user'}); icon: 'fa-user'});
links.push({ links.push({
target: '#/logout', target: '#/logout',
title: 'Logout', title: 'Logout',
icon: 'fa-sign-out'}); icon: 'fa-sign-out'});
} }
links.push({ links.push({
target: '#/help', target: '#/help',
title: 'Help', title: 'Help',
icon: 'fa-question-circle'}); icon: 'fa-question-circle'});
var takenAccessKeys = []; var takenAccessKeys = [];
links = _.map(links, function(link) { links = _.map(links, function(link) {
if (typeof(link.className) === 'undefined') { if (typeof(link.className) === 'undefined') {
link.className = link.title.toLowerCase(); link.className = link.title.toLowerCase();
} }
if (typeof(link.accessKey) === 'undefined') { if (typeof(link.accessKey) === 'undefined') {
for (var i = 0; i < link.title.length; i ++) { for (var i = 0; i < link.title.length; i ++) {
var accessKey = link.title.charAt(i); var accessKey = link.title.charAt(i);
if (!_.contains(takenAccessKeys, accessKey)) { if (!_.contains(takenAccessKeys, accessKey)) {
link.accessKey = accessKey; link.accessKey = accessKey;
takenAccessKeys.push(accessKey); takenAccessKeys.push(accessKey);
break; break;
} }
} }
} }
return link; return link;
}); });
%> %>
<% _.each(links, function(link) { %><!-- <% _.each(links, function(link) { %><!--
--><li class="<%= link.className %>"> --><li class="<%= link.className %>">
<a class="big-button" href="<%= link.target %>" <%= link.accessKey ? 'accessKey="' + link.accessKey + '"' : '' %>> <a class="big-button" href="<%= link.target %>" <%= link.accessKey ? 'accessKey="' + link.accessKey + '"' : '' %>>
<i class="fa <%= link.icon %>"></i><br/> <i class="fa <%= link.icon %>"></i><br/>
<% var pos = link.title.indexOf(link.accessKey) %> <% var pos = link.title.indexOf(link.accessKey) %>
<%= pos === -1 ? link.title : link.title.substring(0, pos) + '<span class="accesskey">' + link.accessKey + '</span>' + link.title.substring(pos + 1) %> <%= pos === -1 ? link.title : link.title.substring(0, pos) + '<span class="accesskey">' + link.accessKey + '</span>' + link.title.substring(pos + 1) %>
</a> </a>
</li><!-- </li><!--
--><% }) %> --><% }) %>
</ul> </ul>

View file

@ -1,29 +1,29 @@
<div class="user"> <div class="user">
<div class="avatar"> <div class="avatar">
<% if (canViewUsers) { %> <% if (canViewUsers) { %>
<a href="#/user/<%= user.name %>"> <a href="#/user/<%= user.name %>">
<% } %> <% } %>
<img width="80" height="80" src="/data/thumbnails/80x80/avatars/<%= user.name %>" alt="<%= user.name %>"/> <img width="80" height="80" src="/data/thumbnails/80x80/avatars/<%= user.name %>" alt="<%= user.name %>"/>
<% if (canViewUsers) { %> <% if (canViewUsers) { %>
</a> </a>
<% } %> <% } %>
</div> </div>
<div class="details"> <div class="details">
<h1> <h1>
<% if (canViewUsers) { %> <% if (canViewUsers) { %>
<a href="#/user/<%= user.name %>"> <a href="#/user/<%= user.name %>">
<%= user.name %> <%= user.name %>
</a> </a>
<% } else { %> <% } else { %>
<%= user.name %> <%= user.name %>
<% } %> <% } %>
</h1> </h1>
<div class="date-joined" title="<%= util.formatAbsoluteTime(user.registrationTime) %>"> <div class="date-joined" title="<%= util.formatAbsoluteTime(user.registrationTime) %>">
Joined: <%= util.formatRelativeTime(user.registrationTime) %> Joined: <%= util.formatRelativeTime(user.registrationTime) %>
</div> </div>
<div class="date-seen" title="<%= util.formatAbsoluteTime(user.lastLoginTime) %>"> <div class="date-seen" title="<%= util.formatAbsoluteTime(user.lastLoginTime) %>">
Last seen: <%= util.formatRelativeTime(user.lastLoginTime) %> Last seen: <%= util.formatRelativeTime(user.lastLoginTime) %>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,21 +1,21 @@
<div id="user-list"> <div id="user-list">
<ul class="order"> <ul class="order">
<li> <li>
<a class="big-button" href="#/users/order=name,asc">Sort A&rarr;Z</a> <a class="big-button" href="#/users/order=name,asc">Sort A&rarr;Z</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/users/order=name,desc">Sort Z&rarr;A</a> <a class="big-button" href="#/users/order=name,desc">Sort Z&rarr;A</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/users/order=registration_time,asc">Sort old&rarr;new</a> <a class="big-button" href="#/users/order=registration_time,asc">Sort old&rarr;new</a>
</li> </li>
<li> <li>
<a class="big-button" href="#/users/order=registration_time,desc">Sort new&rarr;old</a> <a class="big-button" href="#/users/order=registration_time,desc">Sort new&rarr;old</a>
</li> </li>
</ul> </ul>
<div class="pagination-target"> <div class="pagination-target">
<ul class="users"> <ul class="users">
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -1,19 +1,19 @@
<div class="messages"></div> <div class="messages"></div>
<div id="user-query-form"> <div id="user-query-form">
<form class="form-wrapper"> <form class="form-wrapper">
<div class="form-row"> <div class="form-row">
<label class="form-label" for="user-query-user">User name or e-mail:</label> <label class="form-label" for="user-query-user">User name or e-mail:</label>
<div class="form-input"> <div class="form-input">
<input autocomplete="off" type="text" name="user" id="user-query-user"/> <input autocomplete="off" type="text" name="user" id="user-query-user"/>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="form-label"></label> <label class="form-label"></label>
<div class="form-input"> <div class="form-input">
<button type="submit">Continue</button> <button type="submit">Continue</button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>

View file

@ -1,139 +1,139 @@
<div id="user-view" class="tab-wrapper"> <div id="user-view" class="tab-wrapper">
<div class="messages"></div> <div class="messages"></div>
<div class="top"> <div class="top">
<div class="side"> <div class="side">
<img width="100" height="100" src="/data/thumbnails/100x100/avatars/<%= user.name %>" alt="Avatar"/> <img width="100" height="100" src="/data/thumbnails/100x100/avatars/<%= user.name %>" alt="Avatar"/>
<br/> <br/>
<%= user.name %> <%= user.name %>
</div> </div>
<% if ((canChangeBrowsingSettings || canChangeAccountSettings || canDeleteAccount)) { %> <% if ((canChangeBrowsingSettings || canChangeAccountSettings || canDeleteAccount)) { %>
<ul> <ul>
<li> <li>
<a class="big-button" href="#/user/<%= user.name %>" data-tab="basic-info"> <a class="big-button" href="#/user/<%= user.name %>" data-tab="basic-info">
Basic information Basic information
</a> </a>
</li> </li>
<% if (canChangeBrowsingSettings) { %> <% if (canChangeBrowsingSettings) { %>
<li> <li>
<a class="big-button" href="#/user/<%= user.name %>/browsing-settings" data-tab="browsing-settings"> <a class="big-button" href="#/user/<%= user.name %>/browsing-settings" data-tab="browsing-settings">
Browsing settings Browsing settings
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (canChangeAccountSettings) { %> <% if (canChangeAccountSettings) { %>
<li> <li>
<a class="big-button" href="#/user/<%= user.name %>/account-settings" data-tab="account-settings"> <a class="big-button" href="#/user/<%= user.name %>/account-settings" data-tab="account-settings">
Account settings Account settings
</a> </a>
</li> </li>
<% } %> <% } %>
<% if (canDeleteAccount) { %> <% if (canDeleteAccount) { %>
<li> <li>
<a class="big-button" href="#/user/<%= user.name %>/account-removal" data-tab="account-removal"> <a class="big-button" href="#/user/<%= user.name %>/account-removal" data-tab="account-removal">
Account removal Account removal
</a> </a>
</li> </li>
<% } %> <% } %>
</ul> </ul>
<% } %> <% } %>
</div> </div>
<div class="tab basic-info" data-tab="basic-info"> <div class="tab basic-info" data-tab="basic-info">
<h2>Basic information</h2> <h2>Basic information</h2>
<table> <table>
<tr> <tr>
<td>Registered:</td> <td>Registered:</td>
<td title="<%= util.formatAbsoluteTime(user.registrationTime) %>"> <td title="<%= util.formatAbsoluteTime(user.registrationTime) %>">
<%= util.formatRelativeTime(user.registrationTime) %> <%= util.formatRelativeTime(user.registrationTime) %>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Seen:</td> <td>Seen:</td>
<td title="<%= util.formatAbsoluteTime(user.lastLoginTime) %>"> <td title="<%= util.formatAbsoluteTime(user.lastLoginTime) %>">
<%= util.formatRelativeTime(user.lastLoginTime) %> <%= util.formatRelativeTime(user.lastLoginTime) %>
</td> </td>
</tr> </tr>
<% if (user.accessRank) { %> <% if (user.accessRank) { %>
<tr> <tr>
<td>Access rank:</td> <td>Access rank:</td>
<% <%
var accessRanks = { var accessRanks = {
anonymous: 'anonymous', anonymous: 'anonymous',
restrictedUser: 'restricted user', restrictedUser: 'restricted user',
regularUser: 'regular user', regularUser: 'regular user',
powerUser: 'power user', powerUser: 'power user',
moderator: 'moderator', moderator: 'moderator',
administrator: 'administrator' administrator: 'administrator'
}; };
%> %>
<td><%= accessRanks[user.accessRank] %></td> <td><%= accessRanks[user.accessRank] %></td>
</tr> </tr>
<% } %> <% } %>
<tr> <tr>
<td>Quick links:</td> <td>Quick links:</td>
<td> <td>
<ul class="links"> <ul class="links">
<li> <li>
<a href="#/posts/query=fav:<%= user.name %>"> <a href="#/posts/query=fav:<%= user.name %>">
Favorites Favorites
</a> </a>
</li> </li>
<li> <li>
<a href="#/posts/query=uploader:<%= user.name %>"> <a href="#/posts/query=uploader:<%= user.name %>">
Uploads Uploads
</a> </a>
</li> </li>
<% if (isLoggedIn) { %> <% if (isLoggedIn) { %>
<li> <li>
<a href="#/posts/query=special:liked"> <a href="#/posts/query=special:liked">
Upvoted posts Upvoted posts
</a> </a>
</li> </li>
<li> <li>
<a href="#/posts/query=special:disliked"> <a href="#/posts/query=special:disliked">
Downvoted posts Downvoted posts
</a> </a>
</li> </li>
<% } %> <% } %>
</ul> </ul>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<% if (canChangeBrowsingSettings) { %> <% if (canChangeBrowsingSettings) { %>
<div class="tab" data-tab="browsing-settings"> <div class="tab" data-tab="browsing-settings">
<h2>Browsing settings</h2> <h2>Browsing settings</h2>
<div id="browsing-settings-target"></div> <div id="browsing-settings-target"></div>
</div> </div>
<% } %> <% } %>
<% if (canChangeAccountSettings) { %> <% if (canChangeAccountSettings) { %>
<div class="tab" data-tab="account-settings"> <div class="tab" data-tab="account-settings">
<h2>Account settings</h2> <h2>Account settings</h2>
<div id="account-settings-target"></div> <div id="account-settings-target"></div>
</div> </div>
<% } %> <% } %>
<% if (canDeleteAccount) { %> <% if (canDeleteAccount) { %>
<div class="tab" data-tab="account-removal"> <div class="tab" data-tab="account-removal">
<h2>Account removal</h2> <h2>Account removal</h2>
<div id="account-removal-target"></div> <div id="account-removal-target"></div>
</div> </div>
<% } %> <% } %>
</div> </div>

View file

@ -1,8 +1,8 @@
<?php <?php
require_once(__DIR__ require_once(__DIR__
. DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'
. DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'src'
. DIRECTORY_SEPARATOR . 'Bootstrap.php'); . DIRECTORY_SEPARATOR . 'Bootstrap.php');
use \Szurubooru\Services\PostService; use \Szurubooru\Services\PostService;

View file

@ -1,8 +1,8 @@
<?php <?php
require_once(__DIR__ require_once(__DIR__
. DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'
. DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'src'
. DIRECTORY_SEPARATOR . 'Bootstrap.php'); . DIRECTORY_SEPARATOR . 'Bootstrap.php');
// Why this exists: // Why this exists:
// 1. Some entities store a few basic stats in special columns for performance reasons. The benefit of such // 1. Some entities store a few basic stats in special columns for performance reasons. The benefit of such

View file

@ -1,8 +1,8 @@
<?php <?php
require_once(__DIR__ require_once(__DIR__
. DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'
. DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'src'
. DIRECTORY_SEPARATOR . 'Bootstrap.php'); . DIRECTORY_SEPARATOR . 'Bootstrap.php');
use Szurubooru\Injector; use Szurubooru\Injector;
use Szurubooru\Dao\PublicFileDao; use Szurubooru\Dao\PublicFileDao;
@ -14,18 +14,18 @@ $postDao = Injector::get(PostDao::class);
$paths = []; $paths = [];
foreach ($postDao->findAll() as $post) foreach ($postDao->findAll() as $post)
{ {
$paths[] = $post->getContentPath(); $paths[] = $post->getContentPath();
$paths[] = $post->getThumbnailSourceContentPath(); $paths[] = $post->getThumbnailSourceContentPath();
} }
$paths = array_flip($paths); $paths = array_flip($paths);
foreach ($publicFileDao->listAll() as $path) foreach ($publicFileDao->listAll() as $path)
{ {
if (dirname($path) !== 'posts') if (dirname($path) !== 'posts')
continue; continue;
if (!isset($paths[$path])) if (!isset($paths[$path]))
{ {
echo $path . PHP_EOL; echo $path . PHP_EOL;
flush(); flush();
} }
} }

View file

@ -1,8 +1,8 @@
<?php <?php
require_once(__DIR__ require_once(__DIR__
. DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'
. DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'src'
. DIRECTORY_SEPARATOR . 'Bootstrap.php'); . DIRECTORY_SEPARATOR . 'Bootstrap.php');
use Szurubooru\Injector; use Szurubooru\Injector;
use Szurubooru\Dao\PublicFileDao; use Szurubooru\Dao\PublicFileDao;
@ -16,14 +16,14 @@ $postThumbnailService = Injector::get(PostThumbnailService::class);
foreach (array_reverse($postDao->findAll()) as $post) foreach (array_reverse($postDao->findAll()) as $post)
{ {
try try
{ {
$thumbnailName = $postThumbnailService->generateIfNeeded($post, $size, $size); $thumbnailName = $postThumbnailService->generateIfNeeded($post, $size, $size);
echo '.'; echo '.';
} }
catch (Exception $e) catch (Exception $e)
{ {
echo PHP_EOL . $post->getId() . ': ' . $e->getMessage() . PHP_EOL; echo PHP_EOL . $post->getId() . ': ' . $e->getMessage() . PHP_EOL;
} }
} }
echo PHP_EOL; echo PHP_EOL;

View file

@ -1,33 +1,33 @@
<?php <?php
require_once(__DIR__ require_once(__DIR__
. DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'
. DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'src'
. DIRECTORY_SEPARATOR . 'Bootstrap.php'); . DIRECTORY_SEPARATOR . 'Bootstrap.php');
$testMode = false; $testMode = false;
if (isset($argv)) if (isset($argv))
{ {
foreach ($argv as $arg) foreach ($argv as $arg)
{ {
if ($arg === '--test') if ($arg === '--test')
$testMode = true; $testMode = true;
} }
} }
if ($testMode) if ($testMode)
{ {
$config = \Szurubooru\Injector::get(\Szurubooru\Config::class); $config = \Szurubooru\Injector::get(\Szurubooru\Config::class);
$config->database->dsn = $config->database->tests->dsn; $config->database->dsn = $config->database->tests->dsn;
$config->database->user = $config->database->tests->user; $config->database->user = $config->database->tests->user;
$config->database->password = $config->database->tests->password; $config->database->password = $config->database->tests->password;
\Szurubooru\Injector::set(\Szurubooru\Config::class, $config); \Szurubooru\Injector::set(\Szurubooru\Config::class, $config);
$databaseConnection = \Szurubooru\Injector::get(\Szurubooru\DatabaseConnection::class); $databaseConnection = \Szurubooru\Injector::get(\Szurubooru\DatabaseConnection::class);
$pdo = $databaseConnection->getPDO(); $pdo = $databaseConnection->getPDO();
$pdo->exec('DROP DATABASE IF EXISTS szuru_test'); $pdo->exec('DROP DATABASE IF EXISTS szuru_test');
$pdo->exec('CREATE DATABASE szuru_test'); $pdo->exec('CREATE DATABASE szuru_test');
$pdo->exec('USE szuru_test'); $pdo->exec('USE szuru_test');
} }
$upgradeService = \Szurubooru\Injector::get(\Szurubooru\Services\UpgradeService::class); $upgradeService = \Szurubooru\Injector::get(\Szurubooru\Services\UpgradeService::class);