You've already forked php-flasher
mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-04-05 12:32:55 +01:00
Wip
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dist/main.css": "/dist/main.a73f4b77.css",
|
"dist/main.css": "/dist/main.687d1b36.css",
|
||||||
"dist/main.js": "/dist/main.3be5bc06.js",
|
"dist/main.js": "/dist/main.3be5bc06.js",
|
||||||
"dist/455.3a7b4474.css": "/dist/455.3a7b4474.css",
|
"dist/455.3a7b4474.css": "/dist/455.3a7b4474.css",
|
||||||
"dist/455.095e6545.js": "/dist/455.095e6545.js",
|
"dist/455.095e6545.js": "/dist/455.095e6545.js",
|
||||||
|
|||||||
+34
-57
@@ -87,9 +87,9 @@ layout: default
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tab Content with Clean styling -->
|
<!-- Pre-rendered tab contents -->
|
||||||
<div class="tab-content" id="config-content">
|
<div class="framework-content" id="laravel-content">
|
||||||
<pre class="language-php bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code>// config/flasher.php
|
<pre class="language-php bg-slate-800 text-slate-200 text-sm overflow-x-auto"><code>// config/flasher.php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'default' => '{{ page.theme_name }}',{% if page.has_assets %}
|
'default' => '{{ page.theme_name }}',{% if page.has_assets %}
|
||||||
@@ -106,6 +106,28 @@ return [
|
|||||||
],{% endif %}
|
],{% endif %}
|
||||||
];</code></pre>
|
];</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="framework-content hidden" id="symfony-content">
|
||||||
|
<pre class="language-yaml bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code># config/packages/flasher.yaml
|
||||||
|
|
||||||
|
flasher:
|
||||||
|
default: {{ page.theme_name }}{% if page.has_assets %}
|
||||||
|
|
||||||
|
themes:
|
||||||
|
{{ page.theme_name_short }}:
|
||||||
|
scripts:
|
||||||
|
- '/vendor/flasher/themes/{{ page.theme_name }}.min.js'
|
||||||
|
styles:
|
||||||
|
- '/vendor/flasher/themes/{{ page.theme_name }}.min.css'{% endif %}</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="framework-content hidden" id="javascript-content">
|
||||||
|
<pre class="language-javascript bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code>// Set as default theme
|
||||||
|
flasher.defaultPlugin = '{{ page.theme_name }}';
|
||||||
|
|
||||||
|
// Then use it
|
||||||
|
flasher.success('Well done!');</code></pre>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -340,57 +362,17 @@ return [
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Simple tab system with minimal animations
|
// Simple tab system using show/hide rather than content rendering
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
// Framework tabs
|
// Framework tabs
|
||||||
setupTabs('.tab-button', function(framework) {
|
setupTabs('.tab-button', function(framework) {
|
||||||
const tabContent = document.getElementById('config-content');
|
// Hide all framework content divs
|
||||||
|
document.querySelectorAll('.framework-content').forEach(content => {
|
||||||
|
content.classList.add('hidden');
|
||||||
|
});
|
||||||
|
|
||||||
// Framework content objects
|
// Show the selected framework content
|
||||||
const frameworkContents = {
|
document.getElementById(framework + '-content').classList.remove('hidden');
|
||||||
'laravel': `<pre class="language-php bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code>// config/flasher.php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'default' => '{{ page.theme_name }}',{% if page.has_assets %}
|
|
||||||
|
|
||||||
'themes' => [
|
|
||||||
'{{ page.theme_name_short }}' => [
|
|
||||||
'scripts' => [
|
|
||||||
'/vendor/flasher/themes/{{ page.theme_name }}.min.js',
|
|
||||||
],
|
|
||||||
'styles' => [
|
|
||||||
'/vendor/flasher/themes/{{ page.theme_name }}.min.css',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],{% endif %}
|
|
||||||
];</code></pre>`,
|
|
||||||
|
|
||||||
'symfony': `<pre class="language-yaml bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code># config/packages/flasher.yaml
|
|
||||||
|
|
||||||
flasher:
|
|
||||||
default: {{ page.theme_name }}{% if page.has_assets %}
|
|
||||||
|
|
||||||
themes:
|
|
||||||
{{ page.theme_name_short }}:
|
|
||||||
scripts:
|
|
||||||
- '/vendor/flasher/themes/{{ page.theme_name }}.min.js'
|
|
||||||
styles:
|
|
||||||
- '/vendor/flasher/themes/{{ page.theme_name }}.min.css'{% endif %}</code></pre>`,
|
|
||||||
|
|
||||||
'javascript': `<pre class="language-javascript bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code>// Set as default theme
|
|
||||||
flasher.defaultPlugin = '{{ page.theme_name }}';
|
|
||||||
|
|
||||||
// Then use it
|
|
||||||
flasher.success('Well done!');</code></pre>`
|
|
||||||
};
|
|
||||||
|
|
||||||
// Change content
|
|
||||||
tabContent.innerHTML = frameworkContents[framework];
|
|
||||||
|
|
||||||
// Re-run Prism highlighting
|
|
||||||
if (window.Prism) {
|
|
||||||
Prism.highlightAllUnder(tabContent);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Language usage tabs
|
// Language usage tabs
|
||||||
@@ -407,11 +389,6 @@ flasher.success('Well done!');</code></pre>`
|
|||||||
content.classList.add('hidden');
|
content.classList.add('hidden');
|
||||||
});
|
});
|
||||||
document.getElementById(tabId + '-content').classList.remove('hidden');
|
document.getElementById(tabId + '-content').classList.remove('hidden');
|
||||||
|
|
||||||
// Re-run Prism highlighting
|
|
||||||
if (window.Prism) {
|
|
||||||
Prism.highlightAllUnder(document.getElementById(tabId + '-content'));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -432,8 +409,8 @@ function setupTabs(tabSelector, callback) {
|
|||||||
|
|
||||||
// Get id and execute callback
|
// Get id and execute callback
|
||||||
const id = this.getAttribute('data-framework') ||
|
const id = this.getAttribute('data-framework') ||
|
||||||
this.getAttribute('data-lang') ||
|
this.getAttribute('data-lang') ||
|
||||||
this.getAttribute('data-tab');
|
this.getAttribute('data-tab');
|
||||||
|
|
||||||
if (callback) callback(id);
|
if (callback) callback(id);
|
||||||
});
|
});
|
||||||
|
|||||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": {
|
"main": {
|
||||||
"css": [
|
"css": [
|
||||||
"/dist/main.a73f4b77.css"
|
"/dist/main.687d1b36.css"
|
||||||
],
|
],
|
||||||
"js": [
|
"js": [
|
||||||
"/dist/main.3be5bc06.js"
|
"/dist/main.3be5bc06.js"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user