Mercurial Hosting > linkmystyle
view unsubscribe/src/lib/Shared.luan @ 2:e32e4120dc70
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 11 Jul 2025 21:23:39 -0600 |
parents | 8f4df159f06b |
children |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local String = require "luan:String.luan" local regex = String.regex or error() local Shared = {} function Shared.head() %> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> @import "/site.css"; </style> <% end function Shared.header() %> <div header> <a header href="https://linkmy.style/"> <img logo=big src="https://linkmy.style/images/logo.png"> <img logo=small src="https://linkmy.style/images/small_logo.png"> </a> </div> <% end function Shared.footer() %> <div footer> <span> <a href="https://linkmy.style/help.html">Help</a> <br>support@linkmy.style </span> <span> <a href="https://apps.apple.com/us/app/linkmystyle/id6475133762"><img ios src="https://linkmy.style/images/ios.svg"></a> <a href="https://www.instagram.com/linkmy.style/"><img src="https://linkmy.style/images/icons/instagram.svg"></a> </span> </div> <% end local email_regex = regex[[^[-+~.\w]+@[-.\w]+$]] function Shared.validate_email(email) email_regex.matches(email) or error("bad email: "..email) end return Shared