Skip to content

Commit

Permalink
Merge pull request #1219 from hydephp/compatible-view-cleanups
Browse files Browse the repository at this point in the history
Format Blade HTML
  • Loading branch information
caendesilva authored Mar 6, 2023
2 parents c70e912 + 3357539 commit f000978
Show file tree
Hide file tree
Showing 33 changed files with 246 additions and 253 deletions.
46 changes: 23 additions & 23 deletions _pages/404.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@
<!-- Error page and illustration by LaravelCollective: https://github.com/LaravelCollective/errors (License MIT) --->

<body class="antialiased font-sans">
<div class="md:flex min-h-screen">
<div class="w-full md:w-1/2 bg-white flex items-center justify-center">
<div class="max-w-sm m-8">
<div class="text-black text-5xl md:text-15xl font-black">
404
</div>

<div class="w-16 h-1 bg-purple-light my-3 md:my-6"></div>

<p class="text-grey-darker text-2xl md:text-3xl font-light mb-8 leading-normal">
Sorry, the page you are looking for could not be found.
</p>

<a href="{{ config('hyde.url') ?? '/' }}">
<button
class="bg-transparent text-grey-darkest font-bold uppercase tracking-wide py-3 px-6 border-2 border-grey-light hover:border-grey rounded-lg">
Go Home
</button>
</a>
<div class="md:flex min-h-screen">
<div class="w-full md:w-1/2 bg-white flex items-center justify-center">
<div class="max-w-sm m-8">
<div class="text-black text-5xl md:text-15xl font-black">
404
</div>

<div class="w-16 h-1 bg-purple-light my-3 md:my-6"></div>

<p class="text-grey-darker text-2xl md:text-3xl font-light mb-8 leading-normal">
Sorry, the page you are looking for could not be found.
</p>

<a href="{{ config('hyde.url') ?? '/' }}">
<button
class="bg-transparent text-grey-darkest font-bold uppercase tracking-wide py-3 px-6 border-2 border-grey-light hover:border-grey rounded-lg">
Go Home
</button>
</a>
</div>

<div class="relative pb-full md:flex md:pb-0 md:min-h-screen w-full md:w-1/2">
<div style="background-image: url('https://cdn.jsdelivr.net/gh/LaravelCollective/errors@1.0/src/publish/svg/404.svg');"
class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
</div>

<div class="relative pb-full md:flex md:pb-0 md:min-h-screen w-full md:w-1/2">
<div style="background-image: url('https://cdn.jsdelivr.net/gh/LaravelCollective/errors@1.0/src/publish/svg/404.svg');"
class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
</div>
</div>
</body>
</html>
95 changes: 47 additions & 48 deletions _pages/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,58 +30,57 @@
</head>

<body class="antialiased overflow-x-hidden min-w-screen min-h-screen flex flex-col app-gradient">
<main class="my-auto px-6 pb-12 antialiased app-gradient-dark">
<div class="mx-auto max-w-7xl">
<!-- Main Hero Content -->
<div class="container max-w-lg px-4 py-32 mx-auto text-left md:max-w-none md:text-center">
<h1
class="text-5xl font-extrabold leading-10 tracking-tight text-left text-gray-100 md:text-center sm:leading-none md:text-6xl lg:text-7xl">
<span class="block text-4xl md:text-5xl mb-4 sm:mb-0">You're running on </span><span
class="relative mt-2 text-transparent bg-clip-text bg-gradient-to-br logo-gradient md:inline-block drop-shadow-2xl tracking-normal">HydePHP</span>
</h1>
<div class="mx-auto mt-8 sm:mt-4 text-gray-200 md:mt-8 md:max-w-2xl md:text-center">
<section aria-label="About Hyde">
<p class="lg:text-lg">
Leap into the future of static HTML blogs and documentation with the tools you already know and love.
Made with Tailwind, Laravel, and Coffee.
</p>
</section>

<section aria-label="About this page">
<p class="mt-4 mb-4">
This is the default homepage stored as index.blade.php, however you can publish any of the built-in views using the following command:

