Skip to content

Commit

Permalink
Merge pull request #52 from bolt/new-skeleton-theme
Browse files Browse the repository at this point in the history
Use simplecss for Skeleton theme. Even simpler!
  • Loading branch information
I-Valchev authored Jan 22, 2021
2 parents ef911fe + d9ef883 commit a2c1878
Show file tree
Hide file tree
Showing 10 changed files with 503 additions and 639 deletions.
605 changes: 0 additions & 605 deletions skeleton/css/new.css

This file was deleted.

472 changes: 472 additions & 0 deletions skeleton/css/simple.css

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions skeleton/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

{% if record|default %}

<h1><a href="{{ record|link }}">{{ record|title }}</a></h1>
<h1>{{ record|title }}</h1>

{# Remove this block if you don't need it anymore. #}
{{ include('partials/_fresh_install.twig') }}

{{ record|excerpt }}
{# Output the `introduction` field. If it doesn't exist, 'default' to
the full excerpt of the current Record #}
{{ record.introduction|default(record|excerpt) }}

{% include 'partials/_image.twig' with ({'image': record|image}) %}

Expand All @@ -20,3 +22,9 @@
{% endif %}

{% endblock main %}

{% block aside %}

{{ include('partials/_aside.twig') }}

{% endblock aside %}
10 changes: 4 additions & 6 deletions skeleton/partials/_aside.twig
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<!-- Sidebar -->
<aside>

<hr>

{# Show if there are widgets in the 'aside_top' widgets slot. #}
{{ widgets('aside_top') }}

{# This part is only shown if there are no widgets in the 'aside_top' widgets slot. #}
<div>
<hr>
{# The next section attempts to fill the panel in the sidebar with the contents of the
'about'-block, if it exists. First, attempt to fetch the block by its slug #}
{% setcontent block = "block/about" %}

{# check if we have a title. If so, we know we have content to display. Otherwise, we will
{# check if we have a block. If so, we know we have content to display. Otherwise, we will
output a default text, telling the user to create the 'blocks' in the backend. #}
{% if block %}

<h5>{{ block.title }}</h5>
<h5>{{ block|title }}</h5>
<p>{{ block.content|default(block|excerpt) }}</p>

{% set edit_link = block|edit_link %}
Expand Down
9 changes: 0 additions & 9 deletions skeleton/partials/_footer.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!-- Footer -->
<footer>
<hr>

<h4>{{ __('Menu') }}</h4>
{{ menu(template = 'partials/_sub_menu.twig') }}
Expand All @@ -14,14 +13,6 @@
<button type="submit">{{ __('action.search') }}</button>
</form>

<hr>

<h4>{{ __('general.phrase.select_language') }}</h4>

{% include 'helpers/_languageselect.html.twig' with {'type': 'select'} %}

<hr>

<p>
{{ __('general.phrase.built-with-bolt') }}
</p>
Expand Down
2 changes: 1 addition & 1 deletion skeleton/partials/_header.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<header>
{# the values in the 'config' object are taken directly from the file app/config/config.yml #}
<h2><a href="{{ path('homepage') }}">{{ config.get('general/sitename') }}</a></h2>
{% if config.has('general/payoff') %}
{% if config.has('general/payoff') and record is defined and record|feature == 'homepage' %}
<p>{{ config.get('general/payoff') }}</p>
{% endif %}

Expand Down
6 changes: 3 additions & 3 deletions skeleton/partials/_image.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% if image %}
<div class="imageholder">
<figure>
<a href="{{ record|image }}">
<img src="{{ thumbnail(record, 1368, 1026) }}" alt="{{ (record|image).alt|default(record|title) }}">
</a>
{% if image.alt %}
<small>{{ image.alt }}</small>
<figcaption>{{ image.alt }}</figcaption>
{% endif %}
</div>
</figure>
{% endif %}
16 changes: 10 additions & 6 deletions skeleton/partials/_master.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
{{- ' | ' ~ config.get('general/payoff') -}}
{%- endif -%}
</title>
<link rel="stylesheet" href="{{ asset('css/new.css') }}">
<link rel="stylesheet" href="{{ asset('css/simple.css') }}">
</head>
<body>
{% block body %}
{{ include('partials/_header.twig') }}

<main>
{% block body %}

{{ include('partials/_header.twig') }}

{{ widgets('main_top') }}

Expand All @@ -29,11 +31,13 @@

{{ widgets('main_bottom') }}

{{ include('partials/_aside.twig') }}

{% endblock body %}
</main>

{% block aside %}
{% endblock aside %}

{{ include('partials/_footer.twig') }}
{{ include('partials/_footer.twig') }}

</body>
</html>
9 changes: 3 additions & 6 deletions skeleton/partials/_recordfooter.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,17 @@
{% endif %}

{% set related_content_types = record|related_by_type %}

{% if related_content_types is not empty %}
<p class="meta">{{ __('general.phrase.related-content') }}
<ul>
<h3>{{ __('general.phrase.related-content') }}</h3>
{% for content_type, related_records in related_content_types %}
<li>
<h4>Related {{ config.get('contenttypes/' ~ content_type ~ '/name') }}</h4>
<ul>
{% for related_record in related_records %}
<li><a href="{{ related_record|link }}">{{ related_record|title }}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</p>
{% endif %}

{% endif %}
1 change: 0 additions & 1 deletion skeleton/partials/_sub_menu_header.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
{% if item.label is defined %}
{{ display_menu_item(item, loop, withsubmenus) }}
{% endif %}
|
{% endfor %}
{% include 'helpers/_languageselect.html.twig' with {'type': 'select'} %}
</nav>
Expand Down

0 comments on commit a2c1878

Please sign in to comment.