Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.2 release #643

Merged
merged 8 commits into from
Oct 30, 2024
15 changes: 6 additions & 9 deletions css/base/fields.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@
.field__label {
font-weight: var(--heading-font-weight);
}
.field--label-inline .field__label,
.field--label-inline .field__items {
float: left; /* LTR */

.field--label-inline > .field__label,
.field--label-inline > .field__items {
float: left;
}

.field--label-inline .field__label,
.field--label-inline > .field__item,
.field--label-inline .field__items {
padding-right: var(--spacing-smaller);
}
[dir="rtl"] .field--label-inline .field__label,
[dir="rtl"] .field--label-inline .field__items {
padding-right: 0;
padding-left: var(--spacing-smaller);
padding-inline-end: var(--spacing-smaller);
}
3 changes: 3 additions & 0 deletions css/base/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ body {
--section-spacing-vertical-pre-footer: var(--spacing-largest);
--section-spacing-vertical-footer: var(--spacing);
--section-spacing-vertical-post-footer: var(--spacing);
--color-pre-footer-heading: var(--color-white);
--color-pre-footer-link: var(--color-white);
--color-pre-footer-text: var(--color-white);
--color-footer-heading: var(--color-text);
--color-footer-link: var(--color-link);
--color-footer-text: var(--color-text);
--color-post-footer-heading: var(--color-text);
--color-post-footer-link: var(--color-link);
--color-post-footer-text: var(--color-text);

Expand Down
23 changes: 23 additions & 0 deletions css/components/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,26 @@
.lgd-footer__post-footer a {
color: var(--color-post-footer-link);
}

/* Headings in footer regions */
.lgd-footer__pre-footer h2,
.lgd-footer__pre-footer h3,
.lgd-footer__pre-footer h4,
.lgd-footer__pre-footer h5,
.lgd-footer__pre-footer h6 {
color: var(--color-pre-footer-heading);
}
.lgd-footer__footer h2,
.lgd-footer__footer h3,
.lgd-footer__footer h4,
.lgd-footer__footer h5,
.lgd-footer__footer h6 {
color: var(--color-footer-heading);
}
.lgd-footer__post-footer h2,
.lgd-footer__post-footer h3,
.lgd-footer__post-footer h4,
.lgd-footer__post-footer h5,
.lgd-footer__post-footer h6 {
color: var(--color-post-footer-heading);
}
13 changes: 13 additions & 0 deletions localgov_base.theme
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\DeprecationHelper;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\views\ViewExecutable;

/**
Expand Down Expand Up @@ -248,3 +249,15 @@ function localgov_base_preprocess_container(&$variables) {
function localgov_base_form_preview_link_entity_form_alter(&$form, $form_state, $form_id) {
$form['#attached']['library'][''] = 'localgov_base/preview-link';
}

/**
* Implements hook_preprocess_guides_prev_next_block().
*/
function localgov_base_preprocess_guides_prev_next_block(&$variables) {
if ($variables['previous_url'] instanceof Url) {
$variables['previous_url']->setOption('fragment', 'lgd-guides__title');
}
if ($variables['next_url'] instanceof Url) {
$variables['next_url']->setOption('fragment', 'lgd-guides__title');
}
}
4 changes: 2 additions & 2 deletions templates/_components/prev-next.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ul class="lgd-prev-next__list">
{% if previous_url %}
<li class="lgd-prev-next__list-item lgd-prev-next__list-item--prev">
<a href="{{ previous_url }}#lgd-guides__title" class="lgd-prev-next__link lgd-prev-next__link--prev" aria-label="{{ previous_aria_label }}">
<a href="{{ previous_url }}" class="lgd-prev-next__link lgd-prev-next__link--prev" aria-label="{{ previous_aria_label }}">
{% include "@localgov_base/includes/icons/icon.html.twig" with {
icon_name: previous_icon,
icon_classes: 'lgd-prev-next__icon lgd-prev-next__icon--prev',
Expand All @@ -44,7 +44,7 @@
{% endif %}
{% if next_url %}
<li class="lgd-prev-next__list-item lgd-prev-next__list-item--next">
<a href="{{ next_url }}#lgd-guides__title" class="lgd-prev-next__link lgd-prev-next__link--next" aria-label="{{ next_aria_label }}">
<a href="{{ next_url }}" class="lgd-prev-next__link lgd-prev-next__link--next" aria-label="{{ next_aria_label }}">
<div class="lgd-prev-next__label">
{{ 'Next'|t }}
</div>
Expand Down