Files
critterfolio/assets/main.rml

53 lines
1.6 KiB
Plaintext

<rml>
<head>
<title>Critterfolio</title>
<link type="text/rcss" href="styles/main.rcss" />
</head>
<body data-model="app_data">
<h1>{{page_title}}</h1>
<button data-event-click="is_dialog_open = true">Add New Critter</button>
<!-- Critter Cards -->
<div class="critter-list">
<div data-for="entry : critters" class="critter-card">
<h3>#{{entry.key}} - {{entry.value.name}}</h3>
<p><strong>Species:</strong> {{entry.value.species}}</p>
<p><strong>Gender:</strong> {{entry.value.gender}}</p>
</div>
</div>
<!-- Modal Dialog Overlay -->
<div class="modal-overlay" data-visible="is_dialog_open">
<div class="modal-content">
<h2>Add New Critter</h2>
<p class="error" data-visible="error_message != ''">{{error_message}}</p>
<label>Name:</label>
<input type="text" data-value="form.name" />
<label>Species:</label>
<input type="text" data-value="form.species" />
<label>Gender (M/F):</label>
<input type="text" data-value="form.gender" />
<label>Mother ID (Optional):</label>
<input type="text" data-value="form.mother_id" />
<label>Father ID (Optional):</label>
<input type="text" data-value="form.father_id" />
<label>Notes:</label>
<input type="text" data-value="form.notes" />
<div class="modal-buttons">
<button data-event-click="submit_add_critter">Save</button>
<button data-event-click="is_dialog_open = false">Cancel</button>
</div>
</div>
</div>
</body>
</rml>