Improve style and routes
This commit is contained in:
parent
cf22312f2d
commit
40438b4ea4
@ -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
|
||||
|
||||
7
app/assets/stylesheets/microposts.sass
Normal file
7
app/assets/stylesheets/microposts.sass
Normal file
@ -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
|
||||
@ -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/
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<% if current_user.signed_in? %>
|
||||
<li><%= link_to 'My Tendy Zone', root_path, data: { turbo: false } %></li>
|
||||
<li><%= link_to 'My Tendy Zone', root_path, class: "home-link", data: { turbo: false } %></li>
|
||||
<% end %>
|
||||
<li><%= link_to 'Public', visitors_path, data: { turbo: false } %></li>
|
||||
<li><%= link_to 'Tokens', tokens_path %></li>
|
||||
|
||||
@ -1,22 +1,23 @@
|
||||
.navigation-wallet
|
||||
- if current_user.signed_in?
|
||||
My Tendy Zone Wallet
|
||||
- else
|
||||
Anon Tendy Zone Wallet
|
||||
%br
|
||||
= link_to "Register", new_user_registration_path
|
||||
to keep this wallet
|
||||
.contain
|
||||
- if current_user.signed_in?
|
||||
%h1 My Tendy Zone Wallet
|
||||
- else
|
||||
%h1 Anon Tendy Zone Wallet
|
||||
%br
|
||||
= link_to "Register", new_user_registration_path
|
||||
to keep this wallet
|
||||
|
||||
%br
|
||||
ID
|
||||
%br= current_user.icid
|
||||
Principal
|
||||
%br= current_user.principal
|
||||
= turbo_frame_tag "icp_balance_turbo_frame" do
|
||||
= link_to "Show Balance", "/wallet"
|
||||
-# Balance:
|
||||
-# %br= current_user.icp_balance
|
||||
-# = "#{currency_balance(current_user.principal, "TENDY")} TENDY"
|
||||
-# %br= "#{currency_balance(current_user.principal, "ICYPEES")} ICYPEES"
|
||||
-# = "#{currency_balance(current_user.principal, "ETH", current_user.soft_token)} ETH"
|
||||
-# %br= "#{currency_balance(current_user.principal, "SPICE")} SPICE"
|
||||
%h2 Account ID
|
||||
%span= current_user.icid
|
||||
%h2 Principal
|
||||
%span= current_user.principal
|
||||
%br
|
||||
= turbo_frame_tag "icp_balance_turbo_frame" do
|
||||
= link_to "Show Balance", "/wallet"
|
||||
-# Balance:
|
||||
-# %br= current_user.icp_balance
|
||||
-# = "#{currency_balance(current_user.principal, "TENDY")} TENDY"
|
||||
-# %br= "#{currency_balance(current_user.principal, "ICYPEES")} ICYPEES"
|
||||
-# = "#{currency_balance(current_user.principal, "ETH", current_user.soft_token)} ETH"
|
||||
-# %br= "#{currency_balance(current_user.principal, "SPICE")} SPICE"
|
||||
|
||||
@ -4,7 +4,10 @@
|
||||
<title>My Tendy Zone</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Anton&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
||||
<%= javascript_include_tag 'gems', 'data-turbolinks-track' => true %>
|
||||
<%= javascript_importmap_tags %>
|
||||
|
||||
20
app/views/users/home.html.haml
Normal file
20
app/views/users/home.html.haml
Normal file
@ -0,0 +1,20 @@
|
||||
- if current_user.signed_in?
|
||||
%section.micropost_form
|
||||
= render 'shared/micropost_form'
|
||||
|
||||
.contain
|
||||
%h1 #{@user.display_name if @user.display_name}
|
||||
%section.stats
|
||||
= render 'shared/stats'
|
||||
|
||||
- if @user.microposts.any?
|
||||
%section.microposts
|
||||
%h2 My Posts #{@user.microposts.count}
|
||||
%ol.microposts
|
||||
= render @microposts
|
||||
= will_paginate @microposts
|
||||
|
||||
- if @feed_items.any?
|
||||
.contain
|
||||
%h2 Post feed
|
||||
= render 'shared/feed'
|
||||
@ -1,6 +1,6 @@
|
||||
#home-headline.home-headline
|
||||
- if request.base_url.match(/pin|my|fireside/)
|
||||
%h1 Your own public tendy zone
|
||||
%h1 Your own public tendy zone 🍗
|
||||
- else
|
||||
%h1 Web3 Social Gaming <br/>Crypto Rewards
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user