Skip to content

Commit 768c5dc

Browse files
committed
Display the raw result on the show page
1 parent 4f85743 commit 768c5dc

5 files changed

Lines changed: 13 additions & 2 deletions

File tree

assets/css/app.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
@import "./phoenix.css";
44

5-
@import "./screens/dashboard.scss"
5+
@import "./screens/dashboard.scss";
6+
@import "./screens/keyword.scss";

assets/css/phoenix.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ header section {
9898
flex-direction: column;
9999
justify-content: space-between;
100100
}
101+
header section a {
102+
color: black;
103+
}
101104
header nav ul,
102105
header nav li {
103106
margin: 0;

assets/css/screens/keyword.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
body.keyword.show {
2+
iframe {
3+
width: 100%;
4+
height: 400px;
5+
}
6+
}

lib/google_crawler/search/search_keyword_task.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ defmodule GoogleCrawler.Search.SearchKeywordTask do
1212
{:ok, body} ->
1313
# Store the result to the db
1414
result = PageScrapper.scrap(body)
15+
IO.inspect result
1516
Search.update_keyword(keyword, %{
1617
status: :completed,
1718
raw_html_result: result.raw_html_result

lib/google_crawler_web/templates/layout/app.html.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<body class="<%= body_class(@conn) %>">
1212
<header>
1313
<section class="container">
14-
<h1><%= gettext("Google Crawler") %></h1>
14+
<h1><%= link gettext("Google Crawler"), to: "/" %></h1>
1515
<nav>
1616
<ul>
1717
<%= if @conn.assigns.user_signed_in? do %>

0 commit comments

Comments
 (0)