一、阿文菌導航頁製作
阿文菌導航頁是一個非常實用的工具,它可以方便地整理和訪問常用的網站。首先要做的是製作導航頁的頁面,以下是一個簡單的HTML代碼示例:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>我的導航頁</title> </head> <body> <h1>歡迎來到我的導航頁</h1> <p>下面是我的一些常用網站:</p> <ul> <li><a href="https://www.baidu.com">百度</a></li> <li><a href="https://www.google.com">谷歌</a></li> <li><a href="https://www.zhihu.com">知乎</a></li> </ul> </body> </html>
這個例子中,我使用了<ul>和<li>標籤來創建一個無序列表,然後在每個列表項中用<a>標籤來創建一個鏈接。
二、阿文菌導航頁搭建
有了導航頁的頁面之後,我們就需要將它上傳到伺服器上,在這裡我使用的是GitHub Pages。以下是簡單的搭建步驟:
- 在GitHub上創建一個新的倉庫,倉庫名必須為「你的GitHub用戶名.github.io」。
- 將導航頁的HTML文件命名為index.html,並上傳到倉庫的根目錄中。
- 訪問https://你的GitHub用戶名.github.io即可查看你的導航頁。
三、阿文菌導航頁地址
現在你已經有了一個可以訪問的導航頁,但是URL太長了,不太好記憶。我們可以給導航頁創建一個簡短的地址,例如http://nav.awenjun.com。以下是簡單的創建步驟:
- 在你的域名服務商那裡添加一個CNAME記錄,將導航頁地址與你的域名綁定在一起。
- 在GitHub倉庫的設置中,將Custom domain設置為你的域名。
- 在導航頁的HTML文件中添加以下標籤:
<head> <link rel="canonical" href="http://nav.awenjun.com/"> </head>
這樣就可以通過http://nav.awenjun.com訪問你的導航頁,非常方便。
四、阿文菌導航頁面
在創建一個好看、實用的導航頁時,我們需要考慮一些細節,比如顏色、字體和樣式。這裡我給大家分享一個優秀的導航頁面代碼示例:
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>我的導航頁</title> <link href="https://cdn.bootcss.com/font-awesome/5.11.2/css/all.css" rel="stylesheet"> <style> body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #f6f6f6; margin: 0; } h1 { font-size: 3rem; color: #333; margin: 1rem; text-align: center; } ul { list-style: none; margin: 0; padding: 0; } .link { display: table-cell; width: 30%; height: 5rem; text-align: center; vertical-align: middle; font-size: 1.4rem; color: #333; text-decoration: none; background-color: #fff; box-shadow: 1px 1px 5px rgba(0,0,0,.1); border-radius: 5px; transition: all .2s; } .link:hover { background-color: #efefef; box-shadow: 1px 1px 5px rgba(0,0,0,.2); transform: translate(0,-5px); } .link i { font-size: 1.8rem; margin-right: .5rem; } .link span { vertical-align: middle; font-size: 1.6rem; line-height: 1.8rem; } </style> </head> <body> <h1>我的導航頁</h1> <div class="container"> <ul class="links"> <li> <a class="link" href="#"> <i class="fa fa-youtube"></i> <span>YouTube</span> </a> </li> <li> <a class="link" href="#"> <i class="fa fa-weibo"></i> <span>微博</span> </a> </li> <li> <a class="link" href="#"> <i class="fa fa-github"></i> <span>GitHub</span> </a> </li> <li> <a class="link" href="#"> <i class="fa fa-envelope"></i> <span>郵箱</span> </a> </li> </ul> </div> </body> </html>
在這個例子中,我使用了FontAwesome圖標庫來添加漂亮的圖標,使用了CSS來讓導航頁更好看。你可以自由地根據需要修改CSS代碼,打造出最適合自己的導航頁面。
五、阿文菌導航頁 什麼值得買
做完了自己的導航頁面,我們可以開始思考如何增加內容。一個好的方式就是添加商品列表,例如什麼值得買。
以下是簡單的添加步驟:
- 首先註冊一個什麼值得買的賬號,創建自己的推薦列表。
- 使用什麼值得買提供的API,獲取自己的推薦列表數據,並將數據顯示在導航頁上。以下是一個簡單的PHP代碼示例:
<?php $url = 'https://list.youpin.mi.com/v3/goods/group?did='; $did = '2f09c096e330addb'; $list = json_decode(file_get_contents($url . $did), true); ?> <ul> <?php foreach ($list['data']['goods_list'] as $goods): ?> <li><a href="<?= $goods['goods_url'] ?>"><?= $goods['goods_name'] ?></a></li> <?php endforeach; ?> </ul>
這個例子中,我使用了小米有品的商品API來獲取推薦商品列表,然後在HTML中使用了$goods[‘goods_name’]和$goods[‘goods_url’]來顯示商品名稱和鏈接。你可以根據需要修改API和HTML代碼,打造出最適合自己的導航頁面。
六、阿文菌個人主頁
除了導航頁,我還有一個個人主頁,其中包含了我的介紹、技能、項目和博客等信息。以下是簡單的設計步驟:
- 首先創建一個個人主頁的HTML文件,以下是一個簡單的示例:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>阿文菌個人主頁</title>
<link href="https://cdn.bootcss.com/font-awesome/5.11.2/css/all.css" rel="stylesheet">
<style>
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
background-color: #f6f6f6;
margin: 0;
}
header {
background-color: #333;
color: #fff;
padding: 2rem 1rem;
text-align: center;
}
.avatar {
border-radius: 50%;
width: 10rem;
height: 10rem;
margin-bottom: 1rem;
}
.name {
font-size: 2rem;
margin-bottom: .5rem;
}
.job-title {
font-size: 1.6rem;
margin-bottom: 1rem;
}
.social-media {
margin-bottom: 2rem;
}
.social-media i {
font-size: 2rem;
margin-right: 1rem;
}
.content {
margin: 0 auto;
max-width: 800px;
padding: 2rem;
}
.section {
margin-bottom: 3rem;
}
.section h2 {
font-size: 2rem;
margin-bottom: 1rem;
}
.section p {
font-size: 1.6rem;
line-height: 1.8rem;
}
</style>
</head>
<body>
<header>
<img class="avatar" src="avatar.jpg" alt="阿文菌頭像">
<h1 class="name">阿文菌</h1>
<p class="job-title">全能編程開發工程師</p>
<div class="social-media">
<a href="https://github.com/awenjun"><i class="fab fa-github"></i></a>
<a href="https://weibo.com/awenjun"><i class="fab fa-weibo"></i></a>
</div>
</header>
<div class="content">
<div class="section">
<h2>關於我</h2>
<p>我是一個全能編程開發工程師,精通多種編程語言和開發框架。我喜歡探索新技術和新領域,希望有機會參與更多的開發項目。</p>
</div>
<div class="section">
<h2>技能</h2>
<p>我熟悉Java、Python、JavaScript等編程語言和Spring Boot、Django、React等開發框架,能夠獨立完成從開發到上線的整個流程。我還對人原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/246948.html