Skip to content

Commit

Permalink
updated readMe, removed matrixmate config, new DB dump, template comm…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
CreateSean committed Apr 4, 2024
1 parent 7bca7dc commit 83fcef0
Show file tree
Hide file tree
Showing 35 changed files with 91 additions and 104 deletions.
41 changes: 16 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

This is an opinionated Craft CMS starter project using DDev for local development, Tailwind CSS, Alpine Js, and Laravel Mix.

### Install Craft 4 version
### Install Craft 5 version
to install this package run `composer create-project createsean/craft-starter .`

### Install Craft 4 version
to install this package run `composer create-project createsean/craft-starter . --prefer-dist 4.2.31`

### Install Craft 3 version
To install with Craft 3 version run `composer create-project createsean/craft-starter . --prefer-dist 1.14.0`

Expand All @@ -22,12 +25,9 @@ To install with Craft 3 version run `composer create-project createsean/craft-st
* [Floated Labels](#floated-labels)
* [Picture Element](#picture-elements)
* [Craft Plugins](#craft-plugins)
* [Redactor](#redactor)
* [Image Toolbox](#image-toolbox)
* [Typogrify](#typogrify)
* [Sprig](#sprig)
* [contact Form](#contact-form)
* [MatrixMate](#matrixmate)
* [Style Guide](#styleguide)
* [Content](#content)
* [Composer nuke](#composer-nuke)
Expand Down Expand Up @@ -58,7 +58,7 @@ Password: `letmein`
- [ ] Ensure accessibility passes with default templates - aria labels, alt text etc.
- [x] Set up site search.
- [x] Contact Form.
- [ ] Move AlpineJs and plugins from CDN to compiled build process.
- [X] Move AlpineJs and plugins from CDN to compiled build process.
- [X] Add content builder with common content types.
- [X] Contact page
- [ ] About/Team page
Expand All @@ -69,6 +69,8 @@ Password: `letmein`
- [x] Add notice bar option.
- [x] Add 404 template.
- [x] Add installation instructions.
- [ ] Replace matrix content builder with CKEditor longform
- [ ] update templates to use `.eagerly()` where possible

## Build Process

Expand Down Expand Up @@ -320,29 +322,21 @@ The following plugins are installed and ready to be used on the site. I prefer t

1. Environment Label - adds a color bar across the control panel indicating current environmen
2. Minify - minifies html/css/js on production
3. Redactor - Rich Text Editor
3. CKEditor - Rich Text Editor
4. Retcon - extra twig filters
5. SEOmatic - used for all SEO.
6. Template Comments - adds template comments in local dev to make finding templates easy
7. Typed Link Field - used for buttons and other linkks
8. ~~User Manual - in CP user manual ~~ removed until a Craft 4 version is available
6. Control Panel CSS - add custom styles to the CP
7. Hyper - used for buttons and other linkks
8. ~~User Manual - in CP user manual ~~ removed until a Craft 5 version is available
9. Knock Knock - password protect staging site (pass: **letmein**)
10. MatrixMate
11. Typogrify
10. Typogrify
11. Sprig - Reactive components
13. AssetRev - link to css and js files with manifest.json file names


## Redactor
12. AssetRev - link to css and js files with manifest.json file names

Redactor has the [link-attribute plugin installed](https://github.com/simplicate-web/redactor-link-attr) Adding/editing data attribute options is a 2 step process.

1. go to `modules/sitemodule/src/SiteModule.php` line 118 and edit or add another line like this `$def->addAttribute('a', 'data-track', 'Text');`
2. go to `config/redator/site.json` and edit or copy/paste line 20.

## Typogrify

See the [typogrify docs](https://nystudio107.com/docs/typogrify/) for advanced usage. For basic use add the typography fitler to your redactor fields like this
See the [typogrify docs](https://nystudio107.com/docs/typogrify/) for advanced usage. For basic use add the typography filter to your redactor fields like this

```{{ entry.copy|typogrify }}```

Expand All @@ -356,11 +350,6 @@ Additionally **NOTE** that sprig will only reload components once when using the

The contact form is powered by the first party [contact form plugin](https://github.com/craftcms/contact-form) and Sprig. be sure to update the Email varaibles in dotenv so that email works correctly. Go to `plugins > contact form` and update the Sender Text and Subject text of your emails.

## MatrixMate

MatrixMate enables you to improve the Matrix authoring experience by sorting block types into groups and block type fields into tabs. See the [documentation](https://github.com/vaersaagod/matrixmate/blob/master/README.md) for full options and feautures.

There is a default config file in `config/matrixmate.php` that is not currently attached to any matrix fields.

## Styleguide

Expand Down Expand Up @@ -394,6 +383,8 @@ A hero component is available with three options:
- **Basic Hero** - no image, just a title and a dark background
- **Slider Hero** - same as standard but operates as a slider - maximum 5 slides

There is also a basic matrix field for a content builder. Once I have more time I will create a longform content CKEditor field to replace the matrix content builder.

## Composer nuke

If you ever need to remove the vender folder and basically reset all things composer run this command
Expand Down
65 changes: 0 additions & 65 deletions config/matrixmate.php

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
color: yellow
fieldLayouts:
b3390d68-f84f-46fa-9b06-88b3dc039727:
tabs:
Expand All @@ -12,6 +13,7 @@ fieldLayouts:
disabled: false
elementCondition: null
id: null
includeInCards: false
inputType: null
instructions: null
label: null
Expand All @@ -20,6 +22,7 @@ fieldLayouts:
name: null
orientation: null
placeholder: null
providesThumbs: false
readonly: false
requirable: false
size: null
Expand All @@ -34,13 +37,14 @@ fieldLayouts:
name: Content
uid: 14887279-63d4-41f5-880f-5923f8d02a1d
userCondition: null
handle: newsCategories_default
handle: newsCategories
hasTitleField: true
name: 'News Categories - Default'
icon: icons
name: 'News Categories'
showSlugField: true
showStatusField: true
slugTranslationKeyFormat: null
slugTranslationKeyFormat: ''
slugTranslationMethod: site
sortOrder: 1
titleFormat: null
titleTranslationKeyFormat: null
titleFormat: ''
titleTranslationKeyFormat: ''
titleTranslationMethod: site
4 changes: 2 additions & 2 deletions config/project/project.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dateModified: 1712254102
dateModified: 1712256010
elementSources:
craft\elements\Entry:
-
Expand Down Expand Up @@ -137,7 +137,7 @@ meta:
dbff8535-c8bd-4629-bc58-732972504e1b: 'Alt Text' # Alt Text
e3dea9df-426f-43a5-96fd-927882533aa9: 'News Listing' # News Listing
ea7fe716-adee-4200-a8ca-15362418cd97: Home # Home
ef488e30-b35e-4bf8-87a3-34f0f76b622f: 'News Categories - Default' # News Categories - Default
ef488e30-b35e-4bf8-87a3-34f0f76b622f: 'News Categories' # News Categories
f4da8483-be1a-439d-8918-afde0ea14454: Text # Text
f90a85bd-91b2-462b-acb4-8f265ded647e: Copy # Copy
fbdde691-0df2-4e8e-b1a8-61a1f555fd0e: 'News Categories' # News Categories
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defaultPlacement: end
enableVersioning: true
entryTypes:
- ef488e30-b35e-4bf8-87a3-34f0f76b622f # News Categories - Default
- ef488e30-b35e-4bf8-87a3-34f0f76b622f # News Categories
handle: newsCategories
name: 'News Categories'
previewTargets:
Expand Down
Binary file modified db.sql.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions templates/_blocks/_layout.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{# section background #}
{% set background = background ?? 'bg-white' %}

{% block templateComment %}{% endblock %}

{# reveal blocks when they are 200px into the viewport #}
<section
x-data="{ isVisible: false }"
Expand Down
4 changes: 4 additions & 0 deletions templates/_blocks/callToAction.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{# use block layout #}
{% extends '_blocks/_layout' %}

{% block templateComment %}
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}
{% endblock %}

{# section background #}
{% set background = 'bg-gray-100' %}

Expand Down
4 changes: 4 additions & 0 deletions templates/_blocks/codeEmbed.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{# use block layout #}
{% extends '_blocks/_layout' %}

{% block templateComment %}
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}
{% endblock %}

{# section background #}
{% set background = 'bg-gray-100' %}

Expand Down
4 changes: 4 additions & 0 deletions templates/_blocks/copy.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{# use block layout #}
{% extends '_blocks/_layout' %}

{% block templateComment %}
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}
{% endblock %}

{# section background #}
{% set background = 'bg-gray-50' %}

Expand Down
4 changes: 1 addition & 3 deletions templates/_blocks/fragmentBlock.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{# get fragment entry #}
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<!-- start fragment -->
{% set entry = block.fragment.one() %}

{% for block in entry.contentBuilder.all() %}
<!-- _blocks/{{ block.type }} -->
{% include "_blocks/" ~ block.type %}
{% endfor %}
<!-- end fragment -->
2 changes: 2 additions & 0 deletions templates/_blocks/hero/basicHero.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<div class="bg-gray-200">
{# hero content #}
<div class="py-16">
Expand Down
1 change: 1 addition & 0 deletions templates/_blocks/hero/sliderHero.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<section class="w-full py-0 swiper hero-swiper">

Expand Down
2 changes: 2 additions & 0 deletions templates/_blocks/hero/standardHero.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<div class="relative">

{% set heroImage = block.image.one() %}
Expand Down
4 changes: 4 additions & 0 deletions templates/_blocks/relatedEntries.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends '_blocks/_layout' %}

{% block templateComment %}
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}
{% endblock %}

{# section background #}
{% set background = '' %}

Expand Down
4 changes: 4 additions & 0 deletions templates/_blocks/video.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{# use block layout #}
{% extends '_blocks/_layout' %}

{% block templateComment %}
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}
{% endblock %}

{# section background #}
{% set background = 'bg-gray-200' %}

Expand Down
2 changes: 2 additions & 0 deletions templates/_components/contact-form.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<section class="py-12">
<div class="container">
<div class="w-full prose prose-lg">
Expand Down
1 change: 1 addition & 0 deletions templates/_components/news-listing.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

{% set seg2 = craft.app.request.getSegment('2') %}
{% set seg3 = craft.app.request.getSegment('3') %}
Expand Down
2 changes: 2 additions & 0 deletions templates/_components/pagination.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<div class="container flex flex-col flex-wrap px-4 py-8 mx-auto md:flex-row md:px-0">

<ul class="flex w-auto mx-auto mt-12 font-sans md:mt-8 list-reset">
Expand Down
2 changes: 2 additions & 0 deletions templates/_includes/contact-form.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<section class="py-24">
<div class="container">
<div class="w-full prose prose-lg">
Expand Down
2 changes: 2 additions & 0 deletions templates/_includes/dark-mode.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<div x-cloak class="relative inline-flex items-center gap-2 mr-2 sm:pb-2">

<p class="absolute w-full text-sm text-center -bottom-3 lg:-bottom-0">dark mode</p>
Expand Down
2 changes: 2 additions & 0 deletions templates/_includes/footer.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<footer class="py-20 bg-gray-200">
<div class="container">
<div class="grid flex-row w-full grid-cols-1 gap-8 lg:flex">
Expand Down
2 changes: 2 additions & 0 deletions templates/_includes/hero.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

{# include hero blocks #}

{% for block in entry.hero.all() %}
Expand Down
3 changes: 3 additions & 0 deletions templates/_includes/language-switcher.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}


{# https://craftcms.stackexchange.com/a/14306/193 #}

{% set currentLanguage = currentSite.language %}
Expand Down
3 changes: 3 additions & 0 deletions templates/_includes/main-nav-hover.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}


{% import "_macros" as macros %}
<!--_includes/main-nav-hover-->
<nav class="relative z-20 bg-white border-b shadow-nav ">
Expand Down
2 changes: 2 additions & 0 deletions templates/_includes/main-nav.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<nav class="bg-white border-b border-gray-200">
<div class="container w-full text-gray-700 max-w-screen">
<div
Expand Down
2 changes: 2 additions & 0 deletions templates/_includes/news-listing-article.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ craft.app.config.general.devMode ? ('<!-- Template: ' ~ _self ~ ' -->') | raw }}

<article
x-data="{ isVisible: false }"
x-intersect.half.once="isVisible = true"
Expand Down
Loading

0 comments on commit 83fcef0

Please sign in to comment.