2 Revīzijas

Autors SHA1 Ziņojums Datums
  Carlos Hernandez f3b526ab63 Find way to display articles content from API 3 gadus atpakaļ
  Carlos Hernandez 78de320aef Find way to display articles content from API 3 gadus atpakaļ

+ 2
- 0
Files-API/requirements.txt Parādīt failu

@@ -3,6 +3,7 @@ click==8.0.3
3 3
 decorator==5.1.0
4 4
 flake8==4.0.1
5 5
 Flask==2.0.2
6
+Flask-Cors==3.0.10
6 7
 ipython==7.29.0
7 8
 itsdangerous==2.0.1
8 9
 jedi==0.18.0
@@ -19,6 +20,7 @@ ptyprocess==0.7.0
19 20
 pycodestyle==2.8.0
20 21
 pyflakes==2.4.0
21 22
 Pygments==2.10.0
23
+six==1.16.0
22 24
 traitlets==5.1.1
23 25
 wcwidth==0.2.5
24 26
 Werkzeug==2.0.2

+ 1
- 7
app_template/www/articles.html Parādīt failu

@@ -51,7 +51,6 @@
51 51
 
52 52
 		<!-- Custom JS -->
53 53
 		<script src="sortposts.js"></script>
54
-		<script src="fetch_articles.js"></script>
55 54
 
56 55
 		<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
57 56
 		<script>
@@ -110,12 +109,7 @@
110 109
 			<div class="container">
111 110
 				<div class="row">
112 111
 					<div class="col-md-12 section-heading text-center">
113
-						<h2 class="to-animate">Home</h2>
114
-						<div class="row">
115
-							<div class="col-md-8 col-md-offset-2 subtext">
116
-								<h3 class="to-animate"> Hablando sobre lo que importa. </h3>
117
-							</div>
118
-						</div>
112
+						<h2 class="to-animate">Articles</h2>
119 113
 					</div>
120 114
 				</div>
121 115
 				<div class="row">

+ 0
- 12
app_template/www/fetch_articles.js Parādīt failu

@@ -1,12 +0,0 @@
1
-async function fetchArticle() {
2
-    let response = await fetch("http://localhost:5000/articles/article_1.txt");
3
-
4
-    console.log(response);
5
-    console.log(response.status);
6
-    console.log(response.statusText);
7
-
8
-    if (response.status == 200) {
9
-        let data = await response.text();
10
-        document.querySelector("#preview-text").textContent = data;
11
-    }
12
-}