From 921d78bedf87eed4bdfa488a65a867ec7d00e2ec Mon Sep 17 00:00:00 2001 From: eliot-akira Date: Sat, 21 Sep 2024 19:56:59 +0200 Subject: [PATCH] Move WordPress-related code to Framework --- includes/admin.php | 48 ---- includes/enqueue.php | 16 -- includes/html5-test.html | 564 --------------------------------------- includes/index.php | 3 - index.php | 28 -- module-loader.php | 30 --- package.json | 12 +- plugin.php | 14 - 8 files changed, 6 insertions(+), 709 deletions(-) delete mode 100644 includes/admin.php delete mode 100644 includes/enqueue.php delete mode 100644 includes/html5-test.html delete mode 100644 includes/index.php delete mode 100644 index.php delete mode 100644 module-loader.php delete mode 100644 plugin.php diff --git a/includes/admin.php b/includes/admin.php deleted file mode 100644 index ce4a0d5..0000000 --- a/includes/admin.php +++ /dev/null @@ -1,48 +0,0 @@ -is_plugin = false; - -function is_plugin( $set = null ) { - $is_plugin = &design::$state->is_plugin; - if (is_bool($set)) { - $is_plugin = $set; - } - return $is_plugin; -} - -add_action('plugins_loaded', function() { - /** - * Show admin menu Tangible Design - */ - $show_demo_menu = design\is_plugin() || ( - class_exists('tangible\\template_system') && template_system\is_plugin() - ); - if (!$show_demo_menu) return; - - $callback = function() { - - design\enqueue(); - - ?>
url; - $version = design::$state->version; - - wp_enqueue_style( - 'tangible-design', - $url . '/build/design.min.css', - [], - $version - ); -} diff --git a/includes/html5-test.html b/includes/html5-test.html deleted file mode 100644 index a324598..0000000 --- a/includes/html5-test.html +++ /dev/null @@ -1,564 +0,0 @@ - - -

Tangible Design

- -

This is a test page showing HTML elements without classes.

- - -
-
-

Text

-
-
-

Headings

-
-
-

Heading 1

-

Heading 2

-

Heading 3

-

Heading 4

-
Heading 5
-
Heading 6
-
- -
-
-

Paragraphs

-
-

A paragraph (from the Greek paragraphos, “to write beside” or “written beside”) is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.

-
- -
-
-

Blockquotes

-
-
-

A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text.

-

It is typically distinguished visually using indentation and a different typeface or smaller size quotation. It may or may not include a citation, usually placed at the bottom.

- Said no one, ever. -
-
- -
-
-

Lists

-
-

Definition list

-
-
Definition List Title
-
This is a definition list division.
-
-

Ordered List

-
    -
  1. List Item 1
  2. -
  3. - List Item 2 -
      -
    1. List Item 1
    2. -
    3. - List Item 2 -
        -
      1. List Item 1
      2. -
      3. - List Item 2 -
          -
        1. List Item 1
        2. -
        3. - List Item 2 -
            -
          1. List Item 1
          2. -
          3. List Item 2
          4. -
          5. List Item 3
          6. -
          -
        4. -
        5. List Item 3
        6. -
        -
      4. -
      5. List Item 3
      6. -
      -
    4. -
    5. List Item 3
    6. -
    -
  4. -
  5. List Item 3
  6. -
-

Unordered List

-
    -
  • List Item 1
  • -
  • - List Item 2 -
      -
    • List Item 1
    • -
    • - List Item 2 -
        -
      • List Item 1
      • -
      • - List Item 2 -
          -
        • List Item 1
        • -
        • - List Item 2 -
            -
          • List Item 1
          • -
          • List Item 2
          • -
          • List Item 3
          • -
          -
        • -
        • List Item 3
        • -
        -
      • -
      • List Item 3
      • -
      -
    • -
    • List Item 3
    • -
    -
  • -
  • List Item 3
  • -
-
- -
-
-

Blockquotes

-
-
-

A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text.

-

It is typically distinguished visually using indentation and a different typeface or smaller size quotation. It may or may not include a citation, usually placed at the bottom.

- Said no one, ever. -
-
- -
-
-

Details / Summary

-
- Expand for details -

Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum, odio! Odio natus ullam ad quaerat, eaque necessitatibus, aliquid distinctio similique voluptatibus dicta consequuntur animi. Quaerat facilis quidem unde eos! Ipsa.

-
- -
-
-

Address

-
- Written by Jon Doe.
- Visit us at:
- Example.com
- Box 564, Disneyland
- USA -
- -
-
-

Horizontal rules

-
-
-
- -
-
-

Tabular data

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table Caption
Table Heading 1Table Heading 2Table Heading 3Table Heading 4Table Heading 5
Table Footer 1Table Footer 2Table Footer 3Table Footer 4Table Footer 5
Table Cell 1Table Cell 2Table Cell 3Table Cell 4Table Cell 5
Table Cell 1Table Cell 2Table Cell 3Table Cell 4Table Cell 5
Table Cell 1Table Cell 2Table Cell 3Table Cell 4Table Cell 5
Table Cell 1Table Cell 2Table Cell 3Table Cell 4Table Cell 5
- -
-
-

Code

-
-

Keyboard input: Cmd

-

Inline code: <div>code</div>

-

Sample output: This is sample output from a computer program.

-

Pre-formatted text

-
P R E F O R M A T T E D T E X T
-! " # $ % & ' ( ) * + , - . /
-0 1 2 3 4 5 6 7 8 9 : ; < = > ?
-@ A B C D E F G H I J K L M N O
-P Q R S T U V W X Y Z [ \ ] ^ _
-` a b c d e f g h i j k l m n o
-p q r s t u v w x y z { | } ~ 
-
- -
-
-

Inline elements

-
-

This is a text link.

-

Strong is used to indicate strong importance.

-

This text has added emphasis.

-

The b element is stylistically different text from normal text, without any special importance.

-

The i element is text that is offset from the normal text.

-

The u element is text with an unarticulated, though explicitly rendered, non-textual annotation.

-

This text is deleted and This text is inserted.

-

This text has a strikethrough.

-

Superscript®.

-

Subscript for things like H2O.

-

This small text is small for fine print, etc.

-

Abbreviation: HTML

-

This text is a short inline quotation.

-

This is a citation.

-

The dfn element indicates a definition.

-

The mark element indicates a highlight.

-

The variable element, such as x = y.

-

The time element:

-
- -
-
-

HTML Comments

-
-

There is comment here:

-

There is a comment spanning multiple tags and lines below here.

- -
- -
-
-
-

Embedded content

-
-

Images

-
-

Plain <img> element

-

Random photo

-

<figure> element with <img> element

-
Random photo
-

<figure> element with <img> and <figcaption> elements

-
- Random photo -
Here is a caption for this image.
-
-

<figure> element with a <picture> element

-
- - - Random photo - -
-
- -
-
-

Background images

-
- -
-
-

Audio

-
- -
-
-

Video

-
- -
-
-

Canvas

-
canvas
- -
-
-

Meter

-
2 out of 10
- -
-
-

Progress

-
progress
- -
-
-

Inline SVG

-
- -
- - - -
-
-

Form elements

-
-
- Input fields -

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-
-

[Top]

-
- Select menus -

- - -

-

- - -

-
-

[Top]

-
- Checkboxes -
    -
  • -
  • -
  • -
-
-

[Top]

-
- Radio buttons -
    -
  • -
  • -
  • -
-
-

[Top]

-
- Textareas -

- - -

-
-

[Top]

-
- HTML5 inputs -

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - - - -

-
-

[Top]

-
- Action buttons -

- - - - -

-

- - - - -

-
-

[Top]

-
-
-
diff --git a/includes/index.php b/includes/index.php deleted file mode 100644 index 34dfe38..0000000 --- a/includes/index.php +++ /dev/null @@ -1,3 +0,0 @@ -version = $this->version; - design::$state->path = __DIR__; - design::$state->url = untrailingslashit(plugins_url('/', __FILE__)); - - require_once __DIR__ . '/includes/index.php'; - - do_action($this->name . '_ready'); - } -}); diff --git a/module-loader.php b/module-loader.php deleted file mode 100644 index 390e5ac..0000000 --- a/module-loader.php +++ /dev/null @@ -1,30 +0,0 @@ -name; - $priority = 99999999 - absint( $module->version ); - - remove_all_filters( $name, $priority ); // Same version - - add_action( $name, function() use ($module) { - remove_all_filters( $module->name ); // This instance wins - $module->load(); - }, $priority ); - - $ensure_action = function() use ( $name ) { - if ( ! did_action( $name ) ) do_action( $name ); - }; - - if (doing_action('plugins_loaded') || did_action('plugins_loaded')) { - $ensure_action(); - return; - } - - add_action('plugins_loaded', $ensure_action, 0); - add_action('after_setup_theme', $ensure_action, 0); -}; diff --git a/package.json b/package.json index 7ef6b31..1286cb1 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,15 @@ "version": "2024.09.18", "scripts": { "start": "roll dev", - "build": "roll build", + "build": "roll build && npm run docs:build", "format": "roll format", - "version": "node version.js", - "wp": "concurrently --raw 'roll dev' 'wp-now start'" + "version": "node version.js" + }, + "dependencies": { + "@popperjs/core": "^2.11.8" }, - "dependencies": { "@popperjs/core": "^2.11.8" }, "devDependencies": { - "@tangible/roller": "2.x", - "@wp-now/wp-now": "^0.1.66", + "@tangible/roller": "2", "concurrently": "^8.2.2" } } diff --git a/plugin.php b/plugin.php deleted file mode 100644 index ff17f5b..0000000 --- a/plugin.php +++ /dev/null @@ -1,14 +0,0 @@ -