mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Our application JS is bloated with minified libraries, while our actual application Javascript barely amounts to more than two hundred lines. I propose removing these libraries from our sass file, and instead load them as separate resources in `<link>` and `<script>` tags. This has several advantages: - By using common CDNs, users are likely to have many of these libraries cached already. - Even if the files aren't cached, the CDN is likely to deliver them faster. - We can use the HTML5 'async' attribute to load these libraries asynchronously, so users aren't held up while they download. - Our fully compiled application JS is much, much smaller, which reduces the load on our host. Also, on the topic of load times, I realized that in #152 that one of the images was a PNG, not a JPG. I had tried optimizing the image, but I didn't realize that it wasn't a JPG like the others. Here, I converted it to a JPG, and it is significantly smaller, and it is visually unchanged. I'm having some difficulty testing on my local machine, so I would appreciate some additional manual testing before merging this.
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<%= render 'layouts/common_head' %>
|
|
<script async src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.bundle.min.js" integrity="sha256-1uH5nQ+1cUZEU9YOfMzc9rapsWyuGtvKPpvKN9xDgug=" crossorigin="anonymous"></script>
|
|
<script async src="https://cdnjs.cloudflare.com/ajax/libs/chartkick/2.1.0/chartkick.min.js" integrity="sha256-Nux9AlQvMarSN0Lk52PcKRlezOXTqHGlZRFgBJ7UXyY=" crossorigin="anonymous"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<%= render 'layouts/navbar' %>
|
|
|
|
<main>
|
|
<ul class="admin-nav">
|
|
<li><%= link_to "Dashboard stats", admin_dashboard_path %></li>
|
|
<li><%= link_to "Universe stats", admin_universes_path %></li>
|
|
<li><%= link_to "Character stats", admin_characters_path %></li>
|
|
<li><%= link_to "Location stats", admin_locations_path %></li>
|
|
<li><%= link_to "Item stats", admin_items_path %></li>
|
|
<li><%= link_to "Attribute stats", admin_attributes_path %></li>
|
|
</ul>
|
|
|
|
<%= yield %>
|
|
<a href="https://plus.google.com/118076966717703203223" rel="publisher"></a>
|
|
</main>
|
|
|
|
</body>
|
|
</html>
|