<!-- Syntax highlighted by torchlight.dev -->
<pre style="margin-top: 1.5rem; margin-bottom: 1.5rem;"><code data-theme="material-theme-palenight" data-lang="bash" class="torchlight" style="background-color: #292D3E; padding: 0.5rem 1rem; border-radius: 0.25rem;"><span style="color: #FFCB6B;">php hyde</span> <span style="color: #C3E88D;">publish:homepage</span></code></pre>
</p>
</section>
<main class="my-auto px-6 pb-12 antialiased app-gradient-dark">
<div class="mx-auto max-w-7xl">
<!-- Main Hero Content -->
<div class="container max-w-lg px-4 py-32 mx-auto text-left md:max-w-none md:text-center">
<h1
class="text-5xl font-extrabold leading-10 tracking-tight text-left text-gray-100 md:text-center sm:leading-none md:text-6xl lg:text-7xl">
<span class="block text-4xl md:text-5xl mb-4 sm:mb-0">You're running on </span><span
class="relative mt-2 text-transparent bg-clip-text bg-gradient-to-br logo-gradient md:inline-block drop-shadow-2xl tracking-normal">HydePHP</span>
</h1>
<div class="mx-auto mt-8 sm:mt-4 text-gray-200 md:mt-8 md:max-w-2xl md:text-center">
<section aria-label="About Hyde">
<p class="lg:text-lg">
Leap into the future of static HTML blogs and documentation with the tools you already know and love.
Made with Tailwind, Laravel, and Coffee.
</p>
</section>

<div class="mt-4 md:mt-8 text-white">
<span class="sr-only">Resources for getting started</span>
<ul class="flex flex-wrap justify-center list-none" style="padding: 0;">
<li>
<a href="https://hydephp.com/docs/master" class="uppercase font-bold text-sm flex text-center m-2 mx-3">
Documentation
</a>
</li>
<li>
<a href="https://hydephp.com/docs/master/getting-started" class="uppercase font-bold text-sm flex text-center m-2 mx-3">
Getting Started
</a>
</li>
<li>
<section aria-label="About this page">
<p class="mt-4 mb-4">
This is the default homepage stored as index.blade.php, however you can publish any of the built-in views using the following command:

<a href="https://github.com/hydephp/hyde" class="uppercase font-bold text-sm flex text-center m-2 mx-3">
GitHub Source Code
</a>
</li>
</ul>
</div>
<!-- Syntax highlighted by torchlight.dev -->
<pre style="margin-top: 1.5rem; margin-bottom: 1.5rem;"><code data-theme="material-theme-palenight" data-lang="bash" class="torchlight" style="background-color: #292D3E; padding: 0.5rem 1rem; border-radius: 0.25rem;"><span style="color: #FFCB6B;">php hyde</span> <span style="color: #C3E88D;">publish:homepage</span></code></pre>
</p>
</section>

<div class="mt-4 md:mt-8 text-white">
<span class="sr-only">Resources for getting started</span>
<ul class="flex flex-wrap justify-center list-none" style="padding: 0;">
<li>
<a href="https://hydephp.com/docs/master" class="uppercase font-bold text-sm flex text-center m-2 mx-3">
Documentation
</a>
</li>
<li>
<a href="https://hydephp.com/docs/master/getting-started" class="uppercase font-bold text-sm flex text-center m-2 mx-3">
Getting Started
</a>
</li>
<li>

<a href="https://github.com/hydephp/hyde" class="uppercase font-bold text-sm flex text-center m-2 mx-3">
GitHub Source Code
</a>
</li>
</ul>
</div>
</div>
<!-- End Main Hero Content -->
</div>
</main>
<!-- End Main Hero Content -->
</div>
</main>
</body>

