Tati 10 лет назад
Родитель
Сommit
679fe56528
3 измененных файлов с 203 добавлено и 14 удалено
  1. 9 12
      front/index.html
  2. 100 0
      front/index2.html
  3. 94 2
      front/style.css

+ 9 - 12
front/index.html

@@ -4,12 +4,6 @@
 		<!-- Latest compiled and minified CSS -->
 		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
 
-		<!-- Optional theme -->
-		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
-		<link rel="stylesheet" href="style.css">
-
-		<!-- Latest compiled and minified JavaScript -->
-		<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
 		<link rel="stylesheet" type="text/css" href="js/ng-tags-input.min.css">
 		<link rel="stylesheet" type="text/css" href="js/ng-tags-input.bootstrap.min.css">
 
@@ -64,7 +58,10 @@
 		<div class="content-wrapper">
 			<div class="news-wrapper">
 				<section ng-repeat="n in news" ng-class-odd="'odd-news'" ng-class-even="'even-news'">
-					<h4>{{n.title}}</h4>
+					<div class="title">
+						<h4>{{n.title}}</h4>
+						<a href="#"><i class="fa fa-times"></i></a>
+					</div>
 					<ul class="news-meta">
 						<li><i class="fa fa-calendar-o"></i> {{n.scrap_date | date:'short'}}</li>
 						<li>Weight: {{n.weight}}</li>
@@ -73,12 +70,12 @@
 					<div class="summary">
 						{{n.summary}}
 					</div>
-					<div>
-						<div><a ng-href="{{n.url}}" target="_blank">Visit site</a></div>
-						<div><a ng-click="getArticle(n)">Read complete article</a></div>
+					<div class="navigation">
+						<div><a ng-href="{{n.url}}" target="_blank"><i class="fa fa-external-link"></i> Visit site</a></div>
+						<div class="read-more"><a ng-click="getArticle(n)"><i class="fa fa-share"></i> Read complete article</a></div>
 					</div>
-					<div>
-						Keyword(s): {{n.kw.join(", ")}}
+					<div class="labels">
+						<i class="fa fa-tags"></i> <div ng-repeat="k in n.kw">{{k}}</div>
 					</div>
 				</section>
 				<div class="pagination">

+ 100 - 0
front/index2.html

@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html ng-app="app">
+	<head>
+		<link rel="stylesheet" type="text/css" href="style.css">
+		<script src="js/angular.min.js"></script>
+		<script src="js/ng-tags.js"></script>
+		<script src="js/ng-tags-input.min.js"></script>
+		<script src="js/app.js"></script>
+	</head>
+<body>
+	<div ng-controller="main">
+		<div class="row">
+			<div class="col-sm-3 col-md-3 col-lg-3 col-xl-3">
+				<div class="row">
+					<div class="col-sm-4 col-md-4 col-lg-4">MinDate:</div>
+					<input class="form-control col-sm-8 col-md-8 col-lg-8" ng-model="mindate" type="text"/>
+				</div>
+				<div class="row">
+					<div class="col-sm-4 col-md-4 col-lg-4">MaxDate:</div>
+					<input class="form-control col-sm-8 col-md-8 col-lg-8" ng-model="maxdate" type="text"/>
+				</div>
+				<div class="row">
+					<div class="col-sm-4 col-md-4 col-lg-4">Site:</div>
+					<input class="form-control col-sm-8 col-md-8 col-lg-8" ng-model="site" type="text"/>
+				</div>
+				<div class="row">
+					<div class="col-sm-4 col-md-4 col-lg-4">Keyword:</div>
+					<!--
+					<input class="col-sm-8 col-md-8 col-lg-8" ng-model="keyword" type="text"/>
+					-->
+					<tags-input ng-model="selected_kw" add-on-paste="true" add-from-autocomplete-only="true" replace-spaces-with-dashes="false">
+						<auto-complete source="filtered($query)"></auto-complete>
+					</tags-input>
+				</div>
+				<div class="row">
+					<div class="col-sm-4 col-md-4 col-lg-4">MinWeight:</div>
+					<input class="form-control col-sm-8 col-md-8 col-lg-8" ng-model="minweight" type="text"/>
+				</div>
+				<div class="row">
+					<div class="col-md-4"></div>
+					<div class="col-md-8">
+						<button ng-click="filter()" class="btn btn-default">Filter</button>
+					</div>
+				</div>
+
+				<div class="row">
+					<div class="col-md-12">
+						Parse source:
+						<input type="text" ng-model="source" class="form-control" placeholder="url">
+						<input type="text" ng-model="sourceName" class="form-control" placeholder="name">
+						<input type="text" ng-model="sourceSelector" class="form-control" placeholder="selector">
+						<input type="number" ng-model="sourceRSS" class="form-control" value=0>
+						<button class="btn btn-default" ng-click="parseSource(source,sourceName,sourceSelector,sourceRSS,0)">Test</button>
+						<button class="btn btn-default" ng-click="parseSource(source,sourceName,sourceSelector,sourceRSS,1)">Add</button>
+					</div>
+				</div>
+			</div>
+			<div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
+				<div class="row" style="border:1px solid black" ng-repeat="n in news">
+					<div class="col-md-12">
+						<div class="row">
+							<div class="col-md-12">
+								{{n.title}}
+							</div>
+						</div>
+						<div class="row" style="font-size:11px">
+							<div class="col-md-8">
+								{{n.scrap_date}}
+							</div>
+							<div class="col-md-4">
+								Weight: {{n.weight}}
+							</div>
+						</div>
+						<!-- source: {{n.source}} -->
+						<div class="summary" style="font-size:12px">
+							{{n.summary}}
+						</div>
+						<div class="row">
+							<div class="col-md-7">
+								<a ng-href="{{n.url}}">Visit site</a>
+							</div>
+							<div class="col-md-5">
+								<a ng-click="getArticle(n)">Read complete article</a>
+							</div>
+						</div>
+
+						<div class="row">
+							<div class="col-md-12 keywords">
+								Keyword(s): {{n.kw.join(", ")}}
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div id="news" class="col-sm-5 col-md-5 col-lg-5 col-xl-5" ng-bind-html="newsArticle"></div>
+		</div>
+	</div>
+</body>
+</html>
+

