pull/5168/head
Benjamin Schachter 5 years ago
parent 6d9acbabb2
commit 5846d36193

@ -1,13 +0,0 @@
NODE_ENV=
PORT=
BASEURL=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
MAPBOX_ACCESS_TOKEN=
PGHOST=hostname
PGPORT=port
PGUSER=username
PGPASSWORD=password
PGDATABASE=database_name

@ -34,6 +34,8 @@ export function create_rule(node: Element & ElementCSSInlineStyle, a: number, b:
const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style') as HTMLStyleElement).sheet as CSSStyleSheet); const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style') as HTMLStyleElement).sheet as CSSStyleSheet);
const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {}); const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});
console.log(doc, rule);
if (!current_rules[name]) { if (!current_rules[name]) {
current_rules[name] = true; current_rules[name] = true;
stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);
@ -42,7 +44,10 @@ export function create_rule(node: Element & ElementCSSInlineStyle, a: number, b:
const animation = node.style.animation || ''; const animation = node.style.animation || '';
node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`; node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;
console.log(node.style.animation, current_rules);
active += 1; active += 1;
// debugger;
return name; return name;
} }

@ -102,7 +102,7 @@ interface SlideParams {
export function slide(node: Element, { export function slide(node: Element, {
delay = 0, delay = 0,
duration = 400, duration = 40000,
easing = cubicOut easing = cubicOut
}: SlideParams): TransitionConfig { }: SlideParams): TransitionConfig {
const style = getComputedStyle(node); const style = getComputedStyle(node);
@ -115,20 +115,35 @@ export function slide(node: Element, {
const border_top_width = parseFloat(style.borderTopWidth); const border_top_width = parseFloat(style.borderTopWidth);
const border_bottom_width = parseFloat(style.borderBottomWidth); const border_bottom_width = parseFloat(style.borderBottomWidth);
return { return {
delay, delay,
duration, duration,
easing, easing,
css: t => css: t => {
`overflow-y: hidden;` +
`opacity: ${Math.min(t * 20, 1) * opacity};` + // console.log(`overflow-y: hidden;` +
// `opacity: ${Math.min(t * 20, 1) * opacity};` +
// `height: ${t * height}px;` +
// `padding-top: ${t * padding_top}px;` +
// `padding-bottom: ${t * padding_bottom}px;` +
// `margin-top: ${t * margin_top}px;` +
// `margin-bottom: ${t * margin_bottom}px;` +
// `border-top-width: ${t * border_top_width}px;` +
// `border-bottom-width: ${t * border_bottom_width}px;`+
// `border: 3px solid red`);
return `overflow-y: hidden;` +
`opacity: ${Math.min(t * 20, 1) * opacity};` +
`height: ${t * height}px;` + `height: ${t * height}px;` +
`padding-top: ${t * padding_top}px;` + `padding-top: ${t * padding_top}px;` +
`padding-bottom: ${t * padding_bottom}px;` + `padding-bottom: ${t * padding_bottom}px;` +
`margin-top: ${t * margin_top}px;` + `margin-top: ${t * margin_top}px;` +
`margin-bottom: ${t * margin_bottom}px;` + `margin-bottom: ${t * margin_bottom}px;` +
`border-top-width: ${t * border_top_width}px;` + `border-top-width: ${t * border_top_width}px;` +
`border-bottom-width: ${t * border_bottom_width}px;` `border-bottom-width: ${t * border_bottom_width}px;`+
`border: 3px solid red`;
}
}; };
} }

Loading…
Cancel
Save