Add alpinejs frontend
This commit is contained in:
parent
4281b244dd
commit
f9ba02a160
23
alpinejs/index.html
Normal file
23
alpinejs/index.html
Normal file
@ -0,0 +1,23 @@
|
||||
<html>
|
||||
<head>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
</head>
|
||||
<body x-data="{
|
||||
blurb_data: {
|
||||
title: 'Fart Man Comes To Town!',
|
||||
blurb: 'Will this controversial figure finally cause the downfall of the town? Sally Smith from town center says that she can already smell trouble brewing but other members of the town believe the imminent winds of change will revitalize the towns central business district.'
|
||||
}
|
||||
}">
|
||||
<div x-data="{blurbs: [blurb_data]}">
|
||||
<template x-for="blurb in blurbs">
|
||||
<div>
|
||||
<h1 x-text="blurb.title"></h1>
|
||||
<p x-text="blurb.blurb"></p>
|
||||
<a href="#">Read more...</a>
|
||||
</div>
|
||||
</template>
|
||||
<br />
|
||||
<button x-on:click="blurbs.push(blurb_data)">Load More</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user