Add some space between help text paragraphs via CSS.

This commit is contained in:
Michael Stenta 2021-06-08 21:08:29 -04:00
parent 05418f804b
commit 1d8a0d1c21
4 changed files with 16 additions and 2 deletions

View File

@ -16,7 +16,6 @@ function farm_ui_location_help($route_name, RouteMatchInterface $route_match) {
// Locations overview help text.
if ($route_name == 'farm.locations') {
$output .= '<p>' . t('Locations represent places of interest. They are assets, and assets can be moved to them. Logs can reference them.') . '</p>';
$output .= '<p>&nbsp;</p>';
$output .= '<p>' . t('Locations can be organized into a hierarchy with parent relationships.') . '</p>';
}
@ -27,7 +26,6 @@ function farm_ui_location_help($route_name, RouteMatchInterface $route_match) {
// Drag and drop help text.
if (in_array($route_name, ['farm.locations', 'farm.asset.locations'])) {
$output .= '<p>&nbsp;</p>';
$output .= '<p>' . t('To change the hierarchy, either click on individual assets and edit their parent, or click %toggle_button below to enable drag and drop editing on this page. The %save_button button will save changes, and %reset_button will reset them.', ['%toggle_button' => t('Toggle drag and drop'), '%save_button' => t('Save'), '%reset_button' => t('Reset')]) . '</p>';
}

View File

@ -0,0 +1,3 @@
.help .block-help-block p {
margin-bottom: 1em;
}

View File

@ -6,6 +6,10 @@ footer:
css:
theme:
css/footer.css: { }
help:
css:
theme:
css/help.css: { }
map:
css:
theme:

View File

@ -16,6 +16,15 @@ function farm_ui_theme_element_info_alter(array &$info) {
}
}
/**
* Implements hook_preprocess_HOOK().
*/
function farm_ui_theme_preprocess_block(&$variables) {
if ($variables['plugin_id'] == 'help_block') {
$variables['#attached']['library'][] = 'farm_ui_theme/help';
}
}
/**
* Implements hook_preprocess_HOOK().
*/