Skip to content
wiki.fftac.org

Page Run A Prompt - Source Excerpt 23

Back to Page Run A Prompt

Summary

This source excerpt preserves a bounded section of Spiralist/wp-content/themes/spiralist/page-run-a-prompt.php so readers can inspect the evidence without opening the full source file.

**Source path:** Spiralist/wp-content/themes/spiralist/page-run-a-prompt.php

<?php foreach (array_slice($run_prompt_placeholders, 0, 5) as $placeholder) : ?>
                                <span class="spiralist-chip"><?php echo esc_html('{{' . $placeholder . '}}'); ?></span>
                            <?php endforeach; ?>
                        </div>
                    <?php endif; ?>
                    <div class="spiralist-cta-row spiralist-cta-row--start">
                        <?php if ($run_prompt_can_run) : ?>
                            <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($run_prompt_url . '#run-prompt'); ?>"><?php echo esc_html($ui_text('page.run_prompt.site_run.open_runner', 'Open Runner')); ?></a>
                            <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($workspace_url); ?>"><?php echo spiralist_render_ui_label('ui.nav.workspace', 'Workspace'); ?></a>
                        <?php elseif (is_user_logged_in()) : ?>
                            <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($run_prompt_url); ?>"><?php echo spiralist_render_ui_label('ui.cta.open_prompt', 'Open Prompt'); ?></a>
                            <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($prompts_url); ?>"><?php echo spiralist_render_ui_label('ui.nav.prompts', 'Prompts'); ?></a>
                        <?php else : ?>
                            <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($login_url); ?>"><?php echo esc_html($ui_text('page.run_prompt.site_run.login', 'Log in to run on Spiralist')); ?></a>
                            <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($signup_url); ?>"><?php echo spiralist_render_ui_label('ui.cta.become_spiralist', 'Become a Spiralist'); ?></a>
                        <?php endif; ?>
                    </div>
                <?php else : ?>
                    <p class="spiralist-muted"><?php echo esc_html($ui_text('page.run_prompt.site_run.empty', 'No executable public prompt is selected yet. Use the portable builder now, or browse the prompt library.')); ?></p>
                    <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($prompts_url); ?>"><?php echo spiralist_render_ui_label('ui.nav.prompts', 'Prompts'); ?></a>
                <?php endif; ?>
            </article>

            <article class="spiralist-panel">
                <p class="spiralist-section-tag"><?php echo esc_html($ui_text('page.run_prompt.grounded.tag', 'Public Safety Boundary')); ?></p>
                <h2 class="spiralist-section-title"><?php echo esc_html($ui_text('page.run_prompt.grounded.title', 'Portable first, execution later.')); ?></h2>
                <p><?php echo esc_html($ui_text('page.run_prompt.grounded.copy', 'Logged-out visitors can build, copy, download, and share prompt and art structures. Member workspace surfaces render local prompt packets and conversation records without server-side model calls. Spiral Script publication still requires visible source and validation boundaries.')); ?></p>
                <div class="spiralist-chip-row">
                    <span class="spiralist-chip"><?php echo esc_html($ui_text('page.run_prompt.grounded.chip_one', 'No public AI call')); ?></span>
                    <span class="spiralist-chip"><?php echo esc_html($ui_text('page.run_prompt.grounded.chip_two', 'No front-end secrets')); ?></span>
                    <span class="spiralist-chip"><?php echo esc_html($ui_text('page.run_prompt.grounded.chip_three', 'Shareable setup only')); ?></span>
                </div>
            </article>
        </div>
    </section>

    <?php if (!empty($featured_prompts)) : ?>
        <section class="spiralist-page-section">
            <div class="spiralist-shell">
                <div class="spiralist-section-head">
                    <div>
                        <p class="spiralist-section-tag"><?php echo esc_html($ui_text('page.run_prompt.featured.tag', 'Prompt Library')); ?></p>
                        <h2 class="spiralist-section-title"><?php echo esc_html($ui_text('page.run_prompt.featured.title', 'Open a saved system.')); ?></h2>
                    </div>
                    <a class="spiralist-text-link" href="<?php echo esc_url($prompts_url); ?>"><?php echo spiralist_render_ui_label('ui.nav.prompts', 'Prompts'); ?></a>
                </div>
                <div class="spiralist-access-grid spiralist-run-prompt-grid">
                    <?php foreach ($featured_prompts as $prompt) : ?>
                        <?php
                        $prompt_url = !empty($prompt['slug']) && function_exists('spiralist_get_workspace_prompt_url')
                            ? spiralist_get_workspace_prompt_url((string) $prompt['slug'])
                            : $prompts_url;
                        ?>
                        <article class="spiralist-path-card spiralist-path-card--hub">
                            <p class="spiralist-section-tag"><?php echo esc_html((string) ($prompt['publication_lane_label'] ?? $ui_text('page.run_prompt.featured.fallback_tag', 'Prompt'))); ?></p>
                            <h3 class="spiralist-card-title"><a href="<?php echo esc_url($prompt_url); ?>"><?php echo esc_html((string) ($prompt['title'] ?? $ui_text('page.run_prompt.prompt.fallback_title', 'Prompt'))); ?></a></h3>
                            <p><?php echo esc_html((string) ($prompt['summary'] ?? '')); ?></p>
                            <div class="spiralist-chip-row">
                                <?php foreach (array_slice((array) ($prompt['function_tag_labels'] ?? $prompt['function_tags'] ?? []), 0, 3) as $tag) : ?>
                                    <span class="spiralist-chip"><?php echo esc_html((string) $tag); ?></span>
                                <?php endforeach; ?>
                            </div>
                            <a class="spiralist-text-link" href="<?php echo esc_url($prompt_url); ?>"><?php echo spiralist_render_ui_label('ui.cta.open_prompt', 'Open Prompt'); ?></a>
                        </article>
                    <?php endforeach; ?>
                </div>
            </div>
        </section>
    <?php endif; ?>
</main>
<?php if (is_string($prompt_workbench_json) && $prompt_workbench_json !== '') : ?>
    <script>
        window.SpiralistPromptWorkbench = <?php echo $prompt_workbench_json; ?>;
        window.SpiralistPromptFragments = window.SpiralistPromptWorkbench;
    </script>
<?php endif; ?>

<?php
get_footer();