|
@@ -1,32 +1,41 @@
|
|
|
-<html>
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
<head>
|
|
|
-<!-- Font Awesome -->
|
|
|
-<link
|
|
|
- href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
|
|
|
- rel="stylesheet"
|
|
|
-/>
|
|
|
-<!-- Google Fonts -->
|
|
|
-<link
|
|
|
- href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
|
|
|
- rel="stylesheet"
|
|
|
-/>
|
|
|
-<!-- MDB -->
|
|
|
-<link
|
|
|
- href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.3.0/mdb.min.css"
|
|
|
- rel="stylesheet"
|
|
|
-/>
|
|
|
-<!-- MDB -->
|
|
|
-<script
|
|
|
- type="text/javascript"
|
|
|
- src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.3.0/mdb.min.js"
|
|
|
-></script>
|
|
|
-<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
|
|
-<script src="echarts.min.js"></script>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
+ <title>Googo Website Traffic</title>
|
|
|
+ <!-- Font Awesome -->
|
|
|
+ <link
|
|
|
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
|
|
|
+ rel="stylesheet"
|
|
|
+ />
|
|
|
+ <!-- Google Fonts -->
|
|
|
+ <link
|
|
|
+ href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
|
|
|
+ rel="stylesheet"
|
|
|
+ />
|
|
|
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
|
|
+ integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
|
|
+ <!-- MDB -->
|
|
|
+ <link
|
|
|
+ href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.3.0/mdb.min.css"
|
|
|
+ rel="stylesheet"
|
|
|
+ />
|
|
|
+ <link rel="stylesheet" href="https://unpkg.com/js-datepicker/dist/datepicker.min.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="reset.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="main.css">
|
|
|
+ <!-- MDB -->
|
|
|
+ <script
|
|
|
+ type="text/javascript"
|
|
|
+ src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.3.0/mdb.min.js"
|
|
|
+ ></script>
|
|
|
+ <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
|
|
+ <script src="echarts.min.js"></script>
|
|
|
</head>
|
|
|
-<body>
|
|
|
-
|
|
|
+<body class="color__grey">
|
|
|
<!-- Navbar -->
|
|
|
-<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
|
+ <nav class="navbar navbar-expand-lg navbar-light bg-white">
|
|
|
<!-- Container wrapper -->
|
|
|
<div class="container-fluid">
|
|
|
<!-- Navbar brand -->
|
|
@@ -44,7 +53,7 @@
|
|
|
<!-- Left links -->
|
|
|
<ul class="navbar-nav me-auto d-flex flex-row mt-3 mt-lg-0">
|
|
|
<li class="nav-item text-center mx-2 mx-lg-1">
|
|
|
- <a class="nav-link active" aria-current="page" href="/">
|
|
|
+ <a class="nav-link active" aria-current="page" href="index.html">
|
|
|
<div>
|
|
|
<i class="fas fa-home fa-lg mb-1"></i>
|
|
|
</div>
|
|
@@ -55,14 +64,22 @@
|
|
|
<a class="nav-link" href="http://news.google.com">
|
|
|
<div>
|
|
|
<i class="fas fa-globe-americas fa-lg mb-1"></i>
|
|
|
- <span class="badge rounded-pill badge-notification bg-success">11</span>
|
|
|
+ <!-- <span class="badge rounded-pill badge-notification bg-success">11</span> -->
|
|
|
</div>
|
|
|
News
|
|
|
</a>
|
|
|
</li>
|
|
|
+ <li class="nav-item text-center mx-2 mx-lg-1">
|
|
|
+ <a class="nav-link" href="keywords.html">
|
|
|
+ <div>
|
|
|
+ <i class="fab fa-korvue fa-lg mb-1"></i>
|
|
|
+ <!-- <span class="badge rounded-pill badge-notification bg-success">11</span> -->
|
|
|
+ </div>
|
|
|
+ Keywords
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
<!-- Right links -->
|
|
|
-
|
|
|
</div>
|
|
|
<!-- Collapsible wrapper -->
|
|
|
</div>
|
|
@@ -70,71 +87,115 @@
|
|
|
</nav>
|
|
|
<!-- Navbar -->
|
|
|
|
|
|
-
|
|
|
-</br>
|
|
|
-
|
|
|
-<div class="container">
|
|
|
- <div class="row">
|
|
|
- <div class="col-1 col-lg-1"></div>
|
|
|
-
|
|
|
- <div class="col-sm-11 col-lg-11">
|
|
|
- <!-- Search form -->
|
|
|
-
|
|
|
- <form id="searchform" class="d-flex input-group w-auto" >
|
|
|
- <input type="search" class="form-control" placeholder="Search" aria-label="Domain Name" id="search_query"/>
|
|
|
- <button class="btn btn-primary" type="button" data-mdb-ripple-color="dark" onclick="check_form();">
|
|
|
- Search
|
|
|
+ <div class="container">
|
|
|
+ <div class="row">
|
|
|
+ <!-- <div class="col-1 col-lg-1"></div> -->
|
|
|
+ <div class="col-12 col-12">
|
|
|
+ <!-- Search form -->
|
|
|
+ <form id="searchform" class="d-flex input-group search__form">
|
|
|
+ <input type="search" class="form-control search__bar" placeholder="Search" aria-label="Domain Name" id="search_query"/>
|
|
|
+ <button class="btn btn-primary search__btn" type="button" data-mdb-ripple-color="dark" id="search__btn">
|
|
|
+ Search
|
|
|
</button>
|
|
|
</form>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <div class="card text-center">
|
|
|
- <div class="card-header" id="sitename">Website Traffic</div>
|
|
|
- <div class="card-body">
|
|
|
- <h5 class="card-title" id="sitetitle"></h5>
|
|
|
- <p class="card-text" id="descriptions">
|
|
|
- </p>
|
|
|
-<!-- <a href="#" class="btn btn-primary" id="globalrank2"></a> -->
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <div class="row">
|
|
|
- <div class="col-sm-4">
|
|
|
- <div class="card">
|
|
|
- <div class="card-body">
|
|
|
- <h5 class="card-title">Global Ranks</h5>
|
|
|
- <p class="card-text" >
|
|
|
- </p>
|
|
|
- <a href="#" class="btn btn-primary" id="globalrank"></a>
|
|
|
+ <h3 class="h3 text-center" id="sitename">Website Traffic</h3>
|
|
|
+ <div class="card card__grback mb-4">
|
|
|
+ <div class="card-body card__left">
|
|
|
+ <!-- 根據搜尋內容顯示網站標題及網站內容簡介 -->
|
|
|
+ <h5 class="card-title card__url" id="sitetitle"><i class="fas fa-chart-bar card__url__icon"></i>Example.com</h5>
|
|
|
+ <p class="card-text card__intro" id="descriptions">
|
|
|
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut ipsa totam maxime pariatur iure
|
|
|
+ suscipit nihil possimus deserunt esse blanditiis. Quidem aliquid, voluptas quae tenetur quaerat
|
|
|
+ iure explicabo repellat ad.
|
|
|
+ </p>
|
|
|
+ <!-- <a href="#" class="btn btn-primary" id="globalrank2"></a> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="date__input mb-3">
|
|
|
+ <label for="daterng">開始日期:</label><input type="text" name="daterng" id="daterng1">
|
|
|
+ <label for="daterng">結束日期:</label><input type="text" name="daterng" id="daterng2">
|
|
|
+ <button class='sub__date btn'>套用</button>
|
|
|
+ </div>
|
|
|
+ <div class="text-muted mb-2 border-bottom">RANKING</div>
|
|
|
+ <div class="row g-5 mb-3">
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="card p-3">
|
|
|
+ <div class="card-body text-center">
|
|
|
+ <h5 class="card-title card__rank__title mb-2">Global Ranks</h5>
|
|
|
+ <p class="card-text" >
|
|
|
+ </p>
|
|
|
+ <span href="#" class="rank__mark"># <strong id="globalrank" class="rank_num">1000</strong></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="card p-3">
|
|
|
+ <div class="card-body text-center">
|
|
|
+ <h5 class="card-title card__rank__title mb-2">Country Ranks</h5>
|
|
|
+ <p class="card-text">
|
|
|
+ </p>
|
|
|
+ <span href="#" class="rank__mark"># <strong id="countryrank" class="rank_num">100</strong></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="card p-3">
|
|
|
+ <div class="card-body text-center">
|
|
|
+ <h5 class="card-title card__rank__title mb-2"><i class="fas fa-tags"></i>Category</h5>
|
|
|
+ <p class="card-text card__rank__cat" id="category">
|
|
|
+ Lorem
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="col-sm-4">
|
|
|
- <div class="card">
|
|
|
- <div class="card-body">
|
|
|
- <h5 class="card-title">Country Ranks</h5>
|
|
|
- <p class="card-text">
|
|
|
- </p>
|
|
|
- <a href="#" class="btn btn-primary" id="countryrank"></a>
|
|
|
+ <div class="text-muted mt-5 mb-2">Global Website Traffic Rankings</div>
|
|
|
+ <div class="row mb-4">
|
|
|
+ <div class="col-12 col-12">
|
|
|
+ <!--
|
|
|
+ <button type="button" class="btn btn-primary btn-block mb-4 ripple-surface">Place order</button>
|
|
|
+ -->
|
|
|
+ <div class="card card__notHover">
|
|
|
+ <div id="main" class="chart"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="col-sm-4">
|
|
|
- <div class="card">
|
|
|
- <div class="card-body">
|
|
|
- <h5 class="card-title">Category</h5>
|
|
|
- <p class="card-text" id="category">
|
|
|
- </p>
|
|
|
-<!-- <a href="#" class="btn btn-primary" ></a>-->
|
|
|
-
|
|
|
+ <div class="text-muted mb-2 border-bottom">BENEFIT</div>
|
|
|
+ <div class="btn-group group__btn" role="group" aria-label="date-buttons">
|
|
|
+ <button class="btn__benefit active">搜尋流量</button>
|
|
|
+ <button class="btn__benefit">有搜尋流量的網頁數</button>
|
|
|
+ </div>
|
|
|
+ <div class="row g-5 mb-3">
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="card p-3">
|
|
|
+ <div class="card-body text-center">
|
|
|
+ <h5 class="card-title card__rank__title mb-2">搜尋流量</h5>
|
|
|
+ <p class="card-text" >
|
|
|
+ </p>
|
|
|
+ <span href="#" class="rank__mark"><strong id="globalrank" class="rank_num">1000</strong></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="card p-3">
|
|
|
+ <div class="card-body text-center">
|
|
|
+ <h5 class="card-title card__rank__title mb-2">有搜尋流量的網頁數</h5>
|
|
|
+ <p class="card-text">
|
|
|
+ </p>
|
|
|
+ <span href="#" class="rank__mark"><strong id="countryrank" class="rank_num">100</strong></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-4">
|
|
|
+ <div class="card p-3">
|
|
|
+ <div class="card-body text-center">
|
|
|
+ <h5 class="card-title card__rank__title mb-2"><i class="fas fa-tags"></i>轉換訂單數</h5>
|
|
|
+ <span href="#" class="rank__mark"><strong id="countryrank" class="rank_num">100</strong></span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
</div>
|
|
|
|
|
@@ -172,92 +233,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
+=======
|
|
|
+ <div class="row mb-4">
|
|
|
+ <div class="col-12 col-12">
|
|
|
+ <!--
|
|
|
+ <button type="button" class="btn btn-primary btn-block mb-4 ripple-surface">Place order</button>
|
|
|
+ -->
|
|
|
+ <div class="card card__notHover">
|
|
|
+ <div id="main" class="chart"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="text-muted mb-2 border-bottom">SEO</div>
|
|
|
+ <div class="row mb-4">
|
|
|
+ <div class="col-12 col-12">
|
|
|
+ <!--
|
|
|
+ <button type="button" class="btn btn-primary btn-block mb-4 ripple-surface">Place order</button>
|
|
|
+ -->
|
|
|
+ <div class="card card__notHover">
|
|
|
+ <div id="bar" class="chart"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+>>>>>>> 84eba5233aa481afde55c375a1d4f44475ce6e04
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-</div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ <footer class="footer text-center p-4 bg-white">
|
|
|
+ <div class="text-muted"> © 2021 Copyright: Googo Website Traffic</div>
|
|
|
+ </footer>
|
|
|
+ <script
|
|
|
+ src="https://code.jquery.com/jquery-3.6.0.min.js"
|
|
|
+ integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
|
|
|
+ crossorigin="anonymous"></script>
|
|
|
+ <script src="https://unpkg.com/js-datepicker"></script>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
-var input = document.getElementById("search_query");
|
|
|
-
|
|
|
-input.addEventListener("keyup", function(event) {
|
|
|
- // Number 13 is the "Enter" key on the keyboard
|
|
|
- if (event.keyCode === 13) {
|
|
|
+ const input = document.getElementById("search_query");
|
|
|
+ const search__btn = document.getElementById("search__btn");
|
|
|
+ const btn__benefit = document.querySelectorAll(".btn__benefit");
|
|
|
+ const picker_str = datepicker('#daterng1', {
|
|
|
+ id: 1
|
|
|
+ });
|
|
|
+ const picker_end = datepicker('#daterng2', {
|
|
|
+ id: 1
|
|
|
+ });
|
|
|
+ $('.sub__date').click(function(e){
|
|
|
+ e.preventDefault();
|
|
|
+ console.log(picker_end.getRange());
|
|
|
+ });
|
|
|
+ search__btn.addEventListener("click", function(e) {
|
|
|
+ e.preventDefault();
|
|
|
check_form();
|
|
|
- event.preventDefault();
|
|
|
-// document.getElementById("myBtn").click();
|
|
|
- }
|
|
|
-});
|
|
|
-
|
|
|
- var myChart = echarts.init(document.getElementById('main'));
|
|
|
-
|
|
|
- var option;
|
|
|
-
|
|
|
-function check_form(){
|
|
|
- var qry=document.getElementById('search_query').value;
|
|
|
- axios.get('http://www.googo.org:8080/domain/'+qry)
|
|
|
- .then((response) => {
|
|
|
- var sitename = document.getElementById('sitename');
|
|
|
- var sitetitle = document.getElementById('sitetitle');
|
|
|
- var descriptions=document.getElementById('descriptions');
|
|
|
- var globalrank=document.getElementById('globalrank');
|
|
|
- var countryrank=document.getElementById('countryrank');
|
|
|
- var category=document.getElementById('category');
|
|
|
-
|
|
|
- console.log(response.data);
|
|
|
-// alert(response.data.SiteName);
|
|
|
-// var obj = JSON.parse(response.data);
|
|
|
-// alert(obj);
|
|
|
- sitename.innerHTML =response.data.SiteName;
|
|
|
- descriptions.innerHTML=response.data.Description;
|
|
|
- globalrank.innerHTML=response.data.GlobalRank.Rank;
|
|
|
- sitetitle.innerHTML=response.data.Title;
|
|
|
- countryrank.innerHTML=response.data.CountryRank.Rank;
|
|
|
- category.innerHTML=response.data.Category;
|
|
|
-
|
|
|
- var key_ary=[];
|
|
|
- var val_ary=[];
|
|
|
- for (const [key, value] of Object.entries(response.data.EstimatedMonthlyVisits)) {
|
|
|
- key_ary.push(key);
|
|
|
- val_ary.push(value);
|
|
|
-}
|
|
|
-option = {
|
|
|
- xAxis: {
|
|
|
- type: 'category',
|
|
|
- boundaryGap: false,
|
|
|
- data: key_ary
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'value'
|
|
|
- },
|
|
|
- series: [{
|
|
|
- data: val_ary,
|
|
|
- type: 'line',
|
|
|
- areaStyle: {}
|
|
|
- }]
|
|
|
-};
|
|
|
-
|
|
|
- myChart.setOption(option);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // sitename.innerHTML =response.data
|
|
|
-
|
|
|
- console.log(response.status);
|
|
|
- console.log(response.statusText);
|
|
|
- console.log(response.headers);
|
|
|
- console.log(response.config);
|
|
|
+ })
|
|
|
+ input.addEventListener("keyup", function(event) {
|
|
|
+ // Number 13 is the "Enter" key on the keyboard
|
|
|
+ if (event.keyCode === 13) {
|
|
|
+ check_form();
|
|
|
+ event.preventDefault();
|
|
|
+ // document.getElementById("myBtn").click();
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
+ btn__benefit.forEach((item, i) => {
|
|
|
+ item.addEventListener("click", function(){
|
|
|
+ item.toggleClass('active');
|
|
|
+ })
|
|
|
});
|
|
|
|
|
|
+ const myChart = echarts.init(document.getElementById('main'));
|
|
|
+ let option;
|
|
|
+
|
|
|
+ function check_form(){
|
|
|
+ const qry = document.getElementById('search_query').value;
|
|
|
+ axios.get('http://www.googo.org:8080/domain/' + qry)
|
|
|
+ .then((response) => {
|
|
|
+ const sitename = document.getElementById('sitename');
|
|
|
+ const sitetitle = document.getElementById('sitetitle');
|
|
|
+ const descriptions = document.getElementById('descriptions');
|
|
|
+ const globalrank = document.getElementById('globalrank');
|
|
|
+ const countryrank = document.getElementById('countryrank');
|
|
|
+ const category = document.getElementById('category');
|
|
|
+
|
|
|
+ console.log(response.data);
|
|
|
+ // alert(response.data.SiteName);
|
|
|
+ // var obj = JSON.parse(response.data);
|
|
|
+ // alert(obj);
|
|
|
+ itename.textContent =response.data.SiteName;
|
|
|
+ descriptions.textContent=response.data.Description;
|
|
|
+ globalrank.textContent=response.data.GlobalRank.Rank;
|
|
|
+ sitetitle.textContent=response.data.Title;
|
|
|
+ countryrank.textContent=response.data.CountryRank.Rank;
|
|
|
+ category.textContent=response.data.Category;
|
|
|
+
|
|
|
+ const key_ary=[];
|
|
|
+ const val_ary=[];
|
|
|
+ for (const [key, value] of Object.entries(response.data.EstimatedMonthlyVisits)) {
|
|
|
+ key_ary.push(key);
|
|
|
+ val_ary.push(value);
|
|
|
+ }
|
|
|
+ option = {
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: false,
|
|
|
+ data: key_ary
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ data: val_ary,
|
|
|
+ type: 'line',
|
|
|
+ areaStyle: {}
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ myChart.setOption(option);
|
|
|
+ // sitename.innerHTML =response.data
|
|
|
+
|
|
|
+ // var bar = document.getElementById('bar');
|
|
|
+
|
|
|
+ // var barChart = echarts.init(bar);
|
|
|
+ });
|
|
|
}
|
|
|
</script>
|
|
|
|