-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "updated at" info in secondary top navbar (#1204)
* Ensure "updated at" info is always visible in admin * Put "Last updated" on the right side and other tweaks --------- Co-authored-by: Ben Sheldon [he/him] <[email protected]>
- Loading branch information
1 parent
b2f0344
commit bd2d36b
Showing
14 changed files
with
74 additions
and
82 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<nav class="navbar p-1 shadow-sm mt-auto border-bottom text-muted small" id="secondary-navbar" data-live-poll-region="secondary-navbar"> | ||
<div class="container-fluid"> | ||
<div class="flex-fill d-none d-sm-block "> | ||
<%= t(".inspiration") %> | ||
</div> | ||
<div class="flex-fill text-end"> | ||
<% last_updated_at = Time.current.utc.iso8601 %> | ||
<%= t(".last_updated") %> <time id="page-updated-at" datetime="<%= last_updated_at %>"><%== last_updated_at %></time> | ||
</div> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html lang="<%= I18n.locale %>" data-bs-theme="auto"> | ||
<head> | ||
<title>Good Job Dashboard</title> | ||
<meta charset="utf-8"> | ||
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> | ||
<%= csrf_meta_tags %> | ||
<%= csp_meta_tag %> | ||
|
||
<%# Do not use asset tag helpers to avoid paths being overriden by config.asset_host %> | ||
<%= tag.link rel: "stylesheet", href: frontend_static_path(:bootstrap, format: :css, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.link rel: "stylesheet", href: frontend_static_path(:style, format: :css, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
|
||
<%= tag.script "", src: frontend_static_path(:bootstrap, format: :js, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.script "", src: frontend_static_path(:chartjs, format: :js, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.script "", src: frontend_static_path(:rails_ujs, format: :js, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
|
||
<%= tag.script "", src: frontend_static_path(:es_module_shims, format: :js, v: GoodJob::VERSION, locale: nil), async: true, nonce: content_security_policy_nonce %> | ||
<% importmaps = GoodJob::FrontendsController.js_modules.keys.index_with { |module_name| frontend_module_path(module_name, format: :js, locale: nil, v: GoodJob::VERSION) } %> | ||
<%= tag.script({ imports: importmaps }.to_json.html_safe, type: "importmap", nonce: content_security_policy_nonce) %> | ||
<%= tag.script "", type: "module", nonce: content_security_policy_nonce do %> import "application"; <% end %> | ||
<%= tag.script "", nonce: content_security_policy_nonce do %> | ||
// Ensure theme is updated before dom loads to avoid flash of style | ||
let theme = localStorage.getItem('good_job-theme'); | ||
if (!["light", "dark"].includes(theme)) { | ||
<head> | ||
<title>Good Job Dashboard</title> | ||
<meta charset="utf-8"> | ||
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> | ||
<%= csrf_meta_tags %> | ||
<%= csp_meta_tag %> | ||
<%# Do not use asset tag helpers to avoid paths being overriden by config.asset_host %> | ||
<%= tag.link rel: "stylesheet", href: frontend_static_path(:bootstrap, format: :css, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.link rel: "stylesheet", href: frontend_static_path(:style, format: :css, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.script "", src: frontend_static_path(:bootstrap, format: :js, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.script "", src: frontend_static_path(:chartjs, format: :js, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.script "", src: frontend_static_path(:rails_ujs, format: :js, v: GoodJob::VERSION, locale: nil), nonce: content_security_policy_nonce %> | ||
<%= tag.script "", src: frontend_static_path(:es_module_shims, format: :js, v: GoodJob::VERSION, locale: nil), async: true, nonce: content_security_policy_nonce %> | ||
<% importmaps = GoodJob::FrontendsController.js_modules.keys.index_with { |module_name| frontend_module_path(module_name, format: :js, locale: nil, v: GoodJob::VERSION) } %> | ||
<%= tag.script({ imports: importmaps }.to_json.html_safe, type: "importmap", nonce: content_security_policy_nonce) %> | ||
<%= tag.script "", type: "module", nonce: content_security_policy_nonce do %> import "application"; <% end %> | ||
<%= tag.script "", nonce: content_security_policy_nonce do %> | ||
// Ensure theme is updated before dom loads to avoid flash of style | ||
let theme = localStorage.getItem('good_job-theme'); | ||
if (!["light", "dark"].includes(theme)) { | ||
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; | ||
} | ||
document.documentElement.setAttribute('data-bs-theme', theme); | ||
<% end %> | ||
</head> | ||
<body> | ||
<div class="d-flex flex-column min-vh-100"> | ||
<%= render "good_job/shared/navbar" %> | ||
|
||
<div class="container-fluid flex-grow-1 relative"> | ||
<%= render "good_job/shared/alert" %> | ||
|
||
<%= yield %> | ||
} | ||
document.documentElement.setAttribute('data-bs-theme', theme); | ||
<% end %> | ||
</head> | ||
<body> | ||
<div class="d-flex flex-column min-vh-100"> | ||
<%= render "good_job/shared/navbar" %> | ||
<%= render "good_job/shared/secondary_navbar" %> | ||
<div class="container-fluid flex-grow-1 relative"> | ||
<%= render "good_job/shared/alert" %> | ||
<%= yield %> | ||
</div> | ||
</div> | ||
|
||
<%= render "good_job/shared/footer" %> | ||
</div> | ||
</body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters