Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui changes and user bug fixe #151

Merged
merged 33 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b4a1cb2
dev: added hexagon view to spelling bee
mrkc2303 Nov 1, 2024
8bb31c4
Merge branch 'main' into SCRUM-64
krishnacalindi Nov 1, 2024
16d3b85
Made colors dynamic
mrkc2303 Nov 2, 2024
16658a6
Made colors dynamic
mrkc2303 Nov 2, 2024
4a4f3df
letterboxed puzzle setter
AntonioRosV Nov 11, 2024
b2debaa
rspec updates and improvements
AntonioRosV Nov 11, 2024
db34380
Merge pull request #143 from tamu-edu-students/main
mrkc2303 Nov 12, 2024
716c625
automatic puzzles for letterboxed
AntonioRosV Nov 13, 2024
558e5e3
New games page UI
mrkc2303 Nov 14, 2024
c75011e
debugging session temp code
nandiniiys Nov 14, 2024
0b2fd0f
fixed the users bug
krishnacalindi Nov 14, 2024
e32d257
Made better welcome page with minor changes
mrkc2303 Nov 14, 2024
76825e4
paths on puzzle setter page
AntonioRosV Nov 14, 2024
7388006
aesthetic fix
AntonioRosV Nov 14, 2024
2ec043a
changes to UI in User profile page
mrkc2303 Nov 14, 2024
4c8e091
merge with main
mrkc2303 Nov 14, 2024
e445755
Minor fixes
mrkc2303 Nov 14, 2024
01c8627
Minor changes in cucumber senarios
mrkc2303 Nov 14, 2024
4676ab4
Fix cucumber tests
mrkc2303 Nov 14, 2024
1710a3f
fixed tests
AntonioRosV Nov 14, 2024
c012ad4
SCRUM-72-73-74-75: streamline wordle puzzle setter interface
nandiniiys Nov 13, 2024
9f5bd4e
[SCRUM-72-73-74-75] add documentation comments as per the gem yard
nandiniiys Nov 13, 2024
1bee255
add ui flow docs ofr wordle puzzle setter
nandiniiys Nov 13, 2024
d8cdc2b
SCRUM-72-73-74-75- add cucumber tests
nandiniiys Nov 13, 2024
493169e
rubocop and doc for helper
krishnacalindi Nov 13, 2024
754152f
rescues
krishnacalindi Nov 13, 2024
de54b6b
Merge pull request #148 from tamu-edu-students/SCRUM-64
krishnacalindi Nov 14, 2024
eb3da62
Merge branch 'main' into oauth-bug
krishnacalindi Nov 14, 2024
1bfacb0
Merge branch 'main' into SCRUM-76
krishnacalindi Nov 14, 2024
4eced76
Merge pull request #150 from tamu-edu-students/oauth-bug
krishnacalindi Nov 14, 2024
607c572
Merge branch 'prod' into main
krishnacalindi Nov 14, 2024
55de7a7
Merge branch 'main' into SCRUM-76
AntonioRosV Nov 14, 2024
7c844bb
Merge pull request #149 from tamu-edu-students/SCRUM-76
krishnacalindi Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
New games page UI
  • Loading branch information
mrkc2303 committed Nov 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 558e5e3c790c8bb1b5f0e6a6a3012f4f9b4a027e
2 changes: 1 addition & 1 deletion app/assets/stylesheets/dashboard.css
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
padding: 20px;
background-color: #e0e0e0; /* Light gray background */
border-radius: 10px;
margin-bottom: 20px;
margin: 20px 50px;
}

/* Each Stat Card */
46 changes: 43 additions & 3 deletions app/assets/stylesheets/games.css
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@
.dropdown-content {
display: none;
position: absolute;
right: 0;
margin-right: 10px;
background-color: #f9f9f9;
border: 2px solid black;
min-width: 160px;
@@ -37,6 +39,35 @@
display: block;
}


.dropdown-content-account {
display: none;
position: absolute;
right: 0;
margin-right: 170px;
background-color: #f9f9f9;
border: 2px solid black;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.dropdown-content-account a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}

