webterm: implement underline and blink styles

This commit is contained in:
fang 2020-11-10 01:37:40 +01:00
parent ee55f34a72
commit e3dba290c9
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 14 additions and 2 deletions

View File

@ -15,8 +15,8 @@ export default React.memo(({line}) => {
switch (deco) {
case null: return prop;
case 'br': return {bold: true, ...prop};
case 'bl': return {blink: true, ...prop}; //TODO
case 'un': return {textDecoration: 'underline', ...prop}; //TODO fixme
case 'bl': return {className: 'blink', ...prop};
case 'un': return {style: {textDecoration: 'underline'}, ...prop};
default: console.log('weird deco', deco); return prop;
}
}, {});

View File

@ -3,6 +3,18 @@ input#term {
color: inherit;
}
.blink {
animation: 4s ease-in-out infinite opacity_blink;
}
@keyframes opacity_blink {
0% { opacity: 0; }
10% { opacity: 1; }
80% { opacity: 1; }
90% { opacity: 0; }
100% { opacity: 0; }
}
/* responsive */
@media all and (max-width: 34.375em) {
.h-100-m40-s {