a TON of bugfixes and new features
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -6,7 +6,6 @@ gem 'mysql2'
|
|||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
gem 'therubyracer'
|
gem 'therubyracer'
|
||||||
gem 'bcrypt-ruby' # To use ActiveModel's has_secure_password
|
gem 'bcrypt-ruby' # To use ActiveModel's has_secure_password
|
||||||
gem 'simple_form'
|
|
||||||
gem 'sanitize'
|
gem 'sanitize'
|
||||||
gem 'redcarpet'
|
gem 'redcarpet'
|
||||||
gem 'hirb' #pretty console output
|
gem 'hirb' #pretty console output
|
||||||
|
|||||||
@@ -112,9 +112,6 @@ GEM
|
|||||||
sass (~> 3.2.0)
|
sass (~> 3.2.0)
|
||||||
sprockets (~> 2.8, <= 2.11.0)
|
sprockets (~> 2.8, <= 2.11.0)
|
||||||
sprockets-rails (~> 2.0)
|
sprockets-rails (~> 2.0)
|
||||||
simple_form (3.0.2)
|
|
||||||
actionpack (~> 4.0)
|
|
||||||
activemodel (~> 4.0)
|
|
||||||
sprockets (2.11.0)
|
sprockets (2.11.0)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
@@ -160,7 +157,6 @@ DEPENDENCIES
|
|||||||
rest-client
|
rest-client
|
||||||
sanitize
|
sanitize
|
||||||
sass-rails
|
sass-rails
|
||||||
simple_form
|
|
||||||
therubyracer
|
therubyracer
|
||||||
uglifier
|
uglifier
|
||||||
webrick
|
webrick
|
||||||
|
|||||||
12
app/assets/images/double_p.svg
Normal file
12
app/assets/images/double_p.svg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<svg viewBox="0 0 16 17" height="20px" width="20px" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="m9.27 6.283c-0.63 0.46-1.511 0.691-2.641 0.691h-0.521c-0.45 0-0.736-0.359-0.635-0.797l0.628-2.72c0.101-0.438 0.552-0.797 1.002-0.797h0.686c0.802 0 1.408 0.136 1.814 0.409 0.409 0.268 0.611 0.683 0.611 1.244 0 0.852-0.315 1.507-0.944 1.97zm3.369-5.42c-0.913-0.566-2.16-0.863-4.288-0.863h-4.372c-0.449 0-0.9 0.359-1.001 0.797l-2.957 12.813c-0.101 0.439 0.185 0.798 0.634 0.798h2.099c0.45 0 0.901-0.358 1.003-0.797l0.717-3.105c0.101-0.438 0.552-0.797 1.001-0.797h0.598c2.562 0 4.554-0.524 5.979-1.575 1.427-1.051 2.139-2.433 2.139-4.148-0.001-1.365-0.439-2.425-1.552-3.123z"
|
||||||
|
fill="#fff"
|
||||||
|
/>
|
||||||
|
<!-- original color: #00457c -->
|
||||||
|
<path
|
||||||
|
d="m15.603 3.917c-0.264-0.505-0.651-0.917-1.155-1.231-0.025-0.016-0.055-0.029-0.081-0.044 0.004 0.007 0.009 0.014 0.013 0.021 0.265 0.506 0.396 1.135 0.396 1.891 0 1.715-0.712 3.097-2.138 4.148-1.425 1.052-3.418 1.574-5.979 1.574h-0.597c-0.45 0-0.9 0.359-1.001 0.798l-0.719 3.106c-0.101 0.438-0.552 0.797-1.002 0.797h-1.404l-0.105 0.457c-0.101 0.438 0.184 0.798 0.633 0.798h2.1c0.45 0 0.9-0.359 1.001-0.798l0.718-3.106c0.101-0.438 0.551-0.797 1.002-0.797h0.597c2.562 0 4.554-0.522 5.979-1.574 1.426-1.052 2.139-2.434 2.139-4.149 0-0.755-0.132-1.385-0.397-1.891z"
|
||||||
|
fill="#fff"
|
||||||
|
/>
|
||||||
|
<!-- original color: #0079c1 -->
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 317 B |
Binary file not shown.
|
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 195 B |
@@ -1,7 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
*= require_self
|
*= require_self
|
||||||
*= require style.css
|
*= require style.css
|
||||||
*= require screen.css
|
|
||||||
*= require mobi.css
|
*= require mobi.css
|
||||||
*= require highlight/tomorrow-night.css
|
*= require highlight/tomorrow-night.css
|
||||||
*/
|
*/
|
||||||
@@ -2,14 +2,23 @@
|
|||||||
@media only screen
|
@media only screen
|
||||||
and (max-width: 999px)
|
and (max-width: 999px)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
#mobile-info {
|
#mobile-info {
|
||||||
background: none repeat scroll 0 0 #AB0000;
|
background: none repeat scroll 0 0 #ab0000;
|
||||||
color: #FFFFFF;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
// force tables into line-mode
|
||||||
|
// it's a bit ugly, but probably the best
|
||||||
|
// solution for small screens
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
#head {
|
#head {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
@@ -24,4 +33,21 @@ and (max-width: 999px)
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-group {
|
||||||
|
margin: 30px 0;
|
||||||
|
|
||||||
|
&.with-avatar {
|
||||||
|
margin-left: 0;
|
||||||
|
.avatar {
|
||||||
|
float: none;
|
||||||
|
margin: 0;
|
||||||
|
border: none;
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,614 +0,0 @@
|
|||||||
@keyframes wiggle {
|
|
||||||
0% {transform: rotate(-3deg);}
|
|
||||||
100% {transform: rotate(3deg);}
|
|
||||||
}
|
|
||||||
@-webkit-keyframes wiggle {
|
|
||||||
0% {transform: rotate(-3deg);}
|
|
||||||
100% {transform: rotate(3deg);}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@media only screen
|
|
||||||
and (min-width: 0px) //TODO
|
|
||||||
{
|
|
||||||
|
|
||||||
*, *:before, *:after, *:hover, *:active, *:focus {
|
|
||||||
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
|
|
||||||
outline: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
*::-moz-focus-inner {
|
|
||||||
border: 0;
|
|
||||||
outline: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
overflow-y: scroll;
|
|
||||||
padding: 0 !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: #F2F2F2;
|
|
||||||
color: #3F3F3F;
|
|
||||||
padding: 0 !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mobile-info {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #AB0000;
|
|
||||||
text-decoration: none;
|
|
||||||
&:hover {
|
|
||||||
color: #F00;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.flash {
|
|
||||||
text-align: center;
|
|
||||||
padding: 10px;
|
|
||||||
font-weight: bold;
|
|
||||||
cursor: pointer;
|
|
||||||
&#notice {
|
|
||||||
background: #8e8;
|
|
||||||
border-bottom: 3px dashed #8d8;
|
|
||||||
}
|
|
||||||
&#alert {
|
|
||||||
background: #ebb;
|
|
||||||
border-bottom: 3px dashed #fdd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#head {
|
|
||||||
#menu {
|
|
||||||
background: #3F3F3F;
|
|
||||||
height: 50px;
|
|
||||||
border-bottom: 1px solid #363636;
|
|
||||||
position: relative;
|
|
||||||
#logo {
|
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
position: absolute;
|
|
||||||
background: url(image_path('logo.png')) no-repeat;
|
|
||||||
background-position: 0 -100px;
|
|
||||||
left: 85px;
|
|
||||||
&:hover {
|
|
||||||
transition: all 0.3s ease 0s;
|
|
||||||
background-position: 0 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ul {
|
|
||||||
margin: 0 0 0 185px;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
line-height: 0;
|
|
||||||
a {
|
|
||||||
display: inline-block;
|
|
||||||
color: #fff;
|
|
||||||
&:hover {
|
|
||||||
color: #f66;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
margin: 15px 10px;
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#userbar {
|
|
||||||
border-bottom: 1px solid #d1d1d1;
|
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
|
||||||
text-align: right;
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
background: #eaeaea;
|
|
||||||
#userinfo {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 10px;
|
|
||||||
text-shadow: 0 1px 1px #fff;
|
|
||||||
a {
|
|
||||||
color: #3F3F3F;
|
|
||||||
&:hover {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
img.avatar {
|
|
||||||
border: 1px solid #000;
|
|
||||||
border-radius: 16px;
|
|
||||||
vertical-align: middle;
|
|
||||||
height: 32px;
|
|
||||||
width: 32px;
|
|
||||||
&:hover {
|
|
||||||
box-shadow: 0 0 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#userinfo-box {
|
|
||||||
display: inline-block;
|
|
||||||
text-align: right;
|
|
||||||
vertical-align: middle;
|
|
||||||
line-height: 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
img.user-avatar {
|
|
||||||
border: 1px solid #000;
|
|
||||||
border-radius: 4px;
|
|
||||||
height: 128px;
|
|
||||||
width: 128px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img.avatar {
|
|
||||||
image-rendering: optimizeSpeed;
|
|
||||||
image-rendering:-moz-crisp-edges;
|
|
||||||
image-rendering:-o-crisp-edges;
|
|
||||||
image-rendering: optimize-contrast;
|
|
||||||
image-rendering: -webkit-optimize-contrast;
|
|
||||||
-ms-interpolation-mode: nearest-neighbor;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.no-about {
|
|
||||||
color: #888;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main-content {
|
|
||||||
padding: 30px 100px;
|
|
||||||
width: 100%;
|
|
||||||
margin: auto;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 200%;
|
|
||||||
margin: 0;
|
|
||||||
text-shadow: 0 1px #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#user-info {
|
|
||||||
.user-avatar {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-avatar {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post, .thread {
|
|
||||||
margin-bottom: 50px;
|
|
||||||
.post-content, .thread-content {
|
|
||||||
margin-top: 10px;
|
|
||||||
clear: both;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow: hidden;
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.post-title, .thread-title {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
h1 {
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-weight: normal;
|
|
||||||
text-transform: capitalize;
|
|
||||||
display: inline;
|
|
||||||
font-size: 200%;
|
|
||||||
}
|
|
||||||
.comment-counter {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
tr, td, th {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border: 1px solid #aaa;
|
|
||||||
}
|
|
||||||
tbody {
|
|
||||||
tr:nth-child(odd) {
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
tr:nth-child(even) {
|
|
||||||
background: #DDD
|
|
||||||
}
|
|
||||||
}
|
|
||||||
td, th {
|
|
||||||
padding: 0.3em 1em;
|
|
||||||
}
|
|
||||||
thead {
|
|
||||||
background: #3F3F3F;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
border-radius: 2px;
|
|
||||||
position: relative;
|
|
||||||
background: #3F3F3F;
|
|
||||||
&:after {
|
|
||||||
color: #fff;
|
|
||||||
content: attr(lang); // show language on top right
|
|
||||||
font-style: italic;
|
|
||||||
margin: 10px;
|
|
||||||
position: absolute;
|
|
||||||
right: -10px;
|
|
||||||
top: 0;
|
|
||||||
opacity: 0;
|
|
||||||
transition: all 0.3s;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
&:hover:after {
|
|
||||||
opacity: 1;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
code {
|
|
||||||
padding: 0;
|
|
||||||
box-shadow: 0 0 16px #222 inset;
|
|
||||||
background: #3F3F3F !important;
|
|
||||||
border: none;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background: #A2A2A2;
|
|
||||||
padding: 2px 5px;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #000;
|
|
||||||
border: 1px solid #888;
|
|
||||||
display: inline-block;
|
|
||||||
line-height: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
table, tr, td, th {
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
background: #F9F9F9;
|
|
||||||
border-left: 3px solid #3F3F3F;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 2px 5px 2px 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote p {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.user {
|
|
||||||
display: inline-block;
|
|
||||||
a.role {
|
|
||||||
display: inline-block;
|
|
||||||
color: #fff !important;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 0.5em;
|
|
||||||
border-radius: 3px;
|
|
||||||
&.superadmin, &.admin {
|
|
||||||
background: #d22 !important;
|
|
||||||
}
|
|
||||||
&.mod {
|
|
||||||
background: #6af !important;
|
|
||||||
}
|
|
||||||
&.normal {
|
|
||||||
background: #aaa !important;
|
|
||||||
}
|
|
||||||
&.banned, &.disabled {
|
|
||||||
background: #ccc !important;
|
|
||||||
text-decoration: line-through !important;
|
|
||||||
color: #888 !important;
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
color: #ddd !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.donor {
|
|
||||||
background: #f60 !important;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #fff !important;
|
|
||||||
font-weight: bold !important;
|
|
||||||
margin-left: 3px;
|
|
||||||
padding: 0 0.5em;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.ign {
|
|
||||||
display: block;
|
|
||||||
color: #000;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#comments {
|
|
||||||
margin: 50px 0 0 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#markdown-note {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
|
||||||
text-indent: 0.01px;
|
|
||||||
text-overflow: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
input , select, textarea {
|
|
||||||
margin: 4px;
|
|
||||||
vertical-align: middle;
|
|
||||||
&[type=submit] {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
option {
|
|
||||||
padding: 0.5em;
|
|
||||||
&:hover {
|
|
||||||
background: #0f0;
|
|
||||||
color: #00f;
|
|
||||||
}
|
|
||||||
&:nth-child(even) {
|
|
||||||
background: #eee;
|
|
||||||
}
|
|
||||||
&:nth-child(odd) {
|
|
||||||
background: #ccc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
|
|
||||||
background: #ddd;
|
|
||||||
border: none;
|
|
||||||
height: 3em;
|
|
||||||
margin: 4px 0 0 0;
|
|
||||||
padding: 0.5em 1em;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
input, select, textarea {
|
|
||||||
&.disabled, &[disabled] {
|
|
||||||
box-shadow: none;
|
|
||||||
background: #ddd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
max-width: 100% !important;
|
|
||||||
height: 200px;
|
|
||||||
padding: 1em;
|
|
||||||
min-height: 3.5em;
|
|
||||||
&.comment {
|
|
||||||
height: 75px;
|
|
||||||
}
|
|
||||||
&.full-width {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
&.vertical {
|
|
||||||
resize: vertical;
|
|
||||||
}
|
|
||||||
&.horizontal {
|
|
||||||
resize: horizontal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tr.special_edit {
|
|
||||||
background: #faa;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold;
|
|
||||||
box-shadow: 0 0 5px #faa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.field_with_errors {
|
|
||||||
input, select, textarea {
|
|
||||||
border: 1px solid #f00;
|
|
||||||
box-shadow: 0 0 5px #faa inset;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.validation-error, .error {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0 1em;
|
|
||||||
width: 100%;
|
|
||||||
background: #faa;
|
|
||||||
font-weight: bold;
|
|
||||||
border: 1px solid #f00;
|
|
||||||
border-top: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#form_labels {
|
|
||||||
text-align: right;
|
|
||||||
float: left;
|
|
||||||
label {
|
|
||||||
display: block;
|
|
||||||
padding: 0.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#form_inputs {
|
|
||||||
input, select, textarea {
|
|
||||||
width: 400px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-action {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-unconfirmed, .user-banned {
|
|
||||||
background: #AB0000;
|
|
||||||
color: white;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 4px 10px;
|
|
||||||
display: inline-block;
|
|
||||||
border-radius: 3px;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
margin: 1px 1px 0 0;
|
|
||||||
padding: 6px;
|
|
||||||
cursor: default;
|
|
||||||
color: #fff;
|
|
||||||
border: none;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: normal;
|
|
||||||
display: inline-block;
|
|
||||||
&[disabled], &[disabled]:hover {
|
|
||||||
box-shadow: 0 0 5px #ddd inset;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
&.blue {
|
|
||||||
background: #4096ee;
|
|
||||||
&[disabled] {
|
|
||||||
background: #96C1EE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.red {
|
|
||||||
background: #ee4040;
|
|
||||||
&[disabled] {
|
|
||||||
background: #EE8383;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.left {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
&.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
box-shadow: 0 0 5px #095fb7 inset;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#userlist {
|
|
||||||
.list-user {
|
|
||||||
margin: 15px 0;
|
|
||||||
a img {
|
|
||||||
vertical-align: middle;
|
|
||||||
border: 1px solid;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #222;
|
|
||||||
&:hover {
|
|
||||||
color: #AB0000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.detail {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-left: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.editlink {
|
|
||||||
float: right;
|
|
||||||
opacity: 0;
|
|
||||||
margin-right: -10px;
|
|
||||||
transition: opacity 0.3s, margin 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
#blogpost_text {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clear {
|
|
||||||
clear: both;
|
|
||||||
display: block;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-group {
|
|
||||||
margin: 30px 0;
|
|
||||||
&.with-avatar {
|
|
||||||
margin-left: 70px;
|
|
||||||
.avatar {
|
|
||||||
float: left;
|
|
||||||
margin-left: -70px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:hover .editlink {
|
|
||||||
opacity: 1;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
.header {
|
|
||||||
background: #3F3F3F;
|
|
||||||
border-radius: 5px 5px 0 0;
|
|
||||||
padding: 0.5em;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: 0 1px 1px #222;
|
|
||||||
a {
|
|
||||||
color: #fff;
|
|
||||||
&:hover {
|
|
||||||
color: #f66;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.items {
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-top: none;
|
|
||||||
border-bottom: none;
|
|
||||||
.item {
|
|
||||||
display: block;
|
|
||||||
padding: 0.5em;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
&.locked:before {
|
|
||||||
content: "(locked) ";
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
&.sticky:before {
|
|
||||||
content: "(sticky) ";
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
&.lockedsticky:before {
|
|
||||||
content: "(locked sticky) ";
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
&.content {
|
|
||||||
.headline {
|
|
||||||
margin: 0;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bold {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe.youtube {
|
|
||||||
border: none;
|
|
||||||
width: 640px;
|
|
||||||
max-width: 100%;
|
|
||||||
height: 360px;
|
|
||||||
}
|
|
||||||
|
|
||||||
mark {
|
|
||||||
background: #faa;
|
|
||||||
padding: 0 2px;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comment-counter {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.red-alert {
|
|
||||||
color: #AB0000;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,722 @@
|
|||||||
|
@keyframes wiggle {
|
||||||
|
0% {transform: rotate(-3deg);}
|
||||||
|
100% {transform: rotate(3deg);}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes wiggle {
|
||||||
|
0% {transform: rotate(-3deg);}
|
||||||
|
100% {transform: rotate(3deg);}
|
||||||
|
}
|
||||||
|
@keyframes target {
|
||||||
|
0% {background-color: #ff8;}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes target {
|
||||||
|
0% {background-color: #ff8;}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*, *:before, *:after, *:hover, *:active, *:focus {
|
||||||
|
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Global CSS for all screen sizes */
|
*::-moz-focus-inner {
|
||||||
|
border: 0;
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
overflow-y: scroll;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
background-color: #f2f2f2;
|
||||||
padding: 0;
|
color: #3f3f3f;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
font: 14px/1.6 'Oswald','Calibri','Arial','DejaVu Sans', 'Open Sans','Lucida Sans','Lucida Grande','Lucida Sans Unicode',sans-serif;
|
font: 14px/1.6 'Oswald','Calibri','Arial','DejaVu Sans', 'Open Sans','Lucida Sans','Lucida Grande','Lucida Sans Unicode',sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
color: #fff;
|
||||||
|
background: #363636;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-moz-selection {
|
||||||
|
color: #fff;
|
||||||
|
background: #363636;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mobile-info {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #ab0000;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #f00;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flash {
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.notice {
|
||||||
|
background: #8e8;
|
||||||
|
border-bottom: 3px dashed #8d8;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.alert {
|
||||||
|
background: #ebb;
|
||||||
|
border-bottom: 3px dashed #fdd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#head {
|
||||||
|
#menu {
|
||||||
|
background: #3f3f3f;
|
||||||
|
height: 50px;
|
||||||
|
border-bottom: 1px solid #363636;
|
||||||
|
position: relative;
|
||||||
|
#logo {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
position: absolute;
|
||||||
|
background: url(image_path('logo.png')) no-repeat;
|
||||||
|
background-position: 0 -100px;
|
||||||
|
left: 85px;
|
||||||
|
&:hover {
|
||||||
|
transition: all 0.3s ease 0;
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin: 0 0 0 185px;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
line-height: 0;
|
||||||
|
a {
|
||||||
|
display: inline-block;
|
||||||
|
color: #fff;
|
||||||
|
&:hover {
|
||||||
|
color: #f66;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
margin: 15px 10px;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#userbar {
|
||||||
|
border-bottom: 1px solid #d1d1d1;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
background: #eaeaea;
|
||||||
|
#userinfo {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 10px;
|
||||||
|
text-shadow: 0 1px 1px #fff;
|
||||||
|
a {
|
||||||
|
color: #3f3f3f;
|
||||||
|
&:hover {
|
||||||
|
color: #f00;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
img.avatar {
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 16px;
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#userinfo-box {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: right;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
img.user-avatar {
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 4px;
|
||||||
|
height: 128px;
|
||||||
|
width: 128px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.avatar {
|
||||||
|
image-rendering: -moz-crisp-edges;
|
||||||
|
image-rendering: -o-crisp-edges;
|
||||||
|
image-rendering: -webkit-optimize-contrast;
|
||||||
|
image-rendering: crisp-edges;
|
||||||
|
-ms-interpolation-mode: nearest-neighbor;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.no-about {
|
||||||
|
color: #888;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-content {
|
||||||
|
padding: 30px 100px;
|
||||||
|
width: 1600px;
|
||||||
|
max-width: 100%;
|
||||||
|
margin: auto;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
box-shadow: 0 10px 10px #ddd;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 200%;
|
||||||
|
margin: 0;
|
||||||
|
text-shadow: 0 1px #999;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#user-info {
|
||||||
|
.user-avatar {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-avatar {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post, .thread, .thread-reply {
|
||||||
|
margin-bottom: 50px;
|
||||||
|
.post-content, .thread-content {
|
||||||
|
margin-top: 10px;
|
||||||
|
clear: both;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow: hidden;
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.post-title, .thread-title {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
h1 {
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
font-weight: normal;
|
||||||
|
text-transform: capitalize;
|
||||||
|
display: inline;
|
||||||
|
font-size: 200%;
|
||||||
|
}
|
||||||
|
.comment-counter {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
tr, td, th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
tr:nth-child(odd) {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
tr:nth-child(even) {
|
||||||
|
background: #ddd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
td, th {
|
||||||
|
padding: 0.3em 1em;
|
||||||
|
}
|
||||||
|
thead {
|
||||||
|
background: #3f3f3f;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
border-radius: 2px;
|
||||||
|
position: relative;
|
||||||
|
background: #3f3f3f;
|
||||||
|
&:after {
|
||||||
|
color: #fff;
|
||||||
|
content: attr(lang); // show language on top right
|
||||||
|
font-style: italic;
|
||||||
|
margin: 10px;
|
||||||
|
position: absolute;
|
||||||
|
right: -10px;
|
||||||
|
top: 0;
|
||||||
|
opacity: 0;
|
||||||
|
transition: all 0.3s;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
&:hover:after {
|
||||||
|
opacity: 1;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// code blocks
|
||||||
|
code {
|
||||||
|
padding: 0;
|
||||||
|
box-shadow: 0 0 16px #222 inset;
|
||||||
|
background: #3f3f3f !important;
|
||||||
|
border: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// inline code
|
||||||
|
code {
|
||||||
|
background: #ddd;
|
||||||
|
padding: 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #000;
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
table, tr, td, th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
background: #f9f9f9;
|
||||||
|
border-left: 3px solid #3f3f3f;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
padding: 2px 5px 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote p {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.user {
|
||||||
|
display: inline-block;
|
||||||
|
a.role {
|
||||||
|
display: inline-block;
|
||||||
|
color: #fff !important;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 4px 0.5em;
|
||||||
|
border-radius: 3px;
|
||||||
|
text-shadow: none;
|
||||||
|
line-height: 1em;
|
||||||
|
margin: 1px 0;
|
||||||
|
|
||||||
|
&.superadmin, &.admin {
|
||||||
|
background: #d22 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.mod {
|
||||||
|
background: #6af !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.normal {
|
||||||
|
background: #aaa !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.banned, &.disabled {
|
||||||
|
background: #ccc !important;
|
||||||
|
text-decoration: line-through !important;
|
||||||
|
color: #888 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #ddd !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.donor {
|
||||||
|
background: #f60 !important;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #fff !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
margin-left: 3px;
|
||||||
|
padding: 0 0.5em;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.ign {
|
||||||
|
display: block;
|
||||||
|
color: #000;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#comments {
|
||||||
|
margin: 50px 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-help {
|
||||||
|
margin: 4px 0 -4px;
|
||||||
|
background: #ddd;
|
||||||
|
padding: 0.5em 1em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
text-indent: 0.01px;
|
||||||
|
text-overflow: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
input , select, textarea {
|
||||||
|
margin: 4px;
|
||||||
|
vertical-align: middle;
|
||||||
|
&[type=submit] {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
option {
|
||||||
|
padding: 0.5em;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #0f0;
|
||||||
|
color: #00f;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(even) {
|
||||||
|
background: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(odd) {
|
||||||
|
background: #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
|
||||||
|
background: #ddd;
|
||||||
|
border: none;
|
||||||
|
height: 3em;
|
||||||
|
margin: 4px 0 0;
|
||||||
|
padding: 0.5em 1em;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, select, textarea {
|
||||||
|
&.disabled, &[disabled] {
|
||||||
|
box-shadow: none;
|
||||||
|
background: #ddd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
max-width: 100% !important;
|
||||||
|
height: 300px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 1em;
|
||||||
|
min-height: 3.5em;
|
||||||
|
|
||||||
|
&.comment {
|
||||||
|
height: 75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.full-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.vertical {
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.horizontal {
|
||||||
|
resize: horizontal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.spacer {
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field_with_errors {
|
||||||
|
input, select, textarea {
|
||||||
|
border: 1px solid #f00;
|
||||||
|
box-shadow: 0 0 5px #faa inset;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.validation-error, .error {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 1em;
|
||||||
|
width: 100%;
|
||||||
|
background: #faa;
|
||||||
|
font-weight: bold;
|
||||||
|
border: 1px solid #f00;
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-action {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-unconfirmed, .user-banned {
|
||||||
|
background: #ab0000;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 4px 10px;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin: 1px 1px 0 0;
|
||||||
|
padding: 6px;
|
||||||
|
cursor: default;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: normal;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&[disabled], &[disabled]:hover {
|
||||||
|
box-shadow: 0 0 5px #ddd inset;
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.blue {
|
||||||
|
background: #4096ee;
|
||||||
|
|
||||||
|
&[disabled] {
|
||||||
|
background: #96c1ee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.red {
|
||||||
|
background: #ee4040;
|
||||||
|
&[disabled] {
|
||||||
|
background: #ee8383;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.dark {
|
||||||
|
background: #363636;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.donate {
|
||||||
|
padding-right: 30px;
|
||||||
|
|
||||||
|
&.paypal {
|
||||||
|
background-image: url(image_path('/assets/double_p.svg'));
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right 6px center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 5px #095fb7 inset;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#userlist {
|
||||||
|
.list-user {
|
||||||
|
margin: 15px 0;
|
||||||
|
|
||||||
|
a img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border: 1px solid;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #222;
|
||||||
|
&:hover {
|
||||||
|
color: #ab0000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.editlink {
|
||||||
|
float: right;
|
||||||
|
opacity: 0;
|
||||||
|
margin-right: -10px;
|
||||||
|
transition: opacity 0.3s, margin 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#blogpost_text {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear {
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-group {
|
||||||
|
margin: 30px 0;
|
||||||
|
|
||||||
|
&.with-avatar {
|
||||||
|
margin-left: 70px;
|
||||||
|
.avatar {
|
||||||
|
margin: -7px 0 0 -77px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover .editlink {
|
||||||
|
opacity: 1;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:target {
|
||||||
|
animation: target 2.5s;
|
||||||
|
-webkit-animation: target 2.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
background: #3f3f3f;
|
||||||
|
border-radius: 5px 5px 0 0;
|
||||||
|
padding: 0.5em;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 1px 1px #222;
|
||||||
|
a {
|
||||||
|
color: #fff;
|
||||||
|
&:hover {
|
||||||
|
color: #f66;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.items {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-top: none;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
display: block;
|
||||||
|
padding: 0.5em;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
&:target {
|
||||||
|
animation: target 2.5s;
|
||||||
|
-webkit-animation: target 2.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.locked:before {
|
||||||
|
content: " ";
|
||||||
|
background: url(image_path("lock.png")) no-repeat center center;
|
||||||
|
margin-right: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.sticky:before {
|
||||||
|
content: " ";
|
||||||
|
background: url(image_path("pin.png")) no-repeat center center;
|
||||||
|
margin-right: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.lockedsticky:before {
|
||||||
|
content: " ";
|
||||||
|
background: url(image_path("lock-pin.png")) no-repeat center center;
|
||||||
|
margin: -7px 5px -3px 0;
|
||||||
|
display: inline-block;
|
||||||
|
width: 20px;
|
||||||
|
height: 30px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.content {
|
||||||
|
.headline {
|
||||||
|
margin: 0;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.donation {
|
||||||
|
margin-bottom: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bold {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
iframe.youtube {
|
||||||
|
border: none;
|
||||||
|
width: 640px;
|
||||||
|
max-width: 100%;
|
||||||
|
height: 360px;
|
||||||
|
}
|
||||||
|
|
||||||
|
mark {
|
||||||
|
background: #faa;
|
||||||
|
padding: 0 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-counter {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red-alert {
|
||||||
|
color: #ab0000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
padding: 0 100px 30px;
|
||||||
|
width: 1600px;
|
||||||
|
max-width: 100%;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.note {
|
||||||
|
color: #888;
|
||||||
|
font-size: 12px;
|
||||||
|
font-style: italic;
|
||||||
|
margin-top: 5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ class ForumgroupsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
redirect_to forums_path + "#forum-#{params[:id]}"
|
redirect_to forums_path + "#group-#{params[:id]}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|||||||
@@ -3,11 +3,15 @@ class ForumsController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
@groups = Forumgroup.select {|g| g.can_read?(current_user) }
|
@groups = Forumgroup.select {|g| g.can_read?(current_user) }
|
||||||
@groups.sort_by!{|g| g[:position]}
|
@groups.sort_by!{ |g| g.position || 0 }
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@threads = @forum.forumthreads.order("sticky desc, updated_at desc")
|
@threads = @forum.forumthreads.to_a
|
||||||
|
@threads.sort_by! do |t|
|
||||||
|
# sticky goes first, then sort by last activity (new replies)
|
||||||
|
[t.sticky ? 0 : 1, -(t.replies.last.try(:created_at) || t.created_at).to_i]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class ForumthreadsController < ApplicationController
|
|||||||
def update
|
def update
|
||||||
if mod? || @thread.author.is?(current_user)
|
if mod? || @thread.author.is?(current_user)
|
||||||
@thread.user_editor = current_user
|
@thread.user_editor = current_user
|
||||||
@thread.attributes = thread_params([:user_editor])
|
@thread.attributes = (mod? ? thread_params([:sticky, :locked, :forum_id]) : thread_params)
|
||||||
if @thread.save
|
if @thread.save
|
||||||
redirect_to @thread, notice: 'Post has been updated.'
|
redirect_to @thread, notice: 'Post has been updated.'
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
[yt](729o_Xwg1WU)
|
|
||||||
|
|
||||||
\[yt\]\(([a-zA-Z0-9\-_]+)\)
|
|
||||||
|
|
||||||
|
|
||||||
https://www.youtube.com/embed/{id}?theme=light&iv_load_policy=3&showinfo=1&showsearch=0&rel=0&modestbranding&hd=1&autohide=1&html5=1
|
|
||||||
@@ -20,6 +20,7 @@ module ApplicationHelper
|
|||||||
filter_html: true,
|
filter_html: true,
|
||||||
no_styles: true,
|
no_styles: true,
|
||||||
safe_links_only: true,
|
safe_links_only: true,
|
||||||
|
with_toc_data: true,
|
||||||
hard_wrap: true,
|
hard_wrap: true,
|
||||||
link_attributes: {target: "_blank", rel: "nofollow"}
|
link_attributes: {target: "_blank", rel: "nofollow"}
|
||||||
})
|
})
|
||||||
@@ -46,6 +47,7 @@ module ApplicationHelper
|
|||||||
no_images: true,
|
no_images: true,
|
||||||
no_styles: true,
|
no_styles: true,
|
||||||
safe_links_only: true,
|
safe_links_only: true,
|
||||||
|
with_toc_data: false,
|
||||||
hard_wrap: false,
|
hard_wrap: false,
|
||||||
link_attributes: {target: "_blank", rel: "nofollow"}
|
link_attributes: {target: "_blank", rel: "nofollow"}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ class RedstonerMailer < ActionMailer::Base
|
|||||||
default from: "info@redstoner.com"
|
default from: "info@redstoner.com"
|
||||||
default reply_to: "redstonerserver+website@gmail.com"
|
default reply_to: "redstonerserver+website@gmail.com"
|
||||||
|
|
||||||
def register_mail(user, uses_mc_pass)
|
def register_mail(user, uses_mc_pass)
|
||||||
@user = user
|
@user = user
|
||||||
@mcpw = uses_mc_pass
|
@mcpw = uses_mc_pass
|
||||||
mail(to: @user.email, subject: "Registration on Redstoner.com", from: "info@redstoner.com", reply_to: "redstonerserver+website@gmail.com")
|
mail(to: @user.email, subject: "Registration on Redstoner.com", from: "info@redstoner.com", reply_to: "redstonerserver+website@gmail.com")
|
||||||
end
|
end
|
||||||
|
|
||||||
def register_info_mail(user, uses_mc_pass)
|
def register_info_mail(user, uses_mc_pass)
|
||||||
@user = user
|
@user = user
|
||||||
@mcpw = uses_mc_pass
|
@mcpw = uses_mc_pass
|
||||||
mail(to: "redstonerserver@gmail.com", subject: "#{@user.name} registered on Redstoner.com", from: "info@redstoner.com", reply_to: "redstonerserver+website@gmail.com")
|
mail(to: "redstonerserver@gmail.com", subject: "#{@user.name} registered on Redstoner.com", from: "info@redstoner.com", reply_to: "redstonerserver+website@gmail.com")
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ class Blogpost < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def editor
|
def editor
|
||||||
|
# can be nil
|
||||||
@editor ||= user_editor
|
@editor ||= user_editor
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edited?
|
||||||
|
!!user_editor_id
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,4 +16,13 @@ class Comment < ActiveRecord::Base
|
|||||||
User.first
|
User.first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def editor
|
||||||
|
# can be nil
|
||||||
|
@editor ||= user_editor
|
||||||
|
end
|
||||||
|
|
||||||
|
def edited?
|
||||||
|
!!user_editor_id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -23,9 +23,14 @@ class Forumthread < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def editor
|
def editor
|
||||||
|
# can be nil
|
||||||
@editor ||= user_editor
|
@editor ||= user_editor
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edited?
|
||||||
|
!!user_editor_id
|
||||||
|
end
|
||||||
|
|
||||||
def replies
|
def replies
|
||||||
threadreplies
|
threadreplies
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,8 +15,14 @@ class Role < ActiveRecord::Base
|
|||||||
!!(Role.find_by_name(name) == self)
|
!!(Role.find_by_name(name) == self)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get (name)
|
def self.get (input)
|
||||||
Role.find_by_name(name)
|
if input.is_a?(String) || input.is_a?(Symbol)
|
||||||
|
Role.find_by_name(input)
|
||||||
|
elsif input.is_a?(Fixnum)
|
||||||
|
Role.find_by_id(input)
|
||||||
|
elsif input.is_a?(Role)
|
||||||
|
return input
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def <=> (role)
|
def <=> (role)
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ class Threadreply < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def editor
|
def editor
|
||||||
|
# can be nil
|
||||||
@editor ||= user_editor
|
@editor ||= user_editor
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edited?
|
||||||
|
!!user_editor_id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -7,7 +7,7 @@ class User < ActiveRecord::Base
|
|||||||
|
|
||||||
has_secure_password
|
has_secure_password
|
||||||
|
|
||||||
before_validation :strip_whitespaces, :set_uuid, :set_name, :set_role, :set_email_token
|
before_validation :strip_whitespaces, :set_uuid, :set_name, :set_email_token
|
||||||
|
|
||||||
validates_presence_of :password, :password_confirmation, :email_token, :on => :create
|
validates_presence_of :password, :password_confirmation, :email_token, :on => :create
|
||||||
validates_presence_of :name, :email, :ign
|
validates_presence_of :name, :email, :ign
|
||||||
@@ -38,6 +38,10 @@ class User < ActiveRecord::Base
|
|||||||
!!self.confirmed
|
!!self.confirmed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def online?
|
||||||
|
last_seen && last_seen > 5.minutes.ago
|
||||||
|
end
|
||||||
|
|
||||||
#roles
|
#roles
|
||||||
def disabled?
|
def disabled?
|
||||||
!!(self.role == :disabled)
|
!!(self.role == :disabled)
|
||||||
@@ -179,10 +183,6 @@ class User < ActiveRecord::Base
|
|||||||
self.name ||= self.ign
|
self.name ||= self.ign
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_role
|
|
||||||
self.role ||= Role.get(:normal)
|
|
||||||
end
|
|
||||||
|
|
||||||
def account_exists?
|
def account_exists?
|
||||||
profile = self.get_profile
|
profile = self.get_profile
|
||||||
if !profile || profile["demo"] == true
|
if !profile || profile["demo"] == true
|
||||||
|
|||||||
12
app/views/application/_mdhelp.html.erb
Normal file
12
app/views/application/_mdhelp.html.erb
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<div class="markdown-help">
|
||||||
|
<blockquote>> quote</blockquote> |
|
||||||
|
_underline_ |
|
||||||
|
<i>*italic*</i> |
|
||||||
|
<b>**bold**</b> |
|
||||||
|
<code>`code`</code> |
|
||||||
|
<mark>==mark==</mark> |
|
||||||
|
[<a>link</a>](https://example.com)
|
||||||
|
|
||||||
|
<%= link_to "more...", "/info/1", target: "_blank", class: "right", tabindex: -1 %>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<h1>Edit post</h1>
|
<h1>Edit post</h1>
|
||||||
<p id="markdown-note">Note: You can use <%= link_to "Markdown", "https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", target: "_blank" %>!</p>
|
<%= form_for @post do |f|%>
|
||||||
<%= simple_form_for @post do |f|%>
|
<%= f.text_field :title %>
|
||||||
<%= f.input :title, :label => false %>
|
<%= render partial: "mdhelp" %>
|
||||||
<%= f.text_area :content, :label => false, input_html: {class: "full-width vertical"} %>
|
<%= f.text_area :content, class: "vertical" %>
|
||||||
<p><%= f.submit "Update Post", class: "btn blue left" %></p>
|
<p><%= f.submit "Update Post", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p><%= button_to "Delete post", @post, method: "delete", data: {confirm: "Delete post & comments forever?"}, class: "btn red right" %></p>
|
<p><%= button_to "Delete post", @post, method: "delete", data: {confirm: "Delete post & comments forever?"}, class: "btn red right" %></p>
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
<div id="posts">
|
<div id="posts">
|
||||||
<% @posts.each do |p| %>
|
<% @posts.each do |p| %>
|
||||||
<div class="item-group with-avatar" id="post-<%= p.id %>">
|
<div class="item-group with-avatar" id="post-<%= p.id %>">
|
||||||
<%= link_to(image_tag(p.author.avatar_url(64), class: "avatar"), p.author, title: p.author.ign) %>
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<%= render partial: "users/username", locals: { user: p.author } %> <time><%= link_to p.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
|
<%= link_to(image_tag(p.author.avatar_url(64), class: "avatar"), p.author, title: p.author.ign) %>
|
||||||
|
<%= render partial: "users/username", locals: { user: p.author } %> <time><%= link_to p.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
|
||||||
<span class="comment-counter">
|
<span class="comment-counter">
|
||||||
<%= link_to pluralize(p.comments.count, "Comment"), p %>
|
<%= link_to pluralize(p.comments.count, "Comment"), p %>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<h1>New Post</h1>
|
<h1>New Post</h1>
|
||||||
<%= simple_form_for @post do |f|%>
|
<%= form_for @post do |f|%>
|
||||||
<%= f.input :title, placeholder: "Title" %>
|
<%= f.text_field :title, placeholder: "Title" %>
|
||||||
<p id="markdown-note">Note: You can use <%= link_to "Markdown", "https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", target: "_blank" %>!</p>
|
<%= render partial: "mdhelp" %>
|
||||||
<%= f.text_area :content, placeholder: "Text", input_html: {class: "full-width vertical"} %>
|
<%= f.text_area :content, placeholder: "Text", input_html: {class: "vertical"} %>
|
||||||
<p><%= f.submit "Create Post", class: "btn blue left" %></p>
|
<p><%= f.submit "Create Post", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<%= link_to "News", blogposts_path %> → <%= link_to @post.title %>
|
<%= link_to "News", blogposts_path %> → <%= link_to @post.title %>
|
||||||
<div class="item-group post with-avatar" id="post-<%= @post.id %>">
|
<div class="item-group post with-avatar" id="post-<%= @post.id %>">
|
||||||
<%= link_to(image_tag(@post.author.avatar_url(64), class: "avatar"), @post.author, title: @post.author.ign) %>
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<%= render partial: "users/username", locals: { user: @post.author } %> <time><%= link_to @post.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
|
<%= link_to(image_tag(@post.author.avatar_url(64), class: "avatar"), @post.author, title: @post.author.ign) %>
|
||||||
|
<%= render partial: "users/username", locals: { user: @post.author } %> <time><%= link_to @post.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
|
||||||
<%= link_to "edit", edit_blogpost_path(@post.id), class: "editlink" if mod? %>
|
<%= link_to "edit", edit_blogpost_path(@post.id), class: "editlink" if mod? %>
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<div class="item-group with-avatar comment" id="comment-<%= c.id %>">
|
<div class="item-group with-avatar comment" id="comment-<%= c.id %>">
|
||||||
<%= link_to(image_tag(c.author.avatar_url(64), class: "avatar"), c.author, title: c.author.ign) %>
|
|
||||||
<div class="header <%= "op" if c.author.is?(c.blogpost.author) %>">
|
<div class="header <%= "op" if c.author.is?(c.blogpost.author) %>">
|
||||||
<%= render partial: "users/username", locals: { user: c.author } %> <time><%= link_to c.created_at.strftime("%e. %b %Y, %H:%m"), [c.blogpost, c] %></time>
|
<%= link_to(image_tag(c.author.avatar_url(64), class: "avatar"), c.author, title: c.author.ign) %>
|
||||||
|
<%= render partial: "users/username", locals: { user: c.author } %>
|
||||||
|
<time><%= link_to c.created_at.strftime("%e. %b %Y, %H:%M"), "#comment-#{c.id}" %></time>
|
||||||
|
|
||||||
<%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c), class: "editlink" if (mod? || c.author.is?(current_user)) %>
|
<%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c), class: "editlink" if (mod? || c.author.is?(current_user)) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<% if current_user %>
|
<% if current_user %>
|
||||||
<h3>New comment</h3>
|
<h3>New comment</h3>
|
||||||
<%= simple_form_for [@post, @comment] do |f| %>
|
<%= form_for [@post, @comment] do |f| %>
|
||||||
<p><blockquote>> quote</blockquote> | _underline_ | <i>*italic*</i> | <b>**bold**</b> | <code>`code`</code> | <mark>==mark==</mark> | <a>[link](https://example.com)</a>
|
<%= render partial: "mdhelp" %>
|
||||||
<%= f.input :content, :label => false, :as => "text", :placeholder => "Comment", input_html: {class: "comment"} %>
|
<%= f.text_area :content, placeholder: "Comment", class: "comment" %>
|
||||||
<%= f.submit class: "btn blue" %>
|
<p><%= f.submit class: "btn blue" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<h1>Edit comment</h1>
|
<h1>Edit comment</h1>
|
||||||
|
|
||||||
<%= simple_form_for [@comment.blogpost, @comment] do |f| %>
|
<%= form_for [@comment.blogpost, @comment] do |f| %>
|
||||||
<%= f.input :content, label: false, as: "text", placeholder: "Comment" %>
|
<%= render partial: "mdhelp" %>
|
||||||
|
<%= f.text_area :content, placeholder: "Comment" %>
|
||||||
<p><%= f.submit "Update Comment", class: "btn blue left" %></p>
|
<p><%= f.submit "Update Comment", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p><%= button_to "Delete comment", [@comment.blogpost, @comment] , method: "delete", data: {confirm: "Delete comment forever?"}, class: "btn red right" %></p>
|
<p><%= button_to "Delete comment", [@comment.blogpost, @comment] , method: "delete", data: {confirm: "Delete comment forever?"}, class: "btn red right" %></p>
|
||||||
@@ -32,6 +32,6 @@
|
|||||||
<td><%= f.select :role_write_id, role_selection, include_blank: false %></td>
|
<td><%= f.select :role_write_id, role_selection, include_blank: false %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p><%= f.submit "Update group", class: "btn blue" %></p>
|
<p><%= f.submit "Update group", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p><%= button_to "Delete group", @post, :method => "delete", data: {confirm: "Delete group?\nForums + Threads will not be accessible!"}, class: "btn red right" %></p>
|
<p><%= button_to "Delete group", @post, :method => "delete", data: {confirm: "Delete group?\nForums + Threads will not be accessible!"}, class: "btn red right" %></p>
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
<div id="forum_groups">
|
<div id="forum_groups">
|
||||||
<% @groups.each do |group| %>
|
<% @groups.each do |group| %>
|
||||||
<div class="item-group" id="forum-<%= group.id %>">
|
<div class="item-group" id="group-<%= group.id %>">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<%= group.name %>
|
<%= group.name %>
|
||||||
<%= link_to "edit", edit_forumgroup_path(group), class: "editlink" if admin? %>
|
<%= link_to "edit", edit_forumgroup_path(group), class: "editlink" if admin? %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items bold">
|
<div class="items bold">
|
||||||
<% group.forums.each do |f| %>
|
<% group.forums.sort_by{ |f| f.position || 0 }.each do |f| %>
|
||||||
<% if f.can_read?(current_user) %>
|
<% if f.can_read?(current_user) %>
|
||||||
<%= link_to f.name, f, class: "item" %>
|
<%= link_to f.name, f, id: "forum-#{f.id}", class: "item" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,5 +21,5 @@
|
|||||||
<% if admin? %>
|
<% if admin? %>
|
||||||
<%= link_to "New group", new_forumgroup_path, class: "btn blue" %>
|
<%= link_to "New group", new_forumgroup_path, class: "btn blue" %>
|
||||||
<% elsif mod? %>
|
<% elsif mod? %>
|
||||||
<%= link_to "New group", nil, class: "btn blue", disabled: true %>
|
<%= link_to "New group", "#", class: "btn blue", disabled: true %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
<div id="forum_groups">
|
<div id="forum_groups">
|
||||||
<% @threads.each do |thread| %>
|
<% @threads.each do |thread| %>
|
||||||
<div class="item-group with-avatar" id="thread-<%= thread.id %>">
|
<div class="item-group with-avatar" id="thread-<%= thread.id %>">
|
||||||
<%= link_to(image_tag(thread.author.avatar_url(64), class: "avatar"), thread.author, title: thread.author.ign) %>
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<%= render partial: "users/username", locals: { user: thread.author } %> <time><%= link_to thread.created_at.strftime("%e. %b %Y, %H:%m"), thread %></time>
|
<%= link_to(image_tag(thread.author.avatar_url(64), class: "avatar"), thread.author, title: thread.author.ign) %>
|
||||||
|
<%= render partial: "users/username", locals: { user: thread.author } %> <time><%= link_to thread.created_at.strftime("%e. %b %Y, %H:%M"), thread %></time>
|
||||||
<span class="comment-counter">
|
<span class="comment-counter">
|
||||||
<%= link_to pluralize(thread.replies.count, "Reply"), thread %>
|
<%= link_to pluralize(thread.replies.count, "Reply"), thread %>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -11,12 +11,21 @@
|
|||||||
<td><%= f.label :locked %></td>
|
<td><%= f.label :locked %></td>
|
||||||
<td><%= f.check_box :locked %></td>
|
<td><%= f.check_box :locked %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><%= f.label :forum_id, "Move thread" %></td>
|
||||||
|
<%
|
||||||
|
forums = []
|
||||||
|
Forum.all.sort_by{ |f| f.forumgroup.position || 0 }.each do |f|
|
||||||
|
forums << ["#{f.forumgroup.name} → #{f.name}", f.id]
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
<td><%= f.select :forum_id, forums %></td>
|
||||||
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
<div id="form_inputs">
|
<%= f.text_field :title, placeholder: "Title" %>
|
||||||
<%= f.text_field :title, placeholder: "Title" %>
|
<%= render partial: "mdhelp" %>
|
||||||
</div>
|
|
||||||
<%= f.text_area :content, placeholder: "Text" %>
|
<%= f.text_area :content, placeholder: "Text" %>
|
||||||
<p><%= f.submit "Update thread", class: "btn blue" %></p>
|
<p><%= f.submit "Update thread", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= button_to "Delete thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %>
|
<%= button_to "Delete thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %>
|
||||||
@@ -13,9 +13,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
<div id="form_inputs">
|
<%= f.text_field :title, placeholder: "Title" %>
|
||||||
<%= f.text_field :title, placeholder: "Title" %>
|
<%= render partial: "mdhelp" %>
|
||||||
</div>
|
|
||||||
<%= f.text_area :content, placeholder: "Text" %>
|
<%= f.text_area :content, placeholder: "Text" %>
|
||||||
<%= f.hidden_field :forum_id %>
|
<%= f.hidden_field :forum_id %>
|
||||||
<p><%= f.submit "Create thread", class: "btn blue" %></p>
|
<p><%= f.submit "Create thread", class: "btn blue" %></p>
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread %>
|
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread %>
|
||||||
<div class="item-group thread with-avatar" id="thread-<%= @thread.id %>">
|
<div class="item-group thread with-avatar" id="thread-<%= @thread.id %>">
|
||||||
<%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<%= render partial: "users/username", locals: { user: @thread.author } %> <time><%= link_to @thread.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
|
<%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
|
||||||
|
<%= render partial: "users/username", locals: { user: @thread.author } %> <time><%= link_to @thread.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
|
||||||
<%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if (@thread.author.is?(current_user) || mod?) %>
|
<%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if (@thread.author.is?(current_user) || mod?) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
|
<% if @thread.edited? %>
|
||||||
|
<div class="item edited">
|
||||||
|
Last edited <time><%= @thread.updated_at.strftime("%e. %b %Y, %H:%M") %></time> by <%= link_to @thread.editor.name, @thread.editor %>.
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<div class="item content">
|
<div class="item content">
|
||||||
<h2 class="headline"><%= link_to truncate(@thread.title, length: 60, omission: " …"), p %></h2>
|
<h2 class="headline"><%= link_to truncate(@thread.title, length: 60, omission: " …"), p %></h2>
|
||||||
<%= render_md(@thread.content).html_safe %>
|
<%= render_md(@thread.content).html_safe %>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<h1>Edit Info</h1>
|
<h1>Edit Info</h1>
|
||||||
<%= form_for @info do |f|%>
|
<%= form_for @info do |f|%>
|
||||||
<%= f.text_field :title, :label => false %>
|
<%= f.text_field :title%>
|
||||||
<%= f.text_area :content, :label => false, input_html: {class: "full-width vertical"} %>
|
<%= render partial: "mdhelp" %>
|
||||||
|
<%= f.text_area :content, class: "vertical" %>
|
||||||
<p><%= f.submit "Update Info", class: "btn blue left" %></p>
|
<p><%= f.submit "Update Info", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<p><%= button_to "Delete Info", @info, method: "delete", data: {confirm: "Delete Info forever?"}, class: "btn red right" %></p>
|
<p><%= button_to "Delete Info", @info, method: "delete", data: {confirm: "Delete Info forever?"}, class: "btn red right" %></p>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<h1>Info</h1>
|
<h1>Info</h1>
|
||||||
|
<% if mod? %>
|
||||||
|
<%= link_to "New Info", new_info_path, class: "btn blue" %>
|
||||||
|
<% end %>
|
||||||
<ul>
|
<ul>
|
||||||
<% @info.each do |info| %>
|
<% @info.each do |info| %>
|
||||||
<li><%= link_to info.title, info %></li>
|
<li><%= link_to info.title, info %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% if mod? %>
|
|
||||||
<%= link_to "New Info", new_info_path, class: "btn blue" %>
|
|
||||||
<% end %>
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<h1>New Info</h1>
|
<h1>New Info</h1>
|
||||||
<%= form_for @info, url: info_index_path do |f|%>
|
<%= form_for @info, url: info_index_path do |f|%>
|
||||||
<%= f.text_field :title, placeholder: "Title" %>
|
<%= f.text_field :title, placeholder: "Title" %>
|
||||||
<%= f.text_area :content, placeholder: "Text", input_html: {class: "full-width vertical"} %>
|
<%= render partial: "mdhelp" %>
|
||||||
|
<%= f.text_area :content, placeholder: "Text", class: "vertical" %>
|
||||||
<p><%= f.submit "Create Info", class: "btn blue left" %></p>
|
<p><%= f.submit "Create Info", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
<%= link_to "Info", info_index_path %> → <%= @info.title %>
|
<%= link_to "Info", info_index_path %> → <%= @info.title %>
|
||||||
|
<%= link_to "Edit Info", edit_info_path(@info), class: "btn blue right" %>
|
||||||
|
<div class="clear"></div>
|
||||||
<h1><%= @info.title %></h1>
|
<h1><%= @info.title %></h1>
|
||||||
<div class="post"><%= render_md(@info.content).html_safe %></div>
|
<div class="post"><%= render_md(@info.content).html_safe %></div>
|
||||||
12
app/views/layouts/_footer.html.erb
Normal file
12
app/views/layouts/_footer.html.erb
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<% users = User.select{|u| u.online?} %>
|
||||||
|
<div id="footer">
|
||||||
|
<div id="online-users">
|
||||||
|
<p title="Seen within the last 5 minutes">Users currently online: <%= users.length %></p>
|
||||||
|
<% users.each do |u| %>
|
||||||
|
<%= render partial: "users/username", locals: { user: u } %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="note">
|
||||||
|
Website made by <a href="/users/2">Redstone Sheep</a> with design by <a href="/users/12">ColoArtz</a>.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -11,11 +11,12 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="mobile-info">We don't have a mobile style yet. It might look shitty.<br>Tip: Hold your device in landscape mode.</div>
|
<div id="mobile-info">We don't have a mobile style yet. It might look shitty.<br>Tip: Hold your device in landscape mode.</div>
|
||||||
<%= render "/layouts/head" %>
|
<%= render partial: "/layouts/head" %>
|
||||||
<div id="main-content">
|
<div id="main-content">
|
||||||
<%= "<div id='alert' class='flash'>#{alert}</div>".html_safe if alert %>
|
<%= "<div class='flash alert'>#{alert}</div>".html_safe if alert %>
|
||||||
<%= "<div id='notice' class='flash'>#{notice}</div>".html_safe if notice %>
|
<%= "<div class='flash notice'>#{notice}</div>".html_safe if notice %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
|
<%= render partial: "/layouts/footer" %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,29 +1,39 @@
|
|||||||
<p><%= @user.name %> has registered on redstoner.</p>
|
<h1>'<%= @user.name %>' has registered on redstoner.</h1>
|
||||||
<p>
|
<table style="border: 1px solid black; border-collapse:collapse;">
|
||||||
<table style="border: 1px solid black; border-collapse:collapse;">
|
<tr>
|
||||||
<tr>
|
<td style="border:1px solid black;">IGN</td>
|
||||||
<td style="border:1px solid black;">IGN</td>
|
<td style="border:1px solid black;"><%= @user.ign %></td>
|
||||||
<td style="border:1px solid black;"><%= @user.ign %></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td style="border:1px solid black;">UUID</td>
|
||||||
<td style="border:1px solid black;">email</td>
|
<td style="border:1px solid black;"><%= @user.uuid %></td>
|
||||||
<td style="border:1px solid black;"><%= @user.email %></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td style="border:1px solid black;">email</td>
|
||||||
<td style="border:1px solid black;">Time</td>
|
<td style="border:1px solid black;"><%= @user.email %></td>
|
||||||
<td style="border:1px solid black;"><%= @user.created_at %></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td style="border:1px solid black;">Time</td>
|
||||||
<td style="border:1px solid black;">IP</td>
|
<td style="border:1px solid black;"><%= @user.created_at.strftime("%e. %b %Y, %H:%M") %></td>
|
||||||
<td style="border:1px solid black;"><%= @user.last_ip %></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td style="border:1px solid black;">Role</td>
|
||||||
</p>
|
<td style="border:1px solid black;"><%= @user.role %></td>
|
||||||
|
</tr>
|
||||||
<% if @mcpw %>
|
<tr>
|
||||||
<p>
|
<td style="border:1px solid black;">IP</td>
|
||||||
<font color="red">
|
<td style="border:1px solid black;"><%= @user.last_ip %></td>
|
||||||
<b>USER IS AN IDIOT!</b>
|
</tr>
|
||||||
</font>
|
<tr>
|
||||||
</p>
|
<td style="border:1px solid black;">Idiot</td>
|
||||||
<% end %>
|
<% if @mcpw %>
|
||||||
|
<td style="border:3px solid red; color: red; font-weight: bold">YES! (used his mc pass) >_<</td>
|
||||||
|
<% else %>
|
||||||
|
<td style="border:1px solid black;">no</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
<% debug = @user.attributes.dup %>
|
||||||
|
<% debug.delete("password_digest") %>
|
||||||
|
<p><small style="font-size: 0.7em; color: #aaa;">Debug info:<br><%= debug %></small>
|
||||||
@@ -3,22 +3,17 @@
|
|||||||
Hi <%= @user.name %>!
|
Hi <%= @user.name %>!
|
||||||
|
|
||||||
<p>Thank you for registering on Redstoner.com!</p>
|
<p>Thank you for registering on Redstoner.com!</p>
|
||||||
<p>To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false) %> your email address.</p>
|
<p>To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false), style: "text-decoration: none; color: #4096EE;" %> your email address.</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<% if @mcpw %>
|
<% if @mcpw %>
|
||||||
<div>
|
<div style="background: #500; color: #f00; padding: 0.5em 1em;">
|
||||||
<p>
|
<h2>WARNING!</h2>
|
||||||
<font color="red">
|
<p>Never use the same password on different sites, that is how accers gain access to accounts.</p>
|
||||||
<b>NEVER USE THE SAME PASSWORD TWICE!</b>
|
<p>You have used your minecraft password on our website.<br>
|
||||||
</font>
|
<b>Don't do that</b>! It's stupid.</p>
|
||||||
</p>
|
<p>If you are using this password elsewhere, change it. Now.</p>
|
||||||
<p>
|
|
||||||
<font color="red">
|
|
||||||
You used your minecraft password on our website. <b>Do not do that</b>. It's just stupid.
|
|
||||||
</font>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
@@ -30,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
<p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_path(role: "staff", only_path: false) %> in-game.</p>
|
<p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_path(role: "staff", only_path: false), style: "text-decoration: none; color: #4096EE;" %> in-game.</p>
|
||||||
<p>Your Redstoner team</p>
|
<p>Your Redstoner team</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -38,6 +33,11 @@
|
|||||||
<div style="background: none repeat scroll 0% 0% rgb(68, 68, 68); width: 100%; padding: 2em; color: rgb(255, 255, 255); margin:auto; text-align: center;">
|
<div style="background: none repeat scroll 0% 0% rgb(68, 68, 68); width: 100%; padding: 2em; color: rgb(255, 255, 255); margin:auto; text-align: center;">
|
||||||
<p><i>If you did not sign up on redstoner.com you can safely ignore this email!</i>
|
<p><i>If you did not sign up on redstoner.com you can safely ignore this email!</i>
|
||||||
</p>
|
</p>
|
||||||
<p>You can contact us via: <%= link_to "Website", "root_path" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer" %> | <%= link_to "Google+", "https://google.com/+Redstoner" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com" %></p>
|
<p>You can contact us via:
|
||||||
|
<%= link_to "Website", "root_path", style: "text-decoration: none; color: #4096EE;" %> |
|
||||||
|
<%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> |
|
||||||
|
<%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> |
|
||||||
|
<%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,21 +24,30 @@
|
|||||||
<div class="donation">
|
<div class="donation">
|
||||||
<h1>Donate to Redstone Sheep</h1>
|
<h1>Donate to Redstone Sheep</h1>
|
||||||
<h4>Sheep is our admin. He fixes everything & keeps the server running.</h4>
|
<h4>Sheep is our admin. He fixes everything & keeps the server running.</h4>
|
||||||
<form target="_top" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
|
||||||
<input name="custom" type="text" placeholder="Your Minecraft name" value="<%= current_user.try(:ign) %>">
|
<form target="_blank" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
||||||
|
<% if current_user %>
|
||||||
|
<input name="custom" type="hidden" placeholder="Your Minecraft name" value="<%= current_user.ign %>">
|
||||||
|
<% else %>
|
||||||
|
<input name="custom" type="text" placeholder="Your Minecraft name">
|
||||||
|
<% end %>
|
||||||
<input value="_s-xclick" name="cmd" type="hidden">
|
<input value="_s-xclick" name="cmd" type="hidden">
|
||||||
<input value="HPWLQLL87GTHC" name="hosted_button_id" type="hidden">
|
<input value="HPWLQLL87GTHC" name="hosted_button_id" type="hidden">
|
||||||
<input value="Donate" name="Donate" type="submit" class="btn blue">
|
<input value="Donate" name="Donate" type="submit" class="btn dark donate paypal">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="donation">
|
<div class="donation">
|
||||||
<h1>Donate to PanFritz</h1>
|
<h1>Donate to PanFritz</h1>
|
||||||
<h4>Pan hosts the Server.</h4>
|
<h4>Pan hosts the Server.</h4>
|
||||||
<form target="_top" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
<form target="_blank" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
||||||
<input name="custom" type="text" placeholder="Your Minecraft name" value="<%= current_user.try(:ign) %>">
|
<% if current_user %>
|
||||||
|
<input name="custom" type="hidden" placeholder="Your Minecraft name" value="<%= current_user.ign %>">
|
||||||
|
<% else %>
|
||||||
|
<input name="custom" type="text" placeholder="Your Minecraft name">
|
||||||
|
<% end %>
|
||||||
<input value="_s-xclick" name="cmd" type="hidden">
|
<input value="_s-xclick" name="cmd" type="hidden">
|
||||||
<input value="SW8TJLDK9FX3W" name="hosted_button_id" type="hidden">
|
<input value="SW8TJLDK9FX3W" name="hosted_button_id" type="hidden">
|
||||||
<input value="Donate" name="Donate" type="submit" class="btn blue">
|
<input value="Donate" name="Donate" type="submit" class="btn dark donate paypal">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
<div id="delete_me" class="delete_me"> <!-- delete this div -->
|
<h1>Redstoner</h1>
|
||||||
<h1>The loneliest page in the world</h1>
|
<p>We need some text here</p>
|
||||||
<iframe width="420" height="315" src="//www.youtube.com/embed/N3O20EOE-p4?theme=light&color=red" frameborder="0" allowfullscreen></iframe>
|
<p>Any suggestions?</p>
|
||||||
</div>
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
<div class="item-group thread-reply with-avatar" id="reply-<%= reply.id %>">
|
<div class="item-group thread-reply with-avatar" id="reply-<%= reply.id %>">
|
||||||
<%= link_to(image_tag(reply.author.avatar_url(64), class: "avatar"), reply.author, title: reply.author.ign) %>
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<%= render partial: "users/username", locals: { user: reply.author } %> <time><%= link_to reply.created_at.strftime("%e. %b %Y, %H:%m"), "#reply-#{reply.id}" %></time>
|
<%= link_to(image_tag(reply.author.avatar_url(64), class: "avatar"), reply.author, title: reply.author.ign) %>
|
||||||
|
<%= render partial: "users/username", locals: { user: reply.author } %>
|
||||||
|
<time><%= link_to reply.created_at.strftime("%e. %b %Y, %H:%M"), "#reply-#{reply.id}" %></time>
|
||||||
|
|
||||||
<%= link_to "edit", edit_forumthread_threadreply_path(reply.thread, reply), class: "editlink" if mod? || reply.thread.author.is?(current_user) %>
|
<%= link_to "edit", edit_forumthread_threadreply_path(reply.thread, reply), class: "editlink" if mod? || reply.thread.author.is?(current_user) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<%= link_to @reply.thread.forum.group, forumgroup_path(@reply.thread.forum.group) %> → <%= link_to @reply.thread.forum, @reply.thread.forum %> → <%= link_to @reply.thread %> → Edit reply
|
<%= link_to @reply.thread.forum.group, forumgroup_path(@reply.thread.forum.group) %> → <%= link_to @reply.thread.forum, @reply.thread.forum %> → <%= link_to @reply.thread %> → Edit reply
|
||||||
<h1>Edit reply</h1>
|
<h1>Edit reply</h1>
|
||||||
<%= form_for [@reply.thread, @reply] do |f| %>
|
<%= form_for [@reply.thread, @reply] do |f| %>
|
||||||
|
<%= render partial: "mdhelp" %>
|
||||||
<%= f.text_area :content, placeholder: "Text" %>
|
<%= f.text_area :content, placeholder: "Text" %>
|
||||||
<p><%= f.submit "Reply", class: "btn blue" %></p>
|
<p><%= f.submit "Reply", class: "btn blue left" %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<p><%= button_to "Delete reply", [@reply.thread, @reply], method: "delete", data: {confirm: "Delete reply forever?"}, class: "btn red right" %></p>
|
||||||
@@ -1,13 +1,8 @@
|
|||||||
<h1>Change password</h1>
|
<h1>Change password</h1>
|
||||||
|
|
||||||
<%= simple_form_for @user do |f| %>
|
<%= form_for @user do |f| %>
|
||||||
<div id="form_labels">
|
<%= f.text_field :current_password %>
|
||||||
|
<%= f.text_field :email %>
|
||||||
</div>
|
<%= f.text_field :password %>
|
||||||
<div id="form_inputs">
|
<%= f.text_field :password_confirmation %>
|
||||||
<%= f.input :current_password, :label => false %>
|
|
||||||
<%= f.input :email, :label => false %>
|
|
||||||
<%= f.input :password, :label => false %>
|
|
||||||
<%= f.input :password_confirmation, :label => false %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -1,34 +1,27 @@
|
|||||||
<% def can_edit?; (@user.is?(current_user) && confirmed?) || (mod? && current_user.role >= @user.role); end %>
|
<%
|
||||||
|
def can_edit?
|
||||||
|
(@user.is?(current_user) && confirmed?) || (mod? && current_user.role >= @user.role)
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
|
||||||
<%= link_to (@user.is?(current_user) ? "Your profile" : @user.name), current_user %> → Edit
|
<%= link_to (@user.is?(current_user) ? "Your profile" : @user.name), current_user %> → Edit
|
||||||
<h1>Edit profile</h1>
|
<h1>Edit profile</h1>
|
||||||
|
|
||||||
<%= simple_form_for @user do |f| %>
|
<%= form_for @user do |f| %>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td><%= image_tag @user.avatar_url(128), :class => "user-avatar avatar", :alt => "avatar" %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Display name</td>
|
<td>Display name</td>
|
||||||
<td>
|
<td>
|
||||||
<%= f.input :name, :label => false, disabled: !can_edit? %>
|
<%= f.text_field :name, disabled: !can_edit? %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% if mod? %>
|
<% if mod? %>
|
||||||
<tr>
|
|
||||||
<td>In-game name</td>
|
|
||||||
<td>
|
|
||||||
<%= f.input :ign, :label => false, disabled: !(mod? && current_user.role >= @user.role) %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Role</td>
|
<td>Role</td>
|
||||||
<td>
|
<td>
|
||||||
<% if mod? && current_user.role >= @user.role %>
|
<% if mod? && current_user.role >= @user.role %>
|
||||||
<%= f.association :role, :label => false, :collection => Role.all_to(current_user.role), :include_blank => false %>
|
<%= f.select :role, Role.all_to(current_user.role) %>
|
||||||
<% else %>
|
|
||||||
<%= f.input :role, label: false, disabled: true %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -36,36 +29,39 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Skype username</td>
|
<td>Skype username</td>
|
||||||
<td>
|
<td>
|
||||||
<%= f.input :skype, label: false, placeholder: "Skype username", disabled: !can_edit? %>
|
<%= f.text_field :skype, placeholder: "Skype username", disabled: !can_edit? %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Show Skype to</td>
|
<td>Show Skype to</td>
|
||||||
<td>
|
<td>
|
||||||
<%= f.input :skype_public, label: false, as: :select, collection: [["Staff only", false], ["All users", true]], include_blank: false, input_html: { disabled: !can_edit? } %>
|
<%= f.select :skype_public, [["Staff only", false], ["All users", true]], {}, { disabled: !can_edit? } %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>YouTube username</td>
|
<td>YouTube username</td>
|
||||||
<td>
|
<td>
|
||||||
<%= f.input :youtube, :label => false, placeholder: "YouTube username", disabled: !can_edit? %>
|
<%= f.text_field :youtube, placeholder: "YouTube username", disabled: !can_edit? %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Twitter username</td>
|
<td>Twitter username</td>
|
||||||
<td>
|
<td>
|
||||||
<%= f.input :twitter, :label => false, placeholder: "Twitter username", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)) %>
|
<%= f.text_field :twitter, placeholder: "Twitter username", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>About you</td>
|
<td>About you</td>
|
||||||
<td>
|
<td>
|
||||||
<%= f.input :about, :label => false, :input_html => {:class => "vertical"}, placeholder: "Tell us something about you...", disabled: !can_edit? %>
|
<%= render partial: "mdhelp" %>
|
||||||
|
<%= f.text_area :about, class: "vertical", placeholder: "Tell us something about you...", disabled: !can_edit? %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<%= f.submit "Save profile", class: "btn blue", disabled: (!@user.confirmed? && @user.is?(current_user)) %>
|
|
||||||
|
<p><%= f.submit "Save profile", class: "btn blue", disabled: (!@user.confirmed? && @user.is?(current_user)) %></p>
|
||||||
|
|
||||||
<% if !@user.confirmed? %>
|
<% if !@user.confirmed? %>
|
||||||
<% if @user.is?(current_user) %>
|
<% if @user.is?(current_user) %>
|
||||||
<span class='red-alert'>Please confirm your email adress first!</span>
|
<span class='red-alert'>Please confirm your email adress first!</span>
|
||||||
@@ -73,5 +69,4 @@
|
|||||||
<span class='red-alert'>This user has not confirmed his email!</span>
|
<span class='red-alert'>This user has not confirmed his email!</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to "Cancel", @user, class: "btn red right" %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
<%= link_to "revert", unbecome_users_path, :class => "btn blue" %>
|
<%= link_to "revert", unbecome_users_path, :class => "btn blue" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
|
||||||
<% if @user.banned? %>
|
<% if @user.banned? %>
|
||||||
<span class="user-banned">This user is banned!</span>
|
<span class="user-banned">This user is banned!</span>
|
||||||
@@ -63,7 +64,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Joined</td>
|
<td>Joined</td>
|
||||||
<td><%= @user.created_at.strftime("%e. %b %Y, %H:%m") %></td>
|
<td><%= @user.created_at.strftime("%e. %b %Y, %H:%M") %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% if mod? || @user.is?(current_user) %>
|
<% if mod? || @user.is?(current_user) %>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,142 +0,0 @@
|
|||||||
# Use this setup block to configure all options available in SimpleForm.
|
|
||||||
SimpleForm.setup do |config|
|
|
||||||
# Wrappers are used by the form builder to generate a
|
|
||||||
# complete input. You can remove any component from the
|
|
||||||
# wrapper, change the order or even add your own to the
|
|
||||||
# stack. The options given below are used to wrap the
|
|
||||||
# whole input.
|
|
||||||
config.wrappers :default, :class => :input,
|
|
||||||
:hint_class => :field_with_hint, :error_class => :field_with_errors do |b|
|
|
||||||
## Extensions enabled by default
|
|
||||||
# Any of these extensions can be disabled for a
|
|
||||||
# given input by passing: `f.input EXTENSION_NAME => false`.
|
|
||||||
# You can make any of these extensions optional by
|
|
||||||
# renaming `b.use` to `b.optional`.
|
|
||||||
|
|
||||||
# Determines whether to use HTML5 (:email, :url, ...)
|
|
||||||
# and required attributes
|
|
||||||
b.use :html5
|
|
||||||
|
|
||||||
# Calculates placeholders automatically from I18n
|
|
||||||
# You can also pass a string as f.input :placeholder => "Placeholder"
|
|
||||||
b.use :placeholder
|
|
||||||
|
|
||||||
## Optional extensions
|
|
||||||
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
|
|
||||||
# to the input. If so, they will retrieve the values from the model
|
|
||||||
# if any exists. If you want to enable the lookup for any of those
|
|
||||||
# extensions by default, you can change `b.optional` to `b.use`.
|
|
||||||
|
|
||||||
# Calculates maxlength from length validations for string inputs
|
|
||||||
b.optional :maxlength
|
|
||||||
|
|
||||||
# Calculates pattern from format validations for string inputs
|
|
||||||
b.optional :pattern
|
|
||||||
|
|
||||||
# Calculates min and max from length validations for numeric inputs
|
|
||||||
b.optional :min_max
|
|
||||||
|
|
||||||
# Calculates readonly automatically from readonly attributes
|
|
||||||
b.optional :readonly
|
|
||||||
|
|
||||||
## Inputs
|
|
||||||
b.use :input
|
|
||||||
b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
|
|
||||||
b.use :error, :wrap_with => { :tag => :span, :class => :error }
|
|
||||||
end
|
|
||||||
|
|
||||||
# The default wrapper to be used by the FormBuilder.
|
|
||||||
config.default_wrapper = :default
|
|
||||||
|
|
||||||
# Define the way to render check boxes / radio buttons with labels.
|
|
||||||
# Defaults to :nested for bootstrap config.
|
|
||||||
# :inline => input + label
|
|
||||||
# :nested => label > input
|
|
||||||
config.boolean_style = :nested
|
|
||||||
|
|
||||||
# Default class for buttons
|
|
||||||
config.button_class = 'btn'
|
|
||||||
|
|
||||||
# Method used to tidy up errors. Specify any Rails Array method.
|
|
||||||
# :first lists the first message for each field.
|
|
||||||
# Use :to_sentence to list all errors for each field.
|
|
||||||
# config.error_method = :first
|
|
||||||
|
|
||||||
# Default tag used for error notification helper.
|
|
||||||
config.error_notification_tag = :div
|
|
||||||
|
|
||||||
# CSS class to add for error notification helper.
|
|
||||||
config.error_notification_class = 'alert alert-error'
|
|
||||||
|
|
||||||
# ID to add for error notification helper.
|
|
||||||
# config.error_notification_id = nil
|
|
||||||
|
|
||||||
# Series of attempts to detect a default label method for collection.
|
|
||||||
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
|
||||||
|
|
||||||
# Series of attempts to detect a default value method for collection.
|
|
||||||
# config.collection_value_methods = [ :id, :to_s ]
|
|
||||||
|
|
||||||
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
|
||||||
# config.collection_wrapper_tag = nil
|
|
||||||
|
|
||||||
# You can define the class to use on all collection wrappers. Defaulting to none.
|
|
||||||
# config.collection_wrapper_class = nil
|
|
||||||
|
|
||||||
# You can wrap each item in a collection of radio/check boxes with a tag,
|
|
||||||
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
|
||||||
# SimpleForm will force this option to be a label.
|
|
||||||
# config.item_wrapper_tag = :span
|
|
||||||
|
|
||||||
# You can define a class to use in all item wrappers. Defaulting to none.
|
|
||||||
# config.item_wrapper_class = nil
|
|
||||||
|
|
||||||
# How the label text should be generated altogether with the required text.
|
|
||||||
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
|
||||||
|
|
||||||
# You can define the class to use on all labels. Default is nil.
|
|
||||||
config.label_class = 'control-label'
|
|
||||||
|
|
||||||
# You can define the class to use on all forms. Default is simple_form.
|
|
||||||
# config.form_class = :simple_form
|
|
||||||
|
|
||||||
# You can define which elements should obtain additional classes
|
|
||||||
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
|
||||||
|
|
||||||
# Whether attributes are required by default (or not). Default is true.
|
|
||||||
# config.required_by_default = true
|
|
||||||
|
|
||||||
# Tell browsers whether to use default HTML5 validations (novalidate option).
|
|
||||||
# Default is enabled.
|
|
||||||
config.browser_validations = false
|
|
||||||
|
|
||||||
# Collection of methods to detect if a file type was given.
|
|
||||||
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
|
||||||
|
|
||||||
# Custom mappings for input types. This should be a hash containing a regexp
|
|
||||||
# to match as key, and the input type that will be used when the field name
|
|
||||||
# matches the regexp as value.
|
|
||||||
# config.input_mappings = { /count/ => :integer }
|
|
||||||
|
|
||||||
# Custom wrappers for input types. This should be a hash containing an input
|
|
||||||
# type as key and the wrapper that will be used for all inputs with specified type.
|
|
||||||
# config.wrapper_mappings = { :string => :prepend }
|
|
||||||
|
|
||||||
# Default priority for time_zone inputs.
|
|
||||||
# config.time_zone_priority = nil
|
|
||||||
|
|
||||||
# Default priority for country inputs.
|
|
||||||
# config.country_priority = nil
|
|
||||||
|
|
||||||
# Default size for text inputs.
|
|
||||||
# config.default_input_size = 50
|
|
||||||
|
|
||||||
# When false, do not use translations for labels.
|
|
||||||
# config.translate_labels = true
|
|
||||||
|
|
||||||
# Automatically discover new inputs in Rails' autoload path.
|
|
||||||
# config.inputs_discovery = true
|
|
||||||
|
|
||||||
# Cache SimpleForm inputs discovery
|
|
||||||
# config.cache_discovery = !Rails.env.development?
|
|
||||||
end
|
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
en:
|
en:
|
||||||
simple_form:
|
|
||||||
required:
|
|
||||||
text: 'required'
|
|
||||||
mark: ''
|
|
||||||
errors:
|
errors:
|
||||||
format: "%{message}"
|
format: "%{message}"
|
||||||
activerecord:
|
activerecord:
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
en:
|
|
||||||
simple_form:
|
|
||||||
"yes": 'Yes'
|
|
||||||
"no": 'No'
|
|
||||||
required:
|
|
||||||
text: 'required'
|
|
||||||
mark: ''
|
|
||||||
# You can uncomment the line below if you need to overwrite the whole required html.
|
|
||||||
# When using html, text and mark won't be used.
|
|
||||||
html: ''
|
|
||||||
error_notification:
|
|
||||||
default_message: "Please fill out all required fields:"
|
|
||||||
# Labels and hints examples
|
|
||||||
# labels:
|
|
||||||
# defaults:
|
|
||||||
# password: 'Password'
|
|
||||||
# user:
|
|
||||||
# new:
|
|
||||||
# email: 'E-mail to sign in.'
|
|
||||||
# edit:
|
|
||||||
# email: 'E-mail.'
|
|
||||||
# hints:
|
|
||||||
# defaults:
|
|
||||||
# username: 'User name to sign in.'
|
|
||||||
# password: 'No special characters, please.'
|
|
||||||
@@ -18,7 +18,7 @@ class CreateUsers < ActiveRecord::Migration
|
|||||||
t.boolean :confirmed, default: false
|
t.boolean :confirmed, default: false
|
||||||
t.datetime :last_seen
|
t.datetime :last_seen
|
||||||
|
|
||||||
t.references :role, null: false
|
t.references :role, null: false, default: Role.get(:normal)
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -109,9 +109,9 @@ ActiveRecord::Schema.define(version: 11) do
|
|||||||
t.string "email_token"
|
t.string "email_token"
|
||||||
t.boolean "confirmed", default: false
|
t.boolean "confirmed", default: false
|
||||||
t.datetime "last_seen"
|
t.datetime "last_seen"
|
||||||
t.integer "role_id", null: false
|
t.integer "role_id", default: 3, null: false
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ deleted_user = User.create!(
|
|||||||
uuid: "8667ba71b85a4004af54457a9734eed7",
|
uuid: "8667ba71b85a4004af54457a9734eed7",
|
||||||
name: "Deleted user",
|
name: "Deleted user",
|
||||||
email: "redstonerserver@gmail.com",
|
email: "redstonerserver@gmail.com",
|
||||||
ign: "Steve",
|
ign: "Notch", # just need any valid ign here, overriding later
|
||||||
about: "Hey, apparently, I do no longer exist. This is just a placeholder profile",
|
about: "Hey, apparently, I do no longer exist. This is just a placeholder profile",
|
||||||
password: userpw,
|
password: userpw,
|
||||||
password_confirmation: userpw,
|
password_confirmation: userpw,
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
|
|
||||||
<%%= f.error_notification %>
|
|
||||||
|
|
||||||
<div class="form-inputs">
|
|
||||||
<%- attributes.each do |attribute| -%>
|
|
||||||
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
|
|
||||||
<%- end -%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-actions">
|
|
||||||
<%%= f.button :submit %>
|
|
||||||
</div>
|
|
||||||
<%% end %>
|
|
||||||
1
pp.svg
Normal file
1
pp.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" class="PPTM"><path d="m15.603 3.917c-0.264-0.505-0.651-0.917-1.155-1.231-0.025-0.016-0.055-0.029-0.081-0.044 0.004 0.007 0.009 0.014 0.013 0.021 0.265 0.506 0.396 1.135 0.396 1.891 0 1.715-0.712 3.097-2.138 4.148-1.425 1.052-3.418 1.574-5.979 1.574h-0.597c-0.45 0-0.9 0.359-1.001 0.798l-0.719 3.106c-0.101 0.438-0.552 0.797-1.002 0.797h-1.404l-0.105 0.457c-0.101 0.438 0.184 0.798 0.633 0.798h2.1c0.45 0 0.9-0.359 1.001-0.798l0.718-3.106c0.101-0.438 0.551-0.797 1.002-0.797h0.597c2.562 0 4.554-0.522 5.979-1.574 1.426-1.052 2.139-2.434 2.139-4.149 0-0.755-0.132-1.385-0.397-1.891z" fill="#0079c1" class="PPTM-btm"/><path d="m9.27 6.283c-0.63 0.46-1.511 0.691-2.641 0.691h-0.521c-0.45 0-0.736-0.359-0.635-0.797l0.628-2.72c0.101-0.438 0.552-0.797 1.002-0.797h0.686c0.802 0 1.408 0.136 1.814 0.409 0.409 0.268 0.611 0.683 0.611 1.244 0 0.852-0.315 1.507-0.944 1.97zm3.369-5.42c-0.913-0.566-2.16-0.863-4.288-0.863h-4.372c-0.449 0-0.9 0.359-1.001 0.797l-2.957 12.813c-0.101 0.439 0.185 0.798 0.634 0.798h2.099c0.45 0 0.901-0.358 1.003-0.797l0.717-3.105c0.101-0.438 0.552-0.797 1.001-0.797h0.598c2.562 0 4.554-0.524 5.979-1.575 1.427-1.051 2.139-2.433 2.139-4.148-0.001-1.365-0.439-2.425-1.552-3.123z" fill="#00457c" class="PPTM-top"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
19
test/mailers/previews/registration_preview.rb
Normal file
19
test/mailers/previews/registration_preview.rb
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
class RegistrationPreview < ActionMailer::Preview
|
||||||
|
@@user = User.new(id: 123, uuid: "aabbccddeeff11223344556677889900", ign: "fancy_user", name: "fancy_user", email_token: "abcdefg", email: "fancymail@example.com", created_at: Time.now, last_ip: "1.2.3.4")
|
||||||
|
|
||||||
|
def register_mail_normal
|
||||||
|
RedstonerMailer.register_mail(@@user, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
def register_mail_idiot
|
||||||
|
RedstonerMailer.register_mail(@@user, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
def register_info_mail_normal
|
||||||
|
RedstonerMailer.register_info_mail(@@user, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
def register_info_mail_idiot
|
||||||
|
RedstonerMailer.register_info_mail(@@user, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user