IMPR: minor changes

This commit is contained in:
Tony Air 2022-08-25 21:39:26 +02:00
parent 9b0cb9092f
commit 197aeb3537
4 changed files with 58 additions and 21 deletions

View File

@ -0,0 +1,26 @@
<?php
namespace A2nt\ElementalBasics\Tasks;
use DNADesign\Elemental\Models\BaseElement;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Dev\BuildTask;
class RemoveOldElementsTask extends BuildTask
{
protected $title = 'Remove Old Elements';
protected $description = 'Removes old Elements from DB if there\'s no such class';
public function run($request)
{
$els = ClassInfo::subclassesFor(BaseElement::class);
$badEls = BaseElement::get()->filter('ClassName:not', array_values($els));
echo '<h1>BAD:</h1>';
foreach ($badEls as $bad) {
echo 'Found <b>#'.$bad->ID.'</b> '.$bad->ClassName .'<br/>';
//$bad->delete();
}
echo 'Done!';
}
}

View File

@ -7,7 +7,7 @@
"
<% if $Children %>data-bs-toggle="hover"<% end_if %>
>
<% include NavItem_link ExtraClass="dropdown-toggle-fl dropdown-toggle-notouch" %>
<% include NavItem_link ExtraClass="dropdown-toggle dropdown-toggle-fl dropdown-toggle-notouch" %>
<button
id="NavItemButton{$ID}"

View File

@ -1,18 +1,29 @@
<div class="sc-links sc-links-share">
<a
target="_blank"
href="mailto:?subject=I wanted you to see this site&amp;body=Check out this site $Link"
>
<i class="fa fas fa-envelope"></i>
<span class="visually-hidden">Share by Email</span>
</a>
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={$AbsoluteLink}" rel="noreferrer" class="fb" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u={$AbsoluteLink}','sharer','toolbar=0,status=0,width=530,height=520');return false;">
<i class="fa fab fa-facebook-f"></i>
<span class="visually-hidden">Share Facebook</span>
</a>
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={$AbsoluteLink}" rel="noreferrer" class="fb" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u={$AbsoluteLink}','sharer','toolbar=0,status=0,width=530,height=520');return false;">
<i class="fa fab fa-facebook-f"></i>
<span class="visually-hidden">Share Facebook</span>
</a>
<a target="_blank" href="https://twitter.com/intent/tweet?url={$AbsoluteLink}" rel="noreferrer" class="tw">
<i class="fa fab fa-twitter"></i>
<span class="visually-hidden">Share Twitter</span>
<i class="fa fab fa-twitter"></i>
<span class="visually-hidden">Share Twitter</span>
</a>
<a target="_blank" href="https://www.linkedin.com/sharing/share-offsite/?url={$AbsoluteLink}" rel="noreferrer" class="li">
<i class="fab fa-linkedin-in"></i>
<i class="visually-hidden">Share at LinkedIn</i>
</a>
<a
target="_blank"
href="mailto:?subject=I wanted you to see this site&amp;body=Check out this site {$AbsoluteLink}"
class="ml"
>
<i class="fa fas fa-envelope"></i>
<i class="visually-hidden">Share by Email</i>
</a>
<a onclick="window.print()" title="Print" rel="noreferrer" target="_blank" class="print">
<i class="fas fa-print"></i>
<i class="visually-hidden">Print</i>
</a>
</div>

View File

@ -1,36 +1,36 @@
<div class="sc-links">
<% if $Facebook %>
<a href="$Facebook.LinkURL" title="Facebook" rel="noreferrer" target="_blank">
<a href="$Facebook.LinkURL" title="Facebook" class="fb" rel="noreferrer" target="_blank">
<i class="fab fa-facebook-f"></i>
<i class="visually-hidden">Facebook</i>
</a>
<% end_if %>
<% if $LinkedIn %>
<a href="$LinkedIn.LinkURL" title="LinkedIn" rel="noreferrer" target="_blank">
<a href="$LinkedIn.LinkURL" title="LinkedIn" class="li" rel="noreferrer" target="_blank">
<i class="fab fa-linkedin-in"></i>
<i class="visually-hidden">LinkedIn</i>
</a>
<% end_if %>
<% if $Pinterest %>
<a href="$Pinterest.LinkURL" title="Pinterest" rel="noreferrer" target="_blank">
<a href="$Pinterest.LinkURL" title="Pinterest" class="pr" rel="noreferrer" target="_blank">
<i class="fab fa-pinterest-p"></i>
<i class="visually-hidden">Pinterest</i>
</a>
<% end_if %>
<% if $Instagram %>
<a href="$Instagram.LinkURL" title="Instagram" rel="noreferrer" target="_blank">
<a href="$Instagram.LinkURL" title="Instagram" class="in" rel="noreferrer" target="_blank">
<i class="fab fa-instagram"></i>
<i class="visually-hidden">Instagram</i>
</a>
<% end_if %>
<% if $Twitter %>
<a href="$Twitter.LinkURL" title="Twitter" rel="noreferrer" target="_blank">
<a href="$Twitter.LinkURL" title="Twitter" class="tw" rel="noreferrer" target="_blank">
<i class="fab fa-twitter"></i>
<i class="visually-hidden">Twitter</i>
</a>
<% end_if %>
<% if $Youtube %>
<a href="$Youtube.LinkURL" title="YouTube" rel="noreferrer" target="_blank">
<a href="$Youtube.LinkURL" title="YouTube" class="yt" rel="noreferrer" target="_blank">
<i class="fab fa-youtube"></i>
<i class="visually-hidden">YouTube</i>
</a>