@extends('layouts.app') @section('content') @if($block_count === 0)

{{ __('About Pressbooks', 'aldine') }}

{{ __('Pressbooks is easy-to-use book writing software that lets you create a book in all the formats you need to publish.', 'aldine')}}

@elseif($block_count < 4) @for($i = 0; $i < $block_count; $i++)
@php(dynamic_sidebar($home_blocks[$i]))
@endfor @elseif($block_count === 4)
@for($i = 0; $i < 2; $i++)
@php(dynamic_sidebar($home_blocks[$i]))
@endfor
@for($i = 2; $i < $block_count; $i++)
@php(dynamic_sidebar($home_blocks[$i]))
@endfor @endif @if(get_theme_mod('pb_front_page_catalog'))

{{ get_theme_mod('pb_front_page_catalog_title') }}

@php $books = wp_remote_get(home_url('/wp-json/pressbooks/v2/books')); $books = json_decode($books['body'], true); echo '
'; for ($i = 0; $i < 3; $i++) { printf( '', $books[$i]['link'], $books[$i]['metadata']['name'], __('About this book →', 'aldine') ); } echo '
'; @endphp
@endif @endsection