master
Seph 2024-04-27 21:21:33 +02:00
parent 457701a907
commit 3befe56011
13 changed files with 306 additions and 170 deletions

View File

@ -145,3 +145,14 @@ div.mce-floatpanel{
}
.asgarosforum-widget {
.widget-content{
@apply flex flex-col justify-start items-start;
.post-author{
@apply text-white;
}
}
}

View File

@ -20,3 +20,13 @@
.entry-content {
@apply px-8 bg-glass;
}
.editor-styles-wrapper{
z-index:1;
}
.wp-block-widget-area__panel-body-content {
.editor-styles-wrapper{
z-index:0;
}
}

View File

@ -41,30 +41,30 @@
:root {
--wowp-gap: 1em;
--color-deathknight: #C41E3A;
--color-demonhunter: #A330C9;
--color-druid: #DD7C0A;
--color-evoker: #33937F;
--color-hunter: #AAD372;
--color-mage: #3FC7EB;
--color-monk: #00FF98;
--color-paladin: #F48CBA;
--color-priest: #FFFFFF;
--color-rogue: #FFF468;
--color-shaman: #0070DD;
--color-warlock: #8788EE;
--color-warrior: #C69B6D;
--color-deepblue: #000032;
--color-alliance: #f7941e;
--color-background: var(--color-deepblue);
--color-glass:color-mix(in lch, transparent 75%, var(--color-background) );
--color-deathknight: #C41E3A;
--color-demonhunter: #A330C9;
--color-druid: #DD7C0A;
--color-evoker: #33937F;
--color-hunter: #AAD372;
--color-mage: #3FC7EB;
--color-monk: #00FF98;
--color-paladin: #F48CBA;
--color-priest: #FFFFFF;
--color-rogue: #FFF468;
--color-shaman: #0070DD;
--color-warlock: #8788EE;
--color-warrior: #C69B6D;
--color-deepblue: #000032;
--color-alliance: #f7941e;
--color-background: var(--color-deepblue);
--color-glass: color-mix(in lch, transparent 75%, var(--color-background));
}
.p-auto{
.p-auto {
padding: var(--wowp-gap);
}
.gap-auto{
.gap-auto {
gap: var(--wowp-gap);
}
@ -72,7 +72,7 @@ body {
background-color: unset;
--body-bg: url('https://bnetcmsus-a.akamaihd.net/cms/blog_header/3i/3ITOIMA3P61U1699028715242.png');
position: relative;
z-index: -10;
z-index: -10;
@apply min-h-screen;
}
@ -81,7 +81,7 @@ z-index: -10;
backdrop-filter: blur(10px);
}
.shadow{
.shadow {
-webkit-box-shadow: 5px 5px 9px 0px rgba(0, 0, 0, 0.5);
box-shadow: 5px 5px 9px 0px rgba(0, 0, 0, 0.5);
}
@ -113,9 +113,10 @@ body:before {
}
.content-wrapper {
display: flex;
flex-direction:column;
gap: var(--wowp-gap);
display: flex;
flex-direction: column;
gap: var(--wowp-gap);
@media screen(xl) {
display: grid;
grid-column-gap: var(--wowp-gap);
@ -125,124 +126,180 @@ gap: var(--wowp-gap);
}
}
article{
margin-inline: var(--wowp-gap);
@media screen(xl){
margin-inline: unset;
}
article {
margin-inline: var(--wowp-gap);
@media screen(xl) {
margin-inline: unset;
}
}
.post-wrapper {
display: grid;
grid-template-columns: auto auto 1fr;
grid-template-rows: auto auto 1fr auto;
grid-column-gap: var(--wowp-gap);
grid-row-gap: var(--wowp-gap);
.post-wrapper {
display: grid;
grid-template-columns: auto auto 1fr;
grid-template-rows: auto auto 1fr auto;
grid-column-gap: var(--wowp-gap);
grid-row-gap: var(--wowp-gap);
}
.post-title {
grid-area: 1 / 1 / 2 / 4;
@apply text-center text-2xl py-2;
}
.post-content {
grid-area: 3 / 1 / 4 / 4;
padding-inline: var(--wowp-gap);
}
.post-category {
grid-area: 2 / 1 / 3 / 4;
span {
@apply p-0;
&:before {
height: 1.5em;
}
.post-title { grid-area: 1 / 1 / 2 / 4;
@apply text-center text-2xl py-2;
&:after {
height: 1.5em;
}
.post-content { grid-area: 3 / 1 / 4 / 4;
padding-inline: var(--wowp-gap);}
.post-category { grid-area: 2 / 1 / 3 / 4;
span{
@apply p-0;
&:before{
height: 1.5em;
}
&:after{
height: 1.5em;
}
@media screen(xl) {
padding: .75em 1.25em .75em .75em;
&:before{
height: 3em;
}
&:after{
height: 3em;
}
}
@media screen(xl) {
padding: .75em 1.25em .75em .75em;
&:before {
height: 3em;
}
}
.post-author { grid-area: 4 / 3 / 5 / 4;
@apply text-end;
color: var(--author-class);
padding-right: var(--wowp-gap);
padding-bottom: var(--wowp-gap);
}
.post-day { grid-area: 4 / 1 / 5 / 2;
padding-left: var(--wowp-gap);
padding-bottom: var(--wowp-gap);
}
.post-month { grid-area: 4 / 2 / 5 / 3;
padding-bottom: var(--wowp-gap);
}
.post-avatar{
display:none;
&:after {
height: 3em;
}
}
@media screen(xl){
}
}
.post-author {
grid-area: 4 / 3 / 5 / 4;
@apply text-end;
color: var(--author-class);
padding-right: var(--wowp-gap);
padding-bottom: var(--wowp-gap);
}
.post-day {
grid-area: 4 / 1 / 5 / 2;
padding-left: var(--wowp-gap);
padding-bottom: var(--wowp-gap);
}
.post-month {
grid-area: 4 / 2 / 5 / 3;
padding-bottom: var(--wowp-gap);
}
.post-avatar {
display: none;
}
@media screen(xl) {
.post-wrapper {
display: grid;
grid-template-columns: 1fr 7fr;
grid-template-rows: auto auto 1fr auto auto 1fr auto;
grid-column-gap: var(--wowp-gap);
grid-row-gap: 0px;
}
}
.post-title { grid-area: 1 / 2 / 2 / 5;
.post-title {
grid-area: 1 / 2 / 2 / 5;
@apply text-4xl text-left;
}
.post-content { grid-area: 2 / 2 / 8 / 5;
}
.post-content {
grid-area: 2 / 2 / 8 / 5;
@apply prose prose-wowpress;
padding: unset;
padding-right: var(--wowp-gap);
}
.post-day { grid-area: 1 / 1 / 2 / 2;
@apply bg-shaman flex flex-row items-center justify-center text-4xl;
padding:unset;
}
}
.post-month {
@apply bg-slate-400 flex flex-row items-center justify-center text-xl;
padding: unset;
grid-area: 2 / 1 / 3 / 2;
}
.post-category { grid-area: 3 / 1 / 4 / 2;
.post-day {
grid-area: 1 / 1 / 2 / 2;
@apply bg-shaman flex flex-row items-center justify-center text-4xl;
padding: unset;
}
.post-month {
@apply bg-slate-400 flex flex-row items-center justify-center text-xl;
padding: unset;
grid-area: 2 / 1 / 3 / 2;
}
.post-category {
grid-area: 3 / 1 / 4 / 2;
@apply bg-glass;
margin-top: var(--wowp-gap);
}
.post-avatar {
@apply flex flex-col justify-end items-center bg-glass;
grid-area: 4 / 1 / 7 / 2;
img{
@apply rounded-md mb-4 outline shadow w-20;
outline-color: var(--author-class);
.post-avatar {
@apply flex flex-col justify-end items-center bg-glass;
grid-area: 4 / 1 / 7 / 2;
}
img {
@apply rounded-md mb-4 outline shadow w-20;
outline-color: var(--author-class);
}
.post-author { grid-area: 7 / 1 / 8 / 2;
@apply flex flex-row items-center justify-center;
padding:unset;
background-color: var(--author-class);
color: black;
}
}
.post-author {
grid-area: 7 / 1 / 8 / 2;
@apply flex flex-row items-center justify-center;
padding: unset;
background-color: var(--author-class);
color: black;
}
}
.page-numbers {
@apply btn btn-alliance;
&.current {
@apply btn-outline;
}
}
.is-type-video {
@apply w-full;
@media screen(lg) {
@apply w-1/2;
}
}
.logo {
mask-image: url(icons/logo_nk.png);
mask-repeat: no-repeat;
mask-position: center;
mask-mode: auto;
background-color: var(--color-alliance);
mask-size: contain;
-webkit-mask-image: url(icons/logo_nk.png);
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-mode: auto;
-webkit-mask-size: contain;
}

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -263,6 +263,7 @@ if ( ! function_exists( 'wowpress_the_posts_navigation' ) ) :
'mid_size' => 2,
'prev_text' => __( 'Newer posts', 'wowpress' ),
'next_text' => __( 'Older posts', 'wowpress' ),
#'base' => "%_%",
)
);
}

View File

@ -36,7 +36,15 @@ get_header();
}
// Previous/next page navigation.
wowpress_the_posts_navigation();
?>
<template x-data x-teleport="#sidebar_bottom">
<div class="bg-glass shadow p-auto flex flex-row justify-center gap-2">
<?php foreach(paginate_links(['type' => 'array']) as $link):?>
<?=$link?>
<?php endforeach; ?>
</div>
</template>
<?php
} else {

File diff suppressed because one or more lines are too long

View File

@ -4,17 +4,20 @@
<div class="bg-glass shadow p-auto order-last flex flex-col gap-2">
<h3 class="text-xl font-bold text-center"><?= $this->title ?></h3>
<h4 class="text-lg font-bold text-center"><?=$instance['raid_name']?></h4>
<h4 class="text-lg font-bold text-center"><?= $instance['raid_name'] ?></h4>
<div class="relative pt-1">
<div class="overflow-hidden h-2 mb-4 text-xs flex bg-slate-200">
<div style="width:<?=$this->getCompletePercent($instance)?>%" class="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-alliance"></div>
</div>
</div>
<?php
foreach ($instance['bosses'] as $boss) {
if (!empty($boss['name'])) :
foreach ($this->getBossList($instance) as $boss) {
?>
<div class="flex flex-row gap-2 justify-around">
<div><?= $boss['name'] ?></div>
<div><?= $boss['date']?format_date($boss['date']):"Nicht besiegt" ?></div>
</div>
<div class="flex flex-row gap-2">
<div><?= $boss['name'] ?></div>
<div class="w-full text-end"><?= $boss['date'] ? format_date($boss['date']) : "Nicht besiegt" ?></div>
</div>
<?php
endif;
}
?>
</div>

View File

@ -2,6 +2,18 @@
use WoWPress\Models\Character;
function hasSearch($specs)
{
foreach ($specs as $spec) {
foreach ($spec as $search) {
if ($search) {
return true;
}
}
}
return false;
}
?>
<div class="bg-glass shadow p-auto order-last flex flex-col gap-1">
<h1 class="text-xl font-bold text-center">Klassensuche</h1>

View File

@ -9,7 +9,7 @@ use WoWPress\Models\User;
$user = User::find(get_current_user_id());
$raids = Raid::where('start', '>', date('Y-m-d H:i', strtotime('NOW')))->get()->take(intval($instance['count']) ?: 1);
$character = $user->raiders->first();
if(!empty($character)){
?>
<div class="bg-glass shadow p-auto flex flex-col gap-auto order-last">
@ -32,3 +32,4 @@ $character = $user->raiders->first();
</div>
<?php endforeach; endif;?>
</div>
<?php }

View File

@ -9,8 +9,8 @@ class CreateCharacterTable extends CreateTable
public static $fields = [
'name' => 'text NOT NULL',
'realm' => 'text NOT NULL',
'class' => "text DEFAULT Adventurer",
'spec' => "text DEFAULT Brave",
'class' => "text",
'spec' => "text",
'id_blizz' => 'mediumint',
'id_wowaudit' => 'mediumint',
'raidchar' => 'boolean DEFAULT 0',

View File

@ -12,6 +12,29 @@ class BossKills extends Widget
protected $restricted = false;
public function getBossList($instance){
$out = [];
foreach($instance['bosses'] as $boss){
if(!empty($boss['name'])){
$out[] = $boss;
}
}
return $out;
}
public function getCompletePercent($instance){
$bosses = $this->getBossList($instance);
$done = 0;
foreach($bosses as $boss){
if(!empty($boss['date'])){
$done++;
}
}
return (($done/100)*count($bosses))*1000;
}
public function form($instance)
{