Git Product home page Git Product logo

statamic-bard-text-color's Introduction

Statamic Bard Text Color Extension

Statamic 3.0+ Total Downloads

Introduction

alt text

This is a statamic bard plugin that lets you change text color! It allows you to use the default tailwind palette, but you can also add your own. At the moment it's still under development, so please report any bugs that you encounter. New feature suggestions are welcomed too.

Getting started

If you only wish to use the default tailwind palette, then it's as easy as running the composer require command.

composer require xndbogdan/statamic-bard-text-color

Custom colors

Using a config file

The simplest way of adding new colors to this plugin is by adding a bard-custom-colors.php config file to your project. Please check this file if you need an example.

Planned features

  • Pull colors from tailwind.config.js automatically
  • Upgrade to Vue 3
  • Upgrade to Vite

Credits

Big thanks to:

  • Craig Anderson for participating in active development.
  • Lars Heidkämper for participating in active development.
  • Bernhard Berger for participating in active development.
  • Hesesses for suggesting a custom color implementation.
  • ncla for showing a working example in a project implementation.
  • Jelle Roorda from the Statamic discord, for providing resources & advice on how to sucessfuly implement the feature.

statamic-bard-text-color's People

Contributors

galengidman avatar heidkaemper avatar intrepidws avatar xndbogdan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

statamic-bard-text-color's Issues

3.0 breaks existing content color definitions from <3.x

Thanks to the silent renaming of the attrs.color key to attrs.key this breaks ALL existing content/yaml.

This should never have been renamed and released with 3.0, not sure what's the best strategy to get out of this mess.

  • A: undo the releases and rename the key back (this would break new 3.4 installs but would allow upgraded installs to not break)
  • B: support both keys (support and maintenance overhead)
  • C: screw any existing install and break any existing content for any installs that come from Statamic <3.4
  • D: converter for existing content, not sure if Statamic supports such a concept

No colors to select

I edited the bard-custom-colors.php in vendor/xndbogdan/statamic-bard-text-color/config/ but I can't select colors neither Default nor Custom. This is important for me.

Not so important but interesting, how to get the tailwind colors?

Custom colors

Hello,

Thank you for creating this! I was wondering how I can add custom colors?

Statamic 5 Compatibility

Hi,

Thanks for the great addon. We use this in our projects and i wanted to ask if you plan to do a Statamic 5 update?

Thanks
David

Can't config custom colors

Hey!

Since the last update, overriding colors through the config file doesn't work on my side. Here's what I have on my config/bard-custom-colors.php

    'custom_colors' => [
    ],

    'default_colors' => [
        'Green'     => '#008000',
        'Blue'      => '#2574A9',
        'Pink'      => '#B500B5',
        'Purple'    => '#58007E',
        'Yellow'    => '#8D6708',
        'Orange'    => '#D43900',
        'Red'       => '#AA0000'
    ],

bullet list not styled in the right color

After implementing the plugin and placing a couple list's we found that there was a problem with the bullet colors.

Do you maybe have a fix for this, we need this on a relatively short term if possible.

Thanks in advance.

image

Error after updating to version 3.1.2

Hi,

I updated to the latest version (3.1.2) of the plugin to use it with Statamic 3.4, but I get several javascript errors:
image

The problem only occurs on existing bard fields with content. The content is hidden and nothing is clickable.
If I add a new field or add content to a existing field, there's no problem.

Best wishes,
Joeri

Can not be disabled

When the text color is disabled in the blue print it is still showing up when editing.

Blueprint:
image

When editing:
image

It also stores text color data when I didn't specifically set this.

Bard inside replicator making the titles stacked

Loving the addon, but I stumbled upon a problem when using your addon in combination with a replicator.

After installing the titles are stacked:

screenshot

After uninstalling, the styling is correct again.

I've already been searching for the problem, but can't seem to find it.

Statamic 4 Compatibility

Hello 👋

Statamic 4 is due out any day now (in fact the first beta release was tagged yesterday).

We use this addon in a few of our projects and I was wondering if there was any plans to update this addon soon for compatibility with Statamic 4?

[3.1.1] Render view partial issue

Hello,

I just upgrade Statamic to 3.4 and your package to 3.3.1.
And Statamic trigger an exception with this message :
Undefined property: stdClass::$key

I have to remove the extension to render any view :(
I can provide you an access to my repo if you need.
Here is my shared debug flare : https://flareapp.io/share/B5Z8EDNP#F117

I think maybe there is an issue with some older text-color data where marks is not present or null.

Here is my app details :

Environment
Application Name: UserstoriesStudio
Laravel Version: 9.51.0
PHP Version: 8.1.12
Composer Version: 2.4.1
Environment: local
Debug Mode: ENABLED
URL: stories-studio.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 5
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 3.4.3 PRO

Statamic Addons
aryehraber/statamic-logbook: 2.1.0
jacksleight/statamic-bard-mutator: 2.0.1
jacksleight/statamic-bard-texstyle: 2.0.1
rias/statamic-position-fieldtype: 2.0.1
xndbogdan/statamic-bard-text-color: 3.1.1

color issues

when we add the color white to the options the text in the editor becomes white which makes it hard to read for the customer is there something that we can do about this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.