Skip to content

Commit

Permalink
Update structure and image sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
dudushy committed Oct 8, 2024
1 parent 856112c commit d73fc6b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 56 deletions.
94 changes: 45 additions & 49 deletions src/app/demo/demo.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="container">
<div class="container-fluid col-md-10 col-lg-8">
<ul class="nav nav-pills nav-fill">
<li class="nav-item" role="presentation">
<button
Expand Down Expand Up @@ -36,11 +36,11 @@
</li>
</ul>

<div class="tab-content p-4 mt-3 border rounded">
<div class="row p-4 mt-3 border rounded">
@if (activeTab == "generate") {
<div class="tab-pane fade active show">
<div class="row">
<div class="form-group">
<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrType">QR Type</label>
</div>
Expand All @@ -61,7 +61,7 @@

@switch (qrCodeType) {
@case ("wifi") {
<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_ssid">SSID</label>
</div>
Expand All @@ -76,7 +76,7 @@
</div>
</div>

<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_type">Type</label>
</div>
Expand All @@ -91,7 +91,7 @@
</div>
</div>

<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_password"
>Password</label
Expand Down Expand Up @@ -123,42 +123,38 @@
}

@case ("sms") {
<div class="row">
<div class="col mx-auto"></div>

<div class="col"></div>
</div>

<div class="row">
<div class="col mx-auto"></div>
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_number"
>Number</label
>
</div>

<div class="col"></div>
<div class="col">
<input
class="form-control mb-3"
type="text"
id="qrInput_number"
#qrInput_number
/>
</div>
</div>

<div class="col">
<label class="form-label mb-3" for="qrInput_number"
>Number</label
>

<input
class="form-control mb-3"
type="text"
id="qrInput_number"
#qrInput_number
/>
</div>
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_message"
>Message</label
>
</div>

<div class="col">
<label class="form-label mb-3" for="qrInput_message"
>Message</label
>

<input
class="form-control mb-3"
type="text"
id="qrInput_message"
#qrInput_message
/>
<div class="col">
<input
class="form-control mb-3"
type="text"
id="qrInput_message"
#qrInput_message
/>
</div>
</div>

<button
Expand All @@ -175,7 +171,7 @@
}

@case ("geo") {
<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_latitude"
>Latitude</label
Expand All @@ -192,7 +188,7 @@
</div>
</div>

<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_longitude"
>Longitude</label
Expand Down Expand Up @@ -223,7 +219,7 @@
}

@case ("contact") {
<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_name">Name</label>
</div>
Expand All @@ -238,7 +234,7 @@
</div>
</div>

<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_organization"
>Organization</label
Expand All @@ -255,7 +251,7 @@
</div>
</div>

<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_phone"
>Phone</label
Expand All @@ -272,7 +268,7 @@
</div>
</div>

<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput_email"
>Email</label
Expand Down Expand Up @@ -305,7 +301,7 @@
}

@default {
<div class="row">
<div class="row d-flex flex-column flex-sm-row">
<div class="col mx-auto">
<label class="form-label mb-3" for="qrInput">Data</label>
</div>
Expand All @@ -331,7 +327,7 @@
</div>

@if (qrCodeImage) {
<div class="mt-4 text-center">
<div class="mt-4 mb-2 text-center">
<img
[src]="qrCodeImage"
class="img-fluid mt-3 rounded mx-auto d-block img-thumbnail qrCodeImage"
Expand All @@ -342,7 +338,7 @@
}

@if (activeTab == "upload") {
<div class="tab-pane fade active show">
<div class="row">
<div class="form-group mb-3">
<label for="qrFileInput">Upload a QR Code Image</label>
<input
Expand All @@ -362,7 +358,7 @@
}

@if (activeTab == "scan") {
<div class="tab-pane fade active show">
<div class="row">
<h5>Scan QR Code Using Camera</h5>
<zxing-scanner (scanSuccess)="onCodeResult($event)"></zxing-scanner>

Expand Down
14 changes: 7 additions & 7 deletions src/app/demo/demo.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
}

.qrCodeImage {
--imageSize: 10rem;
--imageSize: 100%;

@include fixedSquare(var(--imageSize));

@include breakpoint(sm) {
--imageSize: 15rem;
--imageSize: 25rem;
}

@include breakpoint(md) {
--imageSize: 20rem;
--imageSize: 27.5rem;
}

@include breakpoint(lg) {
--imageSize: 25rem;
--imageSize: 32.5rem;
}

@include breakpoint(xl) {
--imageSize: 30rem;
}
// @include breakpoint(xl) {
// --imageSize: 35rem;
// }

@include breakpoint(xxl) {
--imageSize: 35rem;
Expand Down

0 comments on commit d73fc6b

Please sign in to comment.