Skip to content

Commit

Permalink
Blog 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Dec 30, 2020
1 parent 506065c commit 9a74066
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 27 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a name="1.8.0"></a>
# [1.8.0](https://github.com/flextype-plugins/themes-admin/compare/v1.7.0...v1.8.0) (2020-12-30)

### Features

* **core** update code base for new Flextype 0.9.14
* **core** use new TWIG Plugin 1.7.0

<a name="1.7.0"></a>
# [1.7.0](https://github.com/flextype-themes/bootstrap-blog) (2020-12-20)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![preview](preview.png)

<p align="center">
<a href="https://github.com/flextype-themes/bootstrap-blog/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-themes/bootstrap-blog.svg?label=version&color=black"></a> <a href="https://github.com/flextype-themes/bootstrap-blog"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-themes/bootstrap-blog"><img src="https://img.shields.io/github/downloads/flextype-themes/bootstrap-blog/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype-themes/bootstrap-blog"><img src="https://img.shields.io/badge/Flextype-0.9.13-green.svg?color=black" alt="Flextype"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
<a href="https://github.com/flextype-themes/bootstrap-blog/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-themes/bootstrap-blog.svg?label=version&color=black"></a> <a href="https://github.com/flextype-themes/bootstrap-blog"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-themes/bootstrap-blog"><img src="https://img.shields.io/github/downloads/flextype-themes/bootstrap-blog/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype-themes/bootstrap-blog"><img src="https://img.shields.io/badge/Flextype-0.9.14-green.svg?color=black" alt="Flextype"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
</p>