+ 94 - 2
front/style.css

@@ -206,6 +206,48 @@ ul.news-meta li {
 	margin-right: 10px;
 }
 
+.progress {
+	width: 100px;
+	height: 10px;
+	border: 0px;
+	border-radius: 2px;
+	background: #e0e0e0;
+	box-shadow: none;
+}
+
+.progress-bar {
+	background: rgba(112, 100, 172, 1);
+}
+
+.news-wrapper .navigation div {
+	float: left;
+	width: 50%;
+	margin: 5px 0px;
+}
+
+.news-wrapper .navigation a {
+	cursor: pointer;
+	color: rgba(112, 100, 172, 0.8);
+	text-transform: uppercase;
+	font-size: 85%;
+
+}
+
+.news-wrapper .navigation a:hover {
+	color: rgba(112, 100, 172, 1);
+	text-decoration: none;
+}
+
+.news-wrapper .navigation .read-more {
+	text-align: right;
+}
+.news-wrapper .navigation:after{
+	content: '';
+	display: block;
+    clear: both;
+
+}
+
 .article-wrapper {
 	position:fixed;
 	max-height:100%;
@@ -214,11 +256,62 @@ ul.news-meta li {
 	width: 41%;
 }
 
+.title h4 {
+	width: 95%;
+	float: left;
+	color: rgb(27, 77, 14);
+}
+
+.title i {
+	float: left;
+	padding: 10px;
+	font-size: 140%;
+}
+
+.title a {
+	color: rgba(112, 100, 172, 0.8);
+}
+
+.title a:hover {
+	color: rgba(112, 100, 172, 1);	
+}
+
+.title:after {
+    content: '';
+    display: block;
+    clear: both;
+}
+
+.labels i {
+	float: left;
+	padding: 5px;
+	color: rgb(27, 77, 14)
+}
+.labels div {
+	background-color: rgb(27, 77, 14);
+	border-radius: 6px;
+	padding: 4px;
+	color: white;
+	font-size: 10px;
+	margin-right: 3px;
+	float: left;
+	margin-bottom: 2px;
+}
+
+.labels:after{
+	content: '';
+	display: block;
+	clear: both;
+}
+
 /*
 .summary:hover { max-height: 999px; }
 .summary { max-height: 35px; transition:0.5s;overflow-y:hidden;}
 */
-.summary {font-size:12px;}
+.summary {
+	font-size:12px;
+	text-align: justify;
+}
 
 .keywords { max-height: 40px; transition:0.5s;overflow-y:hidden;margin-bottom:10px;   text-overflow: ellipsis;}
 .keywords:hover { max-height: 999px; }
@@ -237,7 +330,6 @@ ul.news-meta li {
    font-size: 14px;
    margin-left: 5px;
 }
-
 .pagination { 
 	height:30px;
 	background-color:white;