Skip to content

Commit

Permalink
refactor: content structure for libraries has been modified
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleon4 committed Mar 3, 2023
1 parent 04ed299 commit 175f324
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 980 deletions.
74 changes: 57 additions & 17 deletions src/Tools/Content.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
// components
// pages
import Library from "../pages/Library";
import LionFiles from "../pages/LionFiles";
import LionHelpers from "../pages/LionHelpers";
import LionMailer from "../pages/LionMailer";
import LionRequest from "../pages/LionRequest";
import LionRoute from "../pages/LionRoute";
import LionSecurity from "../pages/LionSecurity";
import LionSpreadsheet from "../pages/LionSpreadsheet";
import LionSQL from "../pages/LionSQL";

//commands
import v12_16_1_CMMD from "./Versions/Commands/v12_16_1_CMMD";
Expand Down Expand Up @@ -74,7 +66,13 @@ export default {
files: {
title: "LION-FILES",
url: "/libraries/lion/files/index",
component: <LionFiles />,
component: (
<Library
library={"files"}
url_github={"https://github.com/Sleon4/Lion-Files"}
command={"composer require lion/files"}
/>
),
description:
"Library created with the function of working internal system files.",
class: {
Expand All @@ -86,7 +84,13 @@ export default {
security: {
title: "LION-SECURITY",
url: "/libraries/lion/security/index",
component: <LionSecurity />,
component: (
<Library
library={"security"}
url_github={"https://github.com/Sleon4/Lion-Security"}
command={"composer require lion/security"}
/>
),
description:
"Library created with the function of implementing AES, RSA and JWT Security functions for PHP.",
class: {
Expand All @@ -98,7 +102,13 @@ export default {
request: {
title: "LION-REQUEST",
url: "/libraries/lion/request/index",
component: <LionRequest />,
component: (
<Library
library={"request"}
url_github={"https://github.com/Sleon4/Lion-Request"}
command={"composer require lion/request"}
/>
),
description:
"Library created to request input data and response requests.",
class: {
Expand All @@ -108,7 +118,13 @@ export default {
sql: {
title: "LION-SQL",
url: "/libraries/lion/sql/index",
component: <LionSQL />,
component: (
<Library
library={"sql"}
url_github={"https://github.com/Sleon4/Lion-SQL"}
command={"composer require lion/sql"}
/>
),
description:
"Package responsible for generating and executing MySQL processes.",
class: {
Expand All @@ -121,7 +137,13 @@ export default {
mailer: {
title: "LION-MAILER",
url: "/libraries/lion/mailer/index",
component: <LionMailer />,
component: (
<Library
library={"mailer"}
url_github={"https://github.com/Sleon4/Lion-Mailer"}
command={"composer require lion/mailer"}
/>
),
description:
"Library created for easy email sending based on PHPMailer.",
class: {
Expand All @@ -132,7 +154,13 @@ export default {
spreadsheet: {
title: "LION-SPREADSHEET",
url: "/libraries/lion/spreadsheet/index",
component: <LionSpreadsheet />,
component: (
<Library
library={"spreadsheet"}
url_github={"https://github.com/Sleon4/Lion-Spreadsheet"}
command={"composer require lion/spreadsheet"}
/>
),
description: "Library for easy spreadsheet use.",
class: {
"v1.5.0": v1_5_0_LSP(),
Expand All @@ -142,7 +170,13 @@ export default {
route: {
title: "LION-ROUTE",
url: "/libraries/lion/route/index",
component: <LionRoute />,
component: (
<Library
library={"route"}
url_github={"https://github.com/Sleon4/Lion-Route"}
command={"composer require lion/route"}
/>
),
description:
"This library has a quick use of the router with regular expressions based on mrjgreen's phroute.",
class: {
Expand All @@ -152,7 +186,13 @@ export default {
helpers: {
title: "LION-HELPERS",
url: "/libraries/lion/helpers/index",
component: <LionHelpers />,
component: (
<Library
library={"helpers"}
url_github={"https://github.com/Sleon4/Lion-Helpers"}
command={"composer require lion/helpers"}
/>
),
description: "Easy to use helpers for any type of use.",
class: {
"v2.1.2": v2_1_2_LH(),
Expand Down
157 changes: 93 additions & 64 deletions src/Tools/Versions/Libraries/LionRoute/v8_1_0_LRT.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,73 +48,102 @@ export default function v8_1_0_LRT() {
description:
"The `init` function initializes the http routing service.",
code: (
<div className="mb-3">
<h4 className="pb-2 text-warning">USAGE</h4>

<p>Start your development server.</p>

<Row>
<Col xs={12} sm={12} md={12} lg={6}>
<div className="mb-3">
<h5 className="pb-2">Lion-Framework</h5>
<CodeBlock
language="powershell"
content={"php lion serve"}
/>
</div>
</Col>

<Col xs={12} sm={12} md={12} lg={6}>
<div className="mb-3">
<h5 className="pb-2">local machine</h5>

<CodeBlock
language="powershell"
content={"php -S 127.0.0.1:8000"}
/>
</div>
</Col>
</Row>

<hr />
<>
<div className="mb-3">
<h4 className="pb-2 text-warning">USAGE</h4>

<p>Start your development server.</p>

<Row>
<Col xs={12} sm={12} md={12} lg={6}>
<div className="mb-3">
<h5 className="pb-2">Lion-Framework</h5>
<CodeBlock
language="powershell"
content={"php lion serve"}
/>
</div>
</Col>

<Col xs={12} sm={12} md={12} lg={6}>
<div className="mb-3">
<h5 className="pb-2">local machine</h5>

<CodeBlock
language="powershell"
content={"php -S 127.0.0.1:8000"}
/>
</div>
</Col>
</Row>

<hr />

<p>
It is recommended to start the development server yourself,
since software such as{" "}
<Badge bg="secondary">
XAMPP, WampServer, BitNami WAMP Stack, Apache Lounge... etc
</Badge>
, provide directories in which to load your PHP projects, This
results in running on the browser routes as
<Badge bg="secondary">'localhost/MyProject/example'</Badge>.
This generates a conflict since the route obtained comes by
default as <Badge bg="secondary">'MyProject/example'</Badge>,
something completely wrong. You can solve it by indicating
from which parameter the URL can be obtained from the{" "}
<Badge bg="secondary">Route::init()</Badge> method.
</p>

<p>
Indicate with an integer from which position the URL will be
obtained, By default it is initialized to 1.
</p>

<p>
It is recommended to start the development server yourself,
since software such as{" "}
<Badge bg="secondary">
XAMPP, WampServer, BitNami WAMP Stack, Apache Lounge... etc
</Badge>
, provide directories in which to load your PHP projects, This
results in running on the browser routes as
<Badge bg="secondary">'localhost/MyProject/example'</Badge>.
This generates a conflict since the route obtained comes by
default as <Badge bg="secondary">'MyProject/example'</Badge>,
something completely wrong. You can solve it by indicating from
which parameter the URL can be obtained from the{" "}
<Badge bg="secondary">Route::init()</Badge> method.
</p>
<CodeBlock
language="php"
content={
"<?php\n\n" +
"/*\n" +
"\tmyweb.com/auth/signin/example\n" +
"\t1 -> auth/signin/example\n" +
"\t2 -> signin/example\n" +
"\t3 -> example\n" +
"\t4+ ...\n" +
"*/\n\n" +
"Request::init(new GuzzleHttp\\Client());\n" +
"Route::init(1);"
}
/>
</div>

<p>
Indicate with an integer from which position the URL will be
obtained, By default it is initialized to 1.
</p>
<div className="mb-3">
<h4 className="pb-2 text-warning">HTACCESS</h4>

<CodeBlock
language="php"
content={
"<?php\n\n" +
"/*\n" +
"\tmyweb.com/auth/signin/example\n" +
"\t1 -> auth/signin/example\n" +
"\t2 -> signin/example\n" +
"\t3 -> example\n" +
"\t4+ ...\n" +
"*/\n\n" +
"Request::init(new GuzzleHttp\\Client());\n" +
"Route::init(1);"
}
/>
</div>
<CodeBlock
language="apache"
content={
"<IfModule mod_rewrite.c>\n" +
"\t<IfModule mod_negotiation.c>\n" +
"\t\tOptions -MultiViews -Indexes\n" +
"\t</IfModule>\n\n" +
"\tRewriteEngine On\n\n" +
"\t# Handle Authorization Header\n" +
"\tRewriteCond %{HTTP:Authorization} .\n" +
"\tRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n\n" +
"\t# Redirect Trailing Slashes If Not A Folder...\n" +
"\tRewriteCond %{REQUEST_FILENAME} !-d\n" +
"\tRewriteCond %{REQUEST_URI} (.+)/$\n" +
"\tRewriteRule ^ %1 [L,R=301]\n\n" +
"\t# Send Requests To Front Controller...\n" +
"\tRewriteCond %{REQUEST_FILENAME} !-d\n" +
"\tRewriteCond %{REQUEST_FILENAME} !-f\n" +
"\tRewriteRule ^ index.php [L]\n" +
"</IfModule>"
}
/>
</div>
</>
),
},
redirect: {
Expand Down
55 changes: 0 additions & 55 deletions src/pages/LionAuthentication.jsx

This file was deleted.

Loading

1 comment on commit 175f324

@vercel
Copy link

@vercel vercel bot commented on 175f324 Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lion-client – ./

lion-client-git-main-sleon.vercel.app
lion-client-sleon.vercel.app
lion-client.vercel.app

Please sign in to comment.