Skip to content

Commit

Permalink
alterações dos controles com icones svg e vlibras para menu fluante n…
Browse files Browse the repository at this point in the history
…o canto inferior direito
  • Loading branch information
benrainir committed Mar 1, 2021
1 parent be5f10c commit 953f976
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 33 deletions.
17 changes: 6 additions & 11 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,33 @@ class Plugin extends \MapasCulturais\Plugin
{
function __construct(array $config = [])
{

parent::__construct($config);
}

public function _init()
{
$app = App::i();

//$app->view->assetManager->publishFolder('accessibility/img', 'accessibility/img');

// enqueue scripts and styles
$app->view->enqueueScript('app', 'accessibility', 'js/accessibility.js');
$app->view->enqueueStyle('app', 'accessibility', 'css/accessibility.css');

// add hooks
$app->hook('template(<<*>>.<<*>>.main-header):begin', function () use ($app) {
$app->hook('template(<<*>>.<<*>>.main-footer):end', function () use ($app) {
$this->part('accessibility/controls');
});

$app->hook('template(<<*>>.<<*>>.main-header):end', function () use ($app) {
$app->hook('template(<<*>>.<<*>>.main-footer):end', function () use ($app) {
$this->part('accessibility/vlibras');
});
}
/**
* Registra os controladores e metadados das entidades
*
* @return void
*/

public function register()
{
$app = App::i();




}
}
?>
Binary file added assets/accessibility/img/icon-accessibility.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions assets/css/accessibility.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,102 @@
@media screen and (max-width: 768px) {
div#accessibility {
display: none !important;
}

div[vw].enabled {
display: none !important;
}
}


/*! Accessibility Controls */

div#accessibility {
position: fixed;
width: 60px !important;
height: 60px !important;
right: 0 !important;
z-index: 99999999 !important;
font-family: Arial !important;
color: #000;
line-height: 1.3 !important;
display: block;
background-color: #ffffff !important;
border-radius: 30px !important;
margin-right: 20px !important;
bottom: 160px !important;
}

div#accessibility img {
width: 42px !important;
height: 42px !important;
margin: 9px !important;
padding: 0px !important;
max-width: none;
display: block;
}

.accessibility-box-title {
display: none;
position: relative;
width: 180px;
height: 25px;
background-color: #FFF !important;
left: -190px;
top: -80px;
border-radius: 10px;
}

.accessibility-box-title h1 {
font-size: 16px !important;
font-family: sans-serif !important;
color: #1351b4;
margin: 0px !important;
padding: 0px !important;
text-align: center!important;
font-weight: bold !important;
line-height: 25px !important;
}

.accessibility-box-wrapper {
display: none;
position: relative;
width: 185px;
height: 42px;
background-color: #fff !important;
left: -190px;
top: -75px;
border-radius: 20px;
}

.svg-icon {
width: 32px;
height: 32px;
margin: 5px;
}

.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
fill: #000;
}

.svg-icon circle {
stroke: #000;
stroke-width: 1;
}

/*! Vlibras */
div[vw].enabled {
display: block;
padding: 10px;
background-color: #ffffff;
border-radius: 30px;
margin-right: 20px;
bottom: 90px !important;
top: unset !important;
}

