diff --git a/.gitignore b/.gitignore index 90badf3663a6..5b540ff37e60 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ apps/librelingo_tools/dist *.tsbuildinfo report.*.*.json /coverage/ +apps/docs/build/ diff --git a/apps/lluis/NavBar.svelte b/apps/lluis/NavBar/NavBar.svelte similarity index 100% rename from apps/lluis/NavBar.svelte rename to apps/lluis/NavBar/NavBar.svelte diff --git a/apps/lluis/NavBar/NavBarButton.svelte b/apps/lluis/NavBar/NavBarButton.svelte new file mode 100644 index 000000000000..308785f0a919 --- /dev/null +++ b/apps/lluis/NavBar/NavBarButton.svelte @@ -0,0 +1,26 @@ + + +
+ + + +
+ + diff --git a/apps/lluis/ButtonSet.svelte b/apps/lluis/NavBar/NavBarButtonSet.svelte similarity index 89% rename from apps/lluis/ButtonSet.svelte rename to apps/lluis/NavBar/NavBarButtonSet.svelte index f3518888a67d..0b29f355b77c 100644 --- a/apps/lluis/ButtonSet.svelte +++ b/apps/lluis/NavBar/NavBarButtonSet.svelte @@ -4,6 +4,7 @@ diff --git a/apps/lluis/primitives/LinkOrButton.svelte b/apps/lluis/primitives/LinkOrButton.svelte new file mode 100644 index 000000000000..337decb3cf60 --- /dev/null +++ b/apps/lluis/primitives/LinkOrButton.svelte @@ -0,0 +1,28 @@ + + +{#if href !== null} + + + +{/if} + +{#if href === null} + +{/if} + + diff --git a/apps/web/cypress/integration/common/i_see_link_in_navbar.js b/apps/web/cypress/integration/common/i_see_link_in_navbar.js new file mode 100644 index 000000000000..b1bb4d08836f --- /dev/null +++ b/apps/web/cypress/integration/common/i_see_link_in_navbar.js @@ -0,0 +1,6 @@ +import { Given } from "cypress-cucumber-preprocessor/steps" + +Given(/I see an? "(.*)" link in the navbar/, (text) => { + cy.get("nav[role=navigation] a").contains(text).should("be.visible") +}) + diff --git a/apps/web/cypress/integration/coursePage.feature b/apps/web/cypress/integration/coursePage.feature index 49f436108fec..9277f6a347a3 100644 --- a/apps/web/cypress/integration/coursePage.feature +++ b/apps/web/cypress/integration/coursePage.feature @@ -10,7 +10,7 @@ Feature: Course page And I see 10 skills that are not started And I see a skill that has no image set And I see 3 skills that have an image set - And I see a "Log in" button + And I see a "Log in" link in the navbar Scenario: Opening course page with a stale skill Given I open "/course/test" diff --git a/apps/web/cypress/integration/coursePage/index.js b/apps/web/cypress/integration/coursePage/index.js index 77c074dbb8ea..5effbdefd09e 100644 --- a/apps/web/cypress/integration/coursePage/index.js +++ b/apps/web/cypress/integration/coursePage/index.js @@ -81,7 +81,6 @@ Then("I see a completed skill", () => { Then("I see a started skill", () => { cy.get("[data-started=true][data-stale=false]").should("have.length", 1) - cy.get(".svg-inline--fa").should("be.visible") }) And("I see a skill with 20% progress", () => { diff --git a/apps/web/src/components/NavBar.svelte b/apps/web/src/components/NavBar.svelte index ef29411ce09d..4c808a7b4284 100644 --- a/apps/web/src/components/NavBar.svelte +++ b/apps/web/src/components/NavBar.svelte @@ -1,14 +1,12 @@ - +
- - - + {#if hasAuth && settings.features.authEnabled} {#if $authStore.user} - - + {:else} - + Sign up - - + + Log in - + {/if} {/if} - +
+ + diff --git a/apps/web/src/db/db.js b/apps/web/src/db/db.js index 37d007b4398c..4292f159b505 100644 --- a/apps/web/src/db/db.js +++ b/apps/web/src/db/db.js @@ -52,10 +52,10 @@ if (isBrowser() === true) { window._DB = db // Detect fake user session - if (Cookies.get("loginDb") === getUserDbName("---fakeUser")) { + if (Cookies.get("loginDb") === getUserDbName("JohnDoe")) { authStore.update((value) => ({ ...value, - user: { name: "---fakeUser" }, + user: { name: "JohnDoe" }, online: true, })) } @@ -84,7 +84,7 @@ if (isBrowser() === true) { // Fake login for testing purposes window._fakeLogin = () => { - Cookies.set("loginDb", getUserDbName("---fakeUser"), { + Cookies.set("loginDb", getUserDbName("JohnDoe"), { expires: settings.database.auth.expireDays, }) window.location.href = "/course/spanish-from-english/" diff --git a/apps/web/src/mystyles.scss b/apps/web/src/mystyles.scss index 9638341418a5..0ec292be858a 100644 --- a/apps/web/src/mystyles.scss +++ b/apps/web/src/mystyles.scss @@ -62,11 +62,13 @@ --spacing-small: 8px; --spacing-medium: 12px; --spacing-large: calc(var(--spacing-small) + var(--spacing-medium)); + --button-radius-small: calc(var(--spacing-small) / 2); --blue: #325f74; - --white: #bfb5af; + --white: #faf4f0; --navbar-background: var(--blue); --navbar-text-color: var(--white); + --navbar-highlight-color: rgba(255, 255, 255, .1); --navbar-height: 52px; --navbar-padding-vertical: var(--spacing-small); --navbar-padding-horizontal: var(--spacing-medium);