Skip to content

Commit 3849ddc

Browse files
committed
Moved styles into the css file
1 parent a40f6fc commit 3849ddc

7 files changed

Lines changed: 153 additions & 20 deletions

File tree

themes/osi/assets/css/editor-style.css

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/osi/assets/css/editor-style.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/osi/assets/scss/_8_overrides.templates.scss

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,55 @@ footer.ai-footer {
494494
.ai-def-header .wp-block-coblocks-hero__inner {
495495
height: 850px;
496496
}
497+
// Secondary Nav
498+
.ai-secondary-navbar-wrapper {
499+
background-color: #fff;
500+
border-bottom: 1px solid #ddd;
501+
padding: 10px 0;
502+
position: sticky;
503+
top: 90px; // adjust as needed
504+
z-index: 999;
505+
}
506+
.ai-secondary-nav-menu {
507+
display: flex;
508+
justify-content: center;
509+
gap: 40px;
510+
list-style: none;
511+
margin: 0;
512+
padding: 0;
513+
padding-top: 10px;
514+
font-size: 10px;
515+
li {
516+
display: inline-block;
517+
}
518+
}
519+
// Hide mobile label by default (desktop)
520+
.ai-mobile-label {
521+
display: none;
522+
}
523+
// Mobile-specific styles (not using "force override" block)
524+
@media (max-width: 768px) {
525+
.ai-secondary-mobile-wrapper {
526+
margin-top: 10px;
527+
padding-top: 0;
528+
}
529+
.ai-mobile-label {
530+
display: block;
531+
color: #bbb;
532+
font-size: 13px;
533+
text-transform: uppercase;
534+
padding: 8px 20px 4px;
535+
margin: 0;
536+
letter-spacing: 0.5px;
537+
text-align: right;
538+
}
539+
.ai-secondary-mobile-menu {
540+
margin-top: 0;
541+
li {
542+
padding: 10px 20px;
543+
}
544+
}
545+
}
497546
.jetpack-social-navigation {
498547
height: 40px;
499548
margin: 0;

themes/osi/header.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@
4747
endif;
4848
//Adding for AI template - secondary navigation
4949
if ( is_page_template( 'templates/ai-wide.php' ) ) :
50-
echo '<p class="ai-mobile-label">Open Source AI</p>';
51-
wp_nav_menu( array(
52-
'theme_location' => 'ai_secondary_nav',
53-
'menu' => 'AI secondary nav',
54-
'container' => false,
55-
'container_class'=> 'ai-secondary-nav',
56-
'menu_class' => 'ai-secondary-nav-menu',
57-
) );
50+
echo '<p class="ai-mobile-label">'. __( 'Open Source AI', 'osi' ) . '</p>';
51+
wp_nav_menu(
52+
array(
53+
'theme_location' => 'ai_secondary_nav',
54+
'menu' => 'AI secondary nav',
55+
'container' => false,
56+
'container_class' => 'ai-secondary-nav',
57+
'menu_class' => 'ai-secondary-nav-menu',
58+
)
59+
);
5860
endif;
5961
?>
6062
</nav><!-- #site-navigation -->

themes/osi/style.css

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/osi/style.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/osi/templates/ai-wide.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
get_header( 'ai' );
1010
else :
1111
get_header();
12-
// Display the AI secondary nav menu
13-
echo '<div class="ai-secondary-navbar-wrapper">';
14-
wp_nav_menu( array(
15-
'theme_location' => 'ai_secondary_nav',
16-
'menu' => 'AI secondary nav',
17-
'container' => 'nav',
18-
'container_class'=> 'ai-secondary-nav',
19-
'menu_class' => 'ai-secondary-nav-menu',
20-
) );
21-
echo '</div>';
2212
endif;
2313
?>
2414

0 commit comments

Comments
 (0)