update docs

This commit is contained in:
Younes ENNAJI
2025-03-09 22:15:50 +00:00
parent 9d0bf7dca7
commit 39ca7b3e83
13 changed files with 319 additions and 80 deletions
+4
View File
@@ -0,0 +1,4 @@
<div class="bg-green-700 text-white text-center p-1 leading-tight shadow-lg">
<span class="text-xl font-bold"><img src="/static/images/palestine-flag.png" alt="Palestinian Flag" class="inline h-4 w-auto mr-1"> Solidarity with Palestine.</span>
<span class="inline text-xs sm:text-sm md:text-base">We seek justice and peace, and strongly oppose all forms of injustice and genocide.</span>
</div>
+17
View File
@@ -0,0 +1,17 @@
<nav class="mb-6" aria-label="Breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-slate-500">
<li>
<a href="/" class="hover:text-indigo-600">
<i class="fa-solid fa-home"></i>
<span class="sr-only">Home</span>
</a>
</li>
{% if page.title %}
<li class="flex items-center">
<i class="fa-solid fa-chevron-right text-xs mx-2"></i>
<span class="text-slate-700">{{ page.title }}</span>
</li>
{% endif %}
</ol>
</nav>
+54 -7
View File
@@ -1,8 +1,55 @@
<section class="bg-indigo-900 pt-10 pb-10">
<div class="max-w-xs mx-auto text-center text-md leading-loose">
<img src="/static/images/younes-khoubza.jpeg" alt="Younes" class="inline rounded-full h-20 w-20 border-gray-100 border-2"/>
<p class="text-white">
<span class="text-gray-300">PHP<span class="text-gray-400">Flasher</span></span> is a project by <a class="text-indigo-300" target="_blank" href="https://www.linkedin.com/in/younes--ennaji/">Younes ENNAJI</a>.
</p>
<footer class="bg-indigo-900 mt-12 pt-12 pb-8 text-white">
<div class="container max-w-7xl mx-auto px-4 lg:px-6">
<div class="grid grid-cols-1 md:grid-cols-3 gap-12">
<!-- About Section -->
<div>
<h3 class="text-xl font-bold mb-4 flex items-center">
PHP<span class="text-indigo-300">Flasher</span>
</h3>
<p class="text-indigo-200 mb-4 text-sm leading-relaxed">
A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects.
Provides feedback to users, improves engagement & enhances user experience.
</p>
<div class="flex space-x-4 mt-6">
<a href="https://github.com/php-flasher/php-flasher" class="text-indigo-300 hover:text-white">
<i class="fa-brands fa-github text-xl"></i>
</a>
<a href="https://twitter.com/phpflasher" class="text-indigo-300 hover:text-white">
<i class="fa-brands fa-twitter text-xl"></i>
</a>
</div>
</div>
<!-- Quick Links -->
<div>
<h3 class="text-lg font-semibold mb-4 text-indigo-100">Documentation</h3>
<ul class="space-y-2 text-sm text-indigo-200">
<li><a href="/" class="text-indigo-200 transition">Introduction</a></li>
<li><a href="/laravel/" class="text-indigo-200 transition">Laravel Integration</a></li>
<li><a href="/symfony/" class="text-indigo-200 transition">Symfony Integration</a></li>
<li><a href="/livewire/" class="text-indigo-200 transition">Livewire Integration</a></li>
</ul>
</div>
<!-- Author -->
<div class="text-center md:text-left">
<h3 class="text-lg font-semibold mb-4 text-indigo-100">Created By</h3>
<div class="flex md:justify-start justify-center items-center">
<img src="/static/images/younes-ennaji.jpeg" alt="Younes ENNAJI"
class="h-16 w-16 rounded-full border-2 border-indigo-200 mr-4">
<div>
<h4 class="font-medium">Younes ENNAJI</h4>
<a href="https://www.linkedin.com/in/younes--ennaji/"
class="text-indigo-300 hover:text-white text-sm inline-flex items-center gap-1">
<i class="fa-brands fa-linkedin"></i> LinkedIn Profile
</a>
</div>
</div>
</div>
</div>
<div class="mt-12 pt-6 border-t border-indigo-800 text-center text-indigo-400 text-sm">
<p>© {{ 'now' | date: "%Y" }} PHPFlasher. Released under the MIT License.</p>
</div>
</div>
</section>
</footer>
+14
View File
@@ -0,0 +1,14 @@
<div class="bg-gradient-to-r from-indigo-50 to-blue-50 border border-indigo-100 rounded-lg p-4 mb-8">
<div class="flex flex-col sm:flex-row items-center">
<div class="text-center sm:text-left">
<div class="text-slate-700">
Enjoying <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong>?
Show your support with a <strong><i class="fa-solid fa-star text-amber-400"></i> star</strong> on
<a href="https://github.com/php-flasher/php-flasher"><i class="fab fa-github text-black"></i> GitHub</a>!
It helps others discover this tool and motivates us to keep improving it.
Have ideas or spot a typo? We'd love your contributions to the docs <i class="fa-solid fa-file-pen text-blue-600"></i>.
<strong>Thank you</strong> <i class="fa-solid fa-heart text-red-600"></i>
</div>
</div>
</div>
</div>
+55
View File
@@ -0,0 +1,55 @@
<header class="sticky top-0 z-30 w-full bg-white border-b border-slate-200 shadow-sm">
<div class="container max-w-7xl mx-auto px-4 lg:px-6">
<div class="flex items-center justify-between h-16">
<!-- Logo Area -->
<div class="flex items-center space-x-4">
<a href="/" class="flex items-center space-x-3">
<span class="text-xl font-semibold text-indigo-900 hidden sm:block">PHP<span class="text-indigo-500">Flasher</span></span>
</a>
<!-- Version Selector -->
<div class="hidden sm:flex items-center space-x-2">
{% for version in site.data.project.versions %}
<a href="{{ version[1] }}" class="{% if forloop.first %}bg-indigo-500 text-white{% else %}text-indigo-700 bg-indigo-50 hover:bg-indigo-100{% endif %} text-xs px-2.5 py-1 rounded-full font-medium transition">
{{ version[0] }}
</a>
{% endfor %}
</div>
</div>
<!-- Search (placeholder for future implementation) -->
<!--
<div class="hidden md:block flex-1 max-w-md mx-4">
<div class="relative">
<input type="search" placeholder="Search documentation..."
class="w-full pl-10 pr-4 py-2 rounded-md border border-slate-200 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 text-sm"
disabled>
<i class="fa-light fa-magnifying-glass absolute left-3 top-2.5 text-slate-400"></i>
</div>
</div>
-->
<!-- Mobile Menu Button -->
<div class="lg:hidden">
<button id="menu-toggle" class="p-2 rounded-md text-slate-500 hover:bg-slate-100 focus:outline-none">
<svg class="menu-closed:shown h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
<svg class="menu-closed:hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<!-- Desktop Navigation Links -->
<nav class="hidden lg:flex items-center space-x-4">
<a href="https://github.com/php-flasher/php-flasher" class="text-slate-600 hover:text-indigo-600 p-2 flex items-center gap-1.5">
<i class="fa-brands fa-github"></i> <span>GitHub</span>
</a>
<a href="/" class="text-slate-600 hover:text-indigo-600 p-2 flex items-center gap-1.5">
<i class="fa-solid fa-book"></i> <span>Documentation</span>
</a>
</nav>
</div>
</div>
</header>
+11
View File
@@ -0,0 +1,11 @@
<div class="flex flex-col sm:flex-row items-center justify-between border-t border-slate-200 mt-12 pt-6 text-sm">
<a class="link-previous mb-4 sm:mb-0 hidden previous-link sm:flex items-center text-slate-600 hover:text-indigo-600" href="./">
<i class="fa-duotone fa-chevron-left mr-2"></i>
<span class="label">Previous Page</span>
</a>
<a class="link-next hidden previous-next sm:flex items-center text-slate-600 hover:text-indigo-600" href="./">
<span class="label">Next Page</span>
<i class="fa-duotone fa-chevron-right ml-2"></i>
</a>
</div>
+67
View File
@@ -0,0 +1,67 @@
<script>
// Mobile menu toggle
document.addEventListener('DOMContentLoaded', function() {
const menuToggle = document.getElementById('menu-toggle');
const mobileMenu = document.getElementById('mobile-menu');
const closeMenu = document.getElementById('close-menu');
if (menuToggle && mobileMenu) {
menuToggle.addEventListener('click', function() {
mobileMenu.classList.toggle('hidden');
document.body.classList.toggle('overflow-hidden');
});
closeMenu.addEventListener('click', function() {
mobileMenu.classList.add('hidden');
document.body.classList.remove('overflow-hidden');
});
}
// Run example buttons
const exampleButtons = document.querySelectorAll('.run-example');
exampleButtons.forEach(button => {
button.addEventListener('click', function() {
const id = this.getAttribute('data-id');
if (window.messages && window.messages[id]) {
const notification = window.messages[id];
// This assumes there's a global function to show notifications
if (window.flasher) {
window.flasher.flash(
notification.type,
notification.message,
notification.options,
notification.title
);
}
}
});
});
// Generate table of contents
const headings = document.querySelectorAll('main h2, main h3');
const tocList = document.querySelector('#anchor-navigation ul');
if (headings.length > 0 && tocList) {
headings.forEach((heading, index) => {
// Add ID to heading if not present
if (!heading.id) {
heading.id = 'heading-' + index;
}
const isH3 = heading.tagName.toLowerCase() === 'h3';
const listItem = document.createElement('li');
const link = document.createElement('a');
link.href = '#' + heading.id;
link.className = isH3 ? 'pl-4 text-slate-600 hover:text-indigo-600 border-l-2 border-slate-200 block py-1'
: 'text-slate-700 hover:text-indigo-600 font-medium block py-1';
link.textContent = heading.textContent;
listItem.appendChild(link);
tocList.appendChild(listItem);
});
document.getElementById('anchor-navigation').classList.remove('hidden');
}
});
</script>
+61
View File
@@ -0,0 +1,61 @@
<nav id="main-navigation" class="sticky top-24 hidden lg:block">
<div class="bg-white rounded-xl shadow-sm border border-slate-200 p-4">
{% for section in site.data.menu %}
<div class="mb-6">
<h3 class="text-xs font-semibold text-indigo-600 uppercase tracking-wider mb-3">
{{ section[0] }}
</h3>
<ul class="space-y-1">
{% for link in section[1] %}
<li>
<a href="{{ link[1] }}"
class="block py-2 px-3 rounded-md text-sm leading-tight
{% if page.url == link[1] %}
bg-indigo-500 text-white font-medium
{% else %}
text-slate-700 hover:bg-slate-100 hover:text-indigo-700
{% endif %}">
{{ link[0] }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</nav>
<!-- Mobile Navigation Menu -->
<div id="mobile-menu" class="fixed inset-0 z-40 bg-slate-900/50 backdrop-blur-sm hidden">
<div class="fixed right-0 top-0 bottom-0 w-64 bg-white shadow-xl p-5 overflow-y-auto">
<div class="flex justify-between items-center mb-5">
<h2 class="text-lg font-bold text-indigo-900">Navigation</h2>
<button id="close-menu" class="p-2 text-slate-500 hover:text-slate-700">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
{% for section in site.data.menu %}
<div class="mb-6">
<h3 class="text-xs font-semibold text-indigo-600 uppercase tracking-wider mb-2">
{{ section[0] }}
</h3>
<ul class="space-y-1">
{% for link in section[1] %}
<li>
<a href="{{ link[1] }}"
class="block py-2 text-sm leading-tight
{% if page.url == link[1] %}
text-indigo-600 font-medium
{% else %}
text-slate-700 hover:text-indigo-600
{% endif %}">
{{ link[0] }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
+34 -71
View File
@@ -3,85 +3,48 @@
<head>
{% include head.html %}
</head>
<body class="min-h-screen min-w-full leading-normal bg-gray-50 overflow-x-hidden" data-controller="anchor clipboard navigation tryit {{ page.data-controller }}">
<body class="min-h-screen bg-slate-50 text-slate-800 font-sans leading-relaxed" data-controller="anchor clipboard navigation tryit {{ page.data-controller }}">
{% include size-helper.html %}
{% include banner.html %}
{% include header.html %}
{% if site.data.dev.dev_mode %}
<div data-controller="ray"></div>
{% endif %}
<div class="bg-green-700 text-white text-center p-1 leading-tight shadow-lg">
<span class="text-xl font-bold">🇵🇸 Solidarity with Palestine.</span>
<span class="inline text-xs sm:text-sm md:text-base">We seek justice and peace, and strongly oppose all forms of injustice and genocide.</span>
</div>
<div class="container max-w-7xl mx-auto px-4 lg:px-6 py-8">
<div class="flex flex-col lg:flex-row gap-8">
<!-- Sidebar Navigation -->
<aside class="lg:w-64 shrink-0">
{% include sidebar.html %}
</aside>
<div class="h-16 z-10 top-0 w-screen bg-white border-b border-indigo-200 shadow">
<div id="header-logo" class="lg:container lg:mx-auto px-4 py-2">
<div class="flex items-center flex-no-shrink pt-1">
<div class="flex items-center">
<span class="pr-2 font-normal leading-none text-3xl text-indigo-900 hidden sm:block">
<img class="fill-current h-8 mr-2" src="/static/images/php-flasher-logo.svg" alt="PHPFlasher Logo" />
{% for version in site.data.project.versions %}
<a href="{{ version[1] }}" class="{% if forloop.first %}text-white bg-indigo-500{% else %}text-indigo-600{% endif %} p-1 rounded text-xs relative text-grey-dark hover:bg-indigo-500 hover:scale-110 hover:text-white" style="top: -20px;">{{ version[0] }}</a>
{% endfor %}
</span>
<!-- Main Content -->
<main class="flex-1 min-w-0">
<div class="bg-white rounded-xl shadow-sm border border-slate-200 p-6">
{% include breadcrumb.html %}
<div class="prose prose-slate max-w-none">
{% include github-cta.html %}
{{ content }}
</div>
{% include pagination.html %}
</div>
<div class="flex-grow"></div>
<a href="#" id="menu-toggle" class="block lg:hidden h-8 w-8 border p-1 border-transparent text-gray-200 hover:text-grey menu-closed">
<svg class="menu-closed:shown fill-current h-full w-full" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/>
</svg>
<svg class="menu-closed:hidden fill-current h-full w-full" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"/>
</svg>
</a>
</div>
</main>
<!-- Table of Contents -->
<aside class="hidden xl:block w-56 shrink-0" id="anchor-navigation">
<div class="sticky top-8">
<h4 class="text-sm font-semibold text-indigo-600 uppercase tracking-wider mb-4">
<i class="fa-duotone fa-list-tree"></i> On This Page
</h4>
<nav class="toc">
<ul class="list-none space-y-2 text-sm"></ul>
</nav>
</div>
</aside>
</div>
</div>
<main class="lg:container lg:mx-auto lg:px-6 flex">
<nav id="main-navigation" class="sticky top-8 hidden lg:block h-full w-full mx-10 lg:w-40">
{% for section in site.data.menu %}
<h4 class="text-sm leading-loose tracking-wide text-indigo-400 uppercase mt-4">{{ section[0] }}</h4>
<ul class="list-reset mb-8">
{% for link in section[1] %}
<li class="{% if page.url == link[1] %}bg-indigo-500 {% endif %}px-6 rounded">
<a href="{{ link[1] }}" class="leading-loose text-md inline-block w-full {% if page.url == link[1] %}text-white{% else %}text-gray-900{% endif %}">{{ link[0] }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</nav>
<article id="main-article" class="flex-1 px-2 lg:px-10 py-5 w-full overflow-x-auto">
<div class="border-b border-grey-lighter py-3 mb-3 hidden sm:block">
{% include prev-next.html %}
</div>
<blockquote>
<p>
If you find <strong><span class="text-indigo-900">PHP<span class="text-indigo-500">Flasher</span></span></strong> useful,
please consider giving it a <strong>⭐ star</strong> on <a href="https://github.com/php-flasher/php-flasher"><i class="fab fa-github text-black"></i> GitHub</a> 😊.
If you spot any typos or have suggestions, feel free to contribute to the documentation 📝.
Your feedback helps keep the project up-to-date and well-maintained. <strong>Thank you</strong> <i class="fa-solid fa-heart text-red-600"></i>
</p>
</blockquote>
<hr>
{{ content }}
<div class="border-t border-grey-lighter py-3 mb-3 hidden sm:block">
{% include prev-next.html %}
</div>
</article>
<nav id="anchor-navigation" class="js-sticky hidden sticky top-8 h-full w-56">
<h4 class="text-sm leading-loose tracking-wide text-indigo-400 uppercase mt-4">
<i class="fa-duotone fa-bars-sort"></i> Jump to
</h4>
<ul class="list-reset mb-8"></ul>
</nav>
</main>
{% include footer.html %}
{% include scripts.html %}
</body>
</html>
+2 -2
View File
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB