Updated styling
This commit is contained in:
1 parent
ed77824bbb
commit
bebcd88e98
3 files changed
+89
-66
No files matched your search
Generated
+15
-15
@@ -2920,9 +2920,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@npmcli/package-json/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3824,9 +3824,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tufjs/models/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -4510,9 +4510,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -4607,9 +4607,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cacache/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -6331,9 +6331,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ignore-walk/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
@@ -9,7 +9,12 @@
|
||||
border-radius: 35px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
max-height: 90vh;
|
||||
overflow: scroll;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.container-content {
|
||||
flex: 0 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.container-wrapper {
|
||||
@@ -82,11 +87,21 @@ button:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.url-list-wrapper {
|
||||
flex: 1 1 auto;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.url-list-items {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.url-list-items li {
|
||||
background-color: #fff;
|
||||
padding: 10px 15px;
|
||||
|
||||
@@ -1,59 +1,62 @@
|
||||
<div class="container-wrapper">
|
||||
<div class="container">
|
||||
<h1>URL Shortener</h1>
|
||||
<div class="container-content">
|
||||
<h1>URL Shortener</h1>
|
||||
|
||||
<!-- URL Creation Form -->
|
||||
<div class="form-section">
|
||||
<form (ngSubmit)="createShortURL(shortURLForm)" #shortURLForm="ngForm">
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="url"
|
||||
id="og_url"
|
||||
name="og_url"
|
||||
ngModel
|
||||
class="form-control"
|
||||
placeholder="Original URL"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<!-- URL Creation Form -->
|
||||
<div class="form-section">
|
||||
<form (ngSubmit)="createShortURL(shortURLForm)" #shortURLForm="ngForm">
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="url"
|
||||
id="og_url"
|
||||
name="og_url"
|
||||
ngModel
|
||||
class="form-control"
|
||||
placeholder="Original URL"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="text"
|
||||
id="short_name"
|
||||
name="short_name"
|
||||
ngModel
|
||||
class="form-control"
|
||||
placeholder="Short URL Name (Optional)"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="text"
|
||||
id="short_name"
|
||||
name="short_name"
|
||||
ngModel
|
||||
class="form-control"
|
||||
placeholder="Short URL Name (Optional)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Shorten URL</button>
|
||||
</form>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Shorten URL</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Delete URL Section -->
|
||||
<div class="form-section">
|
||||
<h3>Delete Short URL</h3>
|
||||
<form (ngSubmit)="deleteShortURL(deleteURLForm)" #deleteURLForm="ngForm">
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="number"
|
||||
id="deleteId"
|
||||
name="deleteId"
|
||||
ngModel
|
||||
class="form-control"
|
||||
placeholder="ID"
|
||||
required
|
||||
/>
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- Delete URL Section -->
|
||||
<div class="form-section">
|
||||
<h3>Delete Short URL</h3>
|
||||
<form (ngSubmit)="deleteShortURL(deleteURLForm)" #deleteURLForm="ngForm">
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="number"
|
||||
id="deleteId"
|
||||
name="deleteId"
|
||||
ngModel
|
||||
class="form-control"
|
||||
placeholder="ID"
|
||||
required
|
||||
/>
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- List of Short URLs -->
|
||||
<div class="url-list">
|
||||
<h3>Existing Short URLs</h3>
|
||||
</div>
|
||||
|
||||
<!-- Scrollable URL list -->
|
||||
<div class="url-list-wrapper">
|
||||
<div *ngIf="noURLs; else urlList">
|
||||
<p>No short URLs available.</p>
|
||||
</div>
|
||||
@@ -61,11 +64,16 @@
|
||||
<ng-template #urlList>
|
||||
<ul class="url-list-items">
|
||||
<li *ngFor="let url of urls">
|
||||
<strong>ID {{url.id}}</strong> // <strong>URL: </strong> <a [href]="'https://itz.sh/' + url.short_url" target="_blank">{{ 'https://itz.sh/' + url.short_url }}</a><br>
|
||||
<strong>Original: </strong> <a [href]="url.og_url" target="_blank">{{ (url.og_url | slice:0:45) + (url.og_url.length > 40 ? '...' : '')}}</a><br>
|
||||
<strong>ID {{url.id}}</strong> // <strong>URL: </strong>
|
||||
<a [href]="'https://itz.sh/' + url.short_url" target="_blank">{{ 'https://itz.sh/' + url.short_url }}</a><br>
|
||||
<strong>Original: </strong>
|
||||
<a [href]="url.og_url" target="_blank">
|
||||
{{ (url.og_url | slice:0:45) + (url.og_url.length > 40 ? '...' : '')}}
|
||||
</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user