Browse Source

Responsive network footer.

pull/3/head
Ned Zimmerman 7 years ago
parent
commit
5266fc9b17
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 12
      app/setup.php
  2. 32
      resources/assets/styles/layouts/_footer.scss
  3. 26
      resources/views/partials/footer.blade.php

12
app/setup.php

@ -87,16 +87,16 @@ add_action('widgets_init', function () {
'id' => 'home-block-5'
] + $config);
register_sidebar([
'name' => __('Footer Block 1', 'aldine'),
'id' => 'footer-block-1'
'name' => __('Network Footer Block 1', 'aldine'),
'id' => 'network-footer-block-1'
] + $config);
register_sidebar([
'name' => __('Footer Block 2', 'aldine'),
'id' => 'footer-block-2'
'name' => __('Network Footer Block 2', 'aldine'),
'id' => 'network-footer-block-2'
] + $config);
register_sidebar([
'name' => __('Footer Block 3', 'aldine'),
'id' => 'footer-block-3'
'name' => __('Network Footer Block 3', 'aldine'),
'id' => 'network-footer-block-3'
] + $config);
});

32
resources/assets/styles/layouts/_footer.scss

@ -21,19 +21,25 @@
text-decoration: none;
}
.footer-block-1 {
.network-footer-block:first-of-type {
border-top: 0;
}
.network-footer-block {
border-top: solid 1px $white;
}
.network-footer-block-1 {
margin: 0 -5px;
padding: 0 0 40px;
}
.footer-block-2 {
.network-footer-block-2 {
padding: 30px 7.5px;
border-top: solid 1px $white;
}
.footer-block-3 {
.network-footer-block-3 {
padding: 30px 7.5px 0;
border-top: solid 1px $white;
}
}
@ -118,28 +124,18 @@
text-align: left;
}
.footer-block-1,
.footer-block-2,
.footer-block-3 {
.network-footer-block {
display: flex;
align-items: center;
height: 142.5px;
margin: 0;
padding: 0 69.5px;
}
.footer-block-1 {
border-right: solid 1px $white;
}
.footer-block-2 {
border-top: 0;
border-right: solid 1px $white;
}
.footer-block-3 {
border-top: 0;
// TODO
.network-footer-block:last-of-type {
border-right: 0;
}
}

26
resources/views/partials/footer.blade.php

@ -1,28 +1,24 @@
<footer class="content-info">
<div class="container">
@if(is_active_sidebar('network-footer-block-1') || is_active_sidebar('network-footer-block-2') || is_active_sidebar('network-footer-block-3'))
<section class="network-footer">
@if(is_dynamic_sidebar('footer-block-1'))
<div class="footer-block-1">
@php(dynamic_sidebar('footer-block-1'))
@if(is_active_sidebar('network-footer-block-1'))
<div class="network-footer-block network-footer-block-1">
@php(dynamic_sidebar('network-footer-block-1'))
</div>
@else
@endif
@if(is_dynamic_sidebar('footer-block-2'))
<div class="footer-block-2">
@php(dynamic_sidebar('footer-block-2'))
@if(is_active_sidebar('network-footer-block-2'))
<div class="network-footer-block network-footer-block-2">
@php(dynamic_sidebar('network-footer-block-2'))
</div>
@else
@endif
@if(is_dynamic_sidebar('footer-block-3'))
<div class="footer-block-3">
@php(dynamic_sidebar('footer-block-3'))
@if(is_active_sidebar('network-footer-block-3'))
<div class="network-footer-block network-footer-block-3">
@php(dynamic_sidebar('network-footer-block-3'))
</div>
@else
@endif
</section>
@endif
<section class="pressbooks-footer">
<a class="pressbooks-icon" href="https://pressbooks.com" title="Pressbooks"><img src="@asset('images/pb.png')" srcset="1x @asset('images/pb.png'), 2x @asset('images/pb@2x.png')" alt="{{ __('The Pressbooks logo', 'aldine')}}" width="45" height="44" /></a>
<div class="pressbooks-links">

Loading…
Cancel
Save