Skip to content

Commit

Permalink
admin
Browse files Browse the repository at this point in the history
  • Loading branch information
qinmingyuan committed Dec 1, 2023
1 parent 0307e84 commit 3c73c47
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 29 deletions.
5 changes: 5 additions & 0 deletions app/views/application/_head_title.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<% if request.variant.include?(:mini_program) %>
<title><%= current_organ_name %></title>
<% else %>
<title><%= t('.title', default: current_organ_name) %></title>
<% end %>
6 changes: 1 addition & 5 deletions app/views/layouts/_admin_head.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
<% if content_for?(:title) %>
<title><%= yield(:title) %></title>
<% else %>
<title><%= current_title %></title>
<% end %>
<%= render 'head_title' %>
<meta name="turbo-cache-control" content="no-preview">
<meta name="view-transition" content="same-origin">
<%= javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true %>
Expand Down
8 changes: 1 addition & 7 deletions app/views/layouts/_application_head.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
<% if content_for?(:title) %>
<title><%= yield(:title) %></title>
<% elsif defined? current_title %>
<title><%= current_title %></title>
<% end %>
<meta name="description" content="<%= yield(:meta_description) %>">
<meta name="keywords" content="<%= yield(:meta_keywords) %>">
<%= render 'head_title' %>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="turbo-cache-control" content="no-preview">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
Expand Down
8 changes: 1 addition & 7 deletions app/views/layouts/_phone_head.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
<% if request.variant.include?(:mini_program) %>
<title><%= current_organ_name %></title>
<% else %>
<title><%= t('.title', default: current_organ_name) %></title>
<% end %>
<%= render 'head_title' %>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="description" content="<%= yield(:meta_description) %>">
<meta name="keywords" content="<%= yield(:meta_keywords) %>">
<meta name="turbo-cache-control" content="no-preview">
<%= yield :reload %>
<%= stylesheet_link_tag 'phone', media: 'all', 'data-turbo-track': 'reload' %>
Expand Down
17 changes: 7 additions & 10 deletions app/views/layouts/frame/body.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<html>
<head></head>
<body>
<turbo-frame id="body">
<%= render 'nav_bar' %>
<%= render 'alert' %>
<%= yield %>
</turbo-frame>
</body>
</html>
<%= render layout: 'layouts/admin_head' do %>
<turbo-frame id="body">
<%= render 'nav_bar' %>
<%= render 'alert' %>
<%= yield %>
</turbo-frame>
<% end %>

0 comments on commit 3c73c47

Please sign in to comment.