ronin-app 0.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +7 -0
  2. data/.dockerignore +3 -0
  3. data/.document +6 -0
  4. data/.env.dev +1 -0
  5. data/.github/workflows/ruby.yml +44 -0
  6. data/.gitignore +16 -0
  7. data/.rspec +1 -0
  8. data/.rubocop.yml +26 -0
  9. data/.ruby-version +1 -0
  10. data/.yardopts +1 -0
  11. data/CONTRIBUTING.md +34 -0
  12. data/COPYING.txt +661 -0
  13. data/ChangeLog.md +38 -0
  14. data/Dockerfile +27 -0
  15. data/Gemfile +61 -0
  16. data/Procfile +2 -0
  17. data/Procfile.dev +2 -0
  18. data/README.md +215 -0
  19. data/Rakefile +44 -0
  20. data/app/db.rb +680 -0
  21. data/app/scanning.rb +173 -0
  22. data/app.rb +372 -0
  23. data/bin/ronin-app +34 -0
  24. data/config/database.rb +17 -0
  25. data/config/puma.rb +24 -0
  26. data/config/redis.rb +4 -0
  27. data/config/sidekiq.rb +23 -0
  28. data/config/sidekiq.yml +12 -0
  29. data/config.ru +33 -0
  30. data/docker-compose.yml +45 -0
  31. data/etc/systemd/user/ronin-app-sidekiq.1.service +17 -0
  32. data/etc/systemd/user/ronin-app-web.1.service +18 -0
  33. data/etc/systemd/user/ronin-app.target +5 -0
  34. data/gemspec.yml +55 -0
  35. data/lib/middleware/sidekiq/active_record_connection_pool.rb +47 -0
  36. data/lib/ronin/app/cli.rb +197 -0
  37. data/lib/ronin/app/helpers/html.rb +71 -0
  38. data/lib/ronin/app/root.rb +28 -0
  39. data/lib/ronin/app/schemas/params_schema.rb +66 -0
  40. data/lib/ronin/app/schemas/payloads/build_schema.rb +56 -0
  41. data/lib/ronin/app/schemas/payloads/encoders/encode_schema.rb +60 -0
  42. data/lib/ronin/app/types/import.rb +35 -0
  43. data/lib/ronin/app/types/nmap.rb +81 -0
  44. data/lib/ronin/app/types/spider.rb +49 -0
  45. data/lib/ronin/app/types/vulns.rb +69 -0
  46. data/lib/ronin/app/types.rb +66 -0
  47. data/lib/ronin/app/validations/import_params.rb +71 -0
  48. data/lib/ronin/app/validations/install_repo_params.rb +78 -0
  49. data/lib/ronin/app/validations/masscan_params.rb +122 -0
  50. data/lib/ronin/app/validations/nmap_params.rb +183 -0
  51. data/lib/ronin/app/validations/recon_params.rb +86 -0
  52. data/lib/ronin/app/validations/spider_params.rb +103 -0
  53. data/lib/ronin/app/validations/vulns_params.rb +83 -0
  54. data/lib/ronin/app/version.rb +26 -0
  55. data/log/.gitkeep +0 -0
  56. data/man/ronin-app.1 +63 -0
  57. data/man/ronin-app.1.md +61 -0
  58. data/public/images/favicon.png +0 -0
  59. data/public/images/favicon.svg +78 -0
  60. data/public/images/logo.svg +78 -0
  61. data/public/images/sidekiq.svg +24 -0
  62. data/public/javascript/app.js +60 -0
  63. data/public/javascript/notes.js +28 -0
  64. data/public/javascript/tabs.js +40 -0
  65. data/public/stylesheets/app.css +216 -0
  66. data/public/stylesheets/bulma.min.css +1 -0
  67. data/ronin-app.gemspec +63 -0
  68. data/scripts/console +7 -0
  69. data/scripts/server +134 -0
  70. data/scripts/setup +447 -0
  71. data/scripts/update +55 -0
  72. data/tmp/.gitkeep +0 -0
  73. data/views/_authors.erb +62 -0
  74. data/views/_delete.erb +4 -0
  75. data/views/_delete_all.erb +4 -0
  76. data/views/_encoding_tabs.erb +25 -0
  77. data/views/_notes.erb +33 -0
  78. data/views/_pagination.erb +1 -0
  79. data/views/_param_fields.erb +66 -0
  80. data/views/_params.erb +35 -0
  81. data/views/about.erb +30 -0
  82. data/views/db/advisories/index.erb +30 -0
  83. data/views/db/advisories/show.erb +105 -0
  84. data/views/db/asns/index.erb +19 -0
  85. data/views/db/asns/show.erb +61 -0
  86. data/views/db/credentials/index.erb +30 -0
  87. data/views/db/credentials/show.erb +51 -0
  88. data/views/db/email_addresses/index.erb +30 -0
  89. data/views/db/email_addresses/show.erb +44 -0
  90. data/views/db/host_names/index.erb +30 -0
  91. data/views/db/host_names/show.erb +52 -0
  92. data/views/db/ip_addresses/index.erb +19 -0
  93. data/views/db/ip_addresses/show.erb +98 -0
  94. data/views/db/mac_addresses/index.erb +19 -0
  95. data/views/db/mac_addresses/show.erb +62 -0
  96. data/views/db/open_ports/index.erb +19 -0
  97. data/views/db/open_ports/show.erb +87 -0
  98. data/views/db/organizations/departments/show.erb +82 -0
  99. data/views/db/organizations/index.erb +28 -0
  100. data/views/db/organizations/members/show.erb +87 -0
  101. data/views/db/organizations/show.erb +111 -0
  102. data/views/db/oses/index.erb +19 -0
  103. data/views/db/oses/show.erb +46 -0
  104. data/views/db/passwords/index.erb +30 -0
  105. data/views/db/passwords/show.erb +52 -0
  106. data/views/db/people/index.erb +31 -0
  107. data/views/db/people/show.erb +120 -0
  108. data/views/db/phone_numbers/index.erb +30 -0
  109. data/views/db/phone_numbers/show.erb +63 -0
  110. data/views/db/ports/index.erb +30 -0
  111. data/views/db/ports/show.erb +70 -0
  112. data/views/db/services/index.erb +30 -0
  113. data/views/db/services/show.erb +65 -0
  114. data/views/db/software/index.erb +19 -0
  115. data/views/db/software/show.erb +52 -0
  116. data/views/db/software_vendors/index.erb +19 -0
  117. data/views/db/software_vendors/show.erb +36 -0
  118. data/views/db/street_addresses/index.erb +19 -0
  119. data/views/db/street_addresses/show.erb +63 -0
  120. data/views/db/url_query_param_names/index.erb +19 -0
  121. data/views/db/url_query_param_names/show.erb +50 -0
  122. data/views/db/url_schemes/index.erb +19 -0
  123. data/views/db/url_schemes/show.erb +36 -0
  124. data/views/db/urls/index.erb +30 -0
  125. data/views/db/urls/show.erb +103 -0
  126. data/views/db/user_names/index.erb +30 -0
  127. data/views/db/user_names/show.erb +48 -0
  128. data/views/db/vulns/index.erb +19 -0
  129. data/views/db/vulns/show.erb +104 -0
  130. data/views/db.erb +152 -0
  131. data/views/exploits/index.erb +9 -0
  132. data/views/exploits/show.erb +100 -0
  133. data/views/import.erb +30 -0
  134. data/views/index.erb +7 -0
  135. data/views/layout.erb +98 -0
  136. data/views/masscan.erb +459 -0
  137. data/views/nmap.erb +1009 -0
  138. data/views/payloads/build.erb +19 -0
  139. data/views/payloads/encoders/encode.erb +35 -0
  140. data/views/payloads/encoders/index.erb +9 -0
  141. data/views/payloads/encoders/show.erb +47 -0
  142. data/views/payloads/index.erb +9 -0
  143. data/views/payloads/show.erb +47 -0
  144. data/views/queue.erb +28 -0
  145. data/views/recon.erb +55 -0
  146. data/views/repos/index.erb +30 -0
  147. data/views/repos/install.erb +45 -0
  148. data/views/repos/show.erb +39 -0
  149. data/views/spider.erb +372 -0
  150. data/views/vulns.erb +214 -0
  151. data/workers/import.rb +96 -0
  152. data/workers/install_repo.rb +40 -0
  153. data/workers/masscan.rb +135 -0
  154. data/workers/nmap.rb +216 -0
  155. data/workers/purge_repos.rb +40 -0
  156. data/workers/recon.rb +95 -0
  157. data/workers/remove_repo.rb +40 -0
  158. data/workers/spider.rb +148 -0
  159. data/workers/update_repo.rb +42 -0
  160. data/workers/update_repos.rb +40 -0
  161. data/workers/vulns.rb +111 -0
  162. data/workers.rb +37 -0
  163. metadata +538 -0
