Initial commit
This commit is contained in:
13
resources/views/components/breadcrumbs.blade.php
Normal file
13
resources/views/components/breadcrumbs.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@unless ($breadcrumbs->isEmpty())
|
||||
<div class="breadcrumb">
|
||||
@foreach ($breadcrumbs as $breadcrumb)
|
||||
|
||||
@if ($breadcrumb->url && !$loop->last)
|
||||
<a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a> <span>›</span>
|
||||
@else
|
||||
<span>{{ $breadcrumb->title }}</span>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
@endunless
|
||||
8
resources/views/components/entry-meta-item.blade.php
Normal file
8
resources/views/components/entry-meta-item.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="entry-meta-item">
|
||||
<span class="entry-meta-label">{{ $label }}</span>
|
||||
@if( $route !== "none" )
|
||||
<a href="{{ $route }}" class="entry-meta-value">{{ $value }}</a>
|
||||
@else
|
||||
<span class="entry-meta-value">{{ $value }}</span>
|
||||
@endif
|
||||
</div>
|
||||
3
resources/views/components/entry-section-title.blade.php
Normal file
3
resources/views/components/entry-section-title.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<h2 class="entry-section-title">
|
||||
@if( $icon != '' )<i data-lucide="{{ $icon }}"></i>@endif {{ $label }}
|
||||
</h2>
|
||||
3
resources/views/components/error-block.blade.php
Normal file
3
resources/views/components/error-block.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="block-error">
|
||||
<i data-lucide="{{ $errorArray['icon'] ?? '' }}"></i> {{ sprintf( $errorArray['message'], $message ) }}
|
||||
</div>
|
||||
6
resources/views/components/form-error-text.blade.php
Normal file
6
resources/views/components/form-error-text.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<span class="form-error-text">
|
||||
@if( $icon )
|
||||
<i data-lucide="alert-triangle" size="14"></i>
|
||||
@endif
|
||||
{{ $message }}
|
||||
</span>
|
||||
10
resources/views/components/form-field-title.blade.php
Normal file
10
resources/views/components/form-field-title.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<label class="form-label">
|
||||
{{ $name }}
|
||||
@if( $required )
|
||||
<span style="color:red">*</span>
|
||||
@endif
|
||||
@if( $helper !== "" )
|
||||
<span>{{ $helper }}</span>
|
||||
@endif
|
||||
</label>
|
||||
{{ $slot }}
|
||||
7
resources/views/components/form-group-title.blade.php
Normal file
7
resources/views/components/form-group-title.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<h3 class="form-group-title">
|
||||
@if( $icon !== "" )
|
||||
<i data-lucide="{{ $icon }}" color="var(--rhpz-orange"></i>
|
||||
@endif
|
||||
{{ $label }}
|
||||
</h3>
|
||||
{{ $slot }}
|
||||
34
resources/views/components/gallery-field.blade.php
Normal file
34
resources/views/components/gallery-field.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div x-data="GalleryManager()" x-init="init(@js($oldPaths))">
|
||||
<x-form-field-title name="Screenshots" helper="At least 1 Screenshot required, Maximum 20." required="{{ $required ? 'true' : 'false' }}" />
|
||||
<div class="form-group main-image-grid">
|
||||
<div class="form-upload" style="flex:1;" :class="{ 'disabled': isFull }">
|
||||
<input type="file" id="gallery-field" accept="image/png, image/jpeg, image/webp" multiple :disabled="isFull" @change="handleSubmitFiles($event)">
|
||||
<div class="form-upload-placeholder level">
|
||||
<i data-lucide="file-archive" size="36" style="margin-bottom:15px;color:var(--text2)"></i>
|
||||
<div style="font-size: 1.1rem;color:var(--text);margin-bottom:5px;">
|
||||
Click or drag'n drop files here.
|
||||
</div>
|
||||
<div style="font-size:0.85rem;color:var(--text2);">
|
||||
Accepted: PNG, JPG or WebP
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-gallery form-group level" style="flex:4;">
|
||||
<template x-for="(image,i) in images" :key="image.serverFilePath">
|
||||
<div class="gallery-item">
|
||||
<div class="form-image-preview-wrap">
|
||||
<img :src="image.preview" :alt="image.name">
|
||||
<button type="button" class="form-image-remove" @click="handleRemoveFile(i)">
|
||||
X
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template x-for="(image, i) in images" :key="image.serverFilePath">
|
||||
<input type="hidden" name="gallery[]" :value="image.serverFilePath">
|
||||
</template>
|
||||
|
||||
</div>
|
||||
29
resources/views/components/languages-selector.blade.php
Normal file
29
resources/views/components/languages-selector.blade.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php /** @var \App\Models\Language $language */ ?>
|
||||
<div class="languages-selector form-group level" x-data="{
|
||||
search: '',
|
||||
selected: {{ JS::from( (array) $selected ) }},
|
||||
toggle(value){
|
||||
const i = this.selected.indexOf(value);
|
||||
i === -1 ? this.selected.push(value) : this.selected.splice(i,1);
|
||||
},
|
||||
valueSelect(value){
|
||||
return this.selected.includes(value);
|
||||
},
|
||||
get count(){ return this.selected.length; }
|
||||
}">
|
||||
<div class="language-search">
|
||||
<i data-lucide="search"></i>
|
||||
<input type="text" x-model="search" placeholder="Search language" autocomplete="off">
|
||||
<button class="btn" type="button" x-show="search !== ''" @click="search = ''" x-cloak>
|
||||
<i data-lucide="x"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="language-list" id="languages-group">
|
||||
@foreach( $languages as $language )
|
||||
<label class="language-item" x-show="'{{ strtolower($language->name) }}'.includes(search.toLowerCase())">
|
||||
<input type="checkbox" name="languages[]" value="{{ $language->id }}" x-model="selected" :value="{{ $language->id }}" {{ in_array($language->id, $selected) ? 'checked' : '' }}> {{ $language->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
37
resources/views/components/main-image-field.blade.php
Normal file
37
resources/views/components/main-image-field.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<div x-data="MainImageManager()" x-init="init('{{$oldPath}}')">
|
||||
<x-form-field-title name="Main image" helper="This will show up on the index and on top of the entry. A screenshot or custom cover is prefered else all entries of same game will look the same." required="{{ $required ? 'true' : 'false' }}" />
|
||||
<div class="form-group main-image-grid">
|
||||
<div class="form-upload" style="flex:4;">
|
||||
<input type="file" id="main-image-field" accept="image/png, image/jpeg, image/webp" @change="handleSubmitFile($event)">
|
||||
<div class="form-upload-placeholder level">
|
||||
<i data-lucide="file-archive" size="36" style="margin-bottom:15px;color:var(--text2)"></i>
|
||||
<div style="font-size: 1.1rem;color:var(--text);margin-bottom:5px;">
|
||||
Click or drag'n drop files here.
|
||||
</div>
|
||||
<div style="font-size:0.85rem;color:var(--text2);">
|
||||
Accepted: PNG, JPG or WebP
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="main-image" x-model="serverFilePath">
|
||||
</div>
|
||||
<div class="form-image" style="flex:1">
|
||||
<div class="form-image-placeholder" x-show="!preview">
|
||||
<i data-lucide="image" size="48"></i>
|
||||
</div>
|
||||
<div class="form-image-preview" x-show="preview" x-cloak>
|
||||
<div class="form-image-preview-wrap">
|
||||
<img :src="preview" alt="Main Image">
|
||||
|
||||
<button type="button" class="form-image-remove" @click="handleRemoveFile()">
|
||||
<i data-lucide="x"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-image-info">
|
||||
<span x-text="name"></span>
|
||||
</div>
|
||||
<span class="form-error-text" x-show="error !== null" x-text="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
16
resources/views/components/markdown-textarea.blade.php
Normal file
16
resources/views/components/markdown-textarea.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<div x-data
|
||||
x-init="
|
||||
window.mde_{{ $name }} = new EasyMDE({
|
||||
element: $el.querySelector('#field_{{ $name }}'),
|
||||
minHeight: '{{ $minHeight }}',
|
||||
toolbar: {{ Js::from( $toolbar ) }},
|
||||
autosave: {
|
||||
enabled: true,
|
||||
uniqueId: '{{ $name }}',
|
||||
delay: 1000,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
<textarea class="form-textarea" id="field_{{ $name }}" name="{{ $name }}">{{ $value }}</textarea>
|
||||
</div>
|
||||
40
resources/views/components/menu.blade.php
Normal file
40
resources/views/components/menu.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<nav id="menu">
|
||||
|
||||
<div class="menu-header">
|
||||
<div class="menu-logo">
|
||||
RP
|
||||
</div>
|
||||
<div class="menu-title">
|
||||
Romhack Plaza
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="menu-navigation">
|
||||
|
||||
|
||||
<div class="menu-group">
|
||||
<div class="menu-group-title">Website</div>
|
||||
<a href="{{ route('home') }}"
|
||||
@class(['menu-item', 'active' => request()->routeIs('home')]) >
|
||||
<i data-lucide="home"></i><span>Home</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="menu-user">
|
||||
<div class="menu-user-avatar">
|
||||
<x-xen-foro-avatar />
|
||||
</div>
|
||||
<div class="menu-user-info">
|
||||
<span class="username">
|
||||
{{ \Auth::user()?->username ?? "Guest" }}
|
||||
</span>
|
||||
<span class="user_role">
|
||||
Lorem
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
31
resources/views/components/staff-credits-field.blade.php
Normal file
31
resources/views/components/staff-credits-field.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<div x-data='Credits()' x-init="init(@js($oldStaffCredits))">
|
||||
<x-form-field-title name="Staff/Credits" />
|
||||
<template x-if="credits.length > 0">
|
||||
<div class="form-group grid-credits">
|
||||
<div><x-form-field-title name="Name" /></div>
|
||||
<div><x-form-field-title name="Description" /></div>
|
||||
<div><x-form-field-title name="Actions" /></div>
|
||||
<template x-for="(credit,i) in credits" :key="i">
|
||||
<div style="display:contents">
|
||||
<div>
|
||||
<input class="form-input" type="text" x-model="credit.name" autocomplete="off">
|
||||
</div>
|
||||
<div>
|
||||
<input class="form-input" type="text" x-model="credit.description" autocomplete="off">
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn" @click="removeCredits(i)">
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<input type="hidden" name="staff_credits" x-model="JSON.stringify(credits)">
|
||||
<div style="display:flex;justify-content:flex-end;margin-top:10px;">
|
||||
<button type="button" class="btn primary" @click="addEmptyCredits()">
|
||||
Add a credit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
28
resources/views/components/submit-entry-status.blade.php
Normal file
28
resources/views/components/submit-entry-status.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="submit-level" x-data="{
|
||||
nsfw: null,
|
||||
state: '{{ old('submit-state', $defaultState) }}',
|
||||
init(){
|
||||
this.$watch('nsfw', (val) => {
|
||||
if( val && this.state === 'published' ) {
|
||||
this.state = 'draft';
|
||||
}
|
||||
});
|
||||
}
|
||||
}" x-init="init()">
|
||||
<div>
|
||||
@if( section_must_be( [ 'romhacks', 'homebrew' ], $section ) )
|
||||
<label class="nsfw-label"><input id="nsfw-checkbox" type="checkbox" name="nsfw-entry" x-model="nsfw" style="transform: scale(1.5)"> NSFW</label>
|
||||
@endif
|
||||
</div>
|
||||
<select class="form-select" name="submit-state" x-model="state">
|
||||
@foreach( $states as $k => $v )
|
||||
@if( $k == 'published' )
|
||||
<template x-if="!nsfw">
|
||||
<option value="{{ $k }}" {{ $defaultState == $k ? 'selected' : '' }}>{{ $v }}</option>
|
||||
</template>
|
||||
@else
|
||||
<option value="{{ $k }}" {{ $defaultState == $k ? 'selected' : '' }}>{{ $v }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
3
resources/views/components/success-block.blade.php
Normal file
3
resources/views/components/success-block.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="block-success">
|
||||
<i data-lucide="{{ $successArray['icon'] ?? '' }}"></i> {{ sprintf( $successArray['message'], $message ) }}
|
||||
</div>
|
||||
16
resources/views/components/topbar.blade.php
Normal file
16
resources/views/components/topbar.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<header id="topbar">
|
||||
<button class="mobile-toggle">
|
||||
<i data-lucide="menu"></i>
|
||||
</button>
|
||||
|
||||
<div class="search-bar">
|
||||
<i data-lucide="search" size="18" color="var(--text2)"></i>
|
||||
<input type="text">Search</input>
|
||||
</div>
|
||||
|
||||
<div class="topbar-actions">
|
||||
<button class="btn">
|
||||
<i data-lucide="bell" size="18"></i>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
16
resources/views/components/xen-foro-avatar.blade.php
Normal file
16
resources/views/components/xen-foro-avatar.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@if(!$user)
|
||||
<i data-lucide="user"></i>
|
||||
@else
|
||||
@if($user->getAvatarUrl())
|
||||
<img src="{{ $user->getAvatarUrl('m') }}" alt="avatar">
|
||||
@else
|
||||
<div style="
|
||||
background: {{\App\Helpers\XenForoHelpers::getAvatarColor($user) }};
|
||||
width: 40px; height: 40px; border-radius: 50%;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
color:var(--text); font-weight: bold;
|
||||
">
|
||||
{{ \App\Helpers\XenForoHelpers::getAvatarLetter($user) }}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
Reference in New Issue
Block a user