diff --git a/app/frontend/src/app/app.module.ts b/app/frontend/src/app/app.module.ts
index 4b331718..4cacab69 100644
--- a/app/frontend/src/app/app.module.ts
+++ b/app/frontend/src/app/app.module.ts
@@ -21,6 +21,7 @@ import { HomeComponent } from './home/home.component';
import { TagsBarComponent } from './tags-bar/tags-bar.component';
import { LeaderboardBarComponent } from './leaderboard-bar/leaderboard-bar.component';
import { PollRequestComponent } from './poll-request/poll-request.component';
+import { PollComponent } from './poll/poll.component';
@NgModule({
declarations: [
@@ -37,7 +38,8 @@ import { PollRequestComponent } from './poll-request/poll-request.component';
HomeComponent,
TagsBarComponent,
LeaderboardBarComponent,
- PollRequestComponent
+ PollRequestComponent,
+ PollComponent
],
imports: [
BrowserModule,
diff --git a/app/frontend/src/app/home/home.component.css b/app/frontend/src/app/home/home.component.css
index cda2e5f1..d7c0b0ef 100644
--- a/app/frontend/src/app/home/home.component.css
+++ b/app/frontend/src/app/home/home.component.css
@@ -22,20 +22,7 @@
text-align: center;
flex: 1;
}
-.poll {
- display: flex;
- flex-direction: column;
- background-color: #9DC0C4;
- border: 1px solid #1b1818;
- border-radius: 15px;
- width: 80%;
- padding: 10%;
- height: 120px;
- margin-top: 15px;
- margin-bottom: 15px;
- align-items: center;
- justify-content: center;
-}
+
.button {
display: block;
diff --git a/app/frontend/src/app/home/home.component.html b/app/frontend/src/app/home/home.component.html
index 1fac8c16..6dabd875 100644
--- a/app/frontend/src/app/home/home.component.html
+++ b/app/frontend/src/app/home/home.component.html
@@ -18,10 +18,12 @@
Following
Trending
-
-
-
diff --git a/app/frontend/src/app/poll/poll.component.css b/app/frontend/src/app/poll/poll.component.css
new file mode 100644
index 00000000..8c438469
--- /dev/null
+++ b/app/frontend/src/app/poll/poll.component.css
@@ -0,0 +1,28 @@
+body {background-color: #9DC0C4; height: 70%;}
+.container {
+ background-color: #63989f;
+ border-radius: 15px;
+ padding: 20px;
+ margin-top: 15px;
+ margin-bottom: 15px;
+ align-items: center;
+ justify-content: center;
+}
+.image {
+ max-width: 100%;
+ height: 100%;
+}
+
+.button {
+ display: block;
+ width: 100%;
+ padding: 10px;
+ margin-bottom: 10px;
+ background-color: #9DC0C4;
+ text-align: center;
+ cursor: pointer;
+ border-radius: 15px;
+ border: 1px solid #1b1818;
+}
+
+
diff --git a/app/frontend/src/app/poll/poll.component.html b/app/frontend/src/app/poll/poll.component.html
new file mode 100644
index 00000000..dd80af6d
--- /dev/null
+++ b/app/frontend/src/app/poll/poll.component.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
Who will be the next James Bond?
+
+
+
+
+
+
+
1567 Votes
+
+
+
+
+
+
+
+
+
52 Comments
+
3d
+
+
+
+
+
diff --git a/app/frontend/src/app/poll/poll.component.spec.ts b/app/frontend/src/app/poll/poll.component.spec.ts
new file mode 100644
index 00000000..165ef55e
--- /dev/null
+++ b/app/frontend/src/app/poll/poll.component.spec.ts
@@ -0,0 +1,21 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PollComponent } from './poll.component';
+
+describe('PollComponent', () => {
+ let component: PollComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ declarations: [PollComponent]
+ });
+ fixture = TestBed.createComponent(PollComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/app/frontend/src/app/poll/poll.component.ts b/app/frontend/src/app/poll/poll.component.ts
new file mode 100644
index 00000000..d09a7c0b
--- /dev/null
+++ b/app/frontend/src/app/poll/poll.component.ts
@@ -0,0 +1,42 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-poll',
+ templateUrl: './poll.component.html',
+ styleUrls: ['./poll.component.css']
+})
+export class PollComponent {
+ selectedButton: HTMLButtonElement | null = null;
+
+ ngOnInit() {
+ // Retrieve the selected button's state from localStorage on component initialization
+ const selectedButtonId = localStorage.getItem('selectedButtonId');
+ if (selectedButtonId) {
+ this.selectedButton = document.getElementById(selectedButtonId) as HTMLButtonElement;
+ if (this.selectedButton) {
+ this.selectedButton.classList.add('clicked');
+ }
+ }
+ }
+
+ toggleButton(button: HTMLButtonElement) {
+ if (this.selectedButton === button) {
+ // If the same button is clicked again, unselect it
+ this.selectedButton.classList.remove('clicked');
+ this.selectedButton = null;
+ localStorage.removeItem('selectedButtonId');
+ } else {
+ // Unselect the previously selected button (if any)
+ if (this.selectedButton) {
+ this.selectedButton.classList.remove('clicked');
+ }
+
+ // Select the clicked button
+ button.classList.add('clicked');
+ this.selectedButton = button;
+
+ // Save the selected button's state in localStorage
+ localStorage.setItem('selectedButtonId', button.id);
+ }
+ }
+}
diff --git a/app/frontend/src/app/user-profile/user-profile.component.css b/app/frontend/src/app/user-profile/user-profile.component.css
index 447b825b..888f0964 100644
--- a/app/frontend/src/app/user-profile/user-profile.component.css
+++ b/app/frontend/src/app/user-profile/user-profile.component.css
@@ -26,8 +26,7 @@
.poll {
display: flex;
flex-direction: column;
- background-color: #9DC0C4;
- border: 1px solid #1b1818;
+ background-color: #7fb7be;
border-radius: 15px;
width: 80%;
padding: 10%;
diff --git a/app/frontend/src/app/user-profile/user-profile.component.html b/app/frontend/src/app/user-profile/user-profile.component.html
index 2b27fdc7..e3b89e78 100644
--- a/app/frontend/src/app/user-profile/user-profile.component.html
+++ b/app/frontend/src/app/user-profile/user-profile.component.html
@@ -23,8 +23,9 @@
Liked
Voted
-
-
+