-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
75 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
<h1>Action Prompt Previews</h1> | ||
|
||
<% if @previews.any? %> | ||
<% @previews.each do |preview| %> | ||
<h3><%= preview.preview_name.titleize %></h3> | ||
<% preview.prompts.each do |prompt| %> | ||
<p><%= link_to prompt.name, "/action_prompt/previews/#{prompt.slug}" %></p> | ||
<% end %> | ||
<h1 class="text-xl font-semibold">Action Prompt Previews</h1> | ||
<div class="py-4"> | ||
<% if @previews.blank? %> | ||
<p>You have not defined any Action Prompt Previews.</p> | ||
<!-- TODO: Add a link to the Action Prompt documentation here --> | ||
<% else %> | ||
<div class="space-y-4"> | ||
<% @previews.each do |preview| %> | ||
<div> | ||
<h2 class="text-lg font-semibold"><%= preview.preview_name.titleize %></h2> | ||
<ul> | ||
<% preview.prompts.each do |prompt| %> | ||
<li><%= link_to prompt.name, "/action_prompt/previews/#{prompt.slug}", class: "cursor-pointer text-blue-500 underline hover:text-blue-600" %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% else %> | ||
<p>You have not defined any Action Prompt Previews.</p> | ||
<!-- TODO: Add a link to the Action Prompt documentation here --> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
<h1>Action Prompt Preview</h1> | ||
<div> | ||
<%= @preview_class.name %> | ||
</div> | ||
<div> | ||
<div>Prompt</div> | ||
<h1 class="text-xl font-semibold"> | ||
<%= @preview_class.name %>: <%= params[:prompt_name] %> | ||
</h1> | ||
<div class="py-4"> | ||
<div> | ||
Output | ||
</div> | ||
<div class="bg-gray-100 p-2 rounded-md border shadow-sm"> | ||
<%= @prompt_output %> | ||
</div> | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title><%= @page_title %></title> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
<body class="min-h-screen bg-yellow-100 pt-2"> | ||
|
||
<div class="mx-auto w-2/3 bg-white rounded-lg p-8 shadow-lg"> | ||
<%= yield %> | ||
</div> | ||
|
||
</body> | ||
</html> |