login studio dscription, fixe #432

This commit is contained in:
2019-11-13 11:06:59 +01:00
parent e78cb51c8f
commit c6ce9f691c
4 changed files with 95 additions and 2 deletions
@@ -0,0 +1,40 @@
<?php
namespace Drupal\edlp_studio\Plugin\Block;
// use Drupal\Core\Access\AccessResult;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
// use Drupal\Core\Routing\RedirectDestinationTrait;
// use Drupal\Core\Routing\RouteMatchInterface;
// use Drupal\Core\Url;
// use Drupal\Core\Session\AccountInterface;
// use Drupal\Core\Block\BlockBase;
use Drupal\user\Plugin\Block\UserLoginBlock;
// use Drupal\user\UserInterface;
// use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides a 'User login' block.
*
* @Block(
* id = "studio_user_login_block",
* admin_label = @Translation("Studio User login"),
* category = @Translation("Forms")
* )
*/
class StudioUserLoginBlock extends UserLoginBlock implements ContainerFactoryPluginInterface {
/**
* {@inheritdoc}
*/
public function build() {
$build = parent::build();
// dpm($build);
array_unshift($build, ["studio_description" => [
"#markup" => '<span class="studio-description">' . t('The studio displays your bookmarked sounds. You can save them and create your own playlists') . '</span>'
]]);
return $build;
}
}
File diff suppressed because one or more lines are too long
@@ -2267,7 +2267,8 @@ footer{
@include iconlinkblock(url(../img/studio.svg), url(../img/studio-active.svg));
}
#block-userlogin{
#block-userlogin,
#block-studiouserlogin{
margin-bottom: 1em;
pointer-events: all;
margin-left: 0.2em;
@@ -2306,11 +2307,16 @@ footer{
pointer-events:none;
transition: all 0.5s ease-in-out;
transition-property: height,opacity;
transition-delay: 2s;
// &:hover{
// height:200px;
// opacity:1;
// pointer-events: auto;
// }
span.studio-description{
font-size: 0.75em;
text-align: justify;
}
form{
font-size: 0.75em;
}
@@ -2333,6 +2339,12 @@ footer{
height:200px;
opacity: 1;
pointer-events:auto;
transition-delay: 0s;
}
}
&#block-studiouserlogin:hover{
.block-content{
height:300px;
}
}
}
@@ -0,0 +1,41 @@
{#
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*
* @ingroup themeable
*/
#}
<div{{ attributes }}>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
<div class="block-content">
{% block content %}
{{ content }}
{% endblock %}
</div>
</div>