diff options
author | Peter Cai <[email protected]> | 2020-04-14 19:55:41 +0800 |
---|---|---|
committer | Peter Cai <[email protected]> | 2020-04-14 19:55:41 +0800 |
commit | 62555714e6a4dd542fcb8e0b41094e0c4b5ee765 (patch) | |
tree | 54f73d3b9084cb10aed861306e57082e8b0c7ad0 | |
parent | ecc3e4bed84bd0b3ed4f9289db9ca6e14ad13344 (diff) | |
download | paprika-62555714e6a4dd542fcb8e0b41094e0c4b5ee765.tar.gz |
theme: add footer on mobile layout
-rw-r--r-- | theme/default/copyright.hbs | 5 | ||||
-rw-r--r-- | theme/default/foot.hbs | 7 | ||||
-rw-r--r-- | theme/default/home.hbs | 3 | ||||
-rw-r--r-- | theme/default/post.hbs | 3 | ||||
-rw-r--r-- | theme/default/sidebar.hbs | 6 | ||||
-rw-r--r-- | theme/default/static/style.css | 14 |
6 files changed, 28 insertions, 10 deletions
diff --git a/theme/default/copyright.hbs b/theme/default/copyright.hbs new file mode 100644 index 0000000..48d86e2 --- /dev/null +++ b/theme/default/copyright.hbs @@ -0,0 +1,5 @@ +<section class="copyright"> + Copyright © {{ cur_year }} {{ blog.title }}<br /> + Powered by <a href="https://github.com/PeterCxy/paprika" target="_blank">paprika</a><br /> + Hosted on <a href="https://workers.cloudflare.com/" target="_blank">Cloudflare Workers</a> +</section>
\ No newline at end of file diff --git a/theme/default/foot.hbs b/theme/default/foot.hbs new file mode 100644 index 0000000..7ee207c --- /dev/null +++ b/theme/default/foot.hbs @@ -0,0 +1,7 @@ +{{> modal.hbs }} +<!-- Footer is only needed on mobile --> +<!-- On desktop, put everything to sidebar --> +<div class="footer"> + {{> copyright.hbs }} +</div> +<script src="/static/script.js?ver={{ build_num }}"></script>
\ No newline at end of file diff --git a/theme/default/home.hbs b/theme/default/home.hbs index 401f1ab..a3d74f2 100644 --- a/theme/default/home.hbs +++ b/theme/default/home.hbs @@ -25,7 +25,6 @@ </div> </div> </div> - {{> modal.hbs }} - <script src="/static/script.js?ver={{ build_num }}"></script> + {{> foot.hbs }} </body> </html>
\ No newline at end of file diff --git a/theme/default/post.hbs b/theme/default/post.hbs index 650da05..f472751 100644 --- a/theme/default/post.hbs +++ b/theme/default/post.hbs @@ -16,7 +16,6 @@ <!-- We don't handle this in backend --> </div> </div> - {{> modal.hbs }} - <script src="/static/script.js?ver={{ build_num }}"></script> + {{> foot.hbs }} </body> </html>
\ No newline at end of file diff --git a/theme/default/sidebar.hbs b/theme/default/sidebar.hbs index 010f48b..955915b 100644 --- a/theme/default/sidebar.hbs +++ b/theme/default/sidebar.hbs @@ -12,9 +12,5 @@ {{ /each }} </ul> </section> - <section class="copyright"> - Copyright © {{ cur_year }} {{ blog.title }}<br /> - Powered by <a href="https://github.com/PeterCxy/paprika" target="_blank">paprika</a><br /> - Hosted on <a href="https://workers.cloudflare.com/" target="_blank">Cloudflare Workers</a> - </section> + {{> copyright.hbs }} </div>
\ No newline at end of file diff --git a/theme/default/static/style.css b/theme/default/static/style.css index 7b34ea4..a7146ed 100644 --- a/theme/default/static/style.css +++ b/theme/default/static/style.css @@ -141,6 +141,11 @@ blockquote { margin-left: 0; } +/* Footer -- Not needed on desktop */ +.footer { + display: none; +} + /* Sidebar */ .sidebar { float: left; @@ -226,7 +231,7 @@ blockquote { color: #f06292; } -.sidebar .copyright { +.copyright { font-size: 0.6em; color: rgb(200, 200, 200); } @@ -451,6 +456,13 @@ blockquote { .with-divider.with-divider-center-mobile::after { margin-left: calc(50% - 20px) !important; } + + /* We need footer on mobile */ + .footer { + display: block; + text-align: center; + width: 100%; + } } /* Modal <https://www.w3schools.com/howto/howto_css_modal_images.asp> */ |