Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
damsfx committed May 1, 2021
1 parent e35eb69 commit a545a31
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Winter CMS - Blocks Theme
Winter CMS theme that demonstrates the use of repeater groups to assemble static pages with customizable building sections and blocks.
Each section, depending oh his type, can have one or more blocks.
Winter CMS theme that demonstrates the use of "repeater groups" in [custom page fields](https://github.com/wintercms/wn-pages-plugin/blob/main/docs/documentation.md#custom-page-fields) to assemble static pages with customizable building sections and blocks.
Each section, depending on his type, can have one or more blocks.

## Installation
(let assume you're in the root of your winter installation)

### Using composer
Just run this command
```
Expand All @@ -23,6 +25,7 @@ NOTE: the name **blocks** is important, if you change the themes name you have t


In your backend, check for the [static pages plugin](https://github.com/wintercms/wn-pages-plugin) to be installed. If you go to the "Pages" and edit home page, you now have a blocks tab where you can add different sections/blocks, enter data and even rearrange their order.
Custom page fields add custom fields to the page editor form, called *Syntax Fields*

![static pages example](assets/images/blocks.jpg)

Expand Down Expand Up @@ -65,6 +68,8 @@ text:
```
**Important**: Each block definition has a corresponding partial file named `partials/blocks/content/{block_name}.htm`. The form data is passed as 'content'.

**Make awesome sites with Winter!**

----


This theme is inspired by [Liip/Blocks Theme](https://github.com/liip/oc-blocks-theme).
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
],
"require": {
"php": ">=5.4",
"composer/installers": "~1.0"
"composer/installers": "~1.0",
"winter/wn-pages-plugin": "^2.0"
},
"extra": {
"branch-alias": {
Expand Down
7 changes: 5 additions & 2 deletions layouts/default.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<html lang="{{ this.page.activeLocale ?: 'en' }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ this.page.title }}</title>

Expand All @@ -13,6 +12,8 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<link rel="stylesheet" href="{{ 'assets/styles.css'|theme }}" />

{% styles %}
</head>
<body>
{#
Expand All @@ -23,7 +24,8 @@
groups="themes/blocks/meta/sections.yaml"
tab="Blocks"
prompt="Add new section"
style="accordion"}
style="accordion"
}
{variable name="_dummy" type="text"}{/variable}
{/repeater}

Expand All @@ -46,5 +48,6 @@
</main>

{% partial 'footer' %}
{% scripts %}
</body>
</html>
9 changes: 6 additions & 3 deletions partials/header.htm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

<div class="text-md md:mx-auto md:text-lg">WinterCMS theme with blocks</div>

<a class="inline-flex items-center px-3 py-1 mt-4 text-base text-white bg-gray-900 border-0 rounded focus:outline-none hover:bg-gray-800 md:mt-0" href="/">Star me on Github
<svg width="24" class="w-4 h-4 ml-2 text-white" viewBox="0 0 16 16" version="1.1"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<a class="inline-flex items-center px-3 py-1 mt-4 text-base text-white bg-gray-900 border-0 rounded focus:outline-none hover:bg-gray-800 md:mt-0 github-button" href="https://github.com/Hounddd/wn-blocks-theme" data-color-scheme="no-preference: dark; light: dark; dark: dark;" data-size="large" data-show-count="true" aria-label="Star Hounddd/wn-blocks-theme on GitHub">Star me on Github</a>
</div>
</header>

{% put scripts %}
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
{% endput %}
8 changes: 4 additions & 4 deletions theme.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Blocks
description: 'Demonstrates the use of repeater groups to assemble static pages with customizable building blocks.'
author: 'Team Jazz, Liip AG'
homepage: 'https://liip.ch'
description: 'Demonstrates the use of repeater groups to assemble static pages with customizable building sections and blocks.'
author: 'Damien MATHIEU, HOUNDDD'
homepage: 'https://hounddd.fr'
code: ''
require:
- RainLab.Pages
- Winter.Pages

0 comments on commit a545a31

Please sign in to comment.