Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit e1fb630

Browse files
committed
feat(links-text): add show text also in broken links
1 parent cd8fcbb commit e1fb630

File tree

7 files changed

+158
-123
lines changed

7 files changed

+158
-123
lines changed

rottoscraper/gui/static/app.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ app.controller('RottoController',function($scope,$location,$http){
4747
};
4848

4949
$scope.cancelRequest = function(){
50-
console.log('cancel');
51-
$location.url('/');
50+
$location.url('/cancel', '/');
5251
};
5352

5453
$scope.submitRequest = function(){

rottoscraper/gui/static/css/style.css

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ body {
1111
width: 100%;
1212
height: 100%;
1313
background: #555 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB9JREFUeNpi/P//PwM6YGLAAuCCmpqacC2MRGsHCDAA+fIHfeQbO8kAAAAASUVORK5CYII=);
14-
font: 30px 'Lucida sans', Arial, Helvetica;
14+
font-family: 'Raleway', sans-serif;
15+
font-size: 30px;
1516
color: #eee;
1617
background-color: #5A5A5A;
1718
}
1819

19-
a {
20+
a , a:visited{
2021
color: #ffffff;
2122
text-decoration: none;
2223
}
2324

24-
a:visited , a:hover{
25+
a:hover{
2526
color: #C0C0C0;
2627
text-decoration: none;
2728
}
@@ -90,6 +91,10 @@ footer small{
9091
overflow: hidden;
9192
}
9293

94+
.main-page{
95+
margin: 80px auto;
96+
}
97+
9398
.wrapper{
9499
width: 100%;
95100
height: 100%;
@@ -127,7 +132,6 @@ footer small{
127132
margin: 0;
128133
height: 100%;
129134
width: 100%;
130-
padding: 3px;
131135
}
132136

133137

@@ -139,34 +143,33 @@ footer small{
139143
display: none;
140144
}
141145

142-
.user-form-data{
143-
padding: 30px 20px;
144-
}
145-
146146
.user-form-data-head{
147-
147+
text-align: center;
148+
font-size: 20px;
149+
color: #ffffff;
150+
padding: 10px;
148151
}
149-
.user-form-data-head table{
152+
.user-form-data-content table{
150153
width: 100%;
151154
}
152155

153-
.user-form-data-head table tr{
154-
height: 40px;
156+
.user-form-data-content table tr{
157+
height: 40px;
155158
}
156159

157-
.user-form-data-head table tr td{
160+
.user-form-data-content table tr td{
158161
text-align: left;
159162
color: #ffffff;
160163
font-size: 0.7em;
161164
}
162165

163-
.user-form-data-head table tr td:first-child{
166+
.user-form-data-content table tr td:first-child{
164167
text-align: right;
165168
padding: 0px 15px;
166169
}
167170

168171
.button-box{
169-
margin: 20px 0px;
172+
margin: 50px 0px;
170173
}
171174

172175
.fancy-button{
@@ -380,9 +383,13 @@ height: 40px;
380383

381384

382385
/* result.html css */
383-
384-
.result-box{
386+
.result-page{
385387
width: 100%;
388+
margin: 10px auto;
389+
}
390+
391+
.simple-font{
392+
font-family: sans-serif;
386393
}
387394
.result{
388395
font-size: 0.5em;
@@ -401,10 +408,12 @@ height: 40px;
401408
.result-head tr td:first-child{
402409
text-align: right;
403410
font-size: 0.8em;
411+
width: 30%;
404412
}
405-
.result-head td{
413+
.result-head tr td:last-child{
406414
text-align: left;
407-
padding: 0px 10px;
415+
padding: 0px 10px;
416+
width: 70%;
408417
}
409418

410419
.focus{
@@ -440,6 +449,9 @@ background-color: rgba(61, 59, 59, 0.55);
440449
padding: 8px 0px;
441450
}
442451

452+
.link-text{
453+
color: #13db8e;
454+
}
443455
.keyword{
444456
float:left;
445457
margin: 2px;
Lines changed: 71 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,77 @@
1-
<div class="user-form" ng-show="formFilling">
2-
<div class="steps-nav">
3-
<ul>
4-
<li class="cursor" ng-class="{true:'nav-selected'}[currentStepId==1]" ng-click="showStep(1)">
5-
<p>Step 1</p>
6-
</li>
7-
<li class="cursor" ng-class="{true:'nav-selected'}[currentStepId==2]" ng-click="showStep(2)">
8-
<p>Step 2</p>
9-
</li>
10-
<li class="cursor" ng-class="{true:'nav-selected'}[currentStepId==3]" ng-click="showStep(3)">
11-
<p>Step 3</p>
12-
</li>
13-
</ul>
14-
</div>
1+
<div class="main-page">
2+
<div class="user-form" ng-show="formFilling">
3+
<div class="steps-nav">
4+
<ul>
5+
<li class="cursor" ng-class="{true:'nav-selected'}[currentStepId==1]" ng-click="showStep(1)">
6+
<p>Step 1</p>
7+
</li>
8+
<li class="cursor" ng-class="{true:'nav-selected'}[currentStepId==2]" ng-click="showStep(2)">
9+
<p>Step 2</p>
10+
</li>
11+
<li class="cursor" ng-class="{true:'nav-selected'}[currentStepId==3]" ng-click="showStep(3)">
12+
<p>Step 3</p>
13+
</li>
14+
</ul>
15+
</div>
1516

16-
<div class="steps-form" >
17-
<form name="crawlForm" method="POST">
18-
<div class="fancy-box form-wrapper step" ng-class="{true:'step-selected',false:'step-unselected'}[currentStepId==1]">
19-
<label for="url">URL</label>
20-
<input type="url" ng-model="url" name="url" class="form-control" placeholder="http:// or https://" required>
21-
<button class="btn btn-default" ng-click="showStep(2)" >Next</button>
22-
</div>
23-
<div class="fancy-box form-wrapper step" ng-class="{true:'step-selected',false:'step-unselected'}[currentStepId==2]">
24-
<label for="keywords">Keywords</label>
25-
<tags-input ng-model="keywords"></tags-input>
26-
<button class="btn btn-default" ng-click="showStep(3)" >Next</button>
27-
</div>
28-
<div class="fancy-box form-wrapper step" ng-class="{true:'step-selected',false:'step-unselected'}[currentStepId==3]">
29-
<label for="email">Email-Id</label>
30-
<input type="email" ng-model="email" name="email" class="form-control" placeholder="Enter a email address" required>
31-
<button type="submit" class="btn btn-default" ng-click="confirmFormDetails(crawlForm.$valid)">Submit</button>
32-
</div>
33-
</form>
17+
<div class="steps-form" >
18+
<form name="crawlForm" method="POST">
19+
<div class="fancy-box form-wrapper step" ng-class="{true:'step-selected',false:'step-unselected'}[currentStepId==1]">
20+
<label for="url">URL</label>
21+
<input type="url" ng-model="url" name="url" class="form-control" placeholder="http:// or https://" required>
22+
<button class="btn btn-default" ng-click="showStep(2)" >Next</button>
23+
</div>
24+
<div class="fancy-box form-wrapper step" ng-class="{true:'step-selected',false:'step-unselected'}[currentStepId==2]">
25+
<label for="keywords">Keywords</label>
26+
<tags-input ng-model="keywords"></tags-input>
27+
<button class="btn btn-default" ng-click="showStep(3)" >Next</button>
28+
</div>
29+
<div class="fancy-box form-wrapper step" ng-class="{true:'step-selected',false:'step-unselected'}[currentStepId==3]">
30+
<label for="email">Email-Id</label>
31+
<input type="email" ng-model="email" name="email" class="form-control" placeholder="Enter a email address" required>
32+
<button type="submit" class="btn btn-default" ng-click="confirmFormDetails(crawlForm.$valid)">Submit</button>
33+
</div>
34+
</form>
35+
</div>
3436
</div>
35-
</div>
36-
<div class="user-form-data" ng-show="confirmDetails">
37-
<div class="user-form-data-head fancy-box">
38-
<table>
39-
<tr>
40-
<td><span class="focus">Url:</span></td>
41-
<td>{{userDetails.url}}</td>
42-
</tr>
43-
<tr>
44-
<td><span class="focus">Keywords:</span></td>
45-
<td>
46-
<div class="keyword" ng-if="userDetails.keywords.length!=0" ng-repeat="keyword in userDetails.keywords">
47-
<span class="glyphicon glyphicon-tag"></span>
48-
<span>{{keyword}}</span>
49-
</div>
50-
<div ng-if="userDetails.keywords.length==0">
51-
No Keyword
52-
</div>
53-
</td>
54-
</tr>
55-
<tr>
56-
<td><span class="focus">Email-Id:</span></td>
57-
<td>{{userDetails.email_id}}</td>
58-
</tr>
59-
</table>
37+
<div class="user-form-data" ng-show="confirmDetails">
38+
<div class="user-form-data-head">Review Details</div>
39+
<div class="user-form-data-content fancy-box">
40+
<table>
41+
<tr>
42+
<td><span class="focus">Url:</span></td>
43+
<td>{{userDetails.url}}</td>
44+
</tr>
45+
<tr>
46+
<td><span class="focus">Keywords:</span></td>
47+
<td>
48+
<div class="keyword" ng-if="userDetails.keywords.length!=0" ng-repeat="keyword in userDetails.keywords">
49+
<span class="glyphicon glyphicon-tag"></span>
50+
<span>{{keyword}}</span>
51+
</div>
52+
<div ng-if="userDetails.keywords.length==0">
53+
No Keyword
54+
</div>
55+
</td>
56+
</tr>
57+
<tr>
58+
<td><span class="focus">Email-Id:</span></td>
59+
<td>{{userDetails.email_id}}</td>
60+
</tr>
61+
</table>
62+
</div>
63+
<div class="button-box">
64+
<button type="submit" class="btn btn-default fancy-button cancel" ng-click="cancelRequest()">Cancel</button>
65+
<button type="submit" class="btn btn-default fancy-button process" ng-click="submitRequest()">Process</button>
66+
</div>
6067
</div>
61-
<div class="button-box">
62-
<button type="submit" class="btn btn-default fancy-button cancel" ng-click="cancelRequest()">Cancel</button>
63-
<button type="submit" class="btn btn-default fancy-button process" ng-click="submitRequest()">Process</button>
68+
<div class="message fancy-box" ng-show="showMessage" >
69+
<h3>Your Request is in Queue</h3>
70+
<p>We will get back to you soon with some solid result. Checkout your email-Id after few moments.</p>
71+
</div>
72+
<div class="message fancy-box" ng-show="error.status" >
73+
<h3>Error Occured in sending request</h3>
74+
<p>{{error.message}}</p>
6475
</div>
6576
</div>
66-
<div class="message fancy-box" ng-show="showMessage" >
67-
<h3>Your Request is in Queue</h3>
68-
<p>We will get back to you soon with some solid result. Checkout your email-Id after few moments.</p>
69-
</div>
70-
<div class="message fancy-box" ng-show="error.status" >
71-
<h3>Error Occured in sending request</h3>
72-
<p>{{error.message}}</p>
73-
</div>
74-
7577

rottoscraper/gui/static/html/result.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="result-box">
1+
<div class="result-page">
22
<div class="msg" ng-if="error.status">
33
<p>{{ error.message }}</p>
44
</div>
@@ -23,15 +23,15 @@
2323
</tr>
2424
<tr>
2525
<td><span class="focus">Website Id: </span></td>
26-
<td>{{ website.id }}</td>
26+
<td class="simple-font">{{ website.id }}</td>
2727
</tr>
2828
<tr>
2929
<td><span class="focus">Job Status:</span></td>
3030
<td>{{ website.status.toUpperCase() }}</td>
3131
</tr>
3232
<tr>
3333
<td><span class="focus">Last Time Crawled:</span></td>
34-
<td>{{ website.last_time_crawled }}</td>
34+
<td class="simple-font"> {{ website.last_time_crawled }}</td>
3535
</tr>
3636
</table>
3737
</div>
@@ -51,7 +51,10 @@
5151
<td></td>
5252
<td><span class="focus">Rotto Url's:</span></td>
5353
<td>
54-
<div class="rotto-row" ng-repeat="rottourl in rottopage.rotto_links">{{$index+1}})&nbsp<a href="{{rottourl}}" target="_blank">{{rottourl}}</a></div>
54+
<div class="rotto-row" ng-repeat="link in rottopage.rotto_links">{{$index+1}})&nbsp
55+
<a href="{{link.url}}" target="_blank">{{link.url}}</a>
56+
<span class='link-text' ng-if="link.text">[{{link.text}}]</span>
57+
</div>
5558
</td>
5659
</tr>
5760
<tr>

rottoscraper/gui/templates/layout.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
<link rel="stylesheet" type="text/css" href="static/css/bootstrap-theme.min.css" />
99
<link rel="stylesheet" type="text/css" href="static/css/ng-tags-input.min.css" />
1010
<link rel="stylesheet" type="text/css" href="static/css/style.css" />
11+
<link href='http://fonts.googleapis.com/css?family=Raleway:500' rel='stylesheet' type='text/css'>
1112
</head>
1213

1314
<body ng-app="RottoApp">
1415

1516
<div class="wrapper">
1617
<header>
17-
<a href="#/"><h2>Rotto Link Scraper V1.0</h2></a>
18+
<a href="#/"><h2>Rotto Link Scraper</h2></a>
1819
</header>
1920
{% block body %}{% endblock %}
2021
<footer >

0 commit comments

Comments
 (0)