</html>
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
class="text-indigo-500 hover:underline font-medium">
Read post</a>
</footer>
</article>
</article>
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
@endforeach
</ol>
</nav>
@endif
@endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
@include('hyde::components.docs.sidebar-toggle-button')
</li>
</ul>
</nav>
</nav>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class="prose dark:prose-invert bg-white dark:bg-gray-800 z-50 p-4 rounded-lg ov
<button @click="searchWindowOpen = false" title="Close search window" class="opacity-75 hover:opacity-100"
aria-label="Close search window">
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
</svg>
</button>
</header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div id="sidebar-brand" class="flex items-center justify-between h-16 py-4 px-2">
<strong class="px-2">
@if(DocumentationPage::home())
<a href="{{ DocumentationPage::home() }}">
{{ config('docs.sidebar.header', 'Documentation') }}
</a>
@else
{{ config('docs.sidebar.header', 'Documentation') }}
@endif
</strong>
<x-hyde::navigation.theme-toggle-button class="opacity-75 hover:opacity-100"/>
<strong class="px-2">
@if(DocumentationPage::home())
<a href="{{ DocumentationPage::home() }}">
{{ config('docs.sidebar.header', 'Documentation') }}
</a>
@else
{{ config('docs.sidebar.header', 'Documentation') }}
@endif
</strong>
<x-hyde::navigation.theme-toggle-button class="opacity-75 hover:opacity-100"/>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<p>
<a href="{{ Hyde::relativeLink('index.html') }}">Back to home page</a>
<a href="{{ Hyde::relativeLink('index.html') }}">Back to home page</a>
</p>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a {{ $attributes->merge(['href' => $href]) }}>{!! $slot !!}</a>
<a {{ $attributes->merge(['href' => $href]) }}>{!! $slot !!}</a>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
@endif
</ul>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<article aria-label="Article" id="{{ Hyde::url("posts/$page->identifier", '') }}" itemscope
itemtype="https://schema.org/Article"
@class(['post-article mx-auto prose dark:prose-invert', 'torchlight-enabled' => Hyde\Facades\Features::hasTorchlight()])>
@class(['post-article mx-auto prose dark:prose-invert', 'torchlight-enabled' => Hyde\Facades\Features::hasTorchlight()])>
<meta itemprop="identifier" content="{{ $page->identifier }}">
@if(Hyde::hasSiteUrl())
<meta itemprop="url" content="{{ Hyde::url('posts/' . $page->identifier) }}">
Expand All @@ -19,4 +19,4 @@
{{ $content }}
</div>
<span class="sr-only">End of article</span>
</article>
</article>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
by author
<address itemprop="author" itemscope itemtype="https://schema.org/Person" aria-label="The post author" style="display: inline;">
@if($page->author->website)
<a href="{{ $page->author->website }}" rel="author" itemprop="url" aria-label="The author's website">
@endif
<span itemprop="name" aria-label="The author's name" {{ ($page->author->username && ($page->author->username !== $page->author->name)) ? 'title=@'. urlencode($page->author->username) .'' : '' }}>{{ $page->author->name ?? $page->author->username }}</span>
@if($page->author->website)
</a>
@endif
</address>
<address itemprop="author" itemscope itemtype="https://schema.org/Person" aria-label="The post author" style="display: inline;">
@if($page->author->website)
<a href="{{ $page->author->website }}" rel="author" itemprop="url" aria-label="The author's website">
@endif
<span itemprop="name" aria-label="The author's name" {{ ($page->author->username && ($page->author->username !== $page->author->name)) ? 'title=@'. urlencode($page->author->username) .'' : '' }}>{{ $page->author->name ?? $page->author->username }}</span>
@if($page->author->website)
</a>
@endif
</address>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
in the category "{{ $page->category }}"
in the category "{{ $page->category }}"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Posted <time itemprop="dateCreated datePublished" datetime="{{ $page->date->datetime }}" title="{{ $page->date->sentence }}">{{ $page->date->short }}</time>
Posted <time itemprop="dateCreated datePublished" datetime="{{ $page->date->datetime }}" title="{{ $page->date->sentence }}">{{ $page->date->short }}</time>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<p itemprop="abstract">
{{ $page->matter['description'] }}
{{ $page->matter['description'] }}
</p>
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
@foreach ($image->getMetadataArray() as $name => $value)
<meta itemprop="{{ $name }}" content="{{ $value }}">
@endforeach
</figure>
</figure>
6 changes: 3 additions & 3 deletions packages/framework/resources/views/homepages/blank.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@extends('hyde::layouts.app')
@section('content')

<main id="content" class="mx-auto max-w-7xl py-16 px-8">
<h1 class="text-center text-3xl font-bold">Hello World!</h1>
</main>
<main id="content" class="mx-auto max-w-7xl py-16 px-8">
<h1 class="text-center text-3xl font-bold">Hello World!</h1>
</main>

@endsection
20 changes: 10 additions & 10 deletions packages/framework/resources/views/homepages/post-feed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
@extends('hyde::layouts.app')
@section('content')

<main id="content" class="mx-auto max-w-7xl py-12 px-8">
<header class="lg:mb-12 xl:mb-16">
<h1 class="text-3xl text-left leading-10 tracking-tight font-extrabold sm:leading-none mb-8 md:mb-12 md:text-4xl md:text-center lg:text-5xl text-gray-700 dark:text-gray-200">
Latest Posts
</h1>
</header>
<main id="content" class="mx-auto max-w-7xl py-12 px-8">
<header class="lg:mb-12 xl:mb-16">
<h1 class="text-3xl text-left leading-10 tracking-tight font-extrabold sm:leading-none mb-8 md:mb-12 md:text-4xl md:text-center lg:text-5xl text-gray-700 dark:text-gray-200">
Latest Posts
</h1>
</header>

<div id="post-feed" class="max-w-3xl mx-auto">
@include('hyde::components.blog-post-feed')
</div>
</main>
<div id="post-feed" class="max-w-3xl mx-auto">
@include('hyde::components.blog-post-feed')
</div>
</main>

@endsection
Loading

0 comments on commit f000978

Please sign in to comment.