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

Responsive layout for the vocabulary home page + layout adjustments #1754

Merged
merged 4 commits into from
Jan 29, 2025
Merged
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
14 changes: 13 additions & 1 deletion resource/css/skosmos.css
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,18 @@ body {

#main-container {
font-size: 16px;
padding-top: 2.75rem;
}

#main-container h1 {
font-family: var(--font-family-heading);
font-weight: bold;
}

#main-container-row {
--bs-gutter-x: 2.25rem;
}

/***** Main container frontpage & frontpage one vocab *****/
#background.frontpage, #background.frontpage-one-vocab {
background-color: var(--main-bg-1);
Expand Down Expand Up @@ -712,13 +717,20 @@ body {
.main-content-section {
background-color: var(--vocab-bg);
margin-bottom: .2rem;
padding-left: 3.5rem;
padding-right: 3.5rem;
}

#concept-heading {
#concept-heading, #vocab-heading {
margin-top: 2rem;
padding-bottom: 2.5rem;
}

#vocab-heading, .vocab-statistics, #vocab-download-links {
margin-left: -.75rem;
margin-right: -.75rem;
}

.property {
border-top: 1px solid var(--vocab-table-border);
padding: .5rem 0;
Expand Down
4 changes: 2 additions & 2 deletions resource/js/concept-mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ const conceptMappingsApp = Vue.createApp({
template: `
<div v-load-concept-page="loadMappings">
<template v-if="loading">
<div class="main-content-section px-5 py-4">
<div class="main-content-section py-4">
<i class="fa-solid fa-spinner fa-spin-pulse"></i>
</div>
</template>
<template v-else-if="hasMappings">
<div class="main-content-section px-5 py-4">
<div class="main-content-section py-4">
<concept-mappings :mappings="mappings" :customLabels="customLabels"></concept-mappings>
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/view/base-template.twig
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@
</div>
{% endif %}
</header>
<main id="main-container" class="{% if request.vocabid == '' or global_search %} frontpage{% elseif concept_uri != '' %} termpage{% elseif request.vocab != '' %} vocabpage{% if list_style %} {{ list_style }}{% endif %}{% endif %} py-5">
<main id="main-container" class="{% if request.vocabid == '' or global_search %} frontpage{% elseif concept_uri != '' %} termpage{% elseif request.vocab != '' %} vocabpage{% if list_style %} {{ list_style }}{% endif %}{% endif %}">
<div class="container">
<noscript>
<strong>We're sorry but Skosmos doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div class="row" tabindex="-1">
<div id="main-container-row" class="row" tabindex="-1">
{% block content %}
{% endblock %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/view/concept-card.inc.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="col-md-8" id="main-content">

<div class="main-content-section px-5 py-4">
<div class="main-content-section py-4">

{% if visible_breadcrumbs and visible_breadcrumbs[0]|length > 1 %}
<nav class="row" id="concept-breadcrumbs" aria-label='{{ "Breadcrumbs" | trans }}'>
Expand Down
12 changes: 6 additions & 6 deletions src/view/vocab-info.inc.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="col-md-8" id="main-content">
<div class="main-content-section px-5 py-4">
<h1 class="pt-3 pb-5">{{ "Vocabulary information" | trans }}</h1>
<div class="main-content-section py-4">
<h1 id="vocab-heading">{{ "Vocabulary information" | trans }}</h1>

{% set vocabInfo = vocab.info(request.contentLang) %}
{% if not vocabInfo %}
Expand All @@ -10,9 +10,9 @@
{% else %}

{% for key, values in vocabInfo %}
<div class="row property g-0">
<div class="col-sm-4 px-0 property-label"><h2>{{ key | trans }}</h2></div>
<div class="col-sm-8 align-self-center property-value">
<div class="row property">
<div class="col-lg-4 ps-0 property-label"><h2>{{ key | trans }}</h2></div>
<div class="col-lg-8 gx-0 gx-lg-4 align-self-center property-value">
<ul class="align-bottom">
{% for val in values %}
<li>
Expand Down Expand Up @@ -45,7 +45,7 @@
{% endif %}

{% if vocab.config.dataURLs %}
<div class="row g-0 py-3">
<div class="row py-3" id="vocab-download-links">
<div class="col-sm-12 px-0 property-label" id="download-links">
<h2><i class="fa-solid fa-download"></i> {{ "Download this vocabulary:" | trans }}</h2>
<ul class="d-inline">
Expand Down
2 changes: 1 addition & 1 deletion src/view/vocab-search.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block url %}{{ BaseHref }}{{ request.langurl }}{% endblock %}

{% block content %}
<main class="searchpage py-5" id="main-container" >
<main class="searchpage" id="main-container">
<div class="container">
<div class="row">
{% include "search-results-filter.inc.twig" %}
Expand Down