| 1 | export const title = "Full Example"; |
| 2 | import Chart from "./chart.marko"; |
| 3 | static const year = 2026; |
| 4 | export const slug = "full-example"; |
| 5 | server { |
| 6 | const data = await fetchData(); |
| 7 | } |
| 8 | // Page starts here |
| 9 | <h1>${title}</h1> |
| 10 | <p>This is a <strong>complete</strong> example of <em>markodown</em> featuring ${year}.</p> |
| 11 | <if=data> |
| 12 | <h2>Chart</h2> |
| 13 | <Chart data=data year=year /> |
| 14 | <for|point| of=data.points> |
| 15 | <ul> |
| 16 | <li><strong>${point.label}</strong>: ${point.value}</li> |
| 17 | </ul> |
| 18 | </for> |
| 19 | </if> |
| 20 | <else> |
| 21 | No data available. Visit <a href="https://example.com">example.com</a> for help. |
| 22 | </else> |
| 23 | <div#footer.site-footer> |
| 24 | <app-footer year=year /> |
| 25 | </div> |