Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISS101 Improve mobile responsiveness #105

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/ananke"]
path = themes/ananke
url = https://github.com/theNewDynamic/gohugo-theme-ananke.git
4 changes: 4 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@tailwind base;
@tailwind colors;
@tailwind components;
@tailwind utilities;
10 changes: 10 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@ baseURL = "https://webtest.ivoa.info"
languageCode = "en-us"
title = "International Virtual Observatory Alliance"
author = "IVOA.net"
theme= "ananke"

[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true

[build]
writeStats = true
useResourceCacheWhen = "fallback"
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
{{- partial "head.html" . -}}
{{- .Scratch.Set "canBeIndexed" (or (or (eq .BundleType "branch") (hasPrefix .Type "_")) (or (eq .Kind "term") (eq .Kind "taxonomy"))) }}
<body{{- if (.Scratch.Get "canBeIndexed") }} data-pagefind-ignore{{- end }}>
<body class="mx-auto max-w-6xl" {{- if (.Scratch.Get "canBeIndexed") }} data-pagefind-ignore{{- end }}>
{{- partial "header.html" . -}}
<main {{- if not (.Scratch.Get "canBeIndexed") }} data-pagefind-body data-pagefind-meta="date:{{- .Date.Format "2006-01-02" }}"{{- end }}>
{{- block "main" . }}{{- end }}
Expand Down
10 changes: 8 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--
<link rel="stylesheet" href="{{ .Site.Home.Permalink}}/css/fa.min.css">
-->
<link rel="stylesheet" href="{{ .Site.Home.Permalink}}/css/layout.css">
<!--
<link rel="stylesheet" href="{{ .Site.Home.Permalink}}/css/ivoa.css">

-->
<link href="{{ "css/tailwind.css" | resources.Get | css.PostCSS | resources.Minify | relURL }}" rel="stylesheet">
<script src="{{ .Site.Home.Permalink}}/js/layout.js" defer></script>
<title>IVOA.net - International Virtual Observatory Alliance</title>
</head>
71 changes: 57 additions & 14 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,57 @@
<header>
<a class="header-logo" href="{{ .Site.Home.RelPermalink}}">
<img src="/images/ivoa_logo.png">
<span>International Virtual<br/>Observatory Alliance</span>
</a>
<nav>
<a href="{{ .Site.Home.Permalink}}">Home</a>
<a href="{{ .Site.Home.Permalink}}astronomers/">Astronomers</a>
<a href="{{ .Site.Home.Permalink}}deployers/">Deployers</a>
<a href="{{ .Site.Home.Permalink}}members/">Members</a>
<a href="{{ .Site.Home.Permalink}}about/">About</a>
<a class="search" href="{{ .Site.Home.Permalink}}search/">Search</a>
</nav>
</header>
<header class="bg-primary w-full">
<div class="max-w-[2560px] mx-auto px-6">
<!-- Desktop & Tablet (768px+) -->
<div class="hidden md:flex flex-col">
<!-- First Row -->
<div class="flex items-center h-20">
<img src="/images/ivoa_logo.png" alt="IVOA Logo" class="h-12 w-auto mr-4">
<span class="text-white text-xl lg:text-2xl">International Virtual Observatory Alliance</span>
</div>

<!-- Second Row -->
<div class="flex justify-end pb-4">
<div class="flex gap-8">
<a href="{{ .Site.Home.Permalink}}" class="text-white hover:text-gray-300">Home</a>
<a href="{{ .Site.Home.Permalink}}astronomers/" class="text-white hover:text-gray-300">Astronomers</a>
<a href="{{ .Site.Home.Permalink}}deployers/" class="text-white hover:text-gray-300">Deployers</a>
<a href="{{ .Site.Home.Permalink}}members/" class="text-white hover:text-gray-300">Members</a>
<a href="{{ .Site.Home.Permalink}}about/" class="text-white hover:text-gray-300">About</a>
<a href="{{ .Site.Home.Permalink}}search/" class="text-white hover:text-gray-300">Search</a>
</div>
</div>
</div>

<!-- Mobile (<768px) -->
<div class="md:hidden">
<div class="flex items-center justify-between h-16">
<div class="flex items-center space-x-3">
<img src="/images/ivoa_logo.png" alt="IVOA Logo" class="h-10 w-auto">
<span class="text-white text-xs">International Virtual Observatory Alliance</span>
</div>
<button
type="button"
class="p-2 text-white hover:bg-white/10 rounded-lg transition-colors"
onclick="toggleMobileMenu()"
aria-expanded="false"
aria-controls="mobile-menu"
>
<span class="sr-only">Open main menu</span>
<svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>

<div id="mobile-menu" class="hidden mt-2 border-t border-white/10">
<nav class="py-2">
<a href="{{ .Site.Home.Permalink}}" class="block text-white hover:bg-white/10 text-sm px-4 py-2 transition-colors">Home</a>
<a href="{{ .Site.Home.Permalink}}astronomers/" class="block text-white hover:bg-white/10 text-sm px-4 py-2 transition-colors">Astronomers</a>
<a href="{{ .Site.Home.Permalink}}deployers/" class="block text-white hover:bg-white/10 text-sm px-4 py-2 transition-colors">Deployers</a>
<a href="{{ .Site.Home.Permalink}}members/" class="block text-white hover:bg-white/10 text-sm px-4 py-2 transition-colors">Members</a>
<a href="{{ .Site.Home.Permalink}}about/" class="block text-white hover:bg-white/10 text-sm px-4 py-2 transition-colors">About</a>
<a href="{{ .Site.Home.Permalink}}search/" class="block text-white hover:bg-white/10 text-sm px-4 py-2 transition-colors">Search</a>
</nav>
</div>
</div>
</div>
</header>
6 changes: 6 additions & 0 deletions postcss.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"plugins": {
"tailwindcss": {},
"autoprefixer": {}
}
}
6 changes: 6 additions & 0 deletions static/css/layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.bg-primary-dark {
background-color: color-mix(in srgb, var(--color-primary) 80%, black);
}
.bg-primary-darker {
background-color: color-mix(in srgb, var(--color-primary) 60%, black);
}
Loading
Loading