DEVELOPMENT ENVIRONMENT

~liljamo/tixe

ref: 7746581cf2c2201816d744bc5c3ae1d1e5dc1ede tixe/template/templates/index.tmpl -rw-r--r-- 4.3 KiB
7746581cJonni Liljamo feat: link management! 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{{ define "content" }}
<details class="group/summary w-fit p-1 border-2 rounded-md">
	<summary class="list-none flex items-center cursor-pointer">
		<div>
			<svg class="group-open/summary:rotate-90 transition-all duration-300 w-5 h-5 stroke-slate-800" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
				<path d="M11 19L17 12L15.5 10.25M11 5L13 7.33333" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
				<path d="M7 5L13 12L11.5 13.75M7 19L9 16.6667" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
			</svg>
		</div>
		<div class="select-none">New link</div>
	</summary>
	<form class="flex flex-col p-1 origin-top group-open/summary:animate-[newlink_300ms_ease-in-out]" action="/api/link/new" method="POST">
		<p class="text-sm" for="visual">Visual</p>
		<div class="flex gap-2">
			<input class="w-full h-8 p-1 border-2 rounded-md placeholder-slate-400 focus:outline-none" type="text" placeholder="..." name="visual" id="visual"/>
		</div>
		<p class="text-sm" for="link">Link</p>
		<div class="flex gap-2">
			<input class="w-full h-8 p-1 border-2 rounded-md placeholder-slate-400 focus:outline-none" type="text" placeholder="..." name="link" id="link"/>
			<button class="group/submit w-fit h-8 p-1 border-2 rounded-md drop-shadow-md bg-slate-50 hover:bg-slate-200 transition-colors" type="submit">
				<svg class="absolute h-5 w-5 stroke-emerald-600 group-hover/submit:stroke-emerald-700 transition-colors" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
					<path d="M15 12L12 12M12 12L9 12M12 12L12 9M12 12L12 15" stroke-width="1.5" stroke-linecap="round"/>
				</svg>
				<svg class="group-hover/submit:animate-[fullrotate_500ms_ease-in-out] h-5 w-5 stroke-emerald-600 group-hover/submit:stroke-emerald-700 transition-colors" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
					<path d="M7 3.33782C8.47087 2.48697 10.1786 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.1786 2.48697 8.47087 3.33782 7" stroke-width="1.5" stroke-linecap="round"/>
				</svg>
			</button>
		</div>
	</form>
</details>
<div class="flex flex-wrap justify-center gap-1">
	{{ range $link := .data.Links }}
		<div class="m-2 p-2 border-2 rounded-md min-w-[12rem] inline-block">
			<a class="hover:underline" href="{{ $link.Link }}" target="blank">{{ $link.Visual }}</a>
			<p class="text-xs">Insert description here</p>
			<div class="flex flex-row-reverse">
				<a href="/link/{{ $link.Id }}">
					<div class="group h-5 w-5">
						<div class="pointer-events-none absolute translate-x-[-22%] translate-y-[-18%] group-hover:animate-penmove">
							<svg class="h-5 w-5 stroke-slate-600 origin-bottom-left group-hover:animate-penrotate" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
								<path d="M14.3601 4.07866L15.2869 3.15178C16.8226 1.61607 19.3125 1.61607 20.8482 3.15178C22.3839 4.68748 22.3839 7.17735 20.8482 8.71306L19.9213 9.63993M14.3601 4.07866C14.3601 4.07866 14.4759 6.04828 16.2138 7.78618C17.9517 9.52407 19.9213 9.63993 19.9213 9.63993M14.3601 4.07866L12 6.43872M19.9213 9.63993L14.6607 14.9006L11.5613 18L11.4001 18.1612C10.8229 18.7383 10.5344 19.0269 10.2162 19.2751C9.84082 19.5679 9.43469 19.8189 9.00498 20.0237C8.6407 20.1973 8.25352 20.3263 7.47918 20.5844L4.19792 21.6782M4.19792 21.6782L3.39584 21.9456C3.01478 22.0726 2.59466 21.9734 2.31063 21.6894C2.0266 21.4053 1.92743 20.9852 2.05445 20.6042L2.32181 19.8021M4.19792 21.6782L2.32181 19.8021M2.32181 19.8021L3.41556 16.5208C3.67368 15.7465 3.80273 15.3593 3.97634 14.995C4.18114 14.5653 4.43213 14.1592 4.7249 13.7838C4.97308 13.4656 5.26166 13.1771 5.83882 12.5999L8.5 9.93872" stroke-width="1.5" stroke-linecap="round" />
							</svg>
						</div>
						<div class="absolute">
							<svg class="-translate-x-2 translate-y-0 h-6 w-6 stroke-slate-600 scribble group-hover:animate-scribble" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
								<path d="M5 14.8159L6.29064 13.4917C6.9621 12.8028 7.9741 12.8423 8.60499 13.5821L11.7658 17.2884C12.2722 17.8822 13.0693 17.9632 13.6552 17.4804L13.875 17.2993C14.7181 16.6045 15.8588 16.685 16.6248 17.4933L19 19.5" stroke-width="1.5" stroke-linecap="round" />
							</svg>
						</div>
					</div>
				</a>
			</div>
		</div>
	{{ end }}
</div>
{{ end }}