Skip to content

Commit 2565da3

Browse files
feat(ole-navbar): replace nav with ole-navbar
1 parent bef4d1e commit 2565da3

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

src/App.vue

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
<template>
22
<div id="app">
3-
<header class="header">
4-
<nav class="inner">
5-
<router-link to="/" exact>
6-
<img class="logo" src="~public/logo-48.png" alt="logo">
7-
</router-link>
8-
<router-link to="/top">Top</router-link>
9-
<router-link to="/new">New</router-link>
10-
<router-link to="/show">Show</router-link>
11-
<router-link to="/ask">Ask</router-link>
12-
<router-link to="/job">Jobs</router-link>
13-
<a class="github" href="https://github.com/vuejs/vue-hackernews-2.0" target="_blank" rel="noopener">
14-
Built with Vue.js
15-
</a>
16-
</nav>
17-
</header>
3+
<ole-navbar href="/">
4+
<img class="logo" src="~public/logo-48.png" alt="logo" width="112"
5+
height="28"/>
6+
<ole-navbar-item slot="navbar-start" href="/top">
7+
Top
8+
</ole-navbar-item>
9+
<ole-navbar-item slot="navbar-start" href="/new">
10+
New
11+
</ole-navbar-item>
12+
<ole-navbar-item slot="navbar-start" href="/show">
13+
Show
14+
</ole-navbar-item>
15+
<ole-navbar-item slot="navbar-start" href="/ask">
16+
Ask
17+
</ole-navbar-item>
18+
<ole-navbar-item slot="navbar-start" href="/job">
19+
Jobs
20+
</ole-navbar-item>
21+
<ole-navbar-item href="https://github.com/vuejs/vue-hackernews-2.0">
22+
<ole-icon type="github" style="color: #333;"></ole-icon>
23+
</ole-navbar-item>
24+
25+
</ole-navbar>
1826
<ole-section>
1927
<router-view class="view"></router-view>
2028
</ole-section>

src/index.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
#skip a { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
1616
#skip a:focus { position:static; width:auto; height:auto; }
1717
</style>
18+
<script src="http://localhost:3333/build/ole.js"></script>
1819
</head>
1920
<body>
2021
<div id="skip"><a href="#app">skip to content</a></div>
2122
<!--vue-ssr-outlet-->
22-
<script async src="http://localhost:3333/build/ole.js"></script>
2323
</body>
2424
</html>

0 commit comments

Comments
 (0)