This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace ProcessWire; | |
/** | |
* Processwire CMS/CMF template file | |
* Attempt at responsive design via watching corresponding container element | |
* instead of relying on the whole document width | |
* Flexbox styling with some javascript sprinkling | |
* See coupla constants to modify (if needed): BASE_CARD_WIDTH, MAX_CARD_WIDTH | |
*/ | |
?> | |
<!DOCTYPE html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function trailingDotsAnimate(elementId, interval = 250) { | |
const el = document.getElementById(elementId); | |
const elText = el.textContent; | |
var count = 0, min = 0, max = 4; | |
var increment = true; | |
setInterval(function() { | |
if (count == min) { | |
increment = true; | |
} else if (count == max) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const months = ['oct', 'nov', 'dec', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'july', 'aug', 'sep', 'oct', 'nov', 'dec', 'jan', 'feb', 'mar']; | |
let year = 2023; | |
const months_copy = []; | |
let startsWithJan = (months[0] === 'jan'); | |
let upTo12Months = months.length < 13; | |
for (let i = 0; i < months.length; i++) { | |
const curJan = months[i] === 'jan'; | |
if (startsWithJan) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const getCurrentUser = async (session) => { | |
if (!session || typeof session.id !== 'number') { | |
throw new Error('Invalid session') | |
} | |
const qResult = await db.user.findUnique({ | |
where: { id: session.id }, | |
select: { id: true, email: true, roles: true }, | |
}) | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.