Skip to content

Bindles/adubb-blog-v2-707-linux

Repository files navigation

README

This README would normally document whatever steps are necessary to get the application up and running.

Things you may want to cover:

  • Ruby version

  • System dependencies

  • Configuration

  • Database creation

  • Database initialization

  • How to run the test suite

  • Services (job queues, cache servers, search engines, etc.)

  • Deployment instructions

  • ...

    <% if post.created_at > 1.hour.ago %> <%= "[created " + time_ago_in_words(post.created_at) %> ago <%= post.created_at.strftime("[%m/%d/%Y (%I %M %P)]") %> <% else %> <%= post.created_at.strftime("[%m/%d/%Y (%I %M %P)]") %> <% end %>

      <% if post.created_at > 1.hour.ago %>
    <%= time_ago_in_words(post.created_at) %> ago
    <%= post.created_at.strftime("[%H:%M | %m/%d/%Y]") %>
    

    <% else %> <%= post.created_at.strftime("[%m/%d/%Y (%I %M %P)]") %> <% end %>

<title>AdubbBlog</title> <%= csrf_meta_tags %> <%= csp_meta_tag %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<%= javascript_importmap_tags %>
<%= render 'layouts/navbar' %> <%= yield %> <%= render 'layouts/alerts' %>

<%= notice %>

<%= alert %>

<%= yield %>
<body>
<header>
  <main>
  <p class="notice"><%= notice %></p>
  <p class="alert"><%= alert %></p>
</header>
</main>
<%= yield %>

turbo_devise_controller.rb:

class TurboDeviseController < ApplicationController class Responder < ActionController::Responder def to_turbo_stream controller.render(options.merge(formats: :html)) rescue ActionView::MissingTemplate => e if get? raise e elsif has_errors? && default_action render rendering_options.merge(formats: :html, status: :unprocessable_entity) else redirect_to navigation_location end end end

self.responder = Responder
respond_to :html, :turbo_stream

end

appl:

<title>AdubbBlog</title> <%= csrf_meta_tags %> <%= csp_meta_tag %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<%= javascript_importmap_tags %>
</header>
<%= yield %>

navbar:

<%= link_to "Rails Blog", root_path, class:'navbar-brand'%>
  • <%= link_to "Home", root_path, class:'nav-link'%>
  • <%= link_to "Blog", posts_path, class:"nav-link" %>
  • <%= link_to "Members", 'posts#index', class:"nav-link" %>
  • <%= link_to "Portfolio", 'posts#index', class:"nav-link" %>
  • <%= render 'layouts/categories', categories: @nav_categories %>
    <%= render 'search/form' %> <%= render 'layouts/notifications' %> <%= render 'user/session_manager' %>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published