Genesis
This commit is contained in:
18
app/views/home/_month.erb
Normal file
18
app/views/home/_month.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="bootstrap">
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
<%= first_day.strftime("%b") %>
|
||||
</div>
|
||||
<div class="flex flex-col w-full">
|
||||
<% (first_day..first_day.end_of_month).each do |day| %>
|
||||
<div class="relative border-t w-full flex h-6 <%= 'bg-gray-200' if day.on_weekend? %>">
|
||||
<div class="text-xs font-bold <%= 'border-red-600 border-b-4' if day.today? %>"
|
||||
<%= raw('data-toggle="tooltip" title="Today"') if day.today? %> <%= raw("data-toggle='tooltip' title='#{day.strftime('%a, %m/%d/%y')}'") unless day.today? %> data-placement="right" >
|
||||
<%= day.strftime('%d') %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
14
app/views/home/index.erb
Normal file
14
app/views/home/index.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
first_days = (1..12).map do |index|
|
||||
Date.new(@year, index, 1).beginning_of_month
|
||||
end
|
||||
%>
|
||||
|
||||
<div class="container mx-auto flex justify-between">
|
||||
<% first_days.each do |first_day| %>
|
||||
<div class="border-l w-full">
|
||||
<%= render 'month', first_day: first_day, events: @events %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
19
app/views/layouts/application.html.erb
Normal file
19
app/views/layouts/application.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>YearlyPlan</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
||||
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="container mx-auto mt-28 px-5 flex">
|
||||
<%= yield %>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
13
app/views/layouts/mailer.html.erb
Normal file
13
app/views/layouts/mailer.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<style>
|
||||
/* Email styles need to be inline */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
1
app/views/layouts/mailer.text.erb
Normal file
1
app/views/layouts/mailer.text.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= yield %>
|
||||
Reference in New Issue
Block a user