diff options
Diffstat (limited to 'nikola/data/themes/bootblog4')
| -rw-r--r-- | nikola/data/themes/bootblog4/README.md | 6 | ||||
| -rw-r--r-- | nikola/data/themes/bootblog4/assets/css/bootblog.css | 225 | ||||
| -rw-r--r-- | nikola/data/themes/bootblog4/bootblog4.theme | 12 | ||||
| -rw-r--r-- | nikola/data/themes/bootblog4/bundles | 28 | ||||
| -rw-r--r-- | nikola/data/themes/bootblog4/templates/base.tmpl | 104 | ||||
| -rw-r--r-- | nikola/data/themes/bootblog4/templates/base_helper.tmpl | 169 | ||||
| -rw-r--r-- | nikola/data/themes/bootblog4/templates/index.tmpl | 150 |
7 files changed, 694 insertions, 0 deletions
diff --git a/nikola/data/themes/bootblog4/README.md b/nikola/data/themes/bootblog4/README.md new file mode 100644 index 0000000..6a9226e --- /dev/null +++ b/nikola/data/themes/bootblog4/README.md @@ -0,0 +1,6 @@ +This is a theme based on Bootstrap 4 and the [blog example](https://getbootstrap.com/docs/4.0/examples/blog/) by @mdo. + +Note that unlike previous versions of Bootstrap, icon fonts are not built-in. +You can use Font Awesome for this. + +This theme **does not** support Bootswatch font/color schemes. diff --git a/nikola/data/themes/bootblog4/assets/css/bootblog.css b/nikola/data/themes/bootblog4/assets/css/bootblog.css new file mode 100644 index 0000000..96d4b92 --- /dev/null +++ b/nikola/data/themes/bootblog4/assets/css/bootblog.css @@ -0,0 +1,225 @@ +/* stylelint-disable selector-list-comma-newline-after */ + +.blog-header { + line-height: 1; + border-bottom: 1px solid #e5e5e5; +} + +.blog-header-logo { + font-family: "Playfair Display", Georgia, "Times New Roman", serif; + font-size: 2.25rem; +} + +.blog-header-logo:hover { + text-decoration: none; +} + +h1, h2, h3, h4, h5, h6 { + font-family: "Playfair Display", Georgia, "Times New Roman", serif; +} + +.display-4 { + font-size: 2.5rem; +} +@media (min-width: 768px) { + .display-4 { + font-size: 3rem; + } +} + +.nav-scroller { + position: relative; + z-index: 2; + height: 2.75rem; + overflow-y: hidden; +} + +.nav-scroller .nav { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + padding-bottom: 1rem; + margin-top: -1px; + overflow-x: auto; + text-align: center; + white-space: nowrap; + -webkit-overflow-scrolling: touch; +} + +.nav-scroller .nav-link { + padding-top: .75rem; + padding-bottom: .75rem; + font-size: .875rem; +} + +.card-img-right { + height: 100%; + border-radius: 0 3px 3px 0; +} + +.flex-auto { + -ms-flex: 0 0 auto; + -webkit-box-flex: 0; + flex: 0 0 auto; +} + +.h-150 { height: 150px; } +@media (min-width: 768px) { + .h-md-150 { height: 150px; } +} + +.h-250 { height: 250px; } +@media (min-width: 768px) { + .h-md-250 { height: 250px; } +} + +.border-top { border-top: 1px solid #e5e5e5; } +.border-bottom { border-bottom: 1px solid #e5e5e5; } + +.box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); } + +/* + * Blog name and description + */ +.blog-title { + margin-bottom: 0; + font-size: 2rem; + font-weight: 400; +} +.blog-description { + font-size: 1.1rem; + color: #999; +} + +@media (min-width: 40em) { + .blog-title { + font-size: 3.5rem; + } +} + +/* Pagination */ +.blog-pagination { + margin-bottom: 4rem; +} +.blog-pagination > .btn { + border-radius: 2rem; +} + +/* + * Blog posts + */ +article { + margin-bottom: 4rem; +} +article:last-child { + margin-bottom: 0; +} +.entry-title { + margin-bottom: .25rem; + font-size: 2.5rem; +} +article .metadata { + margin-bottom: 1.25rem; + color: #999; +} + +/* + * Footer + */ +.blog-footer { + padding: 2.5rem 0; + color: #999; + text-align: center; + background-color: #f9f9f9; + border-top: .05rem solid #e5e5e5; +} +.blog-footer p:last-child { + margin-bottom: 0; +} + +@media (min-width: 576px) { + .nbb-navbar-toggler { + display: none; + } + + .nbb-header { + -webkit-box-pack: justify!important; + -ms-flex-pack: justify!important; + justify-content: space-between!important; + } +} + +/* Various fixes that make this theme look better for Nikola's needs */ +.navbar-brand { + padding: 0; + white-space: initial; +} + +.bootblog4-featured-large-image { + height: 100%; + border-top-right-radius: .25rem!important; + border-bottom-right-radius: .25rem!important; +} + +.bootblog4-featured-jumbotron-row { + margin-left: 0; + margin-right: 0; +} + +.bootblog4-right-nav { + flex-direction: row; +} + +.bootblog4-right-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; +} + +.bootblog4-featured-text { + overflow: auto; +} +/* extend the mobile appearance to `sm`, because otherwise weird things happen */ +@media (min-width: 576px) { + .nbb-navbar-toggler { + display: block; + } +} + +@media (max-width: 767px) { + .bootblog4-right-nav { + margin-top: 1rem; + } + + .bootblog4-search-form-holder { + position: absolute; + top: 2.75rem; + } + + .bootblog4-search-form-holder input.form-control { + width: 6rem; + } + + .bootblog4-brand { + text-align: left; + } +} + +@media (min-width: 768px) { + .nbb-navbar-toggler { + display: none; + } + + .flex-collapse { + display: flex !important; + } + + .bootblog4-search-form-holder { + display: block !important; + } + + .bootblog4-brand { + text-align: center; + } +} diff --git a/nikola/data/themes/bootblog4/bootblog4.theme b/nikola/data/themes/bootblog4/bootblog4.theme new file mode 100644 index 0000000..46db4ea --- /dev/null +++ b/nikola/data/themes/bootblog4/bootblog4.theme @@ -0,0 +1,12 @@ +[Theme] +engine = mako +parent = bootstrap4 +author = The Nikola Contributors +author_url = https://getnikola.com/ +license = MIT +based_on = Bootstrap 4 <http://getbootstrap.com/>, Bootstrap 4 blog example <http://getbootstrap.com/docs/4.0/examples/blog/> +tags = bootstrap + +[Family] +family = bootblog4 +jinja_version = bootblog4-jinja diff --git a/nikola/data/themes/bootblog4/bundles b/nikola/data/themes/bootblog4/bundles new file mode 100644 index 0000000..76ffd4b --- /dev/null +++ b/nikola/data/themes/bootblog4/bundles @@ -0,0 +1,28 @@ +; css bundles +assets/css/all-nocdn.css= + bootstrap.min.css, + rst_base.css, + nikola_rst.css, + code.css, + baguetteBox.min.css, + theme.css, + bootblog.css, + custom.css, +assets/css/all.css= + rst_base.css, + nikola_rst.css, + code.css, + baguetteBox.min.css, + theme.css, + bootblog.css, + custom.css, + +; javascript bundles +assets/js/all-nocdn.js= + jquery.min.js, + popper.min.js, + bootstrap.min.js, + baguetteBox.min.js, + fancydates.min.js, +assets/js/all.js= + fancydates.min.js, diff --git a/nikola/data/themes/bootblog4/templates/base.tmpl b/nikola/data/themes/bootblog4/templates/base.tmpl new file mode 100644 index 0000000..69b9d30 --- /dev/null +++ b/nikola/data/themes/bootblog4/templates/base.tmpl @@ -0,0 +1,104 @@ +## -*- coding: utf-8 -*- +<%namespace name="base" file="base_helper.tmpl" import="*" /> +<%namespace name="notes" file="annotation_helper.tmpl" import="*" /> +${set_locale(lang)} +${base.html_headstart()} +<%block name="extra_head"> +### Leave this block alone. +</%block> +${template_hooks['extra_head']()} +</head> +<body> +<a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a> + +<!-- Header and menu bar --> +<div class="container"> + <header class="blog-header py-3"> + <div class="row nbb-header align-items-center"> + <div class="col-md-3 col-xs-2 col-sm-2" style="width: auto;"> + <button class="navbar-toggler navbar-light bg-light nbb-navbar-toggler" type="button" data-toggle="collapse" data-target=".bs-nav-collapsible" aria-controls="bs-navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse bs-nav-collapsible bootblog4-search-form-holder"> + ${search_form} + </div> + </div> + <div class="col-md-6 col-xs-10 col-sm-10 bootblog4-brand" style="width: auto;"> + <a class="navbar-brand blog-header-logo text-dark" href="${_link("root", None, lang)}"> + %if logo_url: + <img src="${logo_url}" alt="${blog_title|h}" id="logo" class="d-inline-block align-top"> + %endif + + % if show_blog_title: + <span id="blog-title">${blog_title|h}</span> + % endif + </a> + </div> + <div class="col-md-3 justify-content-end align-items-center bs-nav-collapsible collapse flex-collapse bootblog4-right-nav"> + <nav class="navbar navbar-light bg-white"> + <ul class="navbar-nav bootblog4-right-nav"> + ${base.html_navigation_links_entries(navigation_alt_links)} + <%block name="belowtitle"> + %if len(translations) > 1: + ${base.html_translations()} + %endif + </%block> + <%block name="sourcelink"></%block> + ${template_hooks['menu_alt']()} + </ul></nav> + </div> + </div> +</header> + +<nav class="navbar navbar-expand-md navbar-light bg-white static-top"> + <div class="collapse navbar-collapse bs-nav-collapsible" id="bs-navbar"> + <ul class="navbar-nav nav-fill d-flex w-100"> + ${base.html_navigation_links_entries(navigation_links)} + ${template_hooks['menu']()} + </ul> + </div><!-- /.navbar-collapse --> +</nav> +<%block name="before_content"></%block> +</div> + +<div class="container" id="content" role="main"> + <div class="body-content"> + % if theme_config.get('sidebar'): + <div class="row"><div class="col-md-8 blog-main"> + % endif + <!--Body content--> + ${template_hooks['page_header']()} + <%block name="extra_header"></%block> + <%block name="content"></%block> + <!--End of body content--> + % if theme_config.get('sidebar'): + </div><aside class="col-md-4 blog-sidebar">${theme_config.get('sidebar')}</aside></div> + % endif + + <footer id="footer"> + ${content_footer} + ${template_hooks['page_footer']()} + <%block name="extra_footer"></%block> + </footer> + </div> +</div> + +${base.late_load_js()} + %if date_fanciness != 0: + <!-- fancy dates --> + <script> + luxon.Settings.defaultLocale = "${luxon_locales[lang]}"; + fancydates(${date_fanciness}, ${luxon_date_format}); + </script> + <!-- end fancy dates --> + %endif + <%block name="extra_js"></%block> + <script> + baguetteBox.run('div#content', { + ignoreClass: 'islink', + captions: function(element){var i=element.getElementsByTagName('img')[0];return i===undefined?'':i.alt;}}); + </script> +${body_end} +${template_hooks['body_end']()} +</body> +</html> diff --git a/nikola/data/themes/bootblog4/templates/base_helper.tmpl b/nikola/data/themes/bootblog4/templates/base_helper.tmpl new file mode 100644 index 0000000..3c919b4 --- /dev/null +++ b/nikola/data/themes/bootblog4/templates/base_helper.tmpl @@ -0,0 +1,169 @@ +## -*- coding: utf-8 -*- +<%namespace name="feeds_translations" file="feeds_translations_helper.tmpl" import="*"/> + +<%def name="html_headstart()"> +<!DOCTYPE html> +<html +\ +prefix='\ +og: http://ogp.me/ns# article: http://ogp.me/ns/article# \ +%if comment_system == 'facebook': +fb: http://ogp.me/ns/fb# \ +%endif +'\ +% if is_rtl: +dir="rtl" \ +% endif +\ +lang="${lang}"> + <head> + <meta charset="utf-8"> + %if description: + <meta name="description" content="${description|h}"> + %endif + <meta name="viewport" content="width=device-width, initial-scale=1"> + %if title == blog_title: + <title>${blog_title|h}</title> + %else: + <title>${title|h} | ${blog_title|h}</title> + %endif + + ${html_stylesheets()} + <meta name="theme-color" content="${theme_color}"> + % if meta_generator_tag: + <meta name="generator" content="Nikola (getnikola.com)"> + % endif + ${html_feedlinks()} + <link rel="canonical" href="${abs_link(permalink)}"> + + %if favicons: + %for name, file, size in favicons: + <link rel="${name}" href="${file}" sizes="${size}"/> + %endfor + %endif + + % if comment_system == 'facebook': + <meta property="fb:app_id" content="${comment_system_id}"> + % endif + + %if prevlink: + <link rel="prev" href="${prevlink}" type="text/html"> + %endif + %if nextlink: + <link rel="next" href="${nextlink}" type="text/html"> + %endif + + %if use_cdn: + <!--[if lt IE 9]><script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> + %else: + <!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang, url_type)}"></script><![endif]--> + %endif + + ${extra_head_data} +</%def> + +<%def name="late_load_js()"> + %if use_cdn: + <script src="http://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> + <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.11.1/baguetteBox.min.js" integrity="sha256-ULQV01VS9LCI2ePpLsmka+W0mawFpEA0rtxnezUj4A4=" crossorigin="anonymous"></script> + % endif + %if use_bundles and use_cdn: + <script src="/assets/js/all.js"></script> + %elif use_bundles: + <script src="/assets/js/all-nocdn.js"></script> + %else: + %if not use_cdn: + <script src="/assets/js/jquery.min.js"></script> + <script src="/assets/js/popper.min.js"></script> + <script src="/assets/js/bootstrap.min.js"></script> + <script src="/assets/js/baguetteBox.min.js"></script> + %endif + %endif + %if date_fanciness != 0: + %if date_fanciness == 2: + <script src="https://polyfill.io/v3/polyfill.js?features=Intl.RelativeTimeFormat.%7Elocale.${luxon_locales[lang]}"></script> + %endif + %if use_cdn: + <script src="https://cdn.jsdelivr.net/npm/luxon@1.25.0/build/global/luxon.min.js" integrity="sha256-OVk2fwTRcXYlVFxr/ECXsakqelJbOg5WCj1dXSIb+nU=" crossorigin="anonymous"></script> + %else: + <script src="/assets/js/luxon.min.js"></script> + %endif + %if not use_bundles: + <script src="/assets/js/fancydates.min.js"></script> + %endif + %endif + ${social_buttons_code} +</%def> + + +<%def name="html_stylesheets()"> + % if use_cdn: + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous"> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.11.1/baguetteBox.min.css" integrity="sha256-cLMYWYYutHkt+KpNqjg7NVkYSQ+E2VbrXsEvOqU7mL0=" crossorigin="anonymous"> + % endif + %if use_bundles and use_cdn: + <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> + %elif use_bundles: + <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css"> + %else: + %if not use_cdn: + <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/baguetteBox.min.css" rel="stylesheet" type="text/css"> + %endif + <link href="/assets/css/rst.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/code.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/bootblog.css" rel="stylesheet" type="text/css"> + %if has_custom_css: + <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> + %endif + %endif + % if needs_ipython_css: + <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> + % endif + <link href="https://fonts.googleapis.com/css?family=Playfair+Display:700,900" rel="stylesheet"> +</%def> + +<%def name="html_navigation_links()"> + ${html_navigation_links_entries(navigation_links)} +</%def> + +<%def name="html_navigation_links_entries(navigation_links_source)"> + %for url, text in navigation_links_source[lang]: + % if isinstance(url, tuple): + <li class="nav-item dropdown"><a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">${text}</a> + <div class="dropdown-menu"> + %for suburl, text in url: + % if rel_link(permalink, suburl) == "#": + <a href="${permalink}" class="dropdown-item active">${text} <span class="sr-only">${messages("(active)", lang)}</span></a> + %else: + <a href="${suburl}" class="dropdown-item">${text}</a> + %endif + %endfor + </div> + % else: + % if rel_link(permalink, url) == "#": + <li class="nav-item active"><a href="${permalink}" class="nav-link">${text} <span class="sr-only">${messages("(active)", lang)}</span></a> + %else: + <li class="nav-item"><a href="${url}" class="nav-link">${text}</a> + %endif + % endif + %endfor +</%def> + + + +<%def name="html_feedlinks()"> + ${feeds_translations.head(classification=None, kind='index', other=False)} +</%def> + +<%def name="html_translations()"> + %for langname in sorted(translations): + %if langname != lang: + <li class="nav-item"><a href="${_link("root", None, langname)}" rel="alternate" hreflang="${langname}" class="nav-link">${messages("LANGUAGE", langname)}</a></li> + %endif + %endfor +</%def> diff --git a/nikola/data/themes/bootblog4/templates/index.tmpl b/nikola/data/themes/bootblog4/templates/index.tmpl new file mode 100644 index 0000000..449c5ec --- /dev/null +++ b/nikola/data/themes/bootblog4/templates/index.tmpl @@ -0,0 +1,150 @@ +## -*- coding: utf-8 -*- +<%namespace name="helper" file="index_helper.tmpl"/> +<%namespace name="math" file="math_helper.tmpl"/> +<%namespace name="comments" file="comments_helper.tmpl"/> +<%namespace name="pagination" file="pagination_helper.tmpl"/> +<%namespace name="feeds_translations" file="feeds_translations_helper.tmpl" import="*"/> +<%inherit file="base.tmpl"/> + +<%block name="extra_head"> + ${parent.extra_head()} + % if posts and (permalink == '/' or permalink == '/' + index_file): + <link rel="prefetch" href="${posts[0].permalink()}" type="text/html"> + % endif + ${math.math_styles_ifposts(posts)} +</%block> + +<%block name="content"> + <%block name="content_header"> + ${feeds_translations.translation_link(kind)} + </%block> + % if 'main_index' in pagekind: + ${front_index_header} + % endif + % if page_links: + ${pagination.page_navigation(current_page, page_links, prevlink, nextlink, prev_next_links_reversed)} + % endif + <div class="postindex"> + % for post in posts: + <article class="h-entry post-${post.meta('type')}" itemscope="itemscope" itemtype="http://schema.org/Article"> + <header> + <h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1> + <div class="metadata"> + <p class="byline author vcard"><span class="byline-name fn" itemprop="author"> + % if author_pages_generated and multiple_authors_per_post: + % for author in post.authors(): + <a href="${_link('author', author)}">${author|h}</a> + % endfor + % elif author_pages_generated: + <a href="${_link('author', post.author())}">${post.author()|h}</a> + % else: + ${post.author()|h} + % endif + </span></p> + <p class="dateline"> + <a href="${post.permalink()}" rel="bookmark"> + <time class="published dt-published" datetime="${post.formatted_date('webiso')}" itemprop="datePublished" title="${post.formatted_date(date_format)|h}">${post.formatted_date(date_format)|h}</time> + % if post.updated and post.updated != post.date: + <span class="updated"> (${messages("updated")} + <time class="dt-updated" datetime="${post.formatted_updated('webiso')}" itemprop="dateUpdated" title="${post.formatted_updated(date_format)|h}">${post.formatted_updated(date_format)|h}</time>)</span> + % endif + </a> + </p> + % if not post.meta('nocomments') and site_has_comments: + <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)} + % endif + </div> + </header> + %if index_teasers: + <div class="p-summary entry-summary"> + ${post.text(teaser_only=True)} + </div> + %else: + <div class="e-content entry-content"> + ${post.text(teaser_only=False)} + </div> + %endif + </article> + % endfor + </div> + ${helper.html_pager()} + ${comments.comment_link_script()} + ${math.math_scripts_ifposts(posts)} +</%block> + +<%block name="before_content"> + % if 'main_index' in pagekind and is_frontmost_index and featured and (theme_config.get('featured_large') or theme_config.get('featured_small')): + % if theme_config.get('featured_on_mobile'): + <div class="d-block"> + % else: + <div class="d-none d-md-block"> + % endif + % if featured and theme_config.get('featured_large'): + <div class="jumbotron p-0 text-white rounded bg-dark"> + <div class="row bootblog4-featured-jumbotron-row"> + <div class="col-md-6 p-3 p-md-4 pr-0 h-md-250 bootblog4-featured-text"> + <h1 class="display-4 font-italic"><a class="text-white" href="${featured[0].permalink()}">${featured[0].title()}</a></h1> + % if featured[0].previewimage: + <div class="lead my-3 mb-0">${featured[0].text(teaser_only=True, strip_html=theme_config.get('featured_strip_html', True))}</div> + </div> + % if theme_config.get('featured_large_image_on_mobile'): + <div class="col-md-6 p-0 h-md-250 text-right"> + % else: + <div class="col-md-6 p-0 h-md-250 text-right d-none d-md-block"> + % endif + <img class="bootblog4-featured-large-image" src="${featured[0].previewimage}" alt="${featured.pop(0).title()}"> + </div> + % else: + <div class="lead my-3 mb-0">${featured.pop(0).text(teaser_only=True, strip_html=theme_config.get('featured_strip_html', True))}</div> + </div> + % endif + </div> + </div> + % endif + + % if featured and theme_config.get('featured_small'): + <div class="row mb-2"> + % if len(featured) == 1: + <div class="col-md-12"> + % else: + <div class="col-md-6"> + % endif + <div class="card flex-md-row mb-4 box-shadow h-md-250"> + <div class="card-body d-flex flex-column align-items-start"> + <h3 class="mb-0"> + <a class="text-dark" href="${featured[0].permalink()}">${featured[0].title()}</a> + </h3> + % if featured[0].previewimage: + <div class="card-text mb-auto bootblog4-featured-text">${featured[0].text(teaser_only=True, strip_html=theme_config.get('featured_strip_html', True))}</div> + </div> + <img class="card-img-right flex-auto d-none d-lg-block" src="${featured[0].previewimage}" alt="${featured.pop(0).title()}"> + % else: + <div class="card-text mb-auto bootblog4-featured-text">${featured.pop(0).text(teaser_only=True, strip_html=theme_config.get('featured_strip_html', True))}</div> + </div> + % endif + </div> + </div> + + % if featured: + <div class="col-md-6"> + <div class="card flex-md-row mb-4 box-shadow h-md-250"> + <div class="card-body d-flex flex-column align-items-start"> + <h3 class="mb-0"> + <a class="text-dark" href="${featured[0].permalink()}">${featured[0].title()}</a> + </h3> + % if featured[0].previewimage: + <div class="card-text mb-auto bootblog4-featured-text">${featured[0].text(teaser_only=True, strip_html=theme_config.get('featured_strip_html', True))}</div> + </div> + <img class="card-img-right flex-auto d-none d-lg-block" src="${featured[0].previewimage}" alt="${featured.pop(0).title()}"> + % else: + <div class="card-text mb-auto bootblog4-featured-text">${featured.pop(0).text(teaser_only=True, strip_html=theme_config.get('featured_strip_html', True))}</div> + </div> + % endif + </div> + </div> + % endif + </div> + %endif + </div> +% endif +</%block> |