.dropdown-content-account a:hover {
background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content-account {
display: block;
}

.dropdown:hover .dropbtn {
background-color: white;
color: black;
@@ -45,24 +76,33 @@

.game-list {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(2, 1fr);
gap: 20px;
margin-top: 20px;
width: 90%;
margin: 0 auto;
}

.game-item {
padding: 15px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 50px;
border: 1px solid #000;
text-align: center;
border-radius: 20px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.game-image {
width: auto;
height: 100px;
margin-bottom: 10px;
}

.game-item:hover {
transform: scale(1.10);
transform: scale(1.04);
box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.2);
border: 40px;
}
32 changes: 22 additions & 10 deletions app/assets/stylesheets/spellingbee.css
Original file line number Diff line number Diff line change
@@ -167,34 +167,46 @@ td {

.hex {
width: 100px;
height: 100px;
height: 100px;
clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
background-color: var(--tertiary-clr);
display: flex;
justify-content: center;
align-items: center;
font-size: 1.5rem;
color: var(--font-clr);
position: relative;
transition: background-color 0.3s;
/* background-color: var(--primary-clr); */
z-index: 1;
}

.hex-center {
background-color: var(--primary-clr);
}
/* .hex::after {
content: "";
position: absolute;
top: -2px;
left: -2px;
width: calc(100% + 4px);
height: calc(100% + 4px);
clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
background-color: black;
z-index: 0;
} */

.hex-content {
position: absolute;
width: 100%;
height: 100%;
position: relative;
z-index: 2; /* Ensure text is visible */
display: flex;
justify-content: center;
align-items: center;
font-size: 1.5rem;
color: black;
}


.hex-center {
background-color: var(--primary-clr);
}

.hex:hover {
cursor: pointer;
background-color: var(--primary-clr);
}
}
4 changes: 1 addition & 3 deletions app/assets/stylesheets/users.css
Original file line number Diff line number Diff line change
@@ -2,12 +2,10 @@ table {
background-color: #7c818a;
color: white;
width: 90%;
margin: 0 auto;
margin: 10px auto;
height: 50%;
border-radius: 15px;
text-align: center;
margin-left: 0px;
margin-right: auto;
font-size: 20px;
padding: 10px;
border-collapse: collapse;
9 changes: 6 additions & 3 deletions app/views/games/_games.html.erb
Original file line number Diff line number Diff line change
@@ -2,11 +2,14 @@

<body>
<h2 style="text-align:center;">Games</h2>
<div class="game-list">
<div class="game-list">
<% @games.each do |game| %>
<div class="game-item">
<h3><%= game.name %></h3>
<%= button_to 'Play', game_path(game), method: :get, title: "Play" ,class: 'btn btn-login' %>
<img src="<%= game.image_url %>" alt="<%= game.name %> image" class="game-image">
<div>
<h3><%= game.name %></h3>
<%= button_to 'Play', game_path(game), method: :get, title: "Play", class: 'btn btn-login' %>
</div>
</div>
<% end %>
</div>
2 changes: 1 addition & 1 deletion app/views/shared/_all_pages_nav.html.erb
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@
<% else %>
<div class="dropdown">
<button id="myacc" title="My Account", class="btn btn-login"><i class="fas fa-user"></i></button>
<div class="dropdown-content">
<div class="dropdown-content-account">
<%= link_to dashboard_path do %><i class="fas fa-chart-bar"></i> Statistics<% end %>

<%= link_to user_path(@current_user) do %><i class="fas fa-user-circle"></i> Profile<% end %>
5 changes: 5 additions & 0 deletions db/migrate/20241112195746_add_image_url_to_games.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddImageUrlToGames < ActiveRecord::Migration[7.2]
def change
add_column :games, :image_url, :string
end
end
3 changes: 2 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## add initial games to the database
initial_games = [
{ name: 'Spelling Bee', game_path: 'bees_play_path' },
{ name: 'Wordle', game_path: 'wordles_play_path' },
{ name: 'Letter Boxed', game_path: 'boxes_play_path' },
{ name: '2048', game_path: 'game_2048_play_path' }
{ name: 'Spelling Bee', game_path: 'bees_play_path', image_url: 'https://www.pngkey.com/png/full/431-4311161_spelling-bee-spelling-bee-logo.png' },
{ name: 'Wordle', game_path: 'wordles_play_path', image_url: 'https://brandmentions.com/wiki/images/c/cd/Wordle_logo.png' },
{ name: 'Letter Boxed', game_path: 'boxes_play_path', image_url: 'https://calebrob.com/assets/images/letter_boxed.png' },
{ name: '2048', game_path: 'game_2048_play_path', image_url: 'https://is1-ssl.mzstatic.com/image/thumb/Purple221/v4/6a/d4/1c/6ad41c3a-eb36-329f-513e-08e3912681f8/AppIcon-0-0-1x_U007emarketing-0-4-85-220.png/512x512bb.jpg' }
]

initial_games.each do |game|
temp_game = Game.find_or_create_by(name: game[:name])

temp_game.update(game_path: game[:game_path])
temp_game.update(game_path: game[:game_path], image_url: game[:image_url])
end

Game.find_or_create_by(id: -1, name: 'Dummy Game', game_path: 'welcome')