From 38e983ce0843b0ac47b1c0a84acd52f488b4c3d9 Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Mon, 20 Nov 2023 15:40:51 +0000 Subject: [PATCH] Improve style and routes --- app/assets/stylesheets/application.css.sass | 29 ++++++++++++- app/assets/stylesheets/microposts.sass | 7 ++++ app/assets/stylesheets/microposts.scss | 3 -- app/controllers/users_controller.rb | 9 ++-- app/views/layouts/_navigation_links.html.erb | 2 +- .../layouts/_navigation_wallet.html.haml | 41 ++++++++++--------- app/views/layouts/application.html.erb | 3 ++ app/views/users/home.html.haml | 20 +++++++++ app/views/visitors/index.html.haml | 2 +- 9 files changed, 85 insertions(+), 31 deletions(-) create mode 100644 app/assets/stylesheets/microposts.sass delete mode 100644 app/assets/stylesheets/microposts.scss create mode 100644 app/views/users/home.html.haml diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass index b53b4ea3..9f551a3a 100644 --- a/app/assets/stylesheets/application.css.sass +++ b/app/assets/stylesheets/application.css.sass @@ -31,6 +31,7 @@ p h1 font-size: 7vmin margin-bottom: 0 + font-family: "Press Start 2P", "Anton", Impact, fantasy, sans-serif // h2 margin-bottom: 0 @@ -39,6 +40,11 @@ a text-shadow: none header + .home-link + font-family: "Press Start 2P", "Anton", Impact, fantasy, sans-serif + margin-left: 0 + padding-left: 0 + align-self: start font-size: 3vmin // margin-bottom: 10vmin nav @@ -56,6 +62,8 @@ header li flex: 1 1 auto text-align: center + &:nth-child(even) + align-self: end #content flex: 3 1 auto @@ -88,6 +96,7 @@ header border: 3px solid black background-color: #33cc3399 text-shadow: -3px 3px #e1b027, 3px -3px #00ddff + line-height: 1.3em #main-menu flex: 1 1 auto @@ -116,7 +125,7 @@ header box-sizing: inherit font-weight: lighter body - font-family: Anton, Impact, fantasy, sans-serif + font-family: "Anton", Impact, fantasy, sans-serif .eyecandy display: block left: 0 @@ -213,18 +222,33 @@ textarea border-radius: 0 8em 0 8em .navigation-wallet + // font-family: "Press Start 2P", "Anton", Impact, fantasy, sans-serif + h1 + font-size: 1em + margin-top: 0 + // margin-bottom: 0 + // padding-bottom: 0 + // line-height: 1.7em font-size: 0.7em text-align: right padding: 0.5em background: #00ff0060 border-radius: 0 0 0 79em word-wrap: break-word + h2 + font-size: 1em + margin: 0 + padding: 0 + span + font-family: monospace, monospace + // font-family: "Press Start 2P", "Anton", Impact, fantasy, sans-serif + .contain width: 100% max-width: 1200px - padding: 0 1em margin: 0 auto + // padding: 0 1em .table-container max-width: 100% @@ -234,3 +258,4 @@ textarea @import doodads @import profiles @import tokens +@import microposts diff --git a/app/assets/stylesheets/microposts.sass b/app/assets/stylesheets/microposts.sass new file mode 100644 index 00000000..4a793c55 --- /dev/null +++ b/app/assets/stylesheets/microposts.sass @@ -0,0 +1,7 @@ +// .micropost_form + textarea + transition: 1s all + &:focus + color: #ddd + box-shadow: 0px 0px 0px 10px black inset, 0px 0px 0px 43px white inset, 0px 0px 116px 62px black inset + rotate: -36deg diff --git a/app/assets/stylesheets/microposts.scss b/app/assets/stylesheets/microposts.scss deleted file mode 100644 index eebf0a4b..00000000 --- a/app/assets/stylesheets/microposts.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the Microposts controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: https://sass-lang.com/ diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c2344924..aeb18e60 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -16,11 +16,12 @@ class UsersController < ApplicationController def home authorize current_user - # @user = current_user - # @micropost = current_user.microposts.build if current_user.signed_in? - # @microposts = @user.microposts.paginate(page: params[:page]) + @user = current_user + @micropost = current_user.microposts.build if current_user.signed_in? + @microposts = @user.microposts.paginate(page: params[:page]) + @feed_items = current_user.feed.paginate(page: params[:page]) # authorize @user - redirect_to current_user + # redirect_to current_user end diff --git a/app/views/layouts/_navigation_links.html.erb b/app/views/layouts/_navigation_links.html.erb index b9cb498f..2718d669 100644 --- a/app/views/layouts/_navigation_links.html.erb +++ b/app/views/layouts/_navigation_links.html.erb @@ -1,7 +1,7 @@