import 'package:flutter/material.dart';
class HtmlTemplate {
static const String printDocumentCssStyle = '''
''';
static const String fontFaceStyle = '''
@font-face {
font-family: 'Inter';
src: url("/assets/fonts/Inter/Inter-Regular.ttf") format("truetype");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Inter';
src: url("/assets/fonts/Inter/Inter-Medium.ttf") format("truetype");
font-weight: 500;
font-style: medium;
}
@font-face {
font-family: 'Inter';
src: url("/assets/fonts/Inter/Inter-SemiBold.ttf") format("truetype");
font-weight: 600;
font-style: semi-bold;
}
@font-face {
font-family: 'Inter';
src: url("/assets/fonts/Inter/Inter-Bold.ttf") format("truetype");
font-weight: 700;
font-style: bold;
}
body {
font-family: 'Inter', sans-serif;
}
''';
static String defaultFontStyle({double fontSize = 14}) => '''
body {
font-weight: 400;
font-size: ${fontSize}px;
font-style: normal;
}
p {
margin: 0px;
}
''';
static const String defaultEditorFontStyle = '''
#editor, .note-editable, .note-frame {
font-size: 16px;
color: #222222;
}
p {
margin: 0px;
}
''';
static const String previewEMLFileCssStyle = '''
''';
static const String markDownAndASCIIArtStyleCSS = 'display: block; font-family: monospace; white-space: pre; margin: 1em 0px;';
static String webCustomInternalStyleCSS({
bool useDefaultFontStyle = false,
bool customScrollbar = false,
}) => '''
''';
static String mobileCustomInternalStyleCSS({
bool useDefaultFontStyle = false,
TextDirection direction = TextDirection.ltr,
}) => '''
${HtmlTemplate.fontFaceStyle}
${useDefaultFontStyle ? HtmlTemplate.defaultEditorFontStyle : ''}
#editor {
direction: ${direction.name};
}
#editor .tmail-signature {
text-align: ${direction == TextDirection.rtl ? 'right' : 'left'};
}
''';
static const String disableScrollingStyleCSS = '''
html, body {
overflow: hidden;
overscroll-behavior: none;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE/Edge */
}
::-webkit-scrollbar {
display: none;
}
''';
}