Skip to content

Commit

Permalink
CHANGE: /search > /components
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhieb committed Jun 6, 2024
1 parent c8fc755 commit 1de67a8
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The following pages can be easily edited on GitHub:
The following pages should **not** be edited manually:

- Error
- Search/Database
- Components/Search/Database
- Component

To edit a page, follow these steps:
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ app.get(`/bibliography`, handlers.md(`Bibliography`))
app.get(`/grammar`, handlers.md(`Grammar`))
app.get(`/research`, handlers.md(`Research`))
app.get(`/research/:pub`, handlers.Research)
app.get(`/search`, handlers.Search)
app.get(`/components`, handlers.Components)
app.use(handlers.PageNotFound)
app.use(handlers.ServerError)

Expand Down
2 changes: 1 addition & 1 deletion layouts/main/components/nav/nav.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ul aria-labelledby=nav-heading class=links data-hook=nav__links role=list>
<li><a {{#if About }} aria-current=page href=# {{else}} href=/ {{/if}}>About</a></li>
<li><a {{#if Search }} aria-current=page href=# {{else}} href=/search {{/if}}>Explore the Data</a></li>
<li><a {{#if Components }} aria-current=page href=# {{else}} href=/components {{/if}}>Explore the Data</a></li>
<li><a {{#if Grammar }} aria-current=page href=# {{else}} href=/grammar {{/if}}>Algonquian Word-Structure Basics</a></li>
<li><a {{#if Research }} aria-current=page href=# {{else}} href=/research {{/if}}>Research</a></li>
<li><a {{#if Bibliography }} aria-current=page href=# {{else}} href=/bibliography {{/if}}>Bibliography</a></li>
Expand Down
4 changes: 2 additions & 2 deletions layouts/main/main.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<body>
{{> components/skip-link/skip-link }}
{{> components/nav/nav }}
{{#if Search }}
{{> Search/components/construction/construction }}
{{#if Components }}
{{> Components/components/construction/construction }}
{{/if}}
{{> components/issue-link/issue-link }}
{{{ body }}}{{!-- This is actually <main> but express-handlebars calls this variable `body`. --}}
Expand Down
4 changes: 2 additions & 2 deletions pages/About/About.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

A multilingual dictionary database of Algonquian derivational morphemes {.subtitle}

[Explore the Nisinoon database here.](/search) {.db-link}
[Explore the Nisinoon database here.](/components) {.db-link}

<figure class=textile>
<img alt='A rectangular textile hand made by Angela Waupochick for the Nisinoon project, displaying a top-down view of two trillium flowers at opposite corners of a pink square in the center, bordered by side views of two trillium flowers along the top and bottom. Photo by Rodney Schreiner.' src=/images/textile.jpg>
Expand All @@ -26,7 +26,7 @@ This project is an NSF-funded cross-linguistic database of the components which
2. To provide a basis for comprehensive reconstruction of Proto-Algonquian.
{.list .numbered}

This database is be a web-based, open-access, centralized resource for Algonquian word components, providing community members and linguists with a set of data that has previously been difficult to access. [Explore the database here.](/search)
This database is be a web-based, open-access, centralized resource for Algonquian word components, providing community members and linguists with a set of data that has previously been difficult to access. [Explore the database here.](/components)

</section>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import 'components/construction/construction.css';

.search-page {
.components-page {
p {
text-align: center;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<main class=search-page id=main>
<main class=components-page id=main>

<h1>Search the Database</h1>

Expand Down
12 changes: 12 additions & 0 deletions pages/Components/Components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import db from '../../database/index.js'

export function Components(req, res) {

res.render(`Components/Components`, {
Components: true,
cssClass: `components`,
pageCSS: res.app.locals.styles.Components,
title: `Components`,
})

}
9 changes: 9 additions & 0 deletions pages/Components/Components.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe(`Components`, function() {

it(`renders`, function() {
cy.visit(`/components`)
cy.title().should(`equal`, `Nisinoon | Components`)
cy.get(`h1`).should(`have.text`, `Search the Database`)
})

})
12 changes: 0 additions & 12 deletions pages/Search/Search.js

This file was deleted.

9 changes: 0 additions & 9 deletions pages/Search/Search.test.js

This file was deleted.

2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { kebabCase, pascalCase } from 'change-case'

export * from './Error/Error.js'
export * from './Research/Research.js'
export * from './Search/Search.js'
export * from './Components/Components.js'

export function page(title) {
return function handler(req, res) {
Expand Down

0 comments on commit 1de67a8

Please sign in to comment.