Improve style and routes
This commit is contained in:
parent
cf22312f2d
commit
40438b4ea4
@ -31,6 +31,7 @@ p
|
|||||||
h1
|
h1
|
||||||
font-size: 7vmin
|
font-size: 7vmin
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
font-family: "Press Start 2P", "Anton", Impact, fantasy, sans-serif
|
||||||
|
|
||||||
// h2
|
// h2
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
@ -39,6 +40,11 @@ a
|
|||||||
text-shadow: none
|
text-shadow: none
|
||||||
|
|
||||||
header
|
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
|
font-size: 3vmin
|
||||||
// margin-bottom: 10vmin
|
// margin-bottom: 10vmin
|
||||||
nav
|
nav
|
||||||
@ -56,6 +62,8 @@ header
|
|||||||
li
|
li
|
||||||
flex: 1 1 auto
|
flex: 1 1 auto
|
||||||
text-align: center
|
text-align: center
|
||||||
|
&:nth-child(even)
|
||||||
|
align-self: end
|
||||||
|
|
||||||
#content
|
#content
|
||||||
flex: 3 1 auto
|
flex: 3 1 auto
|
||||||
@ -88,6 +96,7 @@ header
|
|||||||
border: 3px solid black
|
border: 3px solid black
|
||||||
background-color: #33cc3399
|
background-color: #33cc3399
|
||||||
text-shadow: -3px 3px #e1b027, 3px -3px #00ddff
|
text-shadow: -3px 3px #e1b027, 3px -3px #00ddff
|
||||||
|
line-height: 1.3em
|
||||||
|
|
||||||
#main-menu
|
#main-menu
|
||||||
flex: 1 1 auto
|
flex: 1 1 auto
|
||||||
@ -116,7 +125,7 @@ header
|
|||||||
box-sizing: inherit
|
box-sizing: inherit
|
||||||
font-weight: lighter
|
font-weight: lighter
|
||||||
body
|
body
|
||||||
font-family: Anton, Impact, fantasy, sans-serif
|
font-family: "Anton", Impact, fantasy, sans-serif
|
||||||
.eyecandy
|
.eyecandy
|
||||||
display: block
|
display: block
|
||||||
left: 0
|
left: 0
|
||||||
@ -213,18 +222,33 @@ textarea
|
|||||||
border-radius: 0 8em 0 8em
|
border-radius: 0 8em 0 8em
|
||||||
|
|
||||||
.navigation-wallet
|
.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
|
font-size: 0.7em
|
||||||
text-align: right
|
text-align: right
|
||||||
padding: 0.5em
|
padding: 0.5em
|
||||||
background: #00ff0060
|
background: #00ff0060
|
||||||
border-radius: 0 0 0 79em
|
border-radius: 0 0 0 79em
|
||||||
word-wrap: break-word
|
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
|
.contain
|
||||||
width: 100%
|
width: 100%
|
||||||
max-width: 1200px
|
max-width: 1200px
|
||||||
padding: 0 1em
|
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
// padding: 0 1em
|
||||||
|
|
||||||
.table-container
|
.table-container
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
@ -234,3 +258,4 @@ textarea
|
|||||||
@import doodads
|
@import doodads
|
||||||
@import profiles
|
@import profiles
|
||||||
@import tokens
|
@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
|
def home
|
||||||
authorize current_user
|
authorize current_user
|
||||||
# @user = current_user
|
@user = current_user
|
||||||
# @micropost = current_user.microposts.build if current_user.signed_in?
|
@micropost = current_user.microposts.build if current_user.signed_in?
|
||||||
# @microposts = @user.microposts.paginate(page: params[:page])
|
@microposts = @user.microposts.paginate(page: params[:page])
|
||||||
|
@feed_items = current_user.feed.paginate(page: params[:page])
|
||||||
# authorize @user
|
# authorize @user
|
||||||
redirect_to current_user
|
# redirect_to current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<% if current_user.signed_in? %>
|
<% 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 %>
|
<% end %>
|
||||||
<li><%= link_to 'Public', visitors_path, data: { turbo: false } %></li>
|
<li><%= link_to 'Public', visitors_path, data: { turbo: false } %></li>
|
||||||
<li><%= link_to 'Tokens', tokens_path %></li>
|
<li><%= link_to 'Tokens', tokens_path %></li>
|
||||||
|
|||||||
@ -1,22 +1,23 @@
|
|||||||
.navigation-wallet
|
.navigation-wallet
|
||||||
- if current_user.signed_in?
|
.contain
|
||||||
My Tendy Zone Wallet
|
- if current_user.signed_in?
|
||||||
- else
|
%h1 My Tendy Zone Wallet
|
||||||
Anon Tendy Zone Wallet
|
- else
|
||||||
%br
|
%h1 Anon Tendy Zone Wallet
|
||||||
= link_to "Register", new_user_registration_path
|
%br
|
||||||
to keep this wallet
|
= link_to "Register", new_user_registration_path
|
||||||
|
to keep this wallet
|
||||||
|
|
||||||
%br
|
%h2 Account ID
|
||||||
ID
|
%span= current_user.icid
|
||||||
%br= current_user.icid
|
%h2 Principal
|
||||||
Principal
|
%span= current_user.principal
|
||||||
%br= current_user.principal
|
%br
|
||||||
= turbo_frame_tag "icp_balance_turbo_frame" do
|
= turbo_frame_tag "icp_balance_turbo_frame" do
|
||||||
= link_to "Show Balance", "/wallet"
|
= link_to "Show Balance", "/wallet"
|
||||||
-# Balance:
|
-# Balance:
|
||||||
-# %br= current_user.icp_balance
|
-# %br= current_user.icp_balance
|
||||||
-# = "#{currency_balance(current_user.principal, "TENDY")} TENDY"
|
-# = "#{currency_balance(current_user.principal, "TENDY")} TENDY"
|
||||||
-# %br= "#{currency_balance(current_user.principal, "ICYPEES")} ICYPEES"
|
-# %br= "#{currency_balance(current_user.principal, "ICYPEES")} ICYPEES"
|
||||||
-# = "#{currency_balance(current_user.principal, "ETH", current_user.soft_token)} ETH"
|
-# = "#{currency_balance(current_user.principal, "ETH", current_user.soft_token)} ETH"
|
||||||
-# %br= "#{currency_balance(current_user.principal, "SPICE")} SPICE"
|
-# %br= "#{currency_balance(current_user.principal, "SPICE")} SPICE"
|
||||||
|
|||||||
@ -4,7 +4,10 @@
|
|||||||
<title>My Tendy Zone</title>
|
<title>My Tendy Zone</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<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=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 %>
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
||||||
<%= javascript_include_tag 'gems', 'data-turbolinks-track' => true %>
|
<%= javascript_include_tag 'gems', 'data-turbolinks-track' => true %>
|
||||||
<%= javascript_importmap_tags %>
|
<%= 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
|
#home-headline.home-headline
|
||||||
- if request.base_url.match(/pin|my|fireside/)
|
- if request.base_url.match(/pin|my|fireside/)
|
||||||
%h1 Your own public tendy zone
|
%h1 Your own public tendy zone 🍗
|
||||||
- else
|
- else
|
||||||
%h1 Web3 Social Gaming <br/>Crypto Rewards
|
%h1 Web3 Social Gaming <br/>Crypto Rewards
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user