メニュー

2022年12月15日(木)

FlatPress用プラグイン『CSS Accordion』

FlatPressという軽量のブログエンジンで、この雑記帳は動いています
よく見かけるアコーディオン風に表示がON/OFFになるプラグインをCSSで作成しました。

開閉時にクリックするラベルの名前をデフォルトとして設定することができます。
また記事の記述の際にも独自にラベルの名前をつけることもできます。
ページ読み込み時に開けておくことも(閉めておくことも)指定できます。
グループ指定をするといつもどれか一つだけが開く状態にできます。
グループ指定時にも全てを閉じれる機能を選択できます。
CSS Accordion タグ内で使用できるタグを指定できます。

・FlatPress公式サイト https://wiki.flatpre … plugins:cssaccordion

2022/12/15 ver.1.01: 初版
2022/12/18 ver.1.02: バグフィックス(Arvid氏の指摘),一部のタグを許可
2022/12/27 ver.2.01: 開閉の速度指定機能を追加
2022/12/29 ver.2.02: バグフィックス(Fraenkiman氏の指摘),他
2023/01/10 ver.2.03: バグフィックス(Frank Hochmuth氏の指摘)
2023/01/21 ver.3.01: グループ指定時にも全てを閉じれるように変更
2023/01/24 ver.3.11: グループ指定時にも全てを閉じれる機能を選択できるように変更
2023/02/13 ver.4.01: ラベルの背景色を指定できるように変更
2023/02/15 ver.4.02: バグフックス(画面回転対応対策)
2023/03/06 ver.4.03: “デフォルト色をセットする”ボタン追加
2023/03/14 ver.4.04: “カラーピッカーを使う”ボタン追加
2023/05/21 ver.4.05: バグフィックス(css:margin-bottomにimportant追加)
2023/05/31 ver.4.06: バグフィックス(関数の重複対策ほか)
2023/06/13 ver.4.07: バグフィックス(関数の重複対策ほか)
2023/07/27 ver.4.08: バグフィックス(css:margin-bottomのimportant削除)
2023/08/02 ver.5.01: CSS Accordion タグ内で使用できるタグを指定できるように変更
2023/08/08 ver.5.11: 使用可能タグの指定をチェックする機能を追加,管理画面のサンプル文を変更,バグフィックス(閉じれないことがあった)
  1. Arvid

    日曜日, 12月 18, 2022 - 03:54:04

    Hi, thanks for the very neat plugin! Unfortunately, it prints an error when run with PHP error reporting activated:
    Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in […]/plugin.cssaccordion.php on line 44

    Solution is quite simple, just change
    strip_tags($content)
    to
    strip_tags($content ?? ‘’)
    in line 44. This takes care of $content being set to an empty string if null.

    All the best,
    Arvid

  2. pea

    日曜日, 12月 18, 2022 - 11:47:59

    Thank you Arvid as your point out.
    I relesed new version, try and check it.

  3. Fraenkiman

    水曜日, 12月 21, 2022 - 06:38:29

    Hello Pi,
    I have tested your plugin. Thanks a lot for making it available to the community. Great work! I was so free and have adapted the template so that it now also works in the future with FlatPress 1.3. Besides English and Japanese, the plugin now also supports German language.

    With best regards
    Frank

  4. Fraenkiman

    水曜日, 12月 28, 2022 - 01:02:02

    Hello Pi,

    thanks for the update to 2.01. The adjustable speed is a cool feature! For the plugin to work in the current development version 1.3 of FlatPress, you would have to correct the template.

    {include file=”shared:errorlist.tpl”}

    Good health for the new year
    Frank

  5. pea

    木曜日, 12月 29, 2022 - 09:31:08

    Thanks to Fraenkiman for pointing it out.
    I relesed new version, try and check it.

コメント記入

次のフォームにコメントを記入してください。


管理者用

カレンダー

最近の記事: 10本