Fakultas Ilmu Komputer UI

Commit 251038de authored by Dhita Putri Pratama's avatar Dhita Putri Pratama
Browse files

Merge branch 'warmfix-profile-page' into 'staging'

[REFACTOR] Fix profile page to be more responsive

See merge request !121
parents d4a08bb0 96f36ea1
Pipeline #49910 passed with stages
in 3 minutes and 31 seconds
@media (min-width: 320px) {
.responsive {
width: 40px;
margin-top: -0.5rem;
}
#id-card {
width: 10rem;
margin-top: 0.5rem;
}
.blood-type {
font-size: 20px;
font-weight: 1000;
color: var(--red);
vertical-align: top;
margin-top: -0.5rem;
margin-right: -1rem;
}
.card-text {
font-size: 12px;
line-height: 0.1;
color: var(--blue);
}
.user-info {
margin-top: -1rem;
margin-bottom: 1rem;
margin-left: 0.25rem;
padding-top: 1rem;
}
.agenda-text {
font-size: 8px;
vertical-align: top;
line-height: 0.3;
color: #376c8b;
}
.card-title-text {
text-align: center;
font-size: 12px;
font-weight: bolder;
color: #a91320;
margin-bottom: 20px;
}
}
@media (min-width: 360px) {
#blood-section {
margin-top: 10px;
}
#id-card {
margin-top: 1rem;
margin-left: 1rem;
}
.responsive {
width: 50px;
}
.blood-type {
font-size: 20px;
}
.card-text {
font-size: 14px;
line-height: 0.2;
}
.user-info {
margin-top: 1rem;
margin-left: 0.5rem;
}
#card {
height: 12rem;
}
.agenda-text {
font-size: 10px;
vertical-align: top;
line-height: 0.3;
color: #376c8b;
}
.card-title-text {
text-align: center;
font-size: 12px;
font-weight: bolder;
color: #a91320;
margin-bottom: 10px;
}
#profile-container {
margin-left: -15px;
margin-right: -15px;
margin-top: 50px;
margin-bottom: 50px;
padding: 2rem;
background-color: var(--cream);
}
@media (min-width: 576px) {
.responsive {
width: 60px;
}
.blood-type {
font-size: 20px;
margin-right: -2rem;
}
.card-text {
font-size: 14px;
vertical-align: top;
}
#id-card {
margin-left: 1.25rem;
}
.agenda-text {
font-size: 10px;
vertical-align: top;
color: #376c8b;
}
.card-title-text {
text-align: center;
font-size: 16px;
font-weight: bolder;
color: #a91320;
}
}
@media (min-width: 768px) {
.responsive {
width: 50px;
}
.blood-type {
font-size: 20px;
margin-right: -1rem;
}
.card-text {
font-size: 14px;
vertical-align: top;
}
.card-deck {
margin-left: 3rem;
}
.user-info {
margin-top: 1rem;
}
#id-card {
margin-left: 1rem;
}
.agenda-text {
font-size: 10px;
vertical-align: top;
color: #376c8b;
}
.card-title-text {
text-align: center;
font-size: 14px;
font-weight: bolder;
color: #a91320;
}
.card-title {
font-weight: bold;
text-align: center;
margin-top: 1rem;
}
@media (min-width: 992px) {
.responsive {
width: 50px;
margin-left: 1rem;
}
.card-text {
font-size: 14px;
vertical-align: top;
line-height: 0.8;
}
.blood-type {
font-size: 40px;
vertical-align: bottom;
margin-left: 1rem;
}
.card-deck {
margin-left: -1.75%;
margin-right: 2%;
}
.user-info {
margin-top: 2rem;
}
.left_card {
width: 18rem;
margin-right: -5%;
}
.right_card {
width: 18rem;
margin-left: 8%;
margin-right: -8%;
}
.agenda-text {
font-size: 10px;
vertical-align: top;
line-height: 0.8;
color: #376c8b;
}
.card-title-text {
text-align: center;
font-size: 16px;
font-weight: bolder;
color: #a91320;
}
.kartu-card,
.agenda-card,
.riwayat-acara-card,
.riwayat-donor-card {
min-height: 300px;
}
@media (min-width: 1200px) {
.responsive {
width: 80px;
margin-left: 1rem;
}
.blood-type {
font-size: 40px;
vertical-align: bottom;
margin-left: 2rem;
}
#logo-id {
margin-left: 0.5rem;
}
.card-text {
font-size: 20px;
vertical-align: top;
line-height: 1;
}
.card-deck {
margin-left: 2%;
margin-right: 2%;
}
.user-info {
margin-top: 2rem;
margin-left: 2rem;
}
#card {
height: 17rem;
}
.left_card {
width: 35rem;
margin-left: 3%;
margin-right: 8%;
}
.right_card {
width: 35rem;
margin-left: 4%;
}
#id-card {
margin-top: 1rem;
margin-left: 1rem;
}
.kartu-table td,
.kartu-table th,
.agenda-table td,
.agenda-table th {
text-align: start !important;
vertical-align: top !important;
}
.kartu-table tbody,
.kartu-table thead th,
.agenda-table tbody,
.agenda-table thead th {
font-weight: normal;
color: var(--blue);
}
@media (min-width: 900px) and (max-width: 1440px) {
.responsive {
width: 70px;
}
.left_card {
width: 28.25rem;
margin-left: 7rem;
}
.right_card {
width: 28.25rem;
margin-left: 3rem;
}
.card-text {
font-size: 16px;
vertical-align: top;
}
#logo-id {
margin-left: -0.5rem;
}
#id-card {
margin-left: 2rem;
}
.blood-type {
font-size: 30px;
margin-top: -0.5rem;
margin-right: -1rem;
}
.user-info {
margin-left: 1rem;
}
#card {
height: 15rem;
}
.agenda-text {
font-size: 14px;
vertical-align: top;
color: #376c8b;
}
.card-title-text {
text-align: center;
font-size: 20px;
font-weight: bolder;
color: #a91320;
}
.kartu-logo {
width: auto;
height: auto;
max-height: 60px;
max-width: 60px;
}
@media (min-width: 800px) and (max-width: 1280px) {
.responsive {
width: 70px;
}
.left_card {
width: 28rem;
margin-left: 3rem;
}
.right_card {
width: 28rem;
margin-left: 3rem;
}
.card-text {
font-size: 16px;
vertical-align: top;
}
#logo-id {
margin-left: -0.5rem;
}
#id-card {
margin-left: 1.5rem;
}
.blood-type {
font-size: 30px;
margin-top: -0.5rem;
margin-right: -1rem;
}
.user-info {
margin-left: 1rem;
}
#card {
height: 15rem;
}
.agenda-text {
font-size: 14px;
vertical-align: top;
color: #376c8b;
}
.card-title-text {
text-align: center;
font-size: 20px;
font-weight: bolder;
color: #a91320;
}
.kartu-text-pmi {
text-align: start;
}
#profile-container {
padding: 1rem;
margin-left: -15px;
margin-right: -15px;
background-color: #fff3df;
border-left: 2px solid #fff;
border-right: 2px solid #fff;
.kartu-id {
word-break: break-all;
}
.profile-card {
height: 18rem;
.agenda-tr-content {
max-width: 150px;
}
.table-riwayat-donor {
text-align: center;
font-size: 0.95rem;
}
.table-riwayat-donor thead tr th {
border-bottom: none;
}
.table-riwayat-donor thead tr {
background-color: var(--dark-cream);
.riwayat-table thead {
color: var(--red);
background-color: var(--dark-cream);
border-color: var(--dark-cream);
}
.table-riwayat-donor tbody {
.riwayat-table thead th {
border-bottom: 2px solid var(--dark-cream);
text-align: center !important;
}
.riwayat-table tbody {
color: var(--blue);
}
.table-riwayat-donor tbody tr:nth-of-type(odd) {
.riwayat-table tbody tr:nth-of-type(odd) {
background-color: var(--white);
}
.table-riwayat-donor tbody tr:nth-of-type(even) {
.riwayat-table tbody tr:nth-of-type(even) {
background-color: var(--cream);
}
.table-riwayat-donor td {
padding: 0.25rem;
.riwayat-acara-th-alamat,
.riwayat-acara-td-alamat {
max-width: 250px;
}
.riwayat-acara-th-waktu,
.riwayat-acara-td-waktu {
max-width: 150px;
}
.table-riwayat-donor th {
padding: 0.25rem;
.riwayat-acara-th-status,
.riwayat-acara-td-status {
max-width: 100px;
}
.riwayat-donor-th-lokasi,
.riwayat-donor-td-lokasi {
max-width: 300px;
}
.page-link {
......@@ -384,3 +109,52 @@
.page-item.disabled .page-link {
border-color: var(--dark-red);
}
@media (max-width: 768px) {
.kartu-logo {
max-height: 37px;
max-width: 37px;
}
.kartu-goldar {
font-size: 2rem;
}
.kartu-text-pmi {
font-size: 14px !important;
}
}
@media (max-width: 573px) {
.kartu-card {
margin-right: 0px !important;
}
.agenda-card {
margin-left: 0px !important;
}
.riwayat-acara-card {
margin-right: 0px !important;
}
.riwayat-donor-card {
margin-left: 0px !important;
}
.kartu-text-pmi {
font-size: 15px !important;
}
.kartu-col-md-2 {
width: 20%;
}
.kartu-col-md-8 {
width: 60%;
}
}
@media (max-width: 400px) {
.kartu-text-pmi {
font-size: 12px !important;
}
}
@media (max-width: 325px) {
.kartu-text-pmi {
font-size: 10px !important;
}
}
This diff is collapsed.
......@@ -85,12 +85,12 @@ describe("Agenda Donor", () => {
})
renderAuthenticated(<ProfilePage />)
await screen.findByText(/Beji/i)
expect(screen.getByText(/Beji/i)).toBeInTheDocument()
expect(screen.getByText(/Lokasi\s*:\s*D'Mall/i)).toBeInTheDocument()
expect(screen.getByText(/Kecamatan\s*:\s*Beji/i)).toBeInTheDocument()
expect(screen.getByText(/Tanggal\s*:\s*2 Maret 2020/i)).toBeInTheDocument()
expect(screen.getByText(/Kuota\s*:\s*150/i)).toBeInTheDocument()
expect(screen.getByText(/Kategori\s*:\s*Umum/i)).toBeInTheDocument()
expect(screen.getByText(/: Beji/i)).toBeInTheDocument()
expect(screen.getByText(/: D'Mall/i)).toBeInTheDocument()
expect(screen.getByText(/: Beji/i)).toBeInTheDocument()
expect(screen.getByText(/: 2 Maret 2020/i)).toBeInTheDocument()
expect(screen.getByText(/: 150/i)).toBeInTheDocument()
expect(screen.getByText(/: Umum/i)).toBeInTheDocument()
await waitFor(() =>
expect(screen.queryByText("Loading...")).not.toBeInTheDocument()
)
......@@ -105,9 +105,7 @@ describe("Agenda Donor", () => {
renderAuthenticated(<ProfilePage />)
expect(await screen.findByText(/Coba lagi/i)).toBeInTheDocument()
fireEvent.click(screen.getByText(/Coba lagi/i))
expect(
await screen.findByText(/Kategori\s*:\s*Tertutup/i)
).toBeInTheDocument()
expect(await screen.findByText(/: Tertutup/i)).toBeInTheDocument()
await waitFor(() =>
expect(screen.queryByText("Loading...")).not.toBeInTheDocument()
)
......@@ -281,7 +279,7 @@ describe("Riwayat Acara Donor", () => {
})
renderAuthenticated(<ProfilePage />)
expect(
await screen.findByText(/Belum ada riwayat acara donor/i)
await screen.findByText(/Belum ada riwayat pengajuan acara donor darah./i)
).toBeInTheDocument()
await waitFor(() =>
expect(screen.queryByText("Loading...")).not.toBeInTheDocument()
......
Supports Markdown
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