Skip to content

Commit

Permalink
fix: landing page on mobile #35 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinderoubaix authored Jul 31, 2023
1 parent 4045c82 commit 509b90e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions demo/src/lib/layout/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$: isSvelte = $selectedFramework$ === 'svelte';
</script>

<header class="bg-light pt-4 pb-md-5 px-4 px-lg-5 d-flex mb-3 d-md-block align-items-center title">
<header class="bg-light pt-4 pb-5 px-4 px-lg-5 d-flex mb-3 d-md-block align-items-center title">
<div class="row mb-4 align-items-end">
<h1 class="col-auto me-auto me-md-none mb-0">{title}</h1>
<div class="col">
Expand All @@ -37,7 +37,7 @@
</div>
</div>
</div>
<ul class="nav-tabs px-4 px-lg-5 content-tabset justify-content-md-start justify-content-end nav" role="tablist">
<ul class="nav-tabs px-4 px-lg-5 content-tabset justify-content-start nav" role="tablist">
{#each tabs as { title, key, path }}
{@const isActive = tab === key}
<li class="nav-item" role="presentation">
Expand Down
6 changes: 5 additions & 1 deletion demo/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Svg from '$lib/layout/Svg.svelte';
import github from 'bootstrap-icons/icons/github.svg?raw';
import twitter from 'bootstrap-icons/icons/twitter.svg?raw';
import coneStriped from 'bootstrap-icons/icons/cone-striped.svg?raw';
import 'bootstrap/dist/css/bootstrap.css';
import {/*canonicalURL$,*/ pathToRoot$} from '../lib/stores';
import './styles.scss';
Expand All @@ -18,7 +19,10 @@
<div class="container-fluid">
<a class="navbar-brand" href={$pathToRoot$}> AgnosUI </a>
<div class="d-flex align-items-center">
<span class="badge bg-warning text-bg-warning">Work In Progress</span>
<span class="badge bg-warning text-bg-warning d-none d-sm-block">Work In Progress</span>
<span class="badge rounded-pill bg-warning text-bg-warning d-block d-sm-none" aria-label="Work In Progress">
<Svg className="icon-20 align-middle" svg={coneStriped} />
</span>
<a class="nav-link text-white ms-3" href="https://github.com/AmadeusITGroup/AgnosUI" aria-label="link to GitHub repository" target="_blank">
<Svg className="icon-24 align-middle" svg={github} />
</a>
Expand Down
2 changes: 1 addition & 1 deletion demo/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
font-weight: 300;
}
.links {
padding: 1rem;
padding: 1rem 0rem;
@media (min-width: 768px) {
padding: 3rem;
}
Expand Down
14 changes: 12 additions & 2 deletions demo/src/routes/[framework]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import {menu} from '../navigation';
</script>

<div class="container-fluid demo-gutter demo-layout">
<div class="demo-layout">
<aside class="demo-sidebar">
<nav class="w-100">
<ul class="list-unstyled mb-0 pb-3 pb-md-2 pe-lg-2">
<ul class="list-unstyled mb-0 pb-0 pb-md-2 pe-lg-2 main-nav-list">
{#each menu as { title, submenu }}
<li class="py-2" id="sidenav-{title}">
<strong class="d-flex w-100 align-items-center fw-semibold">{title}</strong>
Expand Down Expand Up @@ -36,3 +36,13 @@
<slot />
</div>
</div>

<style lang="scss">
.main-nav-list {
@media (max-width: 992px) {
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
}
</style>

0 comments on commit 509b90e

Please sign in to comment.