@@ -0,0 +1,78 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="201.0477mm"
6
+ height="102.70616mm"
7
+ viewBox="0 0 201.0477 102.70616"
8
+ version="1.1"
9
+ id="svg5"
10
+ xml:space="preserve"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ xmlns:svg="http://www.w3.org/2000/svg"
13
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
14
+ xmlns:cc="http://creativecommons.org/ns#"
15
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><title
16
+ id="title1145">Ronin</title><defs
17
+ id="defs2" /><g
18
+ id="g1822"
19
+ style="display:inline"
20
+ transform="translate(-0.31387684,-7.6461117)"><path
21
+ style="font-variation-settings:'wght' 700;fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-opacity:0.991918"
22
+ d="M 10.556199,32.237999 35.277035,27.91055 72.742093,32.490384 66.652961,55.405256 45.288701,61.015098 62.972493,89.246954 35.726284,66.293348 10.397131,101.36149 32.991476,34.955974 Z"
23
+ id="path1808"
24
+ class="UnoptimicedTransforms" /><path
25
+ style="font-variation-settings:'wght' 700;fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:square;stroke-miterlimit:7;stroke-dasharray:none;stroke-opacity:0.991918"
26
+ d="m 41.709993,36.067236 21.425344,2.631011 -2.916211,10.611859 -24.805898,5.279972 z"
27
+ id="path1810"
28
+ class="UnoptimicedTransforms" /><path
29
+ style="font-variation-settings:'wght' 700;fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-opacity:0.991918"
30
+ d="M 83.025798,32.473276 100.56021,21.906154 118.71219,19.57346 104.33803,73.780882 89.699452,82.628239 69.504855,87.399042 Z"
31
+ id="path1812"
32
+ class="UnoptimicedTransforms" /><path
33
+ style="font-variation-settings:'wght' 700;fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-opacity:0.991918"
34
+ d="m 90.229963,36.970303 11.606567,-6.99093 7.34782,-1.089621 -9.89376,39.935064 -10.979702,6.604289 -8.655693,2.025287 z"
35
+ id="path1814"
36
+ class="UnoptimicedTransforms" /><path
37
+ style="font-variation-settings:'wght' 700;fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-opacity:0.991918"
38
+ d="m 128.70244,17.383758 10.82256,36.92438 9.46676,-38.266495 6.92062,-0.870699 -16.13367,61.827109 -10.18316,-32.115214 -7.94266,30.349933 -7.67662,1.768338 z"
39
+ id="path1816"
40
+ class="UnoptimicedTransforms" /><path
41
+ style="font-variation-settings:'wght' 700;fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-opacity:0.991918"
42
+ d="m 162.94575,14.35937 6.73299,-0.825438 -17.55593,67.055342 -3.06881,-9.853432 z"
43
+ id="path1818"
44
+ class="UnoptimicedTransforms" /><path
45
+ style="font-variation-settings:'wght' 700;fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-opacity:0.991918"
46
+ d="m 192.91818,10.746684 -8.00688,32.141895 -8.64458,-29.367845 -12.13921,51.866313 6.18218,-1.393263 6.26444,-26.030554 8.48296,26.582249 14.29314,-54.5937594 z"
47
+ id="path1820"
48
+ class="UnoptimicedTransforms" /><path
49
+ style="font-variation-settings:'wght' 700;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.77953;stroke-linecap:square;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:0.991918"
50
+ d="m 133.05469,108.00781 c -16.89355,3.40057 -34.309727,4.99649 -50.800784,10.0293 -4.179917,3.91216 2.015739,7.04616 5.632813,6.84375 13.187431,2.21748 26.686941,3.23701 39.761721,5.4375 -23.77661,71.08712 -48.326496,141.9371 -72.021487,213.0625 -1.092297,5.398 6.601904,5.74426 7.966797,1.14062 24.162055,-32.08132 47.20471,-65.01712 71.08594,-97.27343 25.4579,20.80322 50.04923,42.68961 75.97461,62.90429 4.57249,1.85769 5.72097,-4.27902 2.79687,-6.77929 -14.85614,-25.04948 -30.73756,-49.4724 -46.08203,-74.22266 26.77762,-7.14176 53.68826,-13.8207 80.33203,-21.44336 4.50441,-4.41197 4.14869,-11.97505 6.59058,-17.63501 5.50825,-20.62599 11.91793,-41.11889 16.19067,-62.01733 -1.44169,-6.47738 -10.0701,-3.63672 -14.77383,-5.25656 -40.90006,-4.77538 -81.7584,-10.10925 -122.6539,-14.79032 z m 23.98828,26.11524 c 28.15721,2.90175 56.32715,6.15142 84.28515,10.56836 -3.77159,14.56453 -7.68173,29.14418 -11.71484,43.58593 -32.99018,7.32994 -66.3027,14.2224 -99.42187,21.38868 8.53756,-25.19841 17.13621,-50.37562 25.57421,-75.60743 l 0.99873,0.0504 z"
51
+ id="path4133"
52
+ transform="scale(0.26458333)" /><path
53
+ style="font-variation-settings:'wght' 700;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.77953;stroke-linecap:square;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:0.991918"
54
+ d="m 437.96289,78.222656 c -19.21949,1.875589 -38.46175,4.274322 -57.51172,7.199219 -21.25796,13.424345 -43.76892,25.055595 -63.99609,40.017575 -3.98664,7.3864 -4.25037,16.56104 -6.90854,24.57626 -13.94621,57.53569 -28.71574,114.9346 -42.02115,172.58781 1.83091,6.13231 9.43464,1.21751 13.46574,0.95706 19.40748,-4.96243 39.26718,-8.69803 58.4174,-14.31618 17.29608,-10.80118 35.3687,-20.70312 52.18244,-32.07893 6.07819,-18.14726 10.15664,-37.2116 15.44425,-55.70909 11.71633,-45.16496 24.61919,-90.0464 35.22064,-135.48763 1.01562,-3.317049 0.4591,-8.521526 -4.29297,-7.746094 z m -22.54883,28.513674 c -12.30319,51.84085 -25.02675,103.56264 -38.76367,155.03711 -14.07034,8.85268 -28.27374,17.73675 -42.768,25.74026 -12.08681,2.85643 -24.16563,5.74554 -36.2652,8.54685 13.93179,-52.63872 27.34213,-105.41689 41.47265,-158.00196 15.35637,-8.92046 30.35816,-18.82761 45.93419,-27.13701 10.00862,-1.31597 20.71563,-3.50436 30.39003,-4.18525 z"
55
+ id="path4135"
56
+ transform="scale(0.26458333)" /><path
57
+ style="font-variation-settings:'wght' 700;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.77953;stroke-linecap:square;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:0.991918"
58
+ d="m 579.01758,61.226562 c -5.61597,0.372786 -14.62567,0.200798 -15.15007,7.777345 C 551.359,117.15218 539.89989,165.56541 527.46289,213.73242 514.64376,171.86179 503.35695,129.47779 489.51953,87.945312 c -3.69929,-3.994346 -6.80948,2.029087 -6.83203,5.480469 -16.13572,62.809029 -32.16236,125.660859 -47.10547,188.761719 0.30929,6.10055 8.16568,3.30776 11.82031,2.56641 4.61703,-1.17607 11.51979,-1.30745 11.61907,-7.63095 10.35401,-38.4614 20.09383,-77.08641 30.6407,-115.49601 11.67759,35.70487 22.56797,71.73861 34.56445,107.36524 2.8876,4.71828 8.37211,-0.0245 8.08822,-4.18696 17.85097,-66.51848 35.46322,-133.12225 51.87663,-200.006402 0.13053,-2.967971 -2.7398,-3.91611 -5.17383,-3.572266 z"
59
+ id="path4139"
60
+ transform="scale(0.26458333)" /><path
61
+ style="font-variation-settings:'wght' 700;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.77953;stroke-linecap:square;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:0.991918"
62
+ d="m 631.63477,55.117187 c -5.35858,0.990629 -14.70486,-0.956048 -15.13864,6.576699 -15.98885,65.961814 -33.1154,131.658324 -48.21488,197.829554 -2.10301,7.78276 -1.24589,16.87058 3.57031,23.42773 5.61315,3.39593 7.77097,-4.97826 8.59571,-8.92578 18.96294,-71.71035 37.819,-143.46788 55.64843,-215.46289 -0.0986,-2.610888 -2.14046,-3.654754 -4.46093,-3.445313 z"
63
+ id="path4141"
64
+ transform="scale(0.26458333)" /><path
65
+ style="font-variation-settings:'wght' 700;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.77953;stroke-linecap:square;stroke-miterlimit:8;stroke-dasharray:none;stroke-opacity:0.991918"
66
+ d="m 742.63867,41.345703 c -4.88827,0.431025 -12.20061,0.591498 -12.38672,7.138672 -10.91242,40.63158 -20.69576,81.586665 -31.18164,122.308595 -10.10556,-32.09726 -18.37819,-64.89948 -29.66015,-96.623048 -3.98641,-3.743399 -6.60998,2.457053 -6.73636,5.851553 -13.09577,52.988785 -26.06687,106.020695 -38.08396,159.263685 0.44746,6.3338 7.76839,2.19141 11.50782,1.95117 7.46701,-0.26624 6.74477,-9.05886 8.55739,-14.23859 7.52821,-30.5613 14.76126,-61.19422 22.21604,-91.77313 9.93772,28.65788 18.60553,58.05198 28.44922,86.86523 3.25562,4.91935 8.45839,-0.71189 8.19302,-4.85551 15.39566,-57.09277 30.69316,-114.22876 44.95737,-171.611283 0.42056,-3.316291 -3.10662,-4.698786 -5.83203,-4.277344 z"
67
+ id="path4143"
68
+ transform="scale(0.26458333)" /></g><metadata
69
+ id="metadata1139"><rdf:RDF><cc:Work
70
+ rdf:about=""><cc:license
71
+ rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /><dc:creator><cc:Agent><dc:title>Hal Brodigan</dc:title></cc:Agent></dc:creator><dc:date>2023-01-28</dc:date><dc:title>Ronin</dc:title></cc:Work><cc:License
72
+ rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"><cc:permits
73
+ rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
74
+ rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:requires
75
+ rdf:resource="http://creativecommons.org/ns#Notice" /><cc:requires
76
+ rdf:resource="http://creativecommons.org/ns#Attribution" /><cc:permits
77
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><cc:requires
78
+ rdf:resource="http://creativecommons.org/ns#ShareAlike" /></cc:License></rdf:RDF></metadata></svg>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg viewBox="0 0 340 340" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 51.3 (57544) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Sidekiq-Alt-Circle-v3</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <circle id="path-1" cx="149.238477" cy="149.238477" r="149.238477"></circle>
8
+ </defs>
9
+ <g id="Sidekiq-Alt-Circle-v3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-7" transform="translate(20.000000, 20.000000)">
11
+ <g id="Rectangle" transform="translate(0.304760, 0.000000)">
12
+ <mask id="mask-2" fill="black">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <use id="Mask" fill="white" fill-rule="nonzero" xlink:href="#path-1"></use>
16
+ </g>
17
+ <g id="Group-5" transform="translate(50.269264, 46.691198)" fill="black" fill-rule="nonzero">
18
+ <path d="M39.9395374,31.660098 C28.0533651,32.258752 20.3016779,34.6112623 16.6844758,38.7176288 C13.0672738,42.8239954 12.7899952,48.5741132 15.8526401,55.9679822 C17.9854555,59.4968861 19.8338662,62.0793863 21.3978722,63.7154825 C22.9618782,65.3515787 25.3641528,67.1028435 28.6046959,68.9692767 L24.3423172,71.3991752 L21.3978722,80.3846492 L14.2267269,93.486488 L2.30415827,122.822785 L0,129.833372 C1.55344864,138.95437 2.9178572,144.035659 4.09322567,145.077237 C5.26859415,146.118816 7.42167441,146.546553 10.5524665,146.360447 C13.6928802,149.866299 15.7368833,151.117182 16.6844758,150.113096 C17.0618004,149.713276 17.658117,149.139161 17.3832544,147.201962 C17.2601635,146.334433 16.0491813,144.652697 16.1420834,143.524536 C16.2315054,142.438638 17.2490929,141.229268 17.5854427,138.882775 C17.7300388,137.874022 17.7300388,135.929855 17.5854427,133.050274 L36.4785418,113.707237 L47.3452495,115.999503 L61.7076791,118.549072 L65.32586,119.526352 C74.4755981,102.224849 79.654008,92.1717814 80.8610897,89.36715 C82.0681713,86.5625187 82.8042631,83.5683517 83.0693652,80.3846492 L78.3986134,76.0907388 C89.5794795,71.7953872 95.932019,68.6590067 97.4562321,66.681597 C99.7425517,63.7154825 103.870711,54.7638958 103.870711,51.3752966 C103.870711,49.1162305 104.205186,41.2773849 104.874135,27.85876 C98.3347854,28.6793377 94.518802,28.6793377 93.426185,27.85876 C91.7872595,26.6278935 90.2479331,21.71632 90.2479331,17.5859305 C90.2479331,14.8323375 89.3973766,11.1154577 87.6962637,6.43529106 L83.0693652,5.16131452 C82.3721715,1.72043817 81.6360797,0 80.8610897,0 C80.0860996,0 79.2652742,0.821073172 78.3986134,2.46321952 C77.4150104,6.23064216 76.9232088,8.57320307 76.9232088,9.49090223 C76.9232088,10.867451 75.9361372,14.7733709 78.3986134,17.5859305 C80.0402642,19.4609703 81.9700587,22.8852468 84.1879969,27.85876 C82.8055019,32.9421064 82.8055019,36.1768473 84.1879969,37.5629827 C86.2617393,39.6421858 84.1879969,42.3875928 84.1879969,43.9782053 C84.1879969,45.0386136 83.8151197,47.5043107 83.0693652,51.3752966 C70.3499161,53.5768827 63.0662983,54.3100014 61.2185121,53.5746528 C59.3707258,52.8393043 56.4435776,53.6370807 52.4370676,55.9679822 L47.3452495,60.85059 C48.2218206,57.0864703 48.2218206,54.3236274 47.3452495,52.5620612 C46.0303927,49.919712 45.2995489,48.2532161 45.2995489,45.8524319 C45.2995489,44.8582808 43.9206453,42.5688115 43.9206453,40.9147713 C43.9206453,40.2421954 44.1070692,39.1249325 44.4799172,37.5629827 L40.8537491,34.1313982 C41.7059378,34.0911351 42.184861,33.851203 42.2905187,33.411602 C42.3961764,32.972001 41.6125159,32.3881663 39.9395374,31.660098 Z" id="Path-2-Copy-2"></path>
19
+ <path d="M94.3859531,86.7241529 C90.3128126,98.6307574 87.3674432,106.452816 85.549845,110.19033 C83.7322467,113.927844 80.4818806,119.038821 75.7987465,125.523261 C79.669749,129.940909 81.6052502,132.978047 81.6052502,134.634675 C81.6052502,137.119617 81.1770817,151.201278 79.8290351,157.796833 C78.9303374,162.19387 78.0169763,184.238684 77.088952,223.931276 C77.0896037,230.815861 76.3987991,235.074737 75.0165381,236.707903 C72.9431466,239.157653 70.5354318,245.753208 70.5354318,247.547019 C70.5354318,249.34083 63.2722076,255.735986 63.2722076,255.735986 C63.2722076,255.735986 65.2947662,259.488815 67.0465425,259.488815 C68.7983188,259.488815 76.5952874,254.599091 79.8290351,250.524648 C83.0627829,246.450204 85.3610117,246.860776 87.2418251,245.130506 C89.1226384,243.400236 92.5303908,238.74317 90.8265146,236.707903 C89.6905972,235.351058 89.1226384,232.39852 89.1226384,227.850289 C91.7027286,226.322698 93.660117,225.558903 94.9948037,225.558903 C96.9968337,225.558903 95.3682292,218.413963 97.9694997,210.909283 C99.70368,205.906163 103.831238,179.848164 110.352173,132.735288 C114.351671,120.963586 117.059495,114.511406 118.475644,113.378747 C119.891794,112.246088 125.541403,107.452164 135.424471,98.9969763 C151.119422,89.2853058 159.872438,83.6431915 161.683519,82.0706334 C164.400141,79.7117962 190.960276,72.157261 194.591888,67.344764 C197.012963,64.1364326 202.15457,60.4223802 210.016708,56.2026065 L210.016708,53.209337 C214.975513,51.5070901 218.224901,50.6559667 219.764874,50.6559667 C222.074834,50.6559667 225.165261,52.0713636 226.814014,48.4564708 C228.462767,44.8415779 227.384906,40.8159108 229.689,38.9204341 C231.993094,37.0249574 235.809949,33.6909544 236.974555,31.711616 C238.139162,29.7322777 240.625302,28.320932 239.382232,26.7141692 C238.139162,25.1074063 231.578726,25.8871008 230.633863,27.4045442 C229.689,28.9219876 224.718548,31.6701639 221.304177,34.7040637 C219.027929,36.7266636 214.264884,39.2057302 207.015042,42.1412635 C202.45827,38.0611913 199.462368,36.3575424 198.027336,37.0303168 C195.874787,38.0394783 180.184872,46.2569749 172.870858,48.4564708 C165.556844,50.6559667 140.274107,68.3756421 133.627806,70.0204713 C126.981506,71.6653005 121.381516,73.5621171 118.475644,75.7555771 C115.569772,77.9490371 111.939878,77.0601701 107.82302,77.5046036 C105.745765,77.7288528 102.405532,81.2731046 96.3311498,82.9016294 C95.5530971,83.6472939 94.9046982,84.9214684 94.3859531,86.7241529 Z" id="Path-3-Copy-2"></path>
20
+ <path d="M64.790455,120.481873 C64.2029273,123.382064 64.5520385,126.463059 64.790455,128.126379 C66.0764615,137.098246 57.3469499,139.385795 57.3469499,139.385795 L61.9496105,143.354658 C71.2028988,141.664417 71.2028988,129.884133 71.2028988,129.884133 C70.7677409,128.25326 70.3381903,122.920637 70.5602887,121.447299 C70.581489,121.467857 75.9808267,115.070412 80.6347097,105.170205 C83.0247601,100.08585 85.2841711,93.7203183 86.8265048,89.5256815 C88.3173013,85.4712086 88.6023625,82.8587244 88.3740267,82.1233299 C88.3740267,82.3752327 85.5962337,81.2020148 82.9648796,80.4972346 C82.8742806,82.125386 82.024552,85.1925248 80.805042,88.2961793 C79.5656077,91.4505413 77.158709,95.1190112 75.1612026,99.2299541 C70.4403948,108.945553 64.5370383,119.919039 64.790455,120.481873 Z" id="Shape_2_"></path>
21
+ </g>
22
+ </g>
23
+ </g>
24
+ </svg>
@@ -0,0 +1,60 @@
1
+ class DarkModeToggle {
2
+ constructor() {
3
+ this.button = document.querySelector("#dark-mode-toggle");
4
+ this.sun = this.button.querySelector("#dark-mode-sun");
5
+ this.moon = this.button.querySelector("#dark-mode-moon");
6
+
7
+ if (this.isEnabled() || this.darkModePreferred()) {
8
+ // set the toggle if dark-mode was previous enabled or is preferred
9
+ this.moon.style.display = "inline";
10
+ this.sun.style.display = "none";
11
+ document.body.classList.add("dark-mode");
12
+ }
13
+
14
+ this.button.addEventListener("click", this.toggle.bind(this));
15
+ }
16
+
17
+ isEnabled() { return localStorage.getItem("dark-mode") != null; }
18
+
19
+ darkModePreferred() {
20
+ return window.matchMedia("(prefers-color-scheme: dark)").matches;
21
+ }
22
+
23
+ disable() {
24
+ this.moon.style.display = "none";
25
+ this.sun.style.display = "inline";
26
+ document.body.classList.remove("dark-mode");
27
+
28
+ localStorage.removeItem("dark-mode");
29
+ }
30
+
31
+ enable() {
32
+ this.moon.style.display = "inline";
33
+ this.sun.style.display = "none";
34
+ document.body.classList.add("dark-mode");
35
+
36
+ localStorage.setItem("dark-mode",true);
37
+ }
38
+
39
+ toggle(setting) {
40
+ if (this.isEnabled()) { this.disable(); }
41
+ else { this.enable(); }
42
+ }
43
+ }
44
+
45
+ const ready = (callback) => {
46
+ if (document.readyState != "loading") callback();
47
+ else document.addEventListener("DOMContentLoaded", callback);
48
+ }
49
+
50
+ ready(() => {
51
+ const dark_mode_toggle = new DarkModeToggle();
52
+
53
+ (document.querySelectorAll('.notification .delete') || []).forEach(($delete) => {
54
+ const $notification = $delete.parentNode;
55
+
56
+ $delete.addEventListener('click', () => {
57
+ $notification.parentNode.removeChild($notification);
58
+ });
59
+ });
60
+ });
@@ -0,0 +1,28 @@
1
+ const Notes = {
2
+ init() {
3
+ (document.querySelectorAll('.delete-note') || []).forEach(button => {
4
+ button.addEventListener('click', () => {
5
+ const noteId = button.getAttribute('data-note-id');
6
+ Notes.delete(noteId, button)
7
+ });
8
+ });
9
+ },
10
+
11
+ delete(noteId, button) {
12
+ fetch(`${document.location}/notes/${noteId}`, {
13
+ method: 'DELETE'
14
+ })
15
+ .then(response => {
16
+ if (response.ok) {
17
+ button.parentElement.parentElement.parentElement.remove();
18
+ } else {
19
+ console.error('Failed to delete note');
20
+ }
21
+ })
22
+ .catch(error => {
23
+ console.error('Error:', error);
24
+ });
25
+ }
26
+ };
27
+
28
+ ready(Notes.init);
@@ -0,0 +1,40 @@
1
+ const Tabs = {
2
+ init() {
3
+ (document.querySelectorAll('.tabs') || []).forEach(($tabs) => {
4
+ let $li_tabs = ($tabs.querySelectorAll('.tabs li:has(a)') || []);
5
+
6
+ $li_tabs.forEach(($li) => {
7
+ const $a = $li.querySelector('a');
8
+ const $content = document.getElementById($a.dataset.tabId);
9
+
10
+ if ($li.classList.contains('is-active')) {
11
+ $content.style.display = 'block';
12
+ }
13
+ else {
14
+ $content.style.display = 'none';
15
+ }
16
+
17
+ $a.addEventListener('click', () => {
18
+ $li_tabs.forEach(($other_li) => {
19
+ $other_li.classList.remove('is-active');
20
+ });
21
+
22
+ $li.classList.add('is-active');
23
+ $content.style.display = 'block';
24
+
25
+ let $sibling_content = $content.parentNode.firstChild;
26
+
27
+ while ($sibling_content) {
28
+ if ($sibling_content.nodeType == 1 && $sibling_content !== $content) {
29
+ $sibling_content.style.display = 'none';
30
+ }
31
+
32
+ $sibling_content = $sibling_content.nextSibling;
33
+ }
34
+ });
35
+ });
36
+ });
37
+ }
38
+ };
39
+
40
+ ready(Tabs.init);
@@ -0,0 +1,216 @@
1
+ :root {
2
+ --bg-color: white;
3
+ --fg-color: black;
4
+ --dark-mode-bg-color: #0f0f1b;
5
+ --dark-mode-fg-color: white;
6
+ }
7
+
8
+ body {
9
+ width: 100%;
10
+ height: 100%;
11
+ color: var(--fg-color);
12
+ background-color: var(--bg-color);
13
+ }
14
+
15
+ main {
16
+ clear: both;
17
+ min-height: 70vh;
18
+ }
19
+
20
+ header {
21
+ width: 100vw;
22
+ background-color: black;
23
+ }
24
+
25
+ #logo {
26
+ margin: 0.5em;
27
+ }
28
+
29
+ /*
30
+ * Top nav menu rules.
31
+ */
32
+ nav#top-menu {
33
+ margin-left: auto;
34
+ padding: 0.5em 0.5em;
35
+ }
36
+
37
+ nav#top-menu .level-item {
38
+ padding-left: 0.5em;
39
+ margin-right: 0.5em;
40
+ }
41
+
42
+ nav#top-menu svg,
43
+ nav#top-menu img {
44
+ width: 2.5em;
45
+ height: 2.5em;
46
+ }
47
+
48
+ button#dark-mode-toggle {
49
+ cursor: pointer;
50
+ background: none;
51
+ border: none;
52
+ }
53
+
54
+ button#dark-mode-toggle svg#dark-mode-sun {
55
+ display: inline;
56
+ }
57
+
58
+ button#dark-mode-toggle svg#dark-mode-moon {
59
+ display: none;
60
+ }
61
+
62
+ /*
63
+ * Navbar rules.
64
+ * https://bulma.io/documentation/components/navbar/
65
+ */
66
+ nav.navbar {
67
+ font-size: 140%;
68
+ }
69
+
70
+ nav.navbar a.navbar-item, nav.navbar a.navbar-link {
71
+ color: white;
72
+ font-weight: bold;
73
+ }
74
+
75
+ nav.navbar a:hover {
76
+ color: black;
77
+ }
78
+
79
+ nav.navbar .navbar-dropdown {
80
+ background-color: black;
81
+ padding-top: 0;
82
+ border-top: 0;
83
+ }
84
+
85
+ nav.navbar .navbar-dropdown {
86
+ background-color: black;
87
+ padding-top: 0;
88
+ border-top: 0;
89
+ }
90
+
91
+ main > nav.breadcrumb {
92
+ margin-top: 1em;
93
+ }
94
+
95
+ main > nav.breadcrumb a {
96
+ color: var(--fg-color);
97
+ }
98
+
99
+ /*
100
+ * Content rules.
101
+ */
102
+ .content {
103
+ margin-top: 1em;
104
+ margin-bottom: 1em;
105
+ }
106
+
107
+ .content .column {
108
+ height: 100%;
109
+ }
110
+
111
+ .content a {
112
+ color: var(--fg-color);
113
+ font-weight: bold;
114
+ text-decoration: underline;
115
+ }
116
+
117
+ .content a:hover {
118
+ color: var(--bg-color);
119
+ background-color: var(--fg-color);
120
+ text-decoration: none;
121
+ }
122
+
123
+ .content pre {
124
+ color: var(--bg-color);
125
+ background-color: var(--fg-color);
126
+ padding: 1em 1.5em;
127
+ margin-bottom: 1em;
128
+ overflow-x: auto;
129
+ }
130
+
131
+
132
+ .content .label.is-required::after,
133
+ .content .control.is-required::after {
134
+ content: "*";
135
+ color: red;
136
+ display: inline;
137
+ font-size: 1.2rem;
138
+ }
139
+
140
+ .content .control.is-required::after {
141
+ position: absolute;
142
+ right: 0.2rem;
143
+ top: 0;
144
+ }
145
+
146
+ /*
147
+ * Content Tab rules.
148
+ */
149
+ .content .tabs {
150
+ margin: 0 !important;
151
+ }
152
+
153
+ .content .tabs-content {
154
+ padding: 1rem 1.5rem !important;
155
+ }
156
+
157
+ .content .tabs ul {
158
+ margin: 0 !important;
159
+ border: none;
160
+ }
161
+
162
+ .content .tabs ul li {
163
+ padding: 4px 0;
164
+ }
165
+
166
+ .content .tabs ul li a {
167
+ text-decoration: none;
168
+ }
169
+
170
+ .content .content-tab {
171
+ display: none;
172
+ }
173
+
174
+ .content .content-tab.is-active {
175
+ display: block;
176
+ }
177
+
178
+ footer.footer {
179
+ clear: both;
180
+ color: gray;
181
+ background-color: var(--fg-color);
182
+ font-size: medium;
183
+ background-color: black;
184
+ }
185
+
186
+ /*
187
+ * Dark-mode rules.
188
+ */
189
+ body.dark-mode {
190
+ color: var(--dark-mode-fg-color);
191
+ background-color: var(--dark-mode-bg-color);
192
+ }
193
+
194
+ body.dark-mode main .box,
195
+ body.dark-mode main table {
196
+ color: var(--dark-mode-fg-color);
197
+ background-color: var(--dark-mode-bg-color);
198
+ }
199
+
200
+ body.dark-mode main code {
201
+ color: var(--dark-mode-fg-color);
202
+ background-color: black;
203
+ }
204
+
205
+ body.dark-mode main h1,
206
+ body.dark-mode main h2,
207
+ body.dark-mode main h3,
208
+ body.dark-mode main h4,
209
+ body.dark-mode main h5,
210
+ body.dark-mode main h6,
211
+ body.dark-mode main p,
212
+ body.dark-mode main label,
213
+ body.dark-mode main strong,
214
+ body.dark-mode main a {
215
+ color: var(--dark-mode-fg-color);
216
+ }