Skip to content

Commit

Permalink
Merge pull request #1158 from RRZE-Webteam/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
xwolfde authored Jun 30, 2022
2 parents 6cb0c10 + 31f2b6a commit 8c7b4b0
Show file tree
Hide file tree
Showing 13 changed files with 22,235 additions and 32 deletions.
5,215 changes: 5,214 additions & 1 deletion css/fau-theme-admin.css

Large diffs are not rendered by default.

19 changes: 17 additions & 2 deletions functions/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Name des Options-Array

$defaultoptions = [
'optiontable-version' => 80,
'optiontable-version' => 81,
// zaehlt jedesmal hoch, wenn neue Optionen eingefuegt werden
// oder Default Optionen geaendert werden. Vorhandene Defaultoptions
// in der Options-Table werden nur dann geändert, wenn der Wert erhöht
Expand Down Expand Up @@ -248,6 +248,15 @@
// 'advanced_display_header_md-showsitelogo' => false,
// Zeigt bei der mobilen Ansicht statt dem Logo der Website das
// CI Logo der FAU anstelle des Logos der Website
'advanced_display_portalmenu_button' => true,
// Per Default wird ein Button zur Verlinkung der jeweiligen
// Menüoberseite im Flyout angezeigt.
// Wenn das Flyout jedoch auf Hover/Focus öffnet, kann der Button
// weggelassen werden, da dann auch der Klick auf den Hauptmenüpunkt
// wirksam ist.
// Diese Option wirkt nicht, wenn das Menü einen Klick
// erfordert um zu öffnen.

'advanced_header_template' => '',
// Anzeigeform des Heros bei Index- und Kategorieseiten
'advanced_template_page_start_display_content' => false,
Expand Down Expand Up @@ -1056,7 +1065,13 @@ function fau_get_searchable_fields() {
'title' => __( 'Hauptmenü', 'fau' ),
),


'advanced_display_portalmenu_button' => array(
'type' => 'toggle',
'title' => __( 'Menü Portal-Button anzeigen', 'fau' ),
'label' => __( 'Der Button im Aufklappmenü verlinkt zur Seite des gewählten Oberpunktes. Mit dieser Option kann das Button bei Menüs, die nicht auf Klick, sondern auf Maushover öffnen, deaktiviert werden. Diese Option wirkt nicht, wenn das Menü einen Klick erfordert um zu öffnen.', 'fau' ),
'default' => $defaultoptions['advanced_display_portalmenu_button'],
'parent' => 'topmenulinks'
),
'menu_pretitle_portal' => array(
'type' => 'text',
'title' => __( 'Menü Portal-Button (Vortitel)', 'fau' ),
Expand Down
4 changes: 2 additions & 2 deletions functions/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@

'meta' => array(
'link1' => array(
'name' => __('Mein Campus', 'fau' ),
'content' => 'https://campus.fau.de/',
'name' => __('Campo', 'fau' ),
'content' => 'https://campo.fau.de/',
),
'link2' => array(
'name' => __('UnivIS', 'fau' ),
Expand Down
27 changes: 16 additions & 11 deletions functions/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,22 @@ function end_lvl(&$output, $depth = 0, $args = array()) {
$output .= '</ul>';
$currenttitle = fau_get_the_title($this->currentID);
if (!empty($currenttitle)) {
$output .= '<a href="'.get_permalink($this->currentID).'" class="button-portal">';
$pretitle = get_theme_mod('menu_pretitle_portal');
if (!fau_empty($pretitle)) {
$output .= $pretitle.' ';
}
$output .= $currenttitle;
$posttitle = get_theme_mod('menu_aftertitle_portal');
if (!fau_empty($posttitle)) {
$output .= ' '.$posttitle;
}
$output .= '</a>';
$display_button = get_theme_mod('advanced_display_portalmenu_button');
$display_forceclick = get_theme_mod('advanced_display_portalmenu_forceclick');

if (((isset($display_button)) && ($display_button==true)) || ($display_forceclick==true)) {
$output .= '<a href="'.get_permalink($this->currentID).'" class="button-portal">';
$pretitle = get_theme_mod('menu_pretitle_portal');
if (!fau_empty($pretitle)) {
$output .= $pretitle.' ';
}
$output .= $currenttitle;
$posttitle = get_theme_mod('menu_aftertitle_portal');
if (!fau_empty($posttitle)) {
$output .= ' '.$posttitle;
}
$output .= '</a>';
}
}

$output .= '</div>';
Expand Down
22 changes: 15 additions & 7 deletions functions/posttype_imagelink.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,27 +241,35 @@ function fau_imagelink_get( $atts = array()) {
$currenturl = get_post_meta( $item->ID, 'fauval_imagelink_url', true );
$imageid = get_post_thumbnail_id( $item->ID );

if ((!empty($currenturl)) && ($imageid > 0)) {
if ($imageid > 0) {
$number++;
$item_output .= '<div class="slick-item';
if (!empty($imagelink_option['class'])) {
$item_output .= ' '.$imagelink_option['class'];
}
$item_output .= '">';
$item_output .= '<a';
if (fau_is_url_external($currenturl)) {
$item_output .= ' rel="nofollow"';
if (!empty($currenturl)) {
$item_output .= '<a';
if (fau_is_url_external($currenturl)) {
$item_output .= ' rel="nofollow"';
}

$item_output .= ' href="'.$currenturl.'">';
} else {
$item_output .= '<span class="image">';
}

$item_output .= ' href="'.$currenturl.'">';
$alttext = get_the_title($item->ID);
$alttext = esc_html($alttext);
if (empty($alttext)) {
$alttext = __("Zum Webauftritt: ", 'fau').$currenturl;
}
$item_output .= fau_get_image_htmlcode($imageid, 'rwd-480-3-2', $alttext);
// $item_output .= fau_get_image_htmlcode($imageid, $imagelink_option['size'], $alttext);
$item_output .= '</a>';
if (!empty($currenturl)) {
$item_output .= '</a>';
} else {
$item_output .= '</span>';
}
$item_output .= '</div>';
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FAU-Einrichtungen",
"textdomain": "fau",
"version": "2.1.1",
"version": "2.1.2-5",
"keywords": [
"WordPress",
"Theme",
Expand Down
2 changes: 1 addition & 1 deletion page-templates/page-start.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<?php

if (get_theme_mod('advanced_template_page_start_display_content')===true) {
if (get_theme_mod('advanced_template_page_start_display_content')==true) {
the_content();
}

Expand Down
2 changes: 1 addition & 1 deletion print.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/sass/elements/_links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ main,
}



figure > a,
a.media-img {
@include defaultlinkstyle();
display: inline-block;
Expand All @@ -152,6 +152,8 @@ main,
}

}
figure > a:hover,
figure > a:focus,
a.media-img:hover,
a.media-img:focus {
img {
Expand Down
5 changes: 4 additions & 1 deletion src/sass/structure/content/_imagelink.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
height: auto;
margin: 0 10px;

a {
a, .image {
height: 150px;
display: flex;
margin: auto;
Expand Down Expand Up @@ -99,6 +99,7 @@
.post-thumbnails .slick-item {
margin: 10px 2px;
}
.slick-item.rounded .image,
.slick-item.rounded a {
aspect-ratio: 1 / 1;
height: auto;
Expand Down Expand Up @@ -284,6 +285,7 @@
border-color: var(--color-primary-dunkelste);
}

.image,
a {
margin: auto;
vertical-align: middle;
Expand All @@ -307,6 +309,7 @@
border-width: 2px;
border-color: var(--color-ContentBorders);

.image,
a {
padding: 5px;
}
Expand Down
4 changes: 3 additions & 1 deletion src/sass/structure/navigation/_mainmenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
transition: transform .2s ease-in-out;
}
}

&:hover {
> a {
@include border-bottom-radius(0);
Expand All @@ -81,6 +80,7 @@
}

> [type=button][aria-expanded=true] {
@include border-bottom-radius(0);
&:before {
transform: rotate(-180deg);
}
Expand Down Expand Up @@ -422,6 +422,8 @@
right: 11px;
}
}


}
}

Expand Down
16,959 changes: 16,957 additions & 2 deletions style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion theme.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.1.1",
"version": "2.1.2-5",
"settings": {
"color": {
"custom": false,
Expand Down

0 comments on commit 8c7b4b0

Please sign in to comment.