Browse Source

Add network footer.

pull/3/head
Ned Zimmerman 7 years ago
parent
commit
6a4a60d00c
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 12
      app/setup.php
  2. BIN
      resources/assets/images/pb.png
  3. 10
      resources/assets/images/pb.svg
  4. BIN
      resources/assets/images/pb@2x.png
  5. 112
      resources/assets/styles/layouts/_footer.scss
  6. 34
      resources/views/partials/footer.blade.php

12
app/setup.php

@ -86,6 +86,18 @@ add_action('widgets_init', function () {
'name' => __('Home Block 5', 'aldine'),
'id' => 'home-block-5'
] + $config);
register_sidebar([
'name' => __('Footer Block 1', 'aldine'),
'id' => 'footer-block-1'
] + $config);
register_sidebar([
'name' => __('Footer Block 2', 'aldine'),
'id' => 'footer-block-2'
] + $config);
register_sidebar([
'name' => __('Footer Block 3', 'aldine'),
'id' => 'footer-block-3'
] + $config);
});
/**

BIN
resources/assets/images/pb.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

10
resources/assets/images/pb.svg

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="45px" height="44px" viewBox="0 0 45 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>Untitled 5</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M44.1945682,41.8720049 C44.1945682,42.6169189 43.5766817,43.2175547 42.8176536,43.2175547 L1.37691462,43.2175547 C0.617886514,43.219123 0,42.6169189 0,41.8720049 L0,1.34711806 C0,0.603772355 0.617886514,0 1.37691462,0 L42.8160853,0 C43.5766817,0 44.1945682,0.603772355 44.1945682,1.34711806 L44.1945682,41.8720049 Z M15.2817784,10.6433115 L10.0720855,10.6433115 L10.0720855,32.0733095 L13.3763669,32.0733095 L13.3763669,24.0000106 L15.2817784,24.0000106 C16.7167179,24.0000106 17.9383768,23.4997421 18.946755,22.4960685 C19.9551333,21.492395 20.4601065,20.2832821 20.4601065,18.8702979 L20.4601065,15.7573418 C20.4601065,14.287901 20.0162946,13.078788 19.1302391,12.1315711 C18.1736128,11.1388753 16.8907925,10.6433115 15.2817784,10.6433115 Z M17.2593289,15.8075254 L17.2577607,15.8075254 L17.2577607,18.9393005 C17.2577607,19.4521149 17.0742766,19.8912221 16.7073085,20.256622 C16.3403403,20.6220219 15.893392,20.8039377 15.3695998,20.8039377 L13.3763669,20.8039377 L13.3763669,13.9444565 L15.3711681,13.9444565 C15.9420074,13.9444565 16.3999334,14.1153946 16.743378,14.4572709 C17.0868225,14.7991472 17.2593289,15.249232 17.2593289,15.8075254 Z M23.0994542,32.0733095 L29.217158,32.0733095 C30.0451887,32.0733095 30.8794923,31.8223911 31.7185006,31.3205544 C32.4649828,30.8767425 33.0420951,30.2839478 33.4498375,29.5421703 C33.9751978,28.5965217 34.2370939,27.4454336 34.2370939,26.0873379 C34.2370939,25.5415904 34.1963196,25.0444584 34.1147712,24.6006465 C33.9516742,23.7334098 33.7007558,23.0261336 33.3635843,22.4788179 C32.8507698,21.6696061 32.2266104,21.1269951 31.4926741,20.8541214 C31.9349177,20.6596596 32.3207047,20.3805129 32.6468986,20.015113 C33.4278821,19.1494446 33.8199421,17.9967883 33.8199421,16.5602806 C33.8199421,15.6836345 33.71487,14.9246064 33.5047259,14.2863327 C33.1189388,13.0881975 32.4775287,12.2052784 31.5804955,11.6344391 C30.531343,10.9616642 29.3551631,10.6260609 28.0488193,10.6260609 L23.0994542,10.6260609 L23.0994542,32.0733095 Z M26.6672,19.3831124 L26.6672,13.9083869 L28.0488193,13.9083869 C28.7012071,13.9083869 29.2328404,14.1200993 29.6405828,14.5419558 C30.0843947,14.9983137 30.3055165,15.6710886 30.3055165,16.5602806 C30.3055165,17.0966186 30.2412187,17.5467035 30.112623,17.9121034 C29.7629055,18.8938215 29.0744482,19.3831124 28.0488193,19.3831124 L26.6672,19.3831124 Z M26.6672,28.8756684 L26.6672,22.4788179 L28.0488193,22.4788179 C28.864304,22.4788179 29.4821906,22.728168 29.9024788,23.2300048 C30.3682461,23.7788888 30.6019138,24.6492619 30.6019138,25.8473972 C30.6019138,26.3492339 30.5266383,26.7946141 30.3745191,27.1819693 C29.9432531,28.311102 29.1669743,28.8756684 28.0488193,28.8756684 L26.6672,28.8756684 Z" id="Combined-Shape" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
resources/assets/images/pb@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

@ -1,5 +1,43 @@
.content-info {
.powered-by {
.network-footer {
background: $brand-secondary;
margin-bottom: 0;
padding: 60px 42.5px 40px;
font-family: Karla, sans-serif;
font-size: 16px;
color: $white;
ul {
margin: 0;
padding: 0;
list-style: none;
text-align: center;
font-weight: 600;
line-height: 36px;
}
a {
color: $white;
text-decoration: none;
}
.footer-block-1 {
margin: 0 -5px;
padding: 0 0 40px;
}
.footer-block-2 {
padding: 30px 7.5px;
border-top: solid 1px $white;
}
.footer-block-3 {
padding: 30px 7.5px 0;
border-top: solid 1px $white;
}
}
.pressbooks-footer {
display: flex;
position: relative;
flex-direction: column;
@ -11,6 +49,7 @@
font-size: 14px;
h1,
li,
a {
color: $white;
font-family: Karla, sans-serif;
@ -29,6 +68,16 @@
}
}
h1 a {
border-bottom: solid 1px $dark-grey;
transition: all 0.4s;
&:hover,
&:focus {
border-bottom: solid 1px $white;
}
}
ul {
display: none;
margin: 0;
@ -59,7 +108,42 @@
@media (min-width: $medium) {
.content-info {
.powered-by {
.network-footer {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
ul {
text-align: left;
}
.footer-block-1,
.footer-block-2,
.footer-block-3 {
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
}
}
.pressbooks-footer {
flex-direction: row;
justify-content: space-between;
height: 106.76px;
@ -92,17 +176,6 @@
}
}
h1 a,
li a {
border-bottom: solid 1px $dark-grey;
transition: all 0.4s;
&:hover,
&:focus {
border-bottom: solid 1px $white;
}
}
.pressbooks-icon {
display: block;
line-height: 1;
@ -119,3 +192,16 @@
}
}
}
@media (min-width: $extra-large) {
.content-info {
.network-footer {
ul {
li {
display: inline-block;
margin-right: 3em;
}
}
}
}
}

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

@ -1,15 +1,37 @@
<footer class="content-info">
<div class="container">
@php(dynamic_sidebar('sidebar-footer'))
<section class="powered-by">
<section class="network-footer">
@if(is_dynamic_sidebar('footer-block-1'))
<div class="footer-block-1">
@php(dynamic_sidebar('footer-block-1'))
</div>
@else
@endif
@if(is_dynamic_sidebar('footer-block-2'))
<div class="footer-block-2">
@php(dynamic_sidebar('footer-block-2'))
</div>
@else
@endif
@if(is_dynamic_sidebar('footer-block-3'))
<div class="footer-block-3">
@php(dynamic_sidebar('footer-block-3'))
</div>
@else
@endif
</section>
<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">
<h1><a href="https://pressbooks.com">{!! sprintf(__('Powered by %s', 'aldine'), '<span class="pressbooks">Pressbooks</span>') !!}</a></h1>
<ul>
<li><a href="https://github.com/pressbooks" title="{{ __('Open Source', 'aldine') }}">{{ __('Open Source', 'aldine') }}</a></li>
<li><a href="https://github.com/pressbooks" title="{{ __('Open Textbooks', 'aldine') }}">{{ __('Open Textbooks', 'aldine') }}</a></li>
<li><a href="https://github.com/pressbooks" title="{{ __('Open Book Publishing', 'aldine') }}">{{ __('Open Book Publishing', 'aldine') }}</a></li>
<li><a href="https://github.com/pressbooks" title="{{ __('Learn More', 'aldine') }}">{{ __('Learn More', 'aldine') }}</a></li>
<li>{{ __('Open Source', 'aldine') }}</li>
<li>{{ __('Open Textbooks', 'aldine') }}</li>
<li>{{ __('Open Book Publishing', 'aldine') }}</li>
<li>{{ __('Learn More', 'aldine') }}</li>
</ul>
</div>
<div class="social-media">

Loading…
Cancel
Save