/*! pojo-accessibility - v2.0.3 - 28-05-2018 */
#pojo-a11y-toolbar {
position: fixed;
Expand Down
21 changes: 16 additions & 5 deletions assets/js/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ $(document).ready(function($){
var minTamanhoFont = 8;
var maxTamanhoFont = 30;

$(".elementor-social-icon-plus-circle").on("click", function(e){

$("#accessibility-btn").on("click", function(e){
$(".accessibility-box-wrapper").fadeToggle();
$(".accessibility-box-title").fadeToggle();
});

$("#accessibility-plus").on("click", function(e){

e.preventDefault();

Expand All @@ -23,7 +29,7 @@ $(document).ready(function($){

});

$(".elementor-social-icon-minus-circle").on("click", function(e){
$("#accessibility-minus").on("click", function(e){
e.preventDefault();

var ellements = $("#main-section p, #main-section span, #main-section li, #main-section h1, #main-section h2, #main-section h3, #main-section h4, #main-section h5, #main-section h6, #main-section a");
Expand All @@ -50,9 +56,11 @@ $(document).ready(function($){
values_defaults.push({ "tagname" : index_val, "fontsize": font_size })
});

$(".elementor-social-icon-font").on("click", function(e){
$("#accessibility-cancel").on("click", function(e){

e.preventDefault();
e.preventDefault();

$("body").removeClass(" pojo-a11y-negative-contrast");

var ellements = $("#main-section p, #main-section span, #main-section li, #main-section h1, #main-section h2, #main-section h3, #main-section h4, #main-section h5, #main-section h6, #main-section a");

Expand All @@ -63,9 +71,12 @@ $(document).ready(function($){
}
} );

$(".accessibility-box-wrapper").fadeToggle();
$(".accessibility-box-title").fadeToggle();

});

$(".elementor-social-icon-adjust ").on("click", function(e){
$("#accessibility-contrast").on("click", function(e){

e.preventDefault();

Expand Down
34 changes: 17 additions & 17 deletions layouts/parts/accessibility/controls.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div id="accessibility">
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
<img id="accessibility-btn" src="<?php $this->asset('accessibility/img/icon-accessibility.png'); ?>" />
<div class="accessibility-box-title"><h1>Acessibilidade</h1></div>
<div class="accessibility-box-wrapper" style="background-color:#fff !important; color:#000 !important;">

<a class="elementor-icon elementor-social-icon elementor-social-icon-font elementor-repeater-item-802b411" target="_blank">
<span class="elementor-screen-only"></span>
<i class="fas fa-font"></i></a>
<a class="elementor-icon elementor-social-icon elementor-social-icon-plus-circle elementor-repeater-item-0667efd" target="_blank">
<span class="elementor-screen-only"></span>
<i class="fas fa-plus-circle"></i></a>
<a class="elementor-icon elementor-social-icon elementor-social-icon-minus-circle elementor-repeater-item-a427cc1" target="_blank">
<span class="elementor-screen-only"></span>
<i class="fas fa-minus-circle"></i></a>

<a class="elementor-icon elementor-social-icon elementor-social-icon-adjust elementor-repeater-item-439ab46" target="_blank">
<span class="elementor-screen-only"></span>
<i class="fas fa-adjust"></i></a>
</div>
<svg id="accessibility-contrast" class="svg-icon" viewBox="0 0 20 20" style="background-color: transparent !important; color:#000 !important;">
<path fill="none" d="M10,0.625c-5.178,0-9.375,4.197-9.375,9.375S4.822,19.375,10,19.375s9.375-4.197,9.375-9.375S15.178,0.625,10,0.625 M10,18.522V1.478c4.707,0,8.522,3.815,8.522,8.522S14.707,18.522,10,18.522"></path>
</svg>
<svg id="accessibility-plus" class="svg-icon" viewBox="0 0 20 20" style="background-color: transparent !important; color:#000 !important;">
<path fill="none" d="M13.388,9.624h-3.011v-3.01c0-0.208-0.168-0.377-0.376-0.377S9.624,6.405,9.624,6.613v3.01H6.613c-0.208,0-0.376,0.168-0.376,0.376s0.168,0.376,0.376,0.376h3.011v3.01c0,0.208,0.168,0.378,0.376,0.378s0.376-0.17,0.376-0.378v-3.01h3.011c0.207,0,0.377-0.168,0.377-0.376S13.595,9.624,13.388,9.624z M10,1.344c-4.781,0-8.656,3.875-8.656,8.656c0,4.781,3.875,8.656,8.656,8.656c4.781,0,8.656-3.875,8.656-8.656C18.656,5.219,14.781,1.344,10,1.344z M10,17.903c-4.365,0-7.904-3.538-7.904-7.903S5.635,2.096,10,2.096S17.903,5.635,17.903,10S14.365,17.903,10,17.903z"></path>
</svg>
<svg id="accessibility-minus" class="svg-icon" viewBox="0 0 20 20" style="background-color: transparent !important; color:#000 !important;">
<path fill="none" d="M10,1.344c-4.781,0-8.656,3.875-8.656,8.656c0,4.781,3.875,8.656,8.656,8.656c4.781,0,8.656-3.875,8.656-8.656C18.656,5.219,14.781,1.344,10,1.344z M10,17.903c-4.365,0-7.904-3.538-7.904-7.903S5.635,2.096,10,2.096S17.903,5.635,17.903,10S14.365,17.903,10,17.903z M13.388,9.624H6.613c-0.208,0-0.376,0.168-0.376,0.376s0.168,0.376,0.376,0.376h6.775c0.207,0,0.377-0.168,0.377-0.376S13.595,9.624,13.388,9.624z"></path>
</svg>
<svg id="accessibility-cancel" class="svg-icon" viewBox="0 0 20 20" style="background-color: transparent !important; color:#000 !important;">
<path fill="none" d="M12.71,7.291c-0.15-0.15-0.393-0.15-0.542,0L10,9.458L7.833,7.291c-0.15-0.15-0.392-0.15-0.542,0c-0.149,0.149-0.149,0.392,0,0.541L9.458,10l-2.168,2.167c-0.149,0.15-0.149,0.393,0,0.542c0.15,0.149,0.392,0.149,0.542,0L10,10.542l2.168,2.167c0.149,0.149,0.392,0.149,0.542,0c0.148-0.149,0.148-0.392,0-0.542L10.542,10l2.168-2.168C12.858,7.683,12.858,7.44,12.71,7.291z M10,1.188c-4.867,0-8.812,3.946-8.812,8.812c0,4.867,3.945,8.812,8.812,8.812s8.812-3.945,8.812-8.812C18.812,5.133,14.867,1.188,10,1.188z M10,18.046c-4.444,0-8.046-3.603-8.046-8.046c0-4.444,3.603-8.046,8.046-8.046c4.443,0,8.046,3.602,8.046,8.046C18.046,14.443,14.443,18.046,10,18.046z"></path>
</svg>
</div>
</div>

0 comments on commit 953f976

Please sign in to comment.