Commit 2ac95d70 authored by Lars Bilke's avatar Lars Bilke

Merge branch 'web-styling' into 'master'

Some web styling and fixes

See merge request ogs/ogs!3455
parents 30f93664 840bc125
......@@ -4,7 +4,7 @@ code coverage:
- .template-build-linux
tags: [shell, envinf]
needs:
- job: "build linux: [USE_PYTHON=ON]"
- job: "build linux: [USE_PYTHON=OFF]"
artifacts: false
- meta
variables:
......
......@@ -29,12 +29,16 @@ if(NOT IS_GIT_REPO)
endif()
if(IS_GIT_REPO)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OGS_GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(DEFINED ENV{CI_COMMIT_BRANCH})
set(OGS_GIT_BRANCH $ENV{CI_COMMIT_BRANCH})
else()
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OGS_GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
endif()
if(IS_GIT_REPO AND NOT OGS_VERSION)
......
......@@ -48,21 +48,21 @@ cite::before {
@apply border-blue-200;
@apply border-l-2;
@apply -ml-4;
@apply px-4;
@apply pl-4;
}
.linux {
@apply border-yellow-200;
@apply border-l-2;
@apply -ml-4;
@apply px-4;
@apply pl-4;
}
.mac {
@apply border-gray-200;
@apply border-l-2;
@apply -ml-4;
@apply px-4;
@apply pl-4;
}
#btn-win.active {
......
......@@ -5,6 +5,7 @@ project = "Elliptic/square_1x1_SteadyStateDiffusion/square_1e2.prj"
author = "Dmitri Naumov"
weight = 102
aliases = ["/docs/benchmarks/"]
[menu.docs]
name = "Benchmarks"
......
......@@ -4,6 +4,8 @@ title = "Welcome!"
author = "Lars Bilke"
weight = 1001
aliases = ["/docs/devguide/"]
[menu.docs]
name = "Developer Guide"
identifier = "devguide"
......
......@@ -4,12 +4,12 @@
<h1>{{ .Title }}</h1>
{{ .Content }}
</div>
<div class="flex flex-wrap -m-4">
<div class="flex flex-wrap -m-4 p-4">
{{ range .Site.Menus.docs }}
<div class="xl:w-1/3 md:w-1/2 mt-2 px-4 py-2 md:p-4">
<a href="{{ .URL }}">
<div class="p-4 bg-gray-100 hover:bg-white rounded-lg shadow h-full">
<h3 class="text-xl mb-2 border-b text-gray-800">
<h3 class="text-xl mb-2 border-b text-blue-800">
{{ .Name }}
{{ $url_first_char := substr .URL 0 1 }}
{{ if not (eq $url_first_char "/") }}
......
{{ define "main" }}
<div class="flex-1 relative z-0 overflow-y-auto focus:outline-none">
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
<div class="max-w-7xl mx-auto pl-4 pr-2 sm:px-6 md:px-8">
<h1 class="text-2xl lg:text-3xl font-bold mb-3 lg:mb-5">{{ .Title }}</h1>
{{ if .CurrentSection.Params.os_selector }}
......
......@@ -3,7 +3,7 @@
<!-- {{ partial "components/quicklinks" .Params.hero }} -->
<h1
class="text-center text-3xl lg:text-5xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl sm:leading-10 mt-6 md:mt-10 lg:mt-16 md:mb-4 lg:mb-6">
Announcements & Discussions
Announcements<span class="hidden md:inline"> & Discussions</span>
</h1>
{{ partial "components/news" . }}
<h1
......
......@@ -7,7 +7,7 @@
<h2 class="text-right uppercase text-xs md:text-base lg:text-lg border-b-0 border-t-2">{{ .headline }}</h2>
</div>
</div>
<div class="prose mt-3 max-w-md mx-auto md:mt-5 md:text-lg lg:text-xl md:max-w-3xl">
<div class="prose mt-3 mx-auto md:mt-5 md:text-lg md:max-w-4xl">
{{ markdownify .textline }}
</div>
</div>
......@@ -2,7 +2,7 @@
{{ template "discours-posts" (dict "page" . "category" "announcements" "count" "3") }}
</div>
<div class="relative mx-auto lg:max-w-7xl mt-8">
<div class="hidden md:block relative md:mx-auto lg:max-w-7xl mt-8">
{{ template "discours-posts" (dict "page" . "category" "usability" "count" "3" "heading" "Discussions") }}
</div>
......@@ -11,7 +11,7 @@
<h3 class="mb-4 text-3xl">Latest Benchmarks</h3>
<div class="py-0 lg:px-4">
{{ template "latest-pages" . }}
</div>
</div>
</div>
*/}}
......@@ -19,29 +19,19 @@
{{/*
<h2 class="mb-2 lg:mb-4 text-2xl lg:text-3xl">
{{ if .heading }}
{{ .heading }}
{{ else }}
{{ .category | humanize }}
{{ end }}
{{ .heading }}
{{ else }}
{{ .category | humanize }}
{{ end }}
</h2>
*/}}
<div class="mt-2 grid lg:grid-cols-3 lg:gap-x-5 gap-4" x-data="categoryData('{{ .category }}', {{ .count }})"
<div class="mt-2 grid md:grid-cols-3 lg:gap-x-5 md:gap-4" x-data="categoryData('{{ .category }}', {{ .count }})"
x-init="init()">
<template x-for="topic in topics" :key="topic.id">
<div class="mb-3 border-b-2 lg:border-b-o lg:shadow lg:rounded-lg p-4">
<div class="p-1 px-2 md:p-4 md:mb-3 md:border-b-2 lg:border-b-o lg:shadow lg:rounded-lg">
<a x-bind:href="'https://discourse.opengeosys.org/t/' + topic.slug" class="block">
<template x-if="topic.tags.length > 0">
<div class="float-right lg:float-none">
<span x-text="topic.tags.slice(0, 1)" x-bind:class="{
'bg-indigo-100 text-indigo-800': topic.tags.slice(0, 1) == 'ogs6',
'bg-green-100 text-green-800': topic.tags.slice(0, 1) == 'ogs5',
'bg-pink-100 text-pink-800': topic.tags.slice(0, 1) == 'infrastructure' }"
class="inline-flex items-center px-3 py-0.5 rounded-full text-sm font-medium leading-5">
</span>
</div>
</template>
<h3 x-text="topic.title" class="text-xl font-bold leading-7 text-gray-800 mt-3">
<h3 x-text="topic.title"
class="text-l lg:text-xl font-bold leading-7 text-blue-800 underline mt-3 line-clamp-1 lg:line-clamp-2">
</h3>
<div class="mt-2 flex items-center">
<div class="flex-shrink-0">
......@@ -54,8 +44,18 @@
<time datetime="2020-03-15"
x-text="(new Date(topic.created_at)).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })">
</time>
<template x-if="topic.tags.length > 0">
<div class="float-right lg:float-none hidden">
<span x-text="topic.tags.slice(0, 1)" x-bind:class="{
'bg-indigo-100 text-indigo-800': topic.tags.slice(0, 1) == 'ogs6',
'bg-green-100 text-green-800': topic.tags.slice(0, 1) == 'ogs5',
'bg-pink-100 text-pink-800': topic.tags.slice(0, 1) == 'infrastructure' }"
class="inline-flex items-center mx-1 px-2 py-0.1 rounded-full text-sm font-medium leading-5">
</span>
</div>
</template>
<template x-if="topic.posts_count > 1">
<span>
<span class="hidden lg:inline">
<span class="mx-1">
&middot;
</span>
......
......@@ -3,12 +3,12 @@
class="flex flex-wrap w-full mb-6 flex-col items-center text-center prose prose-sm lg:prose max-w-none lg:max-w-none">
{{ .Content }}
</div>
<div class="flex flex-wrap -m-4">
<div class="flex flex-wrap -m-4 p-4">
{{ range .Site.Menus.publications }}
<div class="xl:w-1/3 md:w-1/2 mt-2 px-4 py-2 md:p-4">
<a href="{{ .URL }}">
<div class="p-4 bg-gray-100 hover:bg-white rounded-lg shadow h-full">
<h3 class="text-xl mb-2 border-b text-gray-800">
<h3 class="text-xl mb-2 border-b text-blue-800">
{{ .Name }}
{{ $url_first_char := substr .URL 0 1 }}
{{ if not (eq $url_first_char "/") }}
......
......@@ -16,5 +16,8 @@
},
"peerDependencies": {
"postcss": "^8.1.9"
},
"dependencies": {
"@tailwindcss/line-clamp": "^0.2.0"
}
}
......@@ -19,6 +19,3 @@ https://docs.opengeosys.org https://www.opengeosys.org/docs 301!
https://docs.opengeosys.org/* https://www.opengeosys.org/:splat 301!
https://tutorials.opengeosys.org https://www.opengeosys.org/categories/tutorials/ 301!
https://benchmarks.opengeosys.org https://www.opengeosys.org/docs/benchmarks/ 301!
/docs/devguide /docs/devguide/getting-started/introduction/
/docs/benchmarks /docs/benchmarks/elliptic/elliptic-dirichlet/
......@@ -77,5 +77,6 @@ module.exports = {
},
plugins: [
require('@tailwindcss/typography'),
require('@tailwindcss/line-clamp'),
],
}
......@@ -31,6 +31,11 @@
"@nodelib/fs.scandir" "2.1.3"
fastq "^1.6.0"
"@tailwindcss/line-clamp@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@tailwindcss/line-clamp/-/line-clamp-0.2.0.tgz#7f30f26ed3835d64d1eb5a9b0d60cf5291dd2a3b"
integrity sha512-+jXSdRK3/9V/BCPCr+iNpMMhxWMMv62vn/AS2b3/ClmueGuhCijW3bUwO1IiHnE7uCaF74Sli8jUCv9djwvpLg==
"@tailwindcss/typography@^0.3.0":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.3.1.tgz#253ce580c8e06b6163d9a288edd24f25e1d0dfee"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment