127.0.0.1:8000 budget / b41e11f
put in the chart Seva Luchianov 1 year, 7 months ago
8 changed file(s) with 54 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
1010 "axios": "^0.21.1",
1111 "bcrypt": "^5.0.1",
1212 "bufferutil": "^4.0.1",
13 "chart.js": "^4.4.0",
1314 "command-line-args": "^5.1.1",
1415 "cookie-parser": "^1.4.5",
1516 "dotenv": "^8.2.0",
18401841 "@jridgewell/sourcemap-codec": "^1.4.14"
18411842 }
18421843 },
1844 "node_modules/@kurkle/color": {
1845 "version": "0.3.2",
1846 "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz",
1847 "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw=="
1848 },
18431849 "node_modules/@leichtgewicht/ip-codec": {
18441850 "version": "2.0.4",
18451851 "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
30013007 },
30023008 "engines": {
30033009 "node": ">=4"
3010 }
3011 },
3012 "node_modules/chart.js": {
3013 "version": "4.4.0",
3014 "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.0.tgz",
3015 "integrity": "sha512-vQEj6d+z0dcsKLlQvbKIMYFHd3t8W/7L2vfJIbYcfyPcRx92CsHqECpueN8qVGNlKyDcr5wBrYAYKnfu/9Q1hQ==",
3016 "dependencies": {
3017 "@kurkle/color": "^0.3.0"
3018 },
3019 "engines": {
3020 "pnpm": ">=7"
30043021 }
30053022 },
30063023 "node_modules/chokidar": {
1515 "axios": "^0.21.1",
1616 "bcrypt": "^5.0.1",
1717 "bufferutil": "^4.0.1",
18 "chart.js": "^4.4.0",
1819 "command-line-args": "^5.1.1",
1920 "cookie-parser": "^1.4.5",
2021 "dotenv": "^8.2.0",
00 require('../scss/style.scss');
11 require('../scss/home.scss');
2 require('./utils/chart')
23 const logger_commands = require('./utils/logger');
34 const $ = require('jquery');
45 const utils = require('./utils');
0 require(['chart.js/auto'], function(Chart) {
1 var ctx = document.getElementById('myChart').getContext('2d');
2 const chartData = {
3 Dates:["05/08/2020", "05/09/2020", "05/10/2020"],
4 Data: [1500, 1200, 1750]
5 };
6
7 new Chart(ctx, {
8 type: 'line',
9 options:{
10 responsive: true,
11 maintainAspectRatio: false,
12 },
13 data: {
14 labels: chartData.Dates,
15 datasets: [
16 {
17 label: "Order Amount",
18 fill: false,
19 lineTension: 0,
20 borderColor: "#0d6efd",
21 data: chartData.Data
22 }
23 ]
24 }
25 });
26 });
00 @import 'style.scss';
1
2 .chart-wrapper {
3 height: 30vh;
4 }
15
26 .upload-button {
37 float: right;
11 <img class="mobile-menu-icon left" src="/images/hamburger-icon.svg">
22 <img class="mobile-menu-icon right" src="/images/watchrooms-icon.svg">
33 <div class="torso">
4 {{> page/chart}}
45 <div class="left-sidebar">
56 <div class="sidebar-item selected" id="library">Library</div>
67 <div class="sidebar-item" id="account">Account</div>
116117 </div>
117118 </div>
118119 </div>
119 <div class="footer">
120 <div class="copyright-text">&copy; {{current_year}} Seva Luchianov</div>
121 <div class="footer-element">
122 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
123 <input type="hidden" name="cmd" value="_donations" />
124 <input type="hidden" name="business" value="PRF85CF6VZ592" />
125 <input type="hidden" name="item_name" value="Support Watch Together" />
126 <input type="hidden" name="currency_code" value="USD" />
127 <input type="image" class="donate-button" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />
128 </form>
129 </div>
130 <div class="footer-element">
131 <a href="https://discord.gg/8fHMSD4aZ4">
132 <img style="width: 120px;" src="/images/discord-link.png">
133 </a>
134 </div>
135 </div>
136 <div class="donate-info">
137 Watch Together will always be free, no exceptions.<br>
138 However, it costs $20/month to keep Watch Together online.<br>
139 If you love this service, please consider a donation <span style="color: #ff00ff;">&hearts;</span>
140 </div>
141 <div class="right-sidebar">
142 <div class="watchrooms">
143 <div class="network-info">
144 <div class="network-info-item">Status: <span id="ws-status">Connecting...</span></div>
145 <div class="network-info-item">Latency: <span id="latency">0</span>ms</div>
146 <div class="network-info-item">Clock Drift: <span id="clock-drift">0</span>ms</div>
147 </div>
148 <div class="field-header sidebar">Active Watchrooms</div>
149 <div id="watchrooms"></div>
150 </div>
151 <div class="messages">
152 <div class="field-header sidebar">Announcements</div>
153 <div id="messages"></div>
154 </div>
155 </div>
156120 <script src="/js/home.js"></script>
1010 {{#if captcha}}
1111 <script src="https://www.google.com/recaptcha/api.js?render=6LfNZvsUAAAAADGihvl9M1g0ypKt_qQBOYSd8slF"></script>
1212 {{/if}}
13 {{#if ads_enabled}}
14 <script data-ad-client="ca-pub-8776153962782162" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
15 {{/if}}
1613 </head>
1714
1815 <body>
0 <div class="chart-wrapper">
1 <canvas id="myChart"></canvas>
2 </div>