og/views/layout.eta
2023-08-03 02:06:43 -05:00

39 lines
1,022 B
Text

<% if (it.debug) { %>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
:root {
height: 100%;
font-family: 'DM Sans', Arial, Helvetica, sans-serif;
}
* {
font-family: inherit;
}
body {
margin: 0;
background-color: black;
display: grid;
place-items: center;
height: 100%;
}
/* we're using unprefixed line-clamp, but we want that to look correct in dev mode */
*[style*="line-clamp: 2"] {
display: -webkit-box !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>
<title>OpenGraph Debug Preview</title>
</head>
<% } %>
<div class="wrapper <% if (it.languages) { %>has-languages<% } %>">
<%~ it.body %>
<% if (it.languages) { %>
<div class="languages">
<% for (let language in it.languages) { %>
<div class="language" style="background-color: <%= it.languageColors[language] ?? '#ccc' %>; width: <%= it.languages[language] %>%"></div>
<% } %>
</div>
<% } %>
</div>