-
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.
✨ added a landing page with dutch and english text options
- Loading branch information
1 parent
5e53baf
commit a737aad
Showing
17 changed files
with
10,070 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
// Use this file to include individual components. | ||
import './nav/'; |
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,42 @@ | ||
const navNodes = document.querySelectorAll(".nav"); | ||
|
||
class TabNav { | ||
/** | ||
* Constructor method. | ||
* @param {HTMLElement} node | ||
*/ | ||
constructor(node) { | ||
// nodes | ||
this.node = node; | ||
this.tabButtons = this.node.querySelectorAll(".nav__item"); | ||
this.tabs = this.node.querySelectorAll(".nav__pane"); | ||
|
||
this.setActive(this.tabButtons[0]); | ||
|
||
// events | ||
this.tabButtons.forEach((tabButton) => { | ||
tabButton.addEventListener("click", (event) => { | ||
this.setActive(event.target); | ||
}); | ||
}); | ||
} | ||
|
||
setActive(tabButton) { | ||
console.log("tabNode=", tabButton); | ||
// make inactive all tabs and contents | ||
this.tabButtons.forEach((btn) => { | ||
btn.classList.remove("nav__item--active"); | ||
}); | ||
this.tabs.forEach((tab) => { | ||
tab.classList.remove("nav__pane--active"); | ||
}); | ||
|
||
// set active for the current tab and content | ||
tabButton.classList.add("nav__item--active"); | ||
const id = tabButton.dataset.id; | ||
const tab = document.getElementById(id); | ||
tab.classList.add("nav__pane--active"); | ||
} | ||
} | ||
|
||
[...navNodes].forEach((node) => new TabNav(node)); |
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,22 @@ | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5 { | ||
margin-top: 0; | ||
margin-bottom: 0; | ||
font-weight: 500; | ||
line-height: 1.2; | ||
} | ||
|
||
p { | ||
margin-top: 0; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
body { | ||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
line-height: 1.5; | ||
font-weight: 400; | ||
color: var(--color-text); | ||
} |
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,45 @@ | ||
// sass vars | ||
/* Colors */ | ||
$color_primary: #04a5bb; | ||
$color_primary_dark: #017092; | ||
$color_primary_light: #c3eaef; | ||
|
||
$color_secondary: #f3f3f3; | ||
$color_secondary_dark: #c6c6c6; | ||
$color_secondary_light: #fff; | ||
|
||
$color_alert: #dc3545; | ||
$color_alert_dark: #bd2130; | ||
|
||
$color_darkest: #000; | ||
$color_dark: #333; | ||
$color_lightest: #fff; | ||
$color_muted: #6c757d; | ||
|
||
$color_link: #017092; | ||
$color_link_hover: #051f31; | ||
$color-text: $color_dark; | ||
$color-border: $color_secondary_dark; | ||
|
||
// css vars | ||
:root { | ||
--color_primary: #{$color_primary}; | ||
--color_primary_dark: #{$color_primary_dark}; | ||
|
||
--color_secondary: #{$color_secondary}; | ||
--color_secondary_dark: #{$color_secondary_dark}; | ||
--color_secondary_light: #{$color_secondary_light}; | ||
|
||
--color_alert: #{$color_alert}; | ||
--color_alert_dark: #{$color_alert_dark}; | ||
|
||
--color-darkest: #{$color-darkest}; | ||
--color_dark: #{$color_dark}; | ||
--color_lightest: #{$color_lightest}; | ||
--color_muted: #{$color_muted}; | ||
|
||
--color_link: #{$color_link}; | ||
--color_link_hover: #{$color_link_hover}; | ||
--color-text: #{$color-text}; | ||
--color-border: #{$color-border}; | ||
} |
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,24 @@ | ||
.button { | ||
display: inline-block; | ||
padding: 0.25rem 0.5rem; | ||
text-decoration: none; | ||
background-color: var(--color_primary); | ||
border: 1px solid var(--color_primary); | ||
border-radius: 0.2rem; | ||
color: var(--color_lightest); | ||
|
||
&:hover { | ||
background-color: var(--color_primary_dark); | ||
border-color: var(--color_primary_dark); | ||
} | ||
|
||
&--alert { | ||
background-color: var(--color_alert); | ||
border-color: var(--color_alert); | ||
|
||
&:hover { | ||
background-color: var(--color_alert_dark); | ||
border-color: var(--color_alert_dark); | ||
} | ||
} | ||
} |
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,11 @@ | ||
.container { | ||
max-width: 960px; | ||
padding-left: 15px; | ||
padding-right: 15px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
|
||
&--center { | ||
text-align: center; | ||
} | ||
} |
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,35 @@ | ||
.footer { | ||
margin-top: 3rem; | ||
margin-bottom: 3rem; | ||
padding-top: 3rem; | ||
padding-bottom: 3rem; | ||
border-top: 1px solid var(--color-border); | ||
|
||
&__row { | ||
display: flex; | ||
} | ||
|
||
&__col { | ||
flex-grow: 1; | ||
width: 100%; | ||
padding-left: 15px; | ||
padding-right: 15px; | ||
|
||
&--right { | ||
text-align: right; | ||
} | ||
|
||
&--small { | ||
font-size: 80%; | ||
} | ||
} | ||
|
||
&__header { | ||
font-size: 1.25rem; | ||
} | ||
|
||
&__list { | ||
padding-left: 0; | ||
list-style: none; | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1,6 @@ | ||
// Use this file to include individual components. | ||
@import "button.scss"; | ||
@import "container.scss"; | ||
@import "footer.scss"; | ||
@import "link.scss"; | ||
@import "nav.scss"; | ||
@import "title.scss"; |
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,17 @@ | ||
.link { | ||
text-decoration: none; | ||
color: var(--color_link); | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
color: var(--color_link_hover); | ||
} | ||
|
||
&--muted { | ||
color: var(--color_muted); | ||
|
||
&:hover { | ||
color: var(--color_muted); | ||
} | ||
} | ||
} |
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,37 @@ | ||
.nav { | ||
margin-bottom: 2rem; | ||
border-bottom: 1px solid var(--color-border); | ||
|
||
&__list { | ||
display: flex; | ||
justify-content: center; | ||
border-bottom: 1px solid var(--color-border); | ||
list-style: none; | ||
} | ||
|
||
&__item { | ||
display: block; | ||
padding: 0.5rem 1rem; | ||
border: 1px solid transparent; | ||
color: var(--color_link); | ||
cursor: pointer; | ||
|
||
&:hover { | ||
border-color: var(--color_secondary) var(--color_secondary) var(--color-border); | ||
color: var(--color_link_hover); | ||
} | ||
|
||
&--active { | ||
border-color: var(--color-border) var(--color-border) var(--color_lightest) !important; | ||
margin-bottom: -1px; | ||
} | ||
} | ||
|
||
&__pane { | ||
display: none; | ||
|
||
&--active { | ||
display: block; | ||
} | ||
} | ||
} |
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,12 @@ | ||
.title { | ||
text-align: center; | ||
padding: 3rem 1rem 1.5rem 1rem; | ||
|
||
&__header { | ||
font-size: 3.5rem; | ||
} | ||
|
||
&__description { | ||
font-size: 1.25rem; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import "vars"; | ||
@import "app"; | ||
@import 'settings'; | ||
@import 'components'; | ||
@import 'views'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,43 @@ | ||
{% extends "master.html" %} | ||
|
||
{% block content %} | ||
|
||
<div class="title"> | ||
<h1 class="title__header">{{ settings.PROJECT_NAME }} API</h1> | ||
<p class="title__description">{{ settings.SITE_TITLE }}</p> | ||
</div> | ||
|
||
<div class="container container--center"> | ||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item" data-id="en">English</li> | ||
<li class="nav__item" data-id="nl">Nederlands</li> | ||
</ul> | ||
|
||
<div class="nav__content"> | ||
<div class="nav__pane" id="en"> | ||
WIP TEXT | ||
</div> | ||
<div class="nav__pane" id="nl"> | ||
WIP TEKST | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<p> | ||
<b>Licensed under the <a class="link" href="https://github.com/maykinmedia/objects-api/blob/master/LICENSE.md"> | ||
European Union Public License (EUPL) 1.2</a></b> | ||
</p> | ||
|
||
<p> | ||
<a href="{% url "schema" version=version %}" class="button"><i class="fas fa-file-alt"></i> Open API specification</a> | ||
<a href="{% url "api-root" version=version %}" class="button"><i class="fas fa-wifi"></i> API root</a> | ||
</p> | ||
|
||
<p> | ||
<a href="{% url 'admin:index' %}" class="button button--alert"><i class="fas fa-lock"></i> Administration</a> | ||
</p> | ||
|
||
</div> | ||
|
||
{% endblock %} |
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
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