Skip to content

Commit 16a464a

Browse files
committed
docs(register): Add register page
1 parent 4c145da commit 16a464a

File tree

9 files changed

+100
-24
lines changed

9 files changed

+100
-24
lines changed

frontend/src/app/public/howto/howto-get-started/howto-get-started.component.html

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@ <h3>Account</h3>
1414
You can choose to connect via <strong>email/username and password</strong>, or
1515
via one of the following identity providers supported
1616
</p>
17-
<ul class="identity-providers-list">
18-
<li>
19-
<i class="fab fa-github"></i> Github
20-
</li>
21-
<li>
22-
<i class="fab fa-google"></i> Google
23-
</li>
24-
<li>
25-
<i class="fab fa-gitlab"></i> Gitlab
26-
</li>
27-
<li>
28-
<i class="fab fa-stack-overflow"></i> StackOverflow
29-
</li>
30-
</ul>
17+
<div class="identity-providers-list">
18+
<ul>
19+
<li>
20+
<i class="fab fa-github"></i> Github
21+
</li>
22+
<li>
23+
<i class="fab fa-google"></i> Google
24+
</li>
25+
<li>
26+
<i class="fab fa-gitlab"></i> Gitlab
27+
</li>
28+
<li>
29+
<i class="fab fa-stack-overflow"></i> StackOverflow
30+
</li>
31+
</ul>
32+
</div>
3133

3234
<hr>
3335

frontend/src/app/public/howto/howto-get-started/howto-get-started.component.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,3 @@
66
text-align: center;
77
}
88
}
9-
10-
.identity-providers-list {
11-
margin-left: -2rem;
12-
display: flex;
13-
justify-content: space-between;
14-
list-style: none;
15-
}

frontend/src/app/public/public-routing.module.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { RouterModule, Routes } from '@angular/router';
22
import { NgModule } from '@angular/core';
33
import { BookmarksTaggedComponent } from './tag/bookmarks-tagged.component';
4-
import { AboutComponent } from './about/about.component';
54
import { HomepageComponent } from './bookmarks/homepage.component';
65
import { PrivacyPolicyComponent } from './privacy/privacy-policy.component';
76
import { TermsOfServiceComponent } from './terms/terms-of-service.component';
@@ -11,6 +10,8 @@ import { PublicSnippetDetailsComponent } from './snippets/public-snippet-details
1110
import { PublicSnippetsComponent } from './public-snippets/public-snippets.component';
1211
import { SnippetTaggedComponent } from './snippets/tag/snippet-tagged.component';
1312
import { ExtensionsPageComponent } from './extensions/extensions-page.component';
13+
import { AboutComponent } from './about/about.component';
14+
import { RegisterComponent } from './register/register.component';
1415

1516
const publicRoutes: Routes = [
1617
{
@@ -66,6 +67,10 @@ const publicRoutes: Routes = [
6667
path: 'about',
6768
component: AboutComponent
6869
},
70+
{
71+
path: 'register',
72+
component: RegisterComponent
73+
},
6974
{
7075
path: 'extensions',
7176
component: ExtensionsPageComponent

frontend/src/app/public/public.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { NgModule } from '@angular/core';
22
import { SharedModule } from '../shared/shared.module';
3-
import { AboutComponent } from './about/about.component';
43
import { BookmarksTaggedService } from './tag/bookmarks-tagged.service';
54
import { BookmarksTaggedComponent } from './tag/bookmarks-tagged.component';
65
import { PublicRoutingModule } from './public-routing.module';
@@ -23,10 +22,13 @@ import { SnippetTaggedComponent } from './snippets/tag/snippet-tagged.component'
2322
import { SnippetTagService } from './snippets/tag/snippet-tag.service';
2423
import { FeedbackService } from './feedback/feedback.service';
2524
import { ExtensionsPageComponent } from './extensions/extensions-page.component';
25+
import { AboutComponent } from './about/about.component';
26+
import { RegisterComponent } from './register/register.component';
2627

2728
@NgModule({
2829
declarations : [
2930
AboutComponent,
31+
RegisterComponent,
3032
ExtensionsPageComponent,
3133
PrivacyPolicyComponent,
3234
TermsOfServiceComponent,
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<div id="about-content" class="jumbotron">
2+
<h2>Register</h2>
3+
<p class="lead mb-2">Create an <strong>account</strong> on Codever to manage your dev bookmarks and code snippets.
4+
You can choose to register with your <strong>personal email</strong> or with one of the available identity
5+
providers:
6+
7+
<div class="identity-providers-list">
8+
<ul>
9+
<li>
10+
<i class="fab fa-github"></i> Github
11+
</li>
12+
<li>
13+
<i class="fab fa-google"></i> Google
14+
</li>
15+
<li>
16+
<i class="fab fa-gitlab"></i> Gitlab
17+
</li>
18+
<li>
19+
<i class="fab fa-stack-overflow"></i> StackOverflow
20+
</li>
21+
</ul>
22+
</div>
23+
24+
25+
<p class="mt-2 mb-3">
26+
Once registered you can use the available extensions to easily manage your bookmarks and code snippets:
27+
</p>
28+
29+
<app-extensions [showEntryParagraph]="false" [logoSize]="32"></app-extensions>
30+
31+
<button class="ml-2 mt-4 btn btn-primary btn-sm" (click)="login()">Create account <i class="fas fa-user-plus"></i></button>
32+
</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import { environment } from '../../../environments/environment';
3+
import { KeycloakService } from 'keycloak-angular';
4+
5+
@Component({
6+
selector: 'app-about',
7+
templateUrl: './register.component.html',
8+
styleUrls: ['./register.component.scss']
9+
})
10+
export class RegisterComponent implements OnInit {
11+
12+
environment = environment;
13+
14+
constructor(private keycloakService: KeycloakService) {
15+
}
16+
17+
ngOnInit() {
18+
}
19+
20+
login() {
21+
const options: Keycloak.KeycloakLoginOptions = {};
22+
options.redirectUri = `${environment.APP_HOME_URL}`;
23+
this.keycloakService.login(options);
24+
}
25+
26+
}

frontend/src/app/shared/navigation/navigation.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
class="dropdown-item"
4949
href="https://dev.to/ama/how-i-manage-my-dev-bookmarks-and-save-time-and-nerves-56ae"
5050
target="_blank">
51+
<i class="fas fa-smile-beam fa-sm"></i>
5152
Saves time and nerves
5253
<sup class="external-link-hint">
5354
<i class="fas fa-external-link-alt" style="font-size: smaller"></i>

frontend/src/styles.scss

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,24 @@ ul.tags li:not(:last-child):after {
102102
justify-content: space-between;
103103
}
104104

105+
.identity-providers-list {
106+
display: flex;
107+
ul {
108+
margin-left: auto;
109+
margin-right: auto;
110+
display: flex;
111+
list-style: none;
112+
li {
113+
margin-right: 2rem;
114+
}
115+
}
116+
}
117+
105118
// filter search-box
106119
/* Bootstrap 4 text input with search icon */
107-
.has-search {
120+
.has-search {
108121
width: 30%;
122+
109123
.form-control {
110124
padding-left: 2.375rem;
111125
}

0 commit comments

Comments
 (0)