Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

sternenkindsaga.tpl 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. {extends "Data/statistics.tpl"}
  2. {block name="minifiedStats"}
  3. <li class="sparks-info">
  4. <h5> Downloads <span class="txt-color-purple"><i class="fa fa-download"></i>&nbsp;{$allDownloads}</span></h5>
  5. <div class="sparkline txt-color-purple hidden-mobile hidden-md hidden-sm">
  6. {foreach item=dl from=$downloadArray name=downloads}
  7. {$dl.visit_count}{if $smarty.foreach.downloads.last}{else},{/if}
  8. {/foreach}
  9. </div>
  10. </li>
  11. <li class="sparks-info">
  12. <h5> Besucher <span class="txt-color-green"><i class="fa fa-users"></i>&nbsp;{$allVisitors}</span></h5>
  13. <div class="sparkline txt-color-green hidden-mobile hidden-md hidden-sm">
  14. {foreach item=visit from=$visitorArray name=visitors}
  15. {$visit.visit_count}{if $smarty.foreach.visitors.last}{else},{/if}
  16. {/foreach}
  17. </div>
  18. </li>
  19. {/block}
  20. {block name="body"}
  21. <!-- widget grid -->
  22. <section id="widget-grid" class="">
  23. <!-- row -->
  24. <div class="row">
  25. <div class="container">
  26. <article class="col-sm-12">
  27. <!-- new widget -->
  28. <div class="jarviswidget jarviswidget-color-blueLight" id="wid-id-0" data-widget-togglebutton="false" data-widget-editbutton="false" data-widget-fullscreenbutton="false" data-widget-colorbutton="false" data-widget-deletebutton="false">
  29. <!-- widget options:
  30. usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
  31. data-widget-colorbutton="false"
  32. data-widget-editbutton="false"
  33. data-widget-togglebutton="false"
  34. data-widget-deletebutton="false"
  35. data-widget-fullscreenbutton="false"
  36. data-widget-custombutton="false"
  37. data-widget-collapsed="true"
  38. data-widget-sortable="false"
  39. -->
  40. <header>
  41. <span class="widget-icon"> <i class="fa fa-info-circle txt-color-darken"></i> </span>
  42. <h2>Statistik</h2>
  43. </header>
  44. <div class="no-padding">
  45. <div class="widget-body">
  46. <canvas id="lineChart" style="height:250px"></canvas>
  47. </div>
  48. </div>
  49. </div>
  50. </article>
  51. </div>
  52. </div>
  53. </section>
  54. {/block}
  55. {block name="additionalJSFiles"}
  56. <script src="lib/SmartAdmin/js/plugin/chartjs/chart.min.js"></script>
  57. {/block}
  58. {block name="additionalJSCode"}
  59. var areaChartData = {
  60. type: "line",
  61. labels: {$stats->getDateLabels()},
  62. datasets: [
  63. {
  64. label: "Users Per Day",
  65. fillColor: "rgba(60,141,188,0.9)",
  66. strokeColor: "rgba(60,141,188,0.8)",
  67. pointColor: "#3b8bba",
  68. pointStrokeColor: "rgba(60,141,188,1)",
  69. pointHighlightFill: "#fff",
  70. pointHighlightStroke: "rgba(60,141,188,1)",
  71. data: {$stats->getDateRows()}
  72. }
  73. ]
  74. };
  75. var areaChartOptions = {
  76. //Boolean - If we should show the scale at all
  77. showScale: true,
  78. //Boolean - Whether grid lines are shown across the chart
  79. scaleShowGridLines: false,
  80. //String - Colour of the grid lines
  81. scaleGridLineColor: "rgba(0,0,0,.05)",
  82. //Number - Width of the grid lines
  83. scaleGridLineWidth: 1,
  84. //Boolean - Whether to show horizontal lines (except X axis)
  85. scaleShowHorizontalLines: true,
  86. //Boolean - Whether to show vertical lines (except Y axis)
  87. scaleShowVerticalLines: true,
  88. //Boolean - Whether the line is curved between points
  89. bezierCurve: true,
  90. //Number - Tension of the bezier curve between points
  91. bezierCurveTension: 0.3,
  92. //Boolean - Whether to show a dot for each point
  93. pointDot: true,
  94. //Number - Radius of each point dot in pixels
  95. pointDotRadius: 2.5,
  96. //Number - Pixel width of point dot stroke
  97. pointDotStrokeWidth: 1,
  98. //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
  99. pointHitDetectionRadius: 2,
  100. //Boolean - Whether to show a stroke for datasets
  101. datasetStroke: true,
  102. //Number - Pixel width of dataset stroke
  103. datasetStrokeWidth: 2,
  104. //Boolean - Whether to fill the dataset with a color
  105. datasetFill: true,
  106. //String - A legend template
  107. {literal}
  108. legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>",
  109. //Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
  110. maintainAspectRatio: true,
  111. //Boolean - whether to make the chart responsive to window resizing
  112. responsive: true
  113. };
  114. var lineChartCanvas = $("#lineChart").get(0).getContext("2d");
  115. var lineChart = new Chart(lineChartCanvas);
  116. var lineChartOptions = areaChartOptions;
  117. lineChartOptions.datasetFill = false;
  118. lineChart.Line(areaChartData, lineChartOptions);{/literal}
  119. {/block}