Browse Source

collection classes

master
rdrew 1 week ago
parent
commit
66f6ab8378
  1. 2
      .php-cs-fixer.cache
  2. 14
      css/components/footer.css
  3. 6
      css/components/header-site-branding.css
  4. 24
      oliveskspaces.theme

2
.php-cs-fixer.cache

@ -1 +1 @@
{"php":"8.5.6","version":"3.94.2","indent":" ","lineEnding":"\n","rules":{"nullable_type_declaration":true,"operator_linebreak":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":true,"attribute_block_no_spaces":true,"cast_spaces":true,"concat_space":{"spacing":"one"},"function_declaration":{"closure_fn_spacing":"none"},"method_argument_space":{"after_heredoc":false},"new_with_parentheses":{"anonymous_class":false},"single_line_empty_body":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const","const_import","do","else","elseif","enum","final","finally","for","foreach","function","function_import","if","insteadof","interface","match","named_argument","namespace","new","private","protected","public","readonly","static","switch","trait","try","type_colon","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["arguments","array_destructuring","arrays","match","parameters"]},"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_anonymous_functions":false,"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{".conform.2686488.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.1386336.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.6013459.oliveskspaces.theme":"3b1f0e53ce3e89d253dcd965c03484d0",".conform.1117317.oliveskspaces.theme":"92804bfb350085c2200e3e286e0d60f1",".conform.6178012.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.5225526.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.9127829.oliveskspaces.theme":"4371758f7cd8d36b1c7151c229ffec89",".conform.2331781.oliveskspaces.theme":"8319af8e40687bb01a3d08fc9de02a77",".conform.9882494.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.2836943.oliveskspaces.theme":"78daf0be673c47afce5084a9037e194e",".conform.2934848.oliveskspaces.theme":"06748a57e2f11f3c33ca14e5260441ff",".conform.4085354.oliveskspaces.theme":"190cf050a58bf0ecb18a334a7c3af624",".conform.9630384.oliveskspaces.theme":"21e8bd79790c2438e37f6df14ddee0bd",".conform.8186638.oliveskspaces.theme":"d6e445698775f91be6bae9f0aa1994bc"}} {"php":"8.5.6","version":"3.94.2","indent":" ","lineEnding":"\n","rules":{"nullable_type_declaration":true,"operator_linebreak":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":true,"attribute_block_no_spaces":true,"cast_spaces":true,"concat_space":{"spacing":"one"},"function_declaration":{"closure_fn_spacing":"none"},"method_argument_space":{"after_heredoc":false},"new_with_parentheses":{"anonymous_class":false},"single_line_empty_body":true,"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const","const_import","do","else","elseif","enum","final","finally","for","foreach","function","function_import","if","insteadof","interface","match","named_argument","namespace","new","private","protected","public","readonly","static","switch","trait","try","type_colon","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["arguments","array_destructuring","arrays","match","parameters"]},"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_anonymous_functions":false,"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{".conform.2686488.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.1386336.oliveskspaces.theme":"97edd96b9f308469e8e123b44b80901a",".conform.6013459.oliveskspaces.theme":"3b1f0e53ce3e89d253dcd965c03484d0",".conform.1117317.oliveskspaces.theme":"92804bfb350085c2200e3e286e0d60f1",".conform.6178012.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.5225526.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.9127829.oliveskspaces.theme":"4371758f7cd8d36b1c7151c229ffec89",".conform.2331781.oliveskspaces.theme":"8319af8e40687bb01a3d08fc9de02a77",".conform.9882494.oliveskspaces.theme":"3f8260134aa6320fb6a18c898a9255e6",".conform.2836943.oliveskspaces.theme":"78daf0be673c47afce5084a9037e194e",".conform.2934848.oliveskspaces.theme":"06748a57e2f11f3c33ca14e5260441ff",".conform.4085354.oliveskspaces.theme":"190cf050a58bf0ecb18a334a7c3af624",".conform.9630384.oliveskspaces.theme":"21e8bd79790c2438e37f6df14ddee0bd",".conform.8186638.oliveskspaces.theme":"d6e445698775f91be6bae9f0aa1994bc",".conform.7082070.oliveskspaces.theme":"4bb06ce5bdf3859dc02e8126ce304741"}}

14
css/components/footer.css

@ -79,18 +79,16 @@ footer.site-footer .block {
font-size: 1.5em; font-size: 1.5em;
margin: 10px; margin: 10px;
margin-top: 1.5em; margin-top: 1.5em;
color: var(--color--lmmi-tan);
} }
} }
.lmmi_logo { .lmmi_logo {
margin-bottom: 1em; margin-bottom: 1em;
} }
@media ((min-width:700px)) { @media ((min-width: 700px)) {
.lmmi_logo, .lmmi_logo,
.upei_logo, .upei_logo,
.social_icons { .social_icons {
padding-right: 4em; padding-right: 4em;
}
} }
}

6
css/components/header-site-branding.css

@ -138,7 +138,7 @@
font-family: var(--font-serif); font-family: var(--font-serif);
} }
.site-branding__slogan { .site-branding__slogan {
color: #d0bca4; color: var(--color--lmmi-tan);
font-size: 1.125rem; font-size: 1.125rem;
/*font-size: 1.5rem;*/ /*font-size: 1.5rem;*/
} }
@ -149,7 +149,7 @@
@media (min-width: 43.75rem) { @media (min-width: 43.75rem) {
.site-branding__text { .site-branding__text {
font-size: 1.75rem; font-size: 2.2rem;
line-height: 1.75rem; line-height: 1.75rem;
} }
.site-branding__slogan { .site-branding__slogan {
@ -160,7 +160,7 @@
@media ((((min-width: 60rem)))) { @media ((((min-width: 60rem)))) {
.site-branding__text { .site-branding__text {
letter-spacing: 0.02em; letter-spacing: 0.02em;
font-size: 2rem; font-size: 2.7rem;
line-height: var(--sp2); line-height: var(--sp2);
} }
.site-branding__slogan { .site-branding__slogan {

24
oliveskspaces.theme

@ -45,6 +45,30 @@ function oliveskspaces_preprocess_html(&$variables)
'href' => $variables['oliveskspaces_path'] . '/css/components/navigation/nav-primary-no-js.css?' . $query_string, 'href' => $variables['oliveskspaces_path'] . '/css/components/navigation/nav-primary-no-js.css?' . $query_string,
], ],
]; ];
// ===============================
$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface && $node->hasField('field_model')) {
if (!$node->get('field_model')->isEmpty()) {
$model_term = $node->get('field_model')->entity;
if ($model_term) {
// Generic class for any model, e.g. "islandora-model--collection"
$model_name = strtolower(str_replace(' ', '-', $model_term->getName()));
$variables['attributes']['class'][] = 'islandora-model--' . $model_name;
// Collection-specific class
if ($model_term->id() == 47) {
$variables['attributes']['class'][] = 'page--collection';
// Optional: add the collection's own name as a class too,
// e.g. "collection--peel-family-fonds"
$machine_safe = strtolower(preg_replace('/[^a-z0-9]+/', '-', $node->label()));
$variables['attributes']['class'][] = 'collection--' . trim($machine_safe, '-');
}
}
}
}
} }

Loading…
Cancel
Save