## Features
Expand All @@ -18,7 +18,7 @@ The following dependencies need to be downloaded and installed for Bootstrap Blo

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.13 | [download](https://github.com/flextype/flextype/) |
| [flextype](https://github.com/flextype/flextype) | 0.9.14 | [download](https://github.com/flextype/flextype/) |
| [site](https://github.com/flextype-plugins/site) | >=1.0.0 | [download](https://github.com/flextype-plugins/site/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |

Expand Down
8 changes: 4 additions & 4 deletions templates/blog-post.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends 'themes/' ~ registry.get('plugins.site.settings.theme') ~ '/templates/partials/base.html' %}
{% extends 'themes/' ~ flextype.registry.get('plugins.site.settings.theme') ~ '/templates/partials/base.html' %}

{% block content %}
{% set blog = entries.fetch('blog') %}
{% set blog_posts_limit = entries.fetch('blog').entries_limit %}
{% set blog = flextype.entries.fetch('blog') %}
{% set blog_posts_limit = flextype.entries.fetch('blog').entries_limit %}
{% if blog_posts_limit == 0 %}
{% set blog_posts_limit = 5 %}
{% endif %}
Expand All @@ -15,7 +15,7 @@ <h1>{{ entry.title }}</h1>
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2H0z"/>
<path fill-rule="evenodd" d="M0 3h16v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3zm6.5 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-8 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-8 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
</svg>
{{ entry.published_at|date(registry.get('flextype.date_display_format')) }}
{{ entry.published_at|date(flextype.registry.get('flextype.date_display_format')) }}
{% if entry.tags is not empty %}
<svg class="bi bi-tag-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M2 1a1 1 0 0 0-1 1v4.586a1 1 0 0 0 .293.707l7 7a1 1 0 0 0 1.414 0l4.586-4.586a1 1 0 0 0 0-1.414l-7-7A1 1 0 0 0 6.586 1H2zm4 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
Expand Down
8 changes: 4 additions & 4 deletions templates/blog.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{% extends 'themes/' ~ registry.get('plugins.site.settings.theme') ~ '/templates/partials/base.html' %}
{% extends 'themes/' ~ flextype.registry.get('plugins.site.settings.theme') ~ '/templates/partials/base.html' %}

{% block content %}

{# pagination #}

{% set page = query.page %}
{% set tag = query.tag %}
{% set blog = entries.fetch('blog', {'collection': true}) %}
{% set blog = flextype.entries.fetch('blog', {'collection': true}) %}

{% set blog_posts_limit = entries.fetch('blog').entries_limit %}
{% set blog_posts_limit = flextype.entries.fetch('blog').entries_limit %}

{% if blog_posts_limit == 0 %}
{% set blog_posts_limit = 5 %}
Expand Down Expand Up @@ -70,7 +70,7 @@
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2H0z"/>
<path fill-rule="evenodd" d="M0 3h16v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3zm6.5 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-8 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-8 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm2 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm4-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
</svg>
{{ post.published_at|date(registry.get('flextype.date_display_format')) }}
{{ post.published_at|date(flextype.registry.get('flextype.date_display_format')) }}
{% if post.tags is not empty %}
<svg class="bi bi-tag-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M2 1a1 1 0 0 0-1 1v4.586a1 1 0 0 0 .293.707l7 7a1 1 0 0 0 1.414 0l4.586-4.586a1 1 0 0 0 0-1.414l-7-7A1 1 0 0 0 6.586 1H2zm4 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
Expand Down
2 changes: 1 addition & 1 deletion templates/default.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'themes/' ~ registry.get('plugins.site.settings.theme') ~ '/templates/partials/base.html' %}
{% extends 'themes/' ~ flextype.registry.get('plugins.site.settings.theme') ~ '/templates/partials/base.html' %}

{% block content %}
{{ entry.content|raw }}
Expand Down
28 changes: 14 additions & 14 deletions templates/partials/base.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<!doctype html>
<html lang="{{ registry.get('flextype.settings.locale') }}">
<html lang="{{ flextype.registry.get('flextype.settings.locale') }}">
<head>
{% block head %}
<meta charset="{{ registry.get('flextype.settings.charset')|lower }}">
<meta charset="{{ flextype.registry.get('flextype.settings.charset')|lower }}">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{% if entry.description %}{{ entry.description }}{% else %}{{ registry.get('plugins.site.settings.description') }}{% endif %}">
<meta name="keywords" content="{% if entry.keywords %}{{ entry.keywords }}{% else %}{{ registry.get('plugins.site.settings.keywords') }}{% endif %}">
<meta name="robots" content="{% if entry.robots %}{{ entry.robots }}{% else %}{{ registry.get('plugins.site.settings.robots') }}{% endif %}">
<meta name="description" content="{% if entry.description %}{{ entry.description }}{% else %}{{ flextype.registry.get('plugins.site.settings.description') }}{% endif %}">
<meta name="keywords" content="{% if entry.keywords %}{{ entry.keywords }}{% else %}{{ flextype.registry.get('plugins.site.settings.keywords') }}{% endif %}">
<meta name="robots" content="{% if entry.robots %}{{ entry.robots }}{% else %}{{ flextype.registry.get('plugins.site.settings.robots') }}{% endif %}">
<meta name="generator" content="Powered by Flextype"/>

{% do
emitter.emit('onThemeMeta') %}
flextype.emitter.emit('onThemeMeta') %}

<title>
{% if entry.title %}{{ entry.title|e('html') }}
|
{% endif %}{{ registry.get('plugins.site.settings.title')|e('html') }}</title>
{% endif %}{{ flextype.registry.get('plugins.site.settings.title')|e('html') }}</title>

<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900,900i&display=swap&subset=cyrillic,cyrillic-ext,latin-ext" rel="stylesheet">

Expand All @@ -24,29 +24,29 @@
<!-- Custom styles for this template -->
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:700,900" rel="stylesheet">

{% set theme = registry.get('plugins.site.settings.theme') %}
{% set theme = flextype.registry.get('plugins.site.settings.theme') %}
{% do registry.set('assets.site.css.bootstrap-blog', 'project/themes/' ~ theme ~ '/assets/src/css/styles.css') %}

{% if registry.has('assets.site.css') %}
{% for css in registry.get('assets.site.css') %}
{% for css in flextype.registry.get('assets.site.css') %}
<link href="{{ url() }}/{{ css }}" rel="stylesheet">
{% endfor %}
{% endif %}

{% do
emitter.emit('onThemeHeader') %}
flextype.emitter.emit('onThemeHeader') %}
{% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="{{ url() }}">{{ registry.get('plugins.site.settings.title')|e('html') }}</a>
<a class="navbar-brand" href="{{ url() }}">{{ flextype.registry.get('plugins.site.settings.title')|e('html') }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
{% for item in entries.fetch('', {'collection': true}).sortBy('menu_item_order', 'ASC').all() %}
{% for item in flextype.entries.fetch('', {'collection': true}).sortBy('menu_item_order', 'ASC').all() %}
{% if item.menu_item_title %}
<li class="nav-item {% if item.menu_item_url in entry.id %}active{% endif %}">
<a class="nav-link" href="{{ url() }}/{{ item.menu_item_url }}">{{ item.menu_item_title }}</a>
Expand Down Expand Up @@ -77,14 +77,14 @@
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

{% if registry.has('assets.site.js') %}
{% for js in registry.get('assets.site.js') %}
{% for js in flextype.registry.get('assets.site.js') %}
{% if js %}
<script type="text/javascript" src="{{ url() }}/{{ js }}"></script>
{% endif %}
{% endfor %}
{% endif %}

{% do
emitter.emit('onThemeTail') %}
flextype.emitter.emit('onThemeTail') %}
</body>
</html>
4 changes: 2 additions & 2 deletions theme.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bootstrap Blog
version: 1.7.0
version: 1.8.0
description: Twitter Bootstrap Blog theme for Flextype.
author:
name: Sergey Romanenko
Expand All @@ -10,6 +10,6 @@ bugs: https://github.com/flextype-themes/bootstrap-blog/issues
license: MIT

dependencies:
flextype: 0.9.13
flextype: 0.9.14
site: '>=1.0.0'
twig: '>=1.0.0'

0 comments on commit 9a74066

Please sign in to comment.