Commit 80708a5b authored by simon's avatar simon
Browse files

Add users index page

parent f14611ec
@import "variables";
@import "fonts";
@import "mixin";
.users-index-view {
width: 100%;
height: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: column;
.all-users-wrapper {
width: 100%;
height: 100%;
display: flex;
justify-content: space-around;
flex-wrap: wrap;
align-items: flex-start;
margin-top: 50px;
}
.single-user-container {
width: auto;
max-width: 20%;
height: auto;
background-color: map-get($colors, "background-light");
border-radius: 10px;
padding: 10px;
display: grid;
grid-template-rows: 100%;
grid-template-columns: 3fr 6fr;
text-decoration: none;
color: black;
grid-template-areas: "avatar content";
transition: all 0.5s belzier;
&:hover {
transform: scale(1.05);
}
.single-user-avatar {
grid-area: avatar;
max-width: 80%;
margin: auto;
}
.single-user-namewrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
grid-area: content;
& > span {
font-family: map-get($fonts, "heading");
font-size: 1.5rem;
}
.single-user-links {
width: 80%;
display: flex;
justify-content: space-around;
align-items: center;
a {
width: 1.5rem;
}
}
}
}
}
......@@ -14,6 +14,12 @@ em {
font-family: map-get($fonts, "fira");
}
h1,
h2,
h3 {
font-family: map-get($fonts, "heading");
}
////////////////////////////
// //
// Header //
......
# frozen_string_literal: true
class ApplicationController < ActionController::Base
before_action :authenticate_user!
end
<h1>CodeBunker Users</h1>
<div class="users-index-view">
<h1>ALL USERS</h1>
<ul>
<% @users.each do |user| %>
<%= user.username %> | <%= link_to 'send a message', new_conversation_message_path(receiver_id: user) %>
<% end %>
</ul>
<div class="all-users-wrapper">
<% @users.each do |user| %>
<div class="single-user-container">
<img src="<%= image_url("profile_image.png")%>" alt="Profile Picture" class="single-user-avatar">
<div class="single-user-namewrapper">
<span><%= user.username %></span>
<div class="single-user-links">
<%= link_to new_conversation_message_path(receiver_id: user) do %>
<%= image_tag("envelope-regular.svg") %>
<% end %>
<%= link_to new_conversation_message_path(receiver_id: user) do %>
T <%#= image_tag("view.svg") %>
<% end %>
<%#= link_to 'visit profile', new_conversation_message_path(receiver_id: user) %>
</div>
</div>
</div>
<% end %>
</div>
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment