added goal jBBCode element
This commit is contained in:
parent
6a8f6cc649
commit
ce76fe161e
4 changed files with 33 additions and 0 deletions
8
app/post.class.php
Normal file → Executable file
8
app/post.class.php
Normal file → Executable file
|
@ -35,6 +35,14 @@ class Post
|
|||
});
|
||||
}
|
||||
|
||||
// Custom tags
|
||||
$builder = new JBBCode\CodeDefinitionBuilder("goal", "<div class=\"b_goal star\">{param}</div>");
|
||||
$parser->addCodeDefinition($builder->build());
|
||||
|
||||
$builder = new JBBCode\CodeDefinitionBuilder("goal", "<div class=\"b_goal {option}\">{param}</div>");
|
||||
$builder->setUseOption(true);
|
||||
$parser->addCodeDefinition($builder->build());
|
||||
|
||||
if(($tags = Config::get_safe("bbtags", [])) && !empty($tags)){
|
||||
foreach($tags as $tag => $content){
|
||||
$builder = new JBBCode\CodeDefinitionBuilder($tag, $content);
|
||||
|
|
BIN
static/images/star.png
Executable file
BIN
static/images/star.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 470 B |
BIN
static/images/trophy.png
Executable file
BIN
static/images/trophy.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 489 B |
|
@ -429,6 +429,31 @@ body {
|
|||
max-height: 470px;
|
||||
}
|
||||
|
||||
.b_goal {
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.b_goal:before {
|
||||
content: " ";
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: #3578e5 no-repeat center center;
|
||||
border-radius: 50%;
|
||||
line-height: 0;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.b_goal.star:before {
|
||||
background-image: url(../images/star.png);
|
||||
}
|
||||
|
||||
.b_goal.trophy:before {
|
||||
background-image: url(../images/trophy.png);
|
||||
}
|
||||
|
||||
.b_textarea {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
|
|
Loading…
Add table
Reference in a new issue