Styles.razor 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. @using System.Globalization
  2. @using System.Drawing
  3. <style>
  4. /**********
  5. MAIN
  6. ***********/
  7. .fr-@WebReport.ID-container {
  8. width: @Width;
  9. height: @Height;
  10. background-color: white;
  11. display: @Inline;
  12. flex-direction: @WebReport.Toolbar.Vertical;
  13. position: relative;
  14. }
  15. .fr-@WebReport.ID-container * {
  16. box-sizing: content-box;
  17. -moz-box-sizing: content-box;
  18. }
  19. /*************
  20. TOOLBAR
  21. **************/
  22. .fr-@WebReport.ID-toolbar {
  23. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.Color);
  24. display: flex;
  25. -moz-animation: flex;
  26. font: @WebReport.Toolbar.UserFontSettings;
  27. flex-direction: @WebReport.Toolbar.RowOrColumn;
  28. width: auto;
  29. height: @(WebReport.Toolbar.VerticalToolbarHeight)px;
  30. order: @WebReport.Toolbar.TopOrBottom;
  31. position: relative;
  32. align-items: center;
  33. justify-content: @WebReport.Toolbar.Content;
  34. z-index: 2;
  35. border-radius: @(WebReport.Toolbar.ToolbarRoundness)px;
  36. @(WebReport.Tabs.Count > 1 ? "" : "box-shadow: 0px 3px 4px -2px rgba(0, 0, 0, 0.2)")
  37. }
  38. .fr-@WebReport.ID-toolbar-item {
  39. height: @ToolbarHeight;
  40. border-radius:@(WebReport.Toolbar.ToolbarRoundness)px;
  41. position: relative;
  42. }
  43. .fr-@WebReport.ID-toolbar-item:hover {
  44. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.Color);
  45. }
  46. .fr-@WebReport.ID-toolbar-item > img {
  47. height: @CalculateToolBarHeight(0.7f);
  48. padding-top: @CalculateToolBarHeight(0.15f);
  49. padding-bottom: @CalculateToolBarHeight(0.15f);
  50. padding-left: @CalculateToolBarHeight(0.25f);
  51. padding-right: @CalculateToolBarHeight(0.25f);
  52. opacity: @WebReport.Toolbar.TransparencyIcon;
  53. filter:invert(@WebReport.Toolbar.ColorIcon);
  54. display: block;
  55. }
  56. .fr-@WebReport.ID-toolbar-item:hover > img {
  57. opacity: 1;
  58. }
  59. /**********************
  60. TOOLBAR DROPDOWN
  61. ***********************/
  62. .fr-@WebReport.ID-toolbar-dropdown-content {
  63. display: none;
  64. box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  65. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuColor);
  66. color:@ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuTextColor);
  67. min-width: 120px;
  68. z-index: 2;
  69. position: absolute;
  70. @WebReport.Toolbar.DropDownMenuPosition;
  71. white-space: nowrap;
  72. }
  73. .fr-@WebReport.ID-toolbar-item:hover > .fr-@WebReport.ID-toolbar-dropdown-content {
  74. display: block;
  75. }
  76. .fr-@WebReport.ID-toolbar-dropdown-content > a {
  77. float: none;
  78. color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuTextColor);
  79. padding: 6px 12px 6px 8px;
  80. text-decoration: none;
  81. display: block;
  82. z-index:3;
  83. text-align: left;
  84. height: auto;
  85. font-size: 14px;
  86. user-select: none;
  87. }
  88. .fr-@WebReport.ID-toolbar-dropdown-content > a:hover {
  89. color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuTextColor);
  90. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuColor);
  91. opacity: 0.4;
  92. z-index: 3;
  93. cursor: pointer;
  94. }
  95. .fr-webreport-toolbar-narrow > img {
  96. transform: rotate(@(WebReport.Toolbar.ToolbarNarrow)deg);
  97. padding-left: 0px;
  98. padding-right: 0px;
  99. }
  100. .fr-webreport-toolbar-notbutton:hover {
  101. background-color: transparent;
  102. }
  103. .fr-webreport-toolbar-notbutton:hover > img {
  104. opacity: 0.5;
  105. }
  106. .fr-webreport-zoom-selected {
  107. width: 14px;
  108. color:@ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuTextColor);
  109. opacity: 0.6;
  110. display: inline-block;
  111. font-size: 14px;
  112. }
  113. .fr-webreport-settings-btn {
  114. background-color: transparent;
  115. color: transparent;
  116. padding-left: 1rem;
  117. margin-left: 230px;
  118. display: flex;
  119. float: right;
  120. margin-top: -1.6rem;
  121. outline: none;
  122. padding-right: 1rem;
  123. border: none;
  124. position: relative;
  125. z-index: 4;
  126. flex-direction: row;
  127. align-content: space-around;
  128. justify-content: space-between;
  129. opacity:0.5;
  130. }
  131. .fr-webreport-settings-btn:hover {
  132. background-color: transparent;
  133. color: transparent;
  134. padding-left: 1rem;
  135. margin-left: 230px;
  136. display: flex;
  137. float: right;
  138. margin-top: -1.6rem;
  139. outline: none;
  140. padding-right: 1rem;
  141. border: none;
  142. position: relative;
  143. z-index: 4;
  144. flex-direction: row;
  145. align-content: space-around;
  146. justify-content: space-between;
  147. transform: scale(1.1);
  148. opacity:0.8;
  149. }
  150. .fr-webreport-settings-btn::-moz-focus-inner {
  151. background-color: transparent;
  152. color: transparent;
  153. padding-left: 1rem;
  154. margin-left: 230px;
  155. display: flex;
  156. float: right;
  157. margin-top: -1.6rem;
  158. outline: none;
  159. padding-right: 1rem;
  160. border: none;
  161. position: relative;
  162. z-index: 4;
  163. flex-direction: row;
  164. align-content: space-around;
  165. justify-content: space-between;
  166. }
  167. /************************
  168. POPUP
  169. *************************/
  170. .fr-webreport-popup {
  171. min-width: 100%;
  172. position: absolute;
  173. min-height: 100%;
  174. z-index: 3;
  175. padding-bottom: 1rem;
  176. background-color: #0000005c;
  177. display: flex;
  178. align-content: flex-start;
  179. flex-direction: row;
  180. flex-wrap: nowrap;
  181. justify-content: flex-start;
  182. align-items: flex-start;
  183. }
  184. .fr-webreport-popup-content {
  185. display: flex;
  186. width: fit-content;
  187. height: fit-content;
  188. margin-top: 2.5rem;
  189. margin-left: 2.6rem;
  190. padding: 0px 10px 50px 10px;
  191. z-index: 4;
  192. border-radius: 10px;
  193. background-color: white;
  194. flex-wrap: nowrap;
  195. align-content: center;
  196. justify-content: center;
  197. align-items: center;
  198. flex-direction: column;
  199. }
  200. .fr-webreport-popup-content-title {
  201. display: flex;
  202. width: 100%;
  203. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  204. color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.FontColor);
  205. height: 2rem;
  206. margin: 0;
  207. border: 1px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  208. border-radius: 1px 1px 0px 0px;
  209. margin-bottom: 10px;
  210. box-shadow: -0.1rem -0.6rem 0rem 0.6rem @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  211. align-items: center;
  212. flex-direction: column;
  213. flex-wrap: nowrap;
  214. justify-content: flex-start;
  215. align-content: center;
  216. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 16px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  217. }
  218. .fr-webreport-popup-content-title input {
  219. background-color: white;
  220. border: 3px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  221. color: black;
  222. max-height: 9.8px;
  223. border-radius: 3px;
  224. }
  225. .fr-webreport-popup-content-export-parameters {
  226. display: flex;
  227. width: 100%;
  228. -ms-flex-wrap: wrap;
  229. flex-direction: column;
  230. border-bottom: 2px solid #00000024;
  231. border-radius: 3px;
  232. padding-bottom: 1rem;
  233. /*padding-top: 1rem;*/
  234. align-content: flex-start;
  235. flex-wrap: wrap;
  236. align-items: flex-start;
  237. justify-content: flex-start;
  238. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 12px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  239. }
  240. .fr-webreport-popup-content-export-parameters-col {
  241. display: flex;
  242. align-content: center;
  243. flex-wrap: nowrap;
  244. flex-direction: column;
  245. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 11px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  246. }
  247. .custom-select{
  248. width:auto;
  249. outline: none;
  250. min-width: 40px;
  251. padding-left:3px;
  252. padding-right: 3px;
  253. appearance: none;
  254. margin: 0px 5px 0px 5px;
  255. -webkit-appearance: none;
  256. -moz-appearance: none;
  257. border: 2px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  258. border-radius: 3px;
  259. height: 1.5rem;
  260. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 11px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  261. }
  262. .fr-webreport-popup-content-export-parameters-input {
  263. margin-left: 0.3rem;
  264. margin-bottom: 0.3rem;
  265. padding: 6px;
  266. outline: none;
  267. border: none;
  268. margin-left: 5px;
  269. margin-right: 5px;
  270. min-width: inherit;
  271. border-radius: 3px;
  272. border: 2px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  273. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 10px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  274. }
  275. .fr-webreport-popup-content-export-parameters-row {
  276. display: flex;
  277. padding-top: 5px;
  278. flex-direction: row;
  279. align-items: flex-start;
  280. }
  281. .fr-webreport-popup-content-export-parameters-slider {
  282. display: flex;
  283. margin-bottom: 10px;
  284. margin-top: 10px;
  285. margin-left: 5px;
  286. background-color: transparent;
  287. border-radius: 10px;
  288. border-radius: 3px;
  289. justify-content: center;
  290. align-items: center;
  291. align-content: center;
  292. flex-direction: row;
  293. }
  294. .fr-webreport-popup-content-export-parameters-slider span {
  295. color: black;
  296. background-color: transparent;
  297. min-width: 128px;
  298. padding: 5px;
  299. white-space: nowrap;
  300. font:@(WebReport.Toolbar.Exports.UserFontSettingsStyle) 11px @(WebReport.Toolbar.Exports.UserFontSettingsFamily);
  301. }
  302. input[type=range] {
  303. height: 1.7rem;
  304. overflow: hidden;
  305. -webkit-appearance: none;
  306. margin-left: 0;
  307. outline: none;
  308. background-color: #424242;
  309. }
  310. input[type=range]::-webkit-slider-runnable-track {
  311. width: 100%;
  312. height: 100%;
  313. cursor: pointer;
  314. animate: 0.2s;
  315. background: #424242;
  316. border-radius: 0px;
  317. }
  318. input[type=range]::-webkit-slider-thumb {
  319. height: 100%;
  320. width: 5%;
  321. border-radius: 0px;
  322. background: linear-gradient(gray,5%, @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color) );
  323. cursor: pointer;
  324. -webkit-appearance: none;
  325. box-shadow: -100vw 0vw 0vw 100vw @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  326. margin-top: 0px;
  327. }
  328. label{
  329. margin-bottom: 5px;
  330. margin-top: 5px;
  331. }
  332. .fr-webreport-popup-content-export-parameters-col input[type="text"] {
  333. background-color: white;
  334. color: #000000;
  335. border: 2px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  336. max-height: 11px;
  337. }
  338. .fr-webreport-popup-content-export-parameters-button {
  339. margin-left: 0.3rem;
  340. margin-bottom: 0.3rem;
  341. padding: 6px;
  342. outline: none;
  343. background-color: #ffffff00;
  344. border: none;
  345. margin-left: 5px;
  346. height: 0.8rem;
  347. margin-right: 5px;
  348. min-width: inherit;
  349. color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  350. border-radius: 3px;
  351. border: 2px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  352. font: @(WebReport.Toolbar.Exports.UserFontSettingsStyle) 11px @(WebReport.Toolbar.Exports.UserFontSettingsFamily);
  353. }
  354. .fr-webreport-popup-content-buttons {
  355. display: flex;
  356. padding-top: 1rem;
  357. margin-bottom: -1.9rem;
  358. width: 100%;
  359. flex-wrap: nowrap;
  360. align-content: center;
  361. justify-content: space-around;
  362. align-items: center;
  363. flex-direction: row;
  364. }
  365. .fr-webreport-popup-content-btn-submit {
  366. outline: none;
  367. border: none;
  368. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  369. border-radius: 3px;
  370. width: 100px;
  371. padding: 3px;
  372. font-weight: normal;
  373. color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.FontColor);
  374. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 14px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  375. }
  376. .fr-webreport-popup-content-btn-submit:hover {
  377. transform: scale(1.015);
  378. }
  379. .fr-@WebReport.ID-container .active:hover {
  380. transform: scale(1.015);
  381. }
  382. .fr-@WebReport.ID-container .active {
  383. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  384. color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.FontColor);
  385. }
  386. .fr-webreport-popup-content-export-parameters-button:hover {
  387. transform:scale(1.015);
  388. }
  389. /************************
  390. TOOLBAR NAVIGATION
  391. *************************/
  392. .fr-@WebReport.ID-toolbar-slash{
  393. height: @CalculateToolBarHeight(0.68f);
  394. }
  395. .fr-@WebReport.ID-toolbar-slash > img {
  396. transform: rotate(@(WebReport.Toolbar.ToolbarSlash)deg);
  397. height: @CalculateToolBarHeight(0.44f);
  398. padding-left: 3px;
  399. padding-right: 3px;
  400. }
  401. .fr-@WebReport.ID-toolbar-item > input {
  402. font-family: Arial,sans-serif;
  403. font-size: @CalculateToolBarHeight(0.35f);
  404. text-align: center;
  405. border: 0;
  406. background: #fbfbfb;
  407. border-radius: 4px;
  408. height: @CalculateToolBarHeight(0.68f);
  409. width: 2.5em;
  410. margin-top: @CalculateToolBarHeight(0.17f);
  411. margin-bottom: @CalculateToolBarHeight(0.15f);
  412. margin-left: @CalculateToolBarHeight(0.1f);
  413. margin-right: @CalculateToolBarHeight(0.1f);
  414. padding: 0;
  415. display: block;
  416. }
  417. .fr-@WebReport.ID-toolbar-item > input:hover:not([readonly]) {
  418. background: #fff;
  419. }
  420. .fr-@WebReport.ID-toolbar-item > input[readonly] {
  421. cursor: default;
  422. }
  423. /***********
  424. TABS
  425. ***********/
  426. .fr-webreport-tabs {
  427. flex-shrink: 0;
  428. font-family: Verdana,Arial,sans-serif;
  429. background-color: #f1f1f1;
  430. display: table;
  431. width: @WebReport.Toolbar.TabsPositionSettings;
  432. max-width: @(WebReport.ReportMaxWidth)px;
  433. box-shadow: 0px 3px 4px -2px rgba(0, 0, 0, 0.2);
  434. position: relative;
  435. z-index: 1;
  436. @WebReport.Toolbar.TabsPositionSettings
  437. }
  438. /***********
  439. MISC
  440. ***********/
  441. input[type="date"]::-webkit-calendar-picker-indicator{
  442. opacity: 0;
  443. }
  444. .datetimepicker > input[type="date"]{
  445. background: url(_content/FastReport.Web/Resources/date-picker.svg) no-repeat;
  446. background-size: 10px;
  447. background-position: right 5px center;
  448. background-origin: content-box, content-box;
  449. }
  450. .datetimepicker > input[type="date"]:disabled {
  451. background: url("") no-repeat;
  452. }
  453. </style>
  454. @code {
  455. [Parameter]
  456. public WebReport WebReport { get; set; }
  457. protected override void OnParametersSet()
  458. {
  459. ToolbarHeight = WebReport.Toolbar.Height.ToString() + "px";
  460. }
  461. //protected override bool ShouldRender() => false;
  462. private string Width
  463. {
  464. get
  465. {
  466. if (!WebReport.Width.IsNullOrWhiteSpace())
  467. return WebReport.Width + "px";
  468. return string.Empty;
  469. }
  470. }
  471. private string Height
  472. {
  473. get
  474. {
  475. if (!WebReport.Height.IsNullOrWhiteSpace())
  476. return WebReport.Height + "px";
  477. return string.Empty;
  478. }
  479. }
  480. private string Inline
  481. {
  482. get
  483. {
  484. if (WebReport.Inline)
  485. return "inline-flex";
  486. return "flex";
  487. }
  488. }
  489. private string ToolbarHeight
  490. {
  491. get;
  492. set;
  493. }
  494. private string CalculateToolBarHeight(float variable)
  495. {
  496. var calculatedHeight = WebReport.Toolbar.Height * variable;
  497. return $"{calculatedHeight.ToString("0.##", CultureInfo.InvariantCulture)}px";
  498. }
  499. }