-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6fb515
commit d4e9fe9
Showing
14 changed files
with
2,217 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
layout: default | ||
--- | ||
<!--header--> | ||
<header class="main-header clearfix" role="header"> | ||
<div class="logo"> | ||
<a href="https://{{ site.targeturl }}"><em>{{ site.targeturl }}</em></a> | ||
</div> | ||
</header> | ||
|
||
<!-- ***** Main Banner Area Start ***** --> | ||
<section class="section main-banner" id="top" data-section="section1"> | ||
<video autoplay muted loop id="bg-video"> | ||
<source src="assets/images/course-video.mp4" type="video/mp4" /> | ||
</video> | ||
|
||
<div class="video-overlay header-text"> | ||
<div class="caption"> | ||
<h6>Redirect domain from {{ site.url }} to</h6> | ||
<h2><em>{{ site.targeturl }}</h2> | ||
<div class="main-button"> | ||
<div class="scroll-to-section"><a href="https://{{ site.targeturl }}" id="conti">Continue</a></div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
<script> | ||
var url = document.URL; | ||
var url = url.replace("{{ site.url }}/{{ site.baseurl }}", "{{ site.targeturl }}"); | ||
|
||
document.getElementById("conti").href = url; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 HUST & PI | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## What is this project? ![](https://img.shields.io/badge/license-MIT-green) | ||
|
||
If you have a domain [https://www.tailieubkhn.com/2021/10/website-hoc-machine.html](https://www.tailieubkhn.com/2021/10/website-hoc-machine.html), so you want share it to facebook or twitter, that you want avoid facebook or twitter block your domain, this is solution you need. This project help convert your domain to github domain, Because it is the domain of github, it has a certain reputation | ||
|
||
## Demo: | ||
|
||
[https://piandhust.github.io/tailieubkhn/convert](https://piandhust.github.io/tailieubkhn/convert), and paste domain you want convert from website tailieubkhn to github pages, domain [https://www.tailieubkhn.com/123](https://www.tailieubkhn.com/2021/10/website-hoc-machine.html) will convert to [https://piandhust.github.io/tailieubkhn/123](https://piandhust.github.io/tailieubkhn/2021/10/website-hoc-machine.html), And when you access to link github page you will see a website have a button _Continue_, click to button _Continue_ website will redirect to [https://www.tailieubkhn.com/](https://www.tailieubkhn.com/): | ||
|
||
| ![](https://raw.githubusercontent.com/piandhust/tailieubkhn/master/images/convert.png) | | ||
| :----: | | ||
| Convert website | | ||
|
||
| ![](https://raw.githubusercontent.com/piandhust/tailieubkhn/master/images/home.png) | | ||
| :----: | | ||
| Website redirect | | ||
|
||
|
||
## Configuration | ||
|
||
Edit file `_config.yml`: | ||
```yml | ||
permalink: /404.html | ||
url: "piandhust.github.io" | ||
targeturl: "tailieubkhn.com" | ||
baseurl: "tailieubkhn" | ||
``` | ||
With: | ||
- `url` is url of your github page website, if your username is trannguyenhan, this is trannguyenhan.github.io | ||
- `targeturl` is url of target website you want convert domain from github page to it | ||
- `baseurl` is name of this repo | ||
|
||
**Note**: because domain `/convert` has been taken to make a website to convert, so your domain will ignore `/convert`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
permalink: /404.html | ||
url: "piandhust.github.io" | ||
targeturl: "tailieubkhn.com" | ||
baseurl: "tailieubkhn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<html> | ||
<head> | ||
<title>Convert domain</title> | ||
<style> | ||
/* #sidebarrightnbt{ | ||
display: none; | ||
} | ||
|
||
#mainblogsec{ | ||
width:150%; | ||
} | ||
#comments{display:none;} | ||
footer{display:none;} | ||
.home-link{display:none;} | ||
#nav-searchnbt{display:none;} */ | ||
input[type=text] { | ||
width: 80%; | ||
padding: 12px 20px; | ||
margin: 8px 0; | ||
box-sizing: border-box; | ||
} | ||
.button { | ||
width: 15%; | ||
background-color: #4CAF50; /* Green */ | ||
border: none; | ||
color: white; | ||
padding: 15px 32px; | ||
text-align: center; | ||
text-decoration: none; | ||
display: inline-block; | ||
font-size: 16px; | ||
} | ||
label { | ||
color: #B4886B; | ||
font-weight: bold; | ||
float: left; | ||
} | ||
label:after { content: ": " } | ||
</style> | ||
</head> | ||
<body> | ||
{{ content }} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
|
||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800,900" rel="stylesheet"> | ||
|
||
<title>tailieubkhn.com</title> | ||
|
||
<!-- Bootstrap core CSS --> | ||
<link href="/{{ site.baseurl }}/css/bootstrap/bootstrap.min.css" rel="stylesheet"> | ||
|
||
<!-- Additional CSS Files --> | ||
<link rel="stylesheet" href="/{{ site.baseurl }}/css/templatemo-grad-school.css"> | ||
<link rel="stylesheet" href="/{{ site.baseurl }}/css/owl.css"> | ||
<link rel="stylesheet" href="/{{ site.baseurl }}/css/lightbox.css"> | ||
</head> | ||
|
||
<body> | ||
{{ content }} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
layout: convert | ||
--- | ||
<script> | ||
function convert () { | ||
var url = document.getElementById("input_text"); | ||
url = url.value; | ||
if(url == ""){ | ||
alert("Bạn cần nhập vào URL !"); | ||
} else { | ||
if(!url.includes("www")){ | ||
url = url.replace("{{ site.targeturl }}", "{{ site.url }}/{{ site.baseurl }}"); | ||
} else { | ||
url = url.replace("www.{{ site.targeturl }}", "{{ site.url }}/{{ site.baseurl }}"); | ||
} | ||
|
||
document.getElementById("output_text").value = url; | ||
} | ||
} | ||
|
||
function copyURL() { | ||
var copyText = document.getElementById("output_text"); | ||
copyText.select(); | ||
copyText.setSelectionRange(0, 99999) | ||
document.execCommand("copy"); | ||
alert("Copied the text: " + copyText.value); | ||
} | ||
</script> | ||
<div style="font-family: Courier New; margin: 0px auto; width: 80%;"> | ||
<label>URL of page {{ site.targeturl }} </label><br /> | ||
<input id="input_text" type="text" /> | ||
<button class="button" onclick="convert()">Convert</button> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<label>URL of github page:</label><br /> | ||
<input id="output_text" readonly="readonly" type="text" /> | ||
<button class="button" onclick="copyURL()">Copy</button> | ||
</div> |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.