mirror of
https://github.com/semihalev/twig.git
synced 2026-03-14 13:55:46 +01:00
- Implement a compiled template format using gob encoding - Add methods to compile templates and load from compiled templates - Create dedicated CompiledLoader for managing compiled templates - Enable auto-reload support for compiled templates - Add comprehensive tests including benchmarks - Create example application for template compilation workflow - Update documentation with compilation features and examples 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
40 lines
No EOL
1.2 KiB
Twig
40 lines
No EOL
1.2 KiB
Twig
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>User Profile</title>
|
|
</head>
|
|
<body>
|
|
<div class="profile">
|
|
<h1>User Profile</h1>
|
|
|
|
{% if user is defined %}
|
|
<div class="user-info">
|
|
<p><strong>Username:</strong> {{ user.username }}</p>
|
|
<p><strong>Email:</strong> {{ user.email }}</p>
|
|
|
|
{% if user.username starts with "admin" %}
|
|
<div class="admin-badge">Administrator</div>
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<div class="not-logged-in">
|
|
<p>You are not logged in. Please <a href="/login">login</a> to view your profile.</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="recent-activity">
|
|
<h2>Recent Activity</h2>
|
|
|
|
{% if items|length > 0 %}
|
|
<ul>
|
|
{% for item in items|slice(0, 3) %}
|
|
<li>You viewed {{ item }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p>No recent activity.</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |