login studio dscription, fixe #432
This commit is contained in:
@@ -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));
|
@include iconlinkblock(url(../img/studio.svg), url(../img/studio-active.svg));
|
||||||
}
|
}
|
||||||
|
|
||||||
#block-userlogin{
|
#block-userlogin,
|
||||||
|
#block-studiouserlogin{
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
margin-left: 0.2em;
|
margin-left: 0.2em;
|
||||||
@@ -2306,11 +2307,16 @@ footer{
|
|||||||
pointer-events:none;
|
pointer-events:none;
|
||||||
transition: all 0.5s ease-in-out;
|
transition: all 0.5s ease-in-out;
|
||||||
transition-property: height,opacity;
|
transition-property: height,opacity;
|
||||||
|
transition-delay: 2s;
|
||||||
// &:hover{
|
// &:hover{
|
||||||
// height:200px;
|
// height:200px;
|
||||||
// opacity:1;
|
// opacity:1;
|
||||||
// pointer-events: auto;
|
// pointer-events: auto;
|
||||||
// }
|
// }
|
||||||
|
span.studio-description{
|
||||||
|
font-size: 0.75em;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
form{
|
form{
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
}
|
}
|
||||||
@@ -2333,6 +2339,12 @@ footer{
|
|||||||
height:200px;
|
height:200px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
pointer-events:auto;
|
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>
|
||||||
Reference in New Issue
Block a user