Skip to content

Instantly share code, notes, and snippets.

@palcodes
Last active January 8, 2021 16:18
Show Gist options
  • Save palcodes/dd764a18f3c8609a37be9a997dd192c7 to your computer and use it in GitHub Desktop.
Save palcodes/dd764a18f3c8609a37be9a997dd192c7 to your computer and use it in GitHub Desktop.
<html lang="en">
<head>
<title>Edit Blob</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script type="module" src="/js/bottomsheet_controller.js"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="stylesheet" href="../style.css">
<script
src="https://cdn.skypack.dev/pin/@hotwired/[email protected]/min/@hotwired/turbo.js"></script>
</head>
<body>
{{!-- The Top Button Bar --}}
<div class="bg-gray-darkest grid grid-cols-2 divide-x divide-gray-light justify-items-auto">
<a class="p-2 text-white text-sm font-semibold text-center" href="{{Username}}/edit">Done</a>
<a class="p-2 text-white text-sm font-semibold text-center" href="">Sign Out</a>
</div>
<turbo-frame id="body-edit">
{{!-- Header Card --}}
<form action="/edit/submit" method="post">
<div class="m-4 grid grid-flow-col border rounded-md shadow-md p-4">
<div class="grid border rounded-md w-6 p-12">
</div>
<div class="justify-items-end">
<h1 class="text-xl font-bold text-right">{{ Name }}</h1>
<div class="text-md font-light text-right">
{{ Email }}</div>
</div>
</div>
{{!-- Bio Card --}}
<div class="m-4 rounded-md bg-gray-lightest mt-6 mb-6">
<textarea class="m-2 p-2 w-full">{{ Bio }}</textarea>
</div>
{{!-- Blobs/Section area --}}
<div class="m-4">
<ul>
{{#each Blobs}}
<li class="mb-5">
{{#each components }}
{{#equal sem_type "big_title"}}
<input type="text" value="{{content}}" class=" text-xl font-semibold"></input>
{{/equal}}
{{#equal sem_type "small_title" }}
<input type="text" value="{{content}}" class="text-sm"></input>
{{/equal}}
{{#equal sem_type "link" }}
<input type="text" value="{{content}}" class="text-blue-800 underline"></input>
{{/equal}}
{{#equal sem_type "desc_text"}}
<textarea class="w-full">{{content}}</textarea>
{{/equal}}
{{/each }}
</li>
{{/each}}
</ul>
</div>
</form>
</turbo-frame>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment