FEATURE: add missing templates
This commit is contained in:
@@ -7,6 +7,10 @@ use App\Models\Content;
|
||||
use App\Models\Module;
|
||||
use App\Models\User;
|
||||
use App\Models\WidgetArea;
|
||||
use Templates\Binarity\Shortcodes\DarkBlock;
|
||||
use Templates\Binarity\Shortcodes\TechnologiesWrapper;
|
||||
use Templates\Binarity\Shortcodes\Technology;
|
||||
use Webwizo\Shortcodes\Facades\Shortcode;
|
||||
|
||||
class Handler implements TemplateHandler
|
||||
{
|
||||
@@ -79,6 +83,10 @@ class Handler implements TemplateHandler
|
||||
*/
|
||||
public static function beforeRender(Content & $content)
|
||||
{
|
||||
Shortcode::register('technologies', TechnologiesWrapper::class);
|
||||
Shortcode::register('tech', Technology::class);
|
||||
Shortcode::register('dark', DarkBlock::class);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+40
-23
@@ -2266,7 +2266,7 @@ p + .stat {
|
||||
width: 100%;
|
||||
height: 2.4375rem;
|
||||
padding: 0.5rem;
|
||||
border: 2px solid #414042;
|
||||
border: 1px solid #8aa800;
|
||||
margin: 0 0 1rem;
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
@@ -5633,6 +5633,7 @@ textarea,textarea:focus {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.what-we-know {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
@@ -5674,28 +5675,6 @@ textarea,textarea:focus {
|
||||
top: 14px;
|
||||
left: 16px;
|
||||
}
|
||||
.price-list {
|
||||
color: #fefefe;
|
||||
}
|
||||
.price-list tbody {
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
table.price-list tbody tr,table.price-list tbody tr:nth-child(2n) {
|
||||
background-color: transparent;
|
||||
}
|
||||
table.price-list tbody tr td {
|
||||
padding: 0.2rem 0.625rem 0.2rem 0;
|
||||
}
|
||||
table.price-list tbody tr td:first-child:before {
|
||||
content: '•';
|
||||
margin-right: 5px;
|
||||
color: #8aa800;
|
||||
}
|
||||
.dark-background {
|
||||
background-color: #58595b;
|
||||
color: #fefefe;
|
||||
}
|
||||
.services-pos {
|
||||
position: relative;
|
||||
}
|
||||
@@ -6284,6 +6263,44 @@ footer .binarity-info:before {
|
||||
}
|
||||
}
|
||||
|
||||
.dark-background {
|
||||
background-color: #58595b;
|
||||
color: #fefefe;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.dark-background h2, .dark-background h3 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dark-background table {
|
||||
color: #fefefe;
|
||||
width: 85%;
|
||||
margin: 0 auto;
|
||||
border: none;
|
||||
}
|
||||
.dark-background table tbody {
|
||||
border: none;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.dark-background table td:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dark-background table tbody tr,.dark-background table tbody tr:nth-child(2n) {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.dark-background table tbody tr td {
|
||||
padding: 0.2rem 0.625rem 0.2rem 0;
|
||||
border: none;
|
||||
}
|
||||
.dark-background table tbody tr td:first-child:before {
|
||||
content: '•';
|
||||
margin-right: 5px;
|
||||
color: #8aa800;
|
||||
}
|
||||
|
||||
|
||||
.flip-container {
|
||||
-webkit-perspective: 1000px;
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace Templates\Binarity\Shortcodes;
|
||||
|
||||
class DarkBlock
|
||||
{
|
||||
public function register($shortcode, $content, $compiler, $name)
|
||||
{
|
||||
$content = str_replace('<div>', '', $content);
|
||||
$content = str_replace('</div>', '', $content);
|
||||
|
||||
$code = '<div class="clearfix m-t-50"></div>
|
||||
<div class="dark-background">
|
||||
' . $content . '
|
||||
</div>';
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Templates\Binarity\Shortcodes;
|
||||
|
||||
class TechnologiesWrapper {
|
||||
public function register($shortcode, $content, $compiler, $name)
|
||||
{
|
||||
$content = str_replace('<div>', '', $content);
|
||||
$content = str_replace('</div>', '', $content);
|
||||
return '<div class="what-we-know-holder">'.$content.'</div>';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Templates\Binarity\Shortcodes;
|
||||
|
||||
class Technology
|
||||
{
|
||||
public function register($shortcode, $content, $compiler, $name)
|
||||
{
|
||||
$code = '<span class="what-we-know" title="' . $shortcode->title . '">';
|
||||
|
||||
if ($shortcode->img) {
|
||||
$code .= '<img src="' . asset_path($shortcode->img) . '" alt="' . $shortcode->title . '">';
|
||||
}
|
||||
|
||||
if ($content) {
|
||||
$code .= '<small style="position: absolute; top: 41%; left: 30%;">' . $content . '</small>';
|
||||
}
|
||||
$code .= '</span>';
|
||||
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user