xana/gen-html 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xana/gen-html

最新稳定版本:1.0.2.8

Composer 安装命令:

composer require xana/gen-html

包简介

This library make generating HTML contents easier than ever

README 文档

README

Downloads Contributors Forks Stargazers Issues MIT License LinkedIn


image

HTML GEN

Generate your HTML securely, with ease!
Explore the docs »

Report Bug · Request Feature

Table of Contents

About The Project

This is a library that does just that; generates HTML markdown using fluent PHP classes. This library can be used anywhere where you can have PHP and HTML coexist. Worth noting, this library was made just for fun.

(back to top)

Supports:

  1. HTML Elements
    • Divs
    • Paragraphs
    • Images
    • Links
    • Inputs (text, mail, phone, passwoord, date, file, select...)
    • Tables (row, columns, header...)
    • Forms
    • Headings
    • Lists (ordered and unordered)
    • Line break
  2. CSS Framework
    • Bootstrap 5

(back to top)

Getting Started

To set up a local instance of the application, follow the steps below.

Prerequisites

The following dependencies are required to be installed for the project to function properly:

  • PHP 8+
  • Composer

(back to top)

Installation

Now that the environment has been set up and configured to properly compile and run the project, the next step is to install and configure the project locally on your system.

  1. Install the library
composer require xana/gen-html
  1. Have fun!

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space.

  
use Xana\GenHtml\Elements\Button;  
use Xana\GenHtml\Elements\Email;  
use Xana\GenHtml\Elements\Form;  
use Xana\GenHtml\Elements\Password;  
use Xana\GenHtml\Elements\TextArea;  

require 'vendor/autoload.php';

$paragraphWithInlineLink = new Paragraph('A paragraph, but you can click {here} to visit example.com');

$paragraphWithInlineLink->addInlineElement('here', new link('//example.com', 'here'));

$paragraphWithInlineLink->render();

$defaultAttrs = [  
  "required" => true,  
  'placeholder' => 'Enter your message here',  
];
$form = $form->addElement(new Email("email", ["placeholder" => "Email Address", 'class'=>'bg-info'])->keepDefaultClasses())  
           ->addElement(new Password("password", ["placeholder" => "Password"]))  
           ->addElement(new TextArea('the-text', $defaultAttrs))  
           ->addElement(new Button("Login"));
             
echo $form->render();

(back to top)

Contact

📫 Omar SAKHRAOUI ( aka Xana )

(back to top)

Additional documentation

(back to top)

Made with 💕

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2024-03-01