Skip to content

Add in the means to edit the footer and also to use the standard or A… #197

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

Merged
merged 5 commits into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions plugins/osi-features/acf-fields/group_68381f7bdc12b.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"key": "group_68381f7bdc12b",
"title": "AI Template Toggle",
"fields": [
{
"key": "field_68381f7c701f6",
"label": "Use AI Header",
"name": "osi_use_ai_header",
"aria-label": "",
"type": "true_false",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"relevanssi_exclude": 0,
"message": "This will use any menu named 'ai' for the menu when active",
"default_value": 0,
"allow_in_bindings": 0,
"ui": 0,
"ui_on_text": "",
"ui_off_text": ""
},
{
"key": "field_68381fc3701f8",
"label": "Use AI Footer",
"name": "osi_use_ai_footer",
"aria-label": "",
"type": "true_false",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"relevanssi_exclude": 0,
"message": "When selected this will use the ai footer, you can edit the footer in reusable blocks.",
"default_value": 0,
"allow_in_bindings": 0,
"ui": 0,
"ui_on_text": "",
"ui_off_text": ""
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "page"
},
{
"param": "post_template",
"operator": "==",
"value": "templates\/ai-wide.php"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1748508671
}
46 changes: 46 additions & 0 deletions themes/osi/assets/css/editor-style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/osi/assets/css/editor-style.css.map

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions themes/osi/assets/scss/_8_overrides.templates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,55 @@ footer.ai-footer {
.ai-def-header .wp-block-coblocks-hero__inner {
height: 850px;
}
// Secondary Nav
.ai-secondary-navbar-wrapper {
background-color: #fff;
border-bottom: 1px solid #ddd;
padding: 10px 0;
position: sticky;
top: 90px; // adjust as needed
z-index: 999;
}
.ai-secondary-nav-menu {
display: flex;
justify-content: center;
gap: 40px;
list-style: none;
margin: 0;
padding: 0;
padding-top: 10px;
font-size: 10px;
li {
display: inline-block;
}
}
// Hide mobile label by default (desktop)
.ai-mobile-label {
display: none;
}
// Mobile-specific styles (not using "force override" block)
@media (max-width: 768px) {
.ai-secondary-mobile-wrapper {
margin-top: 10px;
padding-top: 0;
}
.ai-mobile-label {
display: block;
color: #bbb;
font-size: 13px;
text-transform: uppercase;
padding: 8px 20px 4px;
margin: 0;
letter-spacing: 0.5px;
text-align: right;
}
.ai-secondary-mobile-menu {
margin-top: 0;
li {
padding: 10px 20px;
}
}
}
.jetpack-social-navigation {
height: 40px;
margin: 0;
Expand Down
184 changes: 21 additions & 163 deletions themes/osi/footer-ai.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,175 +8,33 @@
* @package osi
*/

// Get the footer icon
$image_url = get_template_directory_uri() . '/assets/img/osi-horizontal-white.svg';

// Compile the block markup for the footer
$footer_block = <<<HTML
<!-- wp:group {"className":"os-awesome-feedbacak ai-pre-footer","style":{"elements":{"link":{"color":{"text":"var:preset|color|brand-color-1"}}}},"backgroundColor":"neutral-dark","textColor":"neutral-white","layout":{"type":"constrained","contentSize":"100%"},"noBottomMargin":true,"padding":"no"} -->
<div class="wp-block-group os-awesome-feedbacak ai-pre-footer has-neutral-white-color has-text-color has-background has-link-color mb-0"><!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"},"padding":"no"} -->
<div class="wp-block-group"><!-- wp:columns {"className":"ai-footer-top wide","style":{"layout":{"selfStretch":"fill","flexSize":null},"spacing":{"margin":{"top":"32px","bottom":"32px"}}}} -->
<div class="wp-block-columns ai-footer-top wide" style="margin-top:32px;margin-bottom:32px"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":25020,"width":"270px","sizeSlug":"large","linkDestination":"none","align":"center"} -->
<figure class="wp-block-image aligncenter size-large is-resized"><img src="$image_url" alt="" class="wp-image-25020" style="width:270px"/></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button {"textColor":"neutral-white","className":"is-style-spin-green","style":{"elements":{"link":{"color":{"text":"var:preset|color|neutral-white"}}}}} -->
<div class="wp-block-button is-style-spin-green"><a class="wp-block-button__link has-neutral-white-color has-text-color has-link-color wp-element-button">Join us</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:shortcode -->
[jetpack-social]
<!-- /wp:shortcode --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:columns {"className":"ai-footer-bottom wide"} -->
<div class="wp-block-columns ai-footer-bottom wide"><!-- wp:column {"width":"30%"} -->
<div class="wp-block-column" style="flex-basis:30%"><!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">The Open Source Initiative</h5>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The OSI is the authority that defines Open Source, recognized globally by individuals, companies, and by public institutions.</p>
<!-- /wp:paragraph -->

<!-- wp:shortcode -->
[jetpack-social]
<!-- /wp:shortcode --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"20%"} -->
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">About</h5>
<!-- /wp:heading -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://opensource.org/about"><span class="dashicons dashicons-arrow-right-alt2"></span>About Us</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/about/team"><span class="dashicons dashicons-arrow-right-alt2"></span>Our team</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/associations"><span class="dashicons dashicons-arrow-right-alt2"></span>Associations</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/sponsors"><span class="dashicons dashicons-arrow-right-alt2"></span>Sponsors</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/articles-of-incorporation"><span class="dashicons dashicons-arrow-right-alt2"></span>Articles of Incorporation</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/bylaws"><span class="dashicons dashicons-arrow-right-alt2"></span>Bylaws</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/history"><span class="dashicons dashicons-arrow-right-alt2"></span>History</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/trademark-guidelines"><span class="dashicons dashicons-arrow-right-alt2"></span>Trademark Guidelines</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"20%"} -->
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Licenses</h5>
<!-- /wp:heading -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://opensource.org/osd"><span class="dashicons dashicons-arrow-right-alt2"></span>Open Source Definition</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/licenses"><span class="dashicons dashicons-arrow-right-alt2"></span>Licenses</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/licenses/review-process"><span class="dashicons dashicons-arrow-right-alt2"></span>License Review Process</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/osr"><span class="dashicons dashicons-arrow-right-alt2"></span>Open Standards Requirement for Software</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"20%"} -->
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Board</h5>
<!-- /wp:heading -->

<!-- wp:list -->
<ul class="wp-block-list"><!-- wp:list-item -->
<li><a href="https://opensource.org/about/board-of-directors"><span class="dashicons dashicons-arrow-right-alt2"></span>Board of Directors</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/minutes"><span class="dashicons dashicons-arrow-right-alt2"></span>Minutes</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/about/board-of-directors/elections"><span class="dashicons dashicons-arrow-right-alt2"></span>Elections</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/organization"><span class="dashicons dashicons-arrow-right-alt2"></span>Organization &amp; Operations</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/conflict_of_interest_policy"><span class="dashicons dashicons-arrow-right-alt2"></span>Conflict of Interest Policy</a></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><a href="https://opensource.org/board/board-member-agreement"><span class="dashicons dashicons-arrow-right-alt2"></span>Board member agreement</a></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
HTML;
$footer_block_id = osi_create_or_find_ai_footer_block_content();
?>

<footer id="colophon" class="footer site-footer ai-footer" role="contentinfo">
<?php echo do_shortcode( do_blocks( $footer_block ) ); ?>
<section class="footer-credits">
<div class="footer--inner">
<div class="widgetized-footer footer--widgets wp-block-columns alignwide">
<?php dynamic_sidebar( 'sidebar-footer-secondary' ); ?>
<div class="wp-block-column">
<p class="footer--extra-text">
<?php
if ( is_active_sidebar( 'footer-above-credits' ) ) {
dynamic_sidebar( 'footer-above-credits' );
}
?>
<?php do_action( 'osi_credits' ); ?>
</p><!-- .powered-by-wordpress -->
</div>
<footer id="colophon" class="footer site-footer ai-footer" role="contentinfo">
<?php echo do_shortcode( do_blocks( '<!-- wp:block {"ref":' . absint( $footer_block_id ) . '} /-->' ) ); ?>
<section class="footer-credits">
<div class="footer--inner">
<div class="widgetized-footer footer--widgets wp-block-columns alignwide">
<?php dynamic_sidebar( 'sidebar-footer-secondary' ); ?>
<div class="wp-block-column">
<p class="footer--extra-text">
<?php
if ( is_active_sidebar( 'footer-above-credits' ) ) {
dynamic_sidebar( 'footer-above-credits' );
}
?>
<?php do_action( 'osi_credits' ); ?>
</p><!-- .powered-by-wordpress -->
</div>
</div>
</section>
</footer><!-- #colophon -->
</div>
</section>
</footer><!-- #colophon -->

</div><!-- #page -->
</div><!-- #page -->

<?php wp_footer(); ?>

</body>
</html>
</html>
1 change: 1 addition & 0 deletions themes/osi/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,5 +568,6 @@ function osi_full_width_editor( array $editor_settings ): array {
*/
function osi_register_ai_menu() {
register_nav_menu( 'ai', __( 'AI Menu', 'osi' ) );
register_nav_menu( 'ai_secondary_nav', __( 'AI Secondary Navigation', 'osi' ) );
}
add_action( 'after_setup_theme', 'osi_register_ai_menu' );
Loading