From b7efae362c8307e9a6724c58a6c8f2d6757dd58a Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Mon, 29 Jul 2013 16:09:35 -0400 Subject: [PATCH] Initial release version of templates The templates in this commit are now in RC form. Everything but the article templates are ready. Changes include ( no limited to ): - Update stylesheet - Add method in app.js to handle images in documents - Create _author_item.html to display author information and vcard - Update _disqus.html to fit in with site style - Update _page_footer.html for translation support - Add _pagination.html for pagination support - Add _translations.html for translation listing support - Minor updates to archives.html, tags.html - Update base.html to have more flexibility - Update authors.html and author.html to display information - Update category.html and categories.html to use the _list_item.html - Update page translation support + misc - Update tag.html to use _list_item.html --- static/css/app.css | 139 ++++++++++++----------------------- static/js/app.js | 5 ++ static/sass/app.scss | 67 +++++++++++++++-- templates/_author_item.html | 53 +++++++++++++ templates/_disqus.html | 18 ++--- templates/_page_footer.html | 15 ++-- templates/_pagination.html | 23 ++++++ templates/_translations.html | 10 +++ templates/archives.html | 4 +- templates/author.html | 9 ++- templates/authors.html | 11 ++- templates/base.html | 25 ++++++- templates/categories.html | 13 +++- templates/category.html | 14 +--- templates/index.html | 2 +- templates/page.html | 6 +- templates/tag.html | 4 +- templates/tags.html | 2 +- 18 files changed, 274 insertions(+), 146 deletions(-) create mode 100644 templates/_author_item.html create mode 100644 templates/_pagination.html create mode 100644 templates/_translations.html diff --git a/static/css/app.css b/static/css/app.css index 647ad8d..c4bf003 100644 --- a/static/css/app.css +++ b/static/css/app.css @@ -1,3 +1,4 @@ +@charset "UTF-8"; /* normalize.css v2.1.1 | MIT License | git.io/normalize */ /* ========================================================================== HTML5 display definitions ========================================================================== */ /** Correct `block` display not defined in IE 8/9. */ @@ -325,7 +326,7 @@ ul.square li ul, ul.circle li ul, ul.disc li ul { list-style: inherit; } ul.square { list-style-type: square; } ul.circle { list-style-type: circle; } ul.disc { list-style-type: disc; } -ul.no-bullet, #main section ul.article-list { list-style: none; } +ul.no-bullet, #main section ul.item-list { list-style: none; } /* Ordered Lists */ ol li ul, ol li ol { margin-left: 1.25em; margin-bottom: 0; } @@ -380,67 +381,6 @@ blockquote, blockquote p { line-height: 1.6; color: #6f6f6f; } .print-only { display: block !important; } .hide-for-print { display: none !important; } .show-for-print { display: inherit !important; } } -button, .button { border-style: solid; border-width: 1px; cursor: pointer; font-family: inherit; font-weight: bold; line-height: 1; margin: 0 0 1.25em; position: relative; text-decoration: none; text-align: center; display: inline-block; padding-top: 0.75em; padding-right: 1.5em; padding-bottom: 0.8125em; padding-left: 1.5em; font-size: 1em; background-color: #9b160d; border-color: #6c0f09; color: white; } -button:hover, button:focus, .button:hover, .button:focus { background-color: #6c0f09; } -button:hover, button:focus, .button:hover, .button:focus { color: white; } -button.secondary, .button.secondary { background-color: #e0e0e0; border-color: #c7c7c7; color: #333333; } -button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus { background-color: #c7c7c7; } -button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus { color: #333333; } -button.success, .button.success { background-color: #5da423; border-color: #457a1a; color: white; } -button.success:hover, button.success:focus, .button.success:hover, .button.success:focus { background-color: #457a1a; } -button.success:hover, button.success:focus, .button.success:hover, .button.success:focus { color: white; } -button.alert, .button.alert { background-color: #c60f13; border-color: #970b0e; color: white; } -button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus { background-color: #970b0e; } -button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus { color: white; } -button.large, .button.large { padding-top: 1em; padding-right: 2em; padding-bottom: 1.0625em; padding-left: 2em; font-size: 1.25em; } -button.small, .button.small { padding-top: 0.5625em; padding-right: 1.125em; padding-bottom: 0.625em; padding-left: 1.125em; font-size: 0.8125em; } -button.tiny, .button.tiny { padding-top: 0.4375em; padding-right: 0.875em; padding-bottom: 0.5em; padding-left: 0.875em; font-size: 0.6875em; } -button.expand, .button.expand { padding-right: 0px; padding-left: 0px; width: 100%; } -button.left-align, .button.left-align { text-align: left; text-indent: 0.75em; } -button.right-align, .button.right-align { text-align: right; padding-right: 0.75em; } -button.disabled, button[disabled], .button.disabled, .button[disabled] { background-color: #9b160d; border-color: #6c0f09; color: white; cursor: default; opacity: 0.6; -webkit-box-shadow: none; box-shadow: none; } -button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { background-color: #6c0f09; } -button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { color: white; } -button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { background-color: #9b160d; } -button.disabled.secondary, button[disabled].secondary, .button.disabled.secondary, .button[disabled].secondary { background-color: #e0e0e0; border-color: #c7c7c7; color: #333333; cursor: default; opacity: 0.6; -webkit-box-shadow: none; box-shadow: none; } -button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { background-color: #c7c7c7; } -button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { color: #333333; } -button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { background-color: #e0e0e0; } -button.disabled.success, button[disabled].success, .button.disabled.success, .button[disabled].success { background-color: #5da423; border-color: #457a1a; color: white; cursor: default; opacity: 0.6; -webkit-box-shadow: none; box-shadow: none; } -button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { background-color: #457a1a; } -button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { color: white; } -button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { background-color: #5da423; } -button.disabled.alert, button[disabled].alert, .button.disabled.alert, .button[disabled].alert { background-color: #c60f13; border-color: #970b0e; color: white; cursor: default; opacity: 0.6; -webkit-box-shadow: none; box-shadow: none; } -button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { background-color: #970b0e; } -button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { color: white; } -button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { background-color: #c60f13; } - -button, .button { padding-top: 0.8125em; padding-bottom: 0.75em; -webkit-appearance: none; } -button.tiny, .button.tiny { padding-top: 0.5em; padding-bottom: 0.4375em; -webkit-appearance: none; } -button.small, .button.small { padding-top: 0.625em; padding-bottom: 0.5625em; -webkit-appearance: none; } -button.large, .button.large { padding-top: 1.03125em; padding-bottom: 1.03125em; -webkit-appearance: none; } - -@media only screen { button, .button { -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; -webkit-transition: background-color 300ms ease-out; -moz-transition: background-color 300ms ease-out; transition: background-color 300ms ease-out; } - button:active, .button:active { -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; } - button.radius, .button.radius { -webkit-border-radius: 3px; border-radius: 3px; } - button.round, .button.round { -webkit-border-radius: 1000px; border-radius: 1000px; } } -@media only screen and (min-width: 768px) { button, .button { display: inline-block; } } -/* Dropdown Button */ -.dropdown.button { position: relative; padding-right: 3.1875em; } -.dropdown.button:before { position: absolute; content: ""; width: 0; height: 0; display: block; border-style: solid; border-color: white transparent transparent transparent; top: 50%; } -.dropdown.button:before { border-width: 0.5625em; right: 1.5em; margin-top: -0.25em; } -.dropdown.button:before { border-color: white transparent transparent transparent; } -.dropdown.button.tiny { padding-right: 2.1875em; } -.dropdown.button.tiny:before { border-width: 0.4375em; right: 0.875em; margin-top: -0.15625em; } -.dropdown.button.tiny:before { border-color: white transparent transparent transparent; } -.dropdown.button.small { padding-right: 2.8125em; } -.dropdown.button.small:before { border-width: 0.5625em; right: 1.125em; margin-top: -0.21875em; } -.dropdown.button.small:before { border-color: white transparent transparent transparent; } -.dropdown.button.large { padding-right: 4em; } -.dropdown.button.large:before { border-width: 0.625em; right: 1.75em; margin-top: -0.3125em; } -.dropdown.button.large:before { border-color: white transparent transparent transparent; } -.dropdown.button.secondary:before { border-color: #333333 transparent transparent transparent; } - /* Wrapped around .top-bar to contain to grid width */ .contain-to-grid { width: 100%; background: #9b160d; } .contain-to-grid .top-bar { margin-bottom: 1.875em; } @@ -546,20 +486,20 @@ button.large, .button.large { padding-top: 1.03125em; padding-bottom: 1.03125em; .inline-list > li { list-style: none; float: left; margin-left: 1.375em; display: block; } .inline-list > li > * { display: block; } -/* Panels */ -.panel { border-style: solid; border-width: 1px; border-color: #d9d9d9; margin-bottom: 1.25em; padding: 1.25em; background: #f2f2f2; } -.panel > :first-child { margin-top: 0; } -.panel > :last-child { margin-bottom: 0; } -.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p { color: #333333; } -.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6 { line-height: 1; margin-bottom: 0.625em; } -.panel h1.subheader, .panel h2.subheader, .panel h3.subheader, .panel h4.subheader, .panel h5.subheader, .panel h6.subheader { line-height: 1.4; } -.panel.callout { border-style: solid; border-width: 1px; border-color: #6c0f09; margin-bottom: 1.25em; padding: 1.25em; background: #9b160d; -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; } -.panel.callout > :first-child { margin-top: 0; } -.panel.callout > :last-child { margin-bottom: 0; } -.panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6, .panel.callout p { color: white; } -.panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6 { line-height: 1; margin-bottom: 0.625em; } -.panel.callout h1.subheader, .panel.callout h2.subheader, .panel.callout h3.subheader, .panel.callout h4.subheader, .panel.callout h5.subheader, .panel.callout h6.subheader { line-height: 1.4; } -.panel.radius { -webkit-border-radius: 3px; border-radius: 3px; } +/* Default Pagination */ +ul.pagination { display: block; height: 1.5em; margin-left: -0.3125em; } +ul.pagination li { height: 1.5em; color: #222222; font-size: 0.875em; margin-left: 0.3125em; } +ul.pagination li a { display: block; padding: 0.0625em 0.4375em 0.0625em; color: #999999; } +ul.pagination li:hover a, ul.pagination li a:focus { background: #e6e6e6; } +ul.pagination li.unavailable a { cursor: default; color: #999999; } +ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus { background: transparent; } +ul.pagination li.current a { background: #9b160d; color: white; font-weight: bold; cursor: default; } +ul.pagination li.current a:hover, ul.pagination li.current a:focus { background: #9b160d; } +ul.pagination li { float: left; display: block; } + +/* Pagination centred wrapper */ +.pagination-centered { text-align: center; } +.pagination-centered ul.pagination li { float: none; display: inline-block; } /* Tables */ table { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; } @@ -800,27 +740,39 @@ body { background-color: #fff; } #main section { padding: 0.625em 0.4375em 0.4375em 0.75em; } #main section header { overflow: hidden; margin-bottom: 0.4375em; border-bottom: 1px solid #f2f2f2; } #main section header h1, #main section header h2, #main section header h3 { margin-top: 0; margin-bottom: 0; } -#main section ul.article-list { margin-bottom: 0; margin-left: 0; } -#main section ul.article-list li .article { border: 1px solid #f2f2f2; padding: 0.4375em; margin: 0.4375em; overflow: hidden; clear: both; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background-image: -webkit-linear-gradient(top, #ffffff, #f8f8f8); background-image: -moz-linear-gradient(top, #ffffff, #f8f8f8); background-image: -o-linear-gradient(top, #ffffff, #f8f8f8); background-image: linear-gradient(to bottom, #ffffff, #f8f8f8); } -#main section ul.article-list li .article:after { clear: both; } -#main section ul.article-list li .article .summary { font-size: 0.9em; padding-bottom: 0.4375em; } -#main section ul.article-list li .article footer { border-top: 1px solid #f2f2f2; font-size: 0.8em; color: #c7c7c7; } -#main section ul.article-list li .article footer ul { margin-left: 0; } -#main section ul.article-list li .article footer abbr { color: #c7c7c7; } -#main section ul.article-list li .article footer a { color: #b3190f; } -#main section ul.article-list li .article header .tag-list { font-size: 0.7em; margin-bottom: 0; display: inline-block; vertical-align: middle; } -#main section ul.article-list li .article header .tag-list li a { padding: 0.25em 0.4375em; } -#main section ul.article-list li .article header span { font-size: 0.8em; } -#main section dl.article-list dt { border-top: 1px solid #f2f2f2; } -#main section dl.article-list dt:first-child { border: none; } -#main section dl.article-list dd { margin-bottom: 0.5em; } +#main section header .print_header { display: none; } +#main section header a.th { display: block; margin-left: 0.625em; margin-right: 0.625em; margin-bottom: 0.625em; text-align: center; background-color: #000; } +#main section header a.th img { max-height: 250px; } +#main section article { overflow: auto; } +#main section article a.th { display: block; margin-right: auto; margin-left: auto; } +#main section ul.item-list { margin-bottom: 0; margin-left: 0; } +#main section ul.item-list li .article, #main section ul.item-list li .author { border: 1px solid #f2f2f2; padding: 0.4375em; margin: 0.4375em; overflow: hidden; clear: both; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; background-image: -webkit-linear-gradient(top, #ffffff, #f8f8f8); background-image: -moz-linear-gradient(top, #ffffff, #f8f8f8); background-image: -o-linear-gradient(top, #ffffff, #f8f8f8); background-image: linear-gradient(to bottom, #ffffff, #f8f8f8); } +#main section ul.item-list li .article:after, #main section ul.item-list li .author:after { clear: both; } +#main section ul.item-list li .article .summary, #main section ul.item-list li .author .summary { font-size: 0.9em; padding-bottom: 0.4375em; } +#main section ul.item-list li .article footer, #main section ul.item-list li .author footer { border-top: 1px solid #f2f2f2; font-size: 0.8em; color: #c7c7c7; } +#main section ul.item-list li .article footer ul, #main section ul.item-list li .author footer ul { margin-left: 0; } +#main section ul.item-list li .article footer abbr, #main section ul.item-list li .author footer abbr { color: #c7c7c7; } +#main section ul.item-list li .article footer a, #main section ul.item-list li .author footer a { color: #b3190f; } +#main section ul.item-list li .article header .tag-list, #main section ul.item-list li .author header .tag-list { font-size: 0.7em; margin-bottom: 0; display: inline-block; vertical-align: middle; } +#main section ul.item-list li .article header .tag-list li a, #main section ul.item-list li .author header .tag-list li a { padding: 0.25em 0.4375em; } +#main section ul.item-list li .article header span, #main section ul.item-list li .author header span { font-size: 0.8em; } +#main section ul.item-list li .author .vcard { border: none; border-bottom: 1px solid #f2f2f2; display: block; margin-bottom: 0.4375em; } +#main section ul.item-list li .author .vcard p:last-child { margin-bottom: 0.3125em; } +#main section dl.item-list dt { border-top: 1px solid #f2f2f2; } +#main section dl.item-list dt:first-child { border: none; } +#main section dl.item-list dd { margin-bottom: 0.5em; } +#main section .page_footer, #main section .article_footer { border-top: 1px solid #f2f2f2; padding-top: 0.3125em; margin-top: 0.3125em; } +#main section .page_footer .no-bullet, #main section .page_footer ul.item-list, #main section .article_footer .no-bullet, #main section .article_footer ul.item-list { margin-left: 0; } +#main section .page_footer #disqus_thread, #main section .article_footer #disqus_thread { border-top: 1px solid #f2f2f2; padding-top: 0.625em; } #mainAside { font-size: 0.8em; } #mainAside aside { padding: 0.625em 0.4375em; } -#blogRoll { margin-left: 0; } +#blogRoll { margin-left: 0; margin-bottom: 0; } +#blogRoll .external:after { font-family: 'pelican-red'; content: " "; } #mainFooter { text-align: right; margin-right: 0.625em; margin-top: 0.625em; margin-bottom: 0.4375em; color: #888; font-size: 0.8em; } +#mainFooter .print_footer { display: none; } .social-area li a:not(.button) { padding: 0 10px; } @@ -839,4 +791,7 @@ body { background-color: #fff; } .tag-list li:hover a span { border-color: #88130b; background-color: #bc1b10; color: #fff; } @media print { body { padding-top: 0 !important; } - .top-bar { display: none; } } + .top-bar, #mainAside { display: none; } + #main section header .print_header, #mainFooter .print_footer { display: block; } + #main .codehilitewrapper { page-break-inside: avoid; } + #main pre { border: none; } } diff --git a/static/js/app.js b/static/js/app.js index fc11a96..f02a7ca 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -13,6 +13,11 @@ yepnope.errorTimeout = 3000; // set 3 second error timeout instead of 10 function ready(){ // Hack to fix .codehilitetable overflow $('.codehilitetable').wrap('
'); + // Hack to make images more responsive and wrap with .th class + $('#main article img').each( function() { + $(this).css({'height': '', 'width': ''}); + $(this).wrap(''); + }); }; // zeptojs or jquery diff --git a/static/sass/app.scss b/static/sass/app.scss index 3d14b28..47fbecf 100644 --- a/static/sass/app.scss +++ b/static/sass/app.scss @@ -10,11 +10,11 @@ // @import "foundation/components/visibility"; // @import "foundation/components/block-grid"; @import "foundation/components/type"; -@import "foundation/components/buttons"; +// @import "foundation/components/buttons"; // @import "foundation/components/forms"; // *requires components/buttons // @import "foundation/components/custom-forms"; // *requires components/buttons, components/forms // @import "foundation/components/button-groups"; // *requires components/buttons - @import "foundation/components/dropdown-buttons"; // *requires components/buttons +// @import "foundation/components/dropdown-buttons"; // *requires components/buttons // @import "foundation/components/split-buttons"; // *requires components/buttons // @import "foundation/components/flex-video"; // @import "foundation/components/section"; @@ -28,8 +28,8 @@ @import "foundation/components/keystrokes"; @import "foundation/components/labels"; @import "foundation/components/inline-lists"; -// @import "foundation/components/pagination"; -@import "foundation/components/panels"; +@import "foundation/components/pagination"; +// @import "foundation/components/panels"; // @import "foundation/components/pricing-tables"; // @import "foundation/components/progress-bars"; // @import "foundation/components/side-nav"; @@ -92,12 +92,32 @@ body{ background-color: #fff; } margin-bottom: emCalc(7px); h1, h2, h3 { margin-top: 0; margin-bottom: 0; } border-bottom: 1px solid darken(#fff, 5%); + .print_header{ display: none; } + a.th{ + display: block; + margin-left: emCalc(10px); + margin-right: emCalc(10px); + margin-bottom: emCalc(10px); + text-align: center; + background-color: #000; + img { + max-height: 250px; + } + } } - ul.article-list { + article { + overflow: auto; + a.th { + display: block; + margin-right: auto; + margin-left: auto; + } + } + ul.item-list { @extend .no-bullet; margin-bottom: 0; margin-left: 0; - li .article { + li .article, li .author { border: 1px solid darken(#fff, 5%); padding: emCalc(7px); margin: emCalc(7px); @@ -128,12 +148,29 @@ body{ background-color: #fff; } span{ font-size: 0.8em; } } } + li .author .vcard { + border: none; + border-bottom: 1px solid darken(#fff, 5%); + display: block; + margin-bottom: emCalc(7px); + p:last-child { margin-bottom: emCalc(5px); } + } } - dl.article-list { + dl.item-list { dt{ border-top: 1px solid darken(#fff, 5%); } dt:first-child{ border: none; } dd{ margin-bottom: emCalc(8px); } } + .page_footer, .article_footer{ + border-top: 1px solid darken(#fff, 5%); + padding-top: emCalc(5px); + margin-top: emCalc(5px); + .no-bullet{ margin-left: 0; } + #disqus_thread { + border-top: 1px solid darken(#fff, 5%); + padding-top: emCalc(10px); + } + } } #mainAside { @@ -144,6 +181,13 @@ body{ background-color: #fff; } } #blogRoll { margin-left: 0; + margin-bottom: 0; + .external { + &:after{ + font-family: 'pelican-red'; + content: " "; + } + } } #mainFooter { @@ -153,6 +197,7 @@ body{ background-color: #fff; } margin-bottom: emCalc(7px); color: #888; font-size: 0.8em; + .print_footer{ display: none; } } //// Component Styles @@ -202,7 +247,13 @@ body{ background-color: #fff; } //// Print Visibility styling @media print{ body { padding-top: 0 !important; } - .top-bar{ + .top-bar, #mainAside { display: none; } + #main section header .print_header, #mainFooter .print_footer{ display: block; } + #main { + .codehilitewrapper{ page-break-inside: avoid; } + pre { border: none; } + } } + diff --git a/templates/_author_item.html b/templates/_author_item.html new file mode 100644 index 0000000..08983d0 --- /dev/null +++ b/templates/_author_item.html @@ -0,0 +1,53 @@ + {% set name = author.name|trim() %} + {% if name in AUTHORS %} + {% set props = AUTHORS[name] %} + {% endif %} +
  • +
    + +
    +
    +

    {{ author }}

    +
    +
      + {% if props %} + {% for key, value in props.vcard if not key == 'photo' %} +
    • + {% if key == 'email' %} + {{ value }} + {% elif key == 'url' %} + {{ value }} + {% elif key == 'notes' %} +

      {{ value }}

      + {% else %} + {{ value }} + {% endif %} +
    • + {% endfor %} + {% else %} +
    • {{ author }}
    • +
    • {{ SITEURL+'/'+author.url }}
    • + {% endif %} +
    + {% if props %} +
      + {% for network, url in props.social %} +
    • + {% endfor %} +
    + {% endif %} +
    +
    +
  • \ No newline at end of file diff --git a/templates/_disqus.html b/templates/_disqus.html index 20b44b0..53abedd 100644 --- a/templates/_disqus.html +++ b/templates/_disqus.html @@ -1,11 +1,10 @@ -
    -
    -
    + comments powered by Disqus -
    -
    +
    diff --git a/templates/_page_footer.html b/templates/_page_footer.html index 4eff8b9..6307cbb 100644 --- a/templates/_page_footer.html +++ b/templates/_page_footer.html @@ -1,12 +1,16 @@ {# Items to include at the bottom of a single page #} + {# Comments #} {% if ( page.comments == True or ( page.comments is not defined and COMMENTS_PAGE == True ) ) and DISQUS_SN %} {% include '_disqus.html' %} diff --git a/templates/_pagination.html b/templates/_pagination.html new file mode 100644 index 0000000..20f202c --- /dev/null +++ b/templates/_pagination.html @@ -0,0 +1,23 @@ +
    diff --git a/templates/_translations.html b/templates/_translations.html new file mode 100644 index 0000000..5229fe4 --- /dev/null +++ b/templates/_translations.html @@ -0,0 +1,10 @@ +{% macro translations_for(article) %} +{% if article.translations %} +
  • Translations: +{% for translation in article.translations %} +{{ translation.lang }} +{% if not loop.last %},{% endif %} +{% endfor %} +
  • +{% endif %} +{% endmacro %} diff --git a/templates/archives.html b/templates/archives.html index 4c8d8bc..b383216 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -1,8 +1,8 @@ {% extends 'base.html' %} {% block title %}{{ super() }} - Archives{% endblock %} -{% block content_title %}Archives{% endblock %} +{% block content_title %}Archives{% endblock %} {% block content %} -
    +
    {% for article in articles %}
    {{ article.title }}
    Published: {{ article.locale_date }} by {{ article.author }}
    diff --git a/templates/author.html b/templates/author.html index e4206e1..1825f37 100644 --- a/templates/author.html +++ b/templates/author.html @@ -1,4 +1,9 @@ {% extends 'base.html' %} {% block title %}{{ super() }} - {{author}}{% endblock %} -{% block content_title %}{{author}}{% endblock %} - +{% block content_title %}{{author}}{% endblock %} +{% block content %} +
      +{% include '_author_item.html' %} +
    +{{ super() }} +{% endblock %} diff --git a/templates/authors.html b/templates/authors.html index 0cd57f0..3bff460 100644 --- a/templates/authors.html +++ b/templates/authors.html @@ -1,4 +1,11 @@ {% extends 'base.html' %} - +{% block content_title %}Authors{% endblock %} {% block content %} -{% endblock %} \ No newline at end of file +{% if authors %} +
      + {% for author, articles in authors %} + {% include '_author_item.html' %} + {% endfor %} +
    +{% endif %} +{% endblock %} diff --git a/templates/base.html b/templates/base.html index ef62330..7ef67e8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -77,14 +77,14 @@ {% endif %} {% if DISPLAY_PAGES_ON_MENU == 'Expanded' %} - {% for p in PAGES %} + {% for p in PAGES if not p.status == hidden %}
  • {{ p.title }}
  • {% endfor %} {% endif %} {% endif %} {% if DISPLAY_CATEGORIES_ON_MENU != False %} {% if DISPLAY_CATEGORIES_ON_MENU == 'Compact' %} -
  • Categories +
  • Categories