Browse Source

lambda

main
pvincent 1 year ago
parent
commit
630b321e71
  1. 23
      app/views/layouts/_navbar.html.erb
  2. 2
      app/views/layouts/application.html.erb
  3. 3
      app/views/main/about.html.erb
  4. 6
      app/views/main/home.html.erb
  5. 18
      config/environments/development.rb

23
app/views/layouts/_navbar.html.erb

@ -50,29 +50,22 @@
<!-- Dashboard link -->
<a
class="text-neutral-500 hover:text-neutral-700 focus:text-neutral-700 disabled:text-black/30 dark:text-neutral-200 dark:hover:text-neutral-300 dark:focus:text-neutral-300 lg:px-2 [&.active]:text-black/90 dark:[&.active]:text-zinc-400"
href="/main/about"
data-te-nav-link-ref
>Dashboard</a
>
</li>
<!-- Team link -->
<li class="mb-4 lg:mb-0 lg:pr-2" data-te-nav-item-ref>
<a
class="text-neutral-500 hover:text-neutral-700 focus:text-neutral-700 disabled:text-black/30 dark:text-neutral-200 dark:hover:text-neutral-300 dark:focus:text-neutral-300 lg:px-2 [&.active]:text-black/90 dark:[&.active]:text-neutral-400"
href="#"
href="/"
data-te-nav-link-ref
>Team</a
>Home</a
>
</li>
<!-- Projects link -->
<li class="mb-4 lg:mb-0 lg:pr-2" data-te-nav-item-ref>
<!-- Dashboard link -->
<a
class="text-neutral-500 hover:text-neutral-700 focus:text-neutral-700 disabled:text-black/30 dark:text-neutral-200 dark:hover:text-neutral-300 dark:focus:text-neutral-300 lg:px-2 [&.active]:text-black/90 dark:[&.active]:text-neutral-400"
href="#"
class="text-neutral-500 hover:text-neutral-700 focus:text-neutral-700 disabled:text-black/30 dark:text-neutral-200 dark:hover:text-neutral-300 dark:focus:text-neutral-300 lg:px-2 [&.active]:text-black/90 dark:[&.active]:text-zinc-400"
href="/main/about"
data-te-nav-link-ref
>Projects</a
>About</a
>
</li>
</ul>
</div>

2
app/views/layouts/application.html.erb

@ -9,7 +9,7 @@
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %>
</head>
<body class='bg-yellow-200'>
<body class='bg-cyan-100'>
<%= render 'layouts/navbar' %>
<div class='m-5'>
<%= yield %>

3
app/views/main/about.html.erb

@ -1,5 +1,6 @@
<h1 class="text-4xl">About page</h1>
<div>
<h1 class="text-2xl text-red-300 ">Main#index</h1>
<h1 class="text-2xl text-red-800 ">Main#index</h1>
<h2 class="text-3xl">aaaaaaaaaaaaaa</h2>
<h1 class="text-3xl font-bold text-gray-700">aaaaaasaaa</h1>
<p class=" text-4xl center bg-red-700 text-blue-800">Find me in app/views/main/index.html.erb</p>

6
app/views/main/home.html.erb

@ -1,9 +1,9 @@
<div>
<h1 class="text-4xl font-bold">HOME</h1>
<div class="text-2xl bg-gray-400">
this is a welcome message.
<div class="text-xl bg-gray-100 ">
Hello man
</div>
<div class="italic text-2xl">
<div class="font-bold italic text-2xl bg-pink-500 text-red-50">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur provident dolor quod laboriosam facere quas, excepturi quasi consequuntur quo pariatur recusandae, eaque doloremque voluptas, a commodi officia ducimus animi incidunt.
</div>
</div>

18
config/environments/development.rb

@ -1,4 +1,4 @@
require "active_support/core_ext/integer/time"
require 'active_support/core_ext/integer/time'
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
@ -19,13 +19,13 @@ Rails.application.configure do
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join("tmp/caching-dev.txt").exist?
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}",
'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
@ -72,14 +72,14 @@ Rails.application.configure do
config.semantic_logger.add_appender(
io: $stdout,
formatter: BasicFormatter.new,
filter: ->log {
if log.name == "ActionView::Base"
log.message&.exclude?("Rendered /") && log.message.exclude?("Rendered layout /")
elsif log.name == "Rails" && log.message != nil
log.message.exclude?("Started GET \"/rails/live/reload")
filter: lambda { |log|
if log.name == 'ActionView::Base'
log.message&.exclude?('Rendered /') && log.message&.exclude?('Rendered layout /')
elsif log.name == 'Rails' && !log.message.nil?
log.message.exclude?('Started GET "/rails/live/reload')
else
true
end
},
}
)
end
Loading…
Cancel
Save