Customized header some
This commit is contained in:
parent
00db138b13
commit
a2dbc8d22e
3 changed files with 39 additions and 12 deletions
3
app/components/header-nav-link.hbs
Normal file
3
app/components/header-nav-link.hbs
Normal file
|
@ -0,0 +1,3 @@
|
|||
<a href={{@href}} class="block mt-4 md:inline-block md:mt-0 text-teal-200 hover:text-white mr-4">
|
||||
{{yield}}
|
||||
</a>
|
|
@ -1,7 +1,11 @@
|
|||
<nav class="flex items-center justify-between flex-wrap bg-teal-500 p-6">
|
||||
<div class="flex items-center flex-shrink-0 text-white mr-6">
|
||||
<svg class="fill-current h-8 w-8 mr-2" width="54" height="54" viewBox="0 0 54 54" xmlns="http://www.w3.org/2000/svg"><path d="M13.5 22.1c1.8-7.2 6.3-10.8 13.5-10.8 10.8 0 12.15 8.1 17.55 9.45 3.6.9 6.75-.45 9.45-4.05-1.8 7.2-6.3 10.8-13.5 10.8-10.8 0-12.15-8.1-17.55-9.45-3.6-.9-6.75.45-9.45 4.05zM0 38.3c1.8-7.2 6.3-10.8 13.5-10.8 10.8 0 12.15 8.1 17.55 9.45 3.6.9 6.75-.45 9.45-4.05-1.8 7.2-6.3 10.8-13.5 10.8-10.8 0-12.15-8.1-17.55-9.45-3.6-.9-6.75.45-9.45 4.05z"/></svg>
|
||||
<span class="font-semibold text-xl tracking-tight">Tailwind CSS</span>
|
||||
<svg class="fill-current h-8 w-8 mr-2" width="54" height="54" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 0c6.623 0 12 5.377 12 12s-5.377 12-12 12-12-5.377-12-12 5.377-12 12-12zm6.997 20.486c2.444-2.019 4.003-5.072 4.003-8.486 0-6.071-4.929-11-11-11s-11 4.929-11 11c0 4.27 2.439 7.975 5.998 9.798v-3.228c0-.691-.441-.917-1.384-1.673-.698-.56-1.177-1.433-1.089-2.322.252-2.537.862-7.575.862-7.575l.909.003-.597 5.997h1.291l.005-6h1l-.002 6h1.003l-.001-6h1l.004 6 1.34.002-.675-6.002h.887c.002.011.675 5.008.951 7.55.098.902-.409 1.792-1.121 2.356-.95.751-1.382.967-1.382 1.669v4.243c.649.12 1.318.182 2.001.182 1.409 0 2.756-.265 3.994-.749l.001-3.251h-2.467c.802-6.996 3.103-12 4.66-12 .447 0 .804.357.807.851.008 1.164.004 6.814.002 12.635zm-7.563-6.486h-5.845c-.067.642-.26 1.387.651 2.117.938.754 1.758 1.231 1.758 2.453v3.678c.326.128.66.24 1.001.337v-4.01c0-1.237.811-1.7 1.761-2.453.944-.747.75-1.464.674-2.122zm6.561 7.222l.002-13.029c-1.14 1.352-2.563 4.206-3.31 9.809h2.308l-.001 3.8c.345-.176.679-.37 1.001-.58z"></path>
|
||||
</svg>
|
||||
<span class="font-semibold text-xl tracking-tight">
|
||||
Sortable Recipes
|
||||
</span>
|
||||
</div>
|
||||
<div class="block md:hidden">
|
||||
<button
|
||||
|
@ -12,18 +16,12 @@
|
|||
</div>
|
||||
<div class="w-full block flex-grow md:flex md:items-center md:w-auto {{if this.hideLinks "hidden"}}">
|
||||
<div class="text-sm md:flex-grow">
|
||||
<a href="#responsive-header" class="block mt-4 md:inline-block md:mt-0 text-teal-200 hover:text-white mr-4">
|
||||
Docs
|
||||
</a>
|
||||
<a href="#responsive-header" class="block mt-4 md:inline-block md:mt-0 text-teal-200 hover:text-white mr-4">
|
||||
Examples
|
||||
</a>
|
||||
<a href="#responsive-header" class="block mt-4 md:inline-block md:mt-0 text-teal-200 hover:text-white">
|
||||
Blog
|
||||
</a>
|
||||
<HeaderNavLink @href="https://github.com/adopted-ember-addons/ember-sortable">
|
||||
Ember-Sortable
|
||||
</HeaderNavLink>
|
||||
</div>
|
||||
<div>
|
||||
<a href="#" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 md:mt-0">Download</a>
|
||||
<a href="https://gitlab.com/gaiety/sortable-recipes" class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 md:mt-0">Fork on Gitlab</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
26
tests/integration/components/header-nav-link-test.js
Normal file
26
tests/integration/components/header-nav-link-test.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | header-nav-link', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<HeaderNavLink />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<HeaderNavLink>
|
||||
template block text
|
||||
</HeaderNavLink>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
Loading…
Add table
Reference in a new issue