Article

Latest News

News

Table Alignment & Code Block Full Test (PHP / SQL / Bash / JS)

─ By Administrator

Table Tests

Basic Table (no alignment markers, defaults to left-align)

Process Layers Min. Line Width Certification
HDI Any-Layer Up to 10 50µm IPC-6012
Rigid-Flex Up to 12 50µm IPC-6013
FPC Up to 6 30µm IPC-6013
Standard multilayer Up to 20 75µm IPC-6012

Three Column Alignments (left / center / right)

Left-aligned Center-aligned Right-aligned
Text left Text center Text right
Longer left-aligned text Center 9,999,999
A B 1

Table Cells with Inline Formatting

Feature Status Notes
Live published_at IS NOT NULL
Coming soon 🔄 Target Q3 2026
~~Deprecated~~ Use new API instead
Spec sheet 📄 External link test

Narrow Two-Column Table

Key Description
category_id Article category FK
published_at Publication timestamp
sort_order Sort weight

Code Block Tests

PHP (with Laravel Eloquent)

<?php

namespace App\Http\Controllers;

use App\Models\Article;

class NewsController extends Controller
{
    public function index(): \Illuminate\View\View
    {
        $articles = Article::published()
            ->forLocale('en')
            ->with('category')
            ->orderBy('sort_order')
            ->orderByDesc('published_at')
            ->paginate(12);

        return view('news-en.index', compact('articles'));
    }
}

SQL (complex query)

SELECT
    a.id,
    a.title_en AS title,
    a.published_at,
    c.name_en AS category_name
FROM articles a
LEFT JOIN categories c ON c.id = a.category_id
WHERE a.deleted_at IS NULL
  AND a.published_at IS NOT NULL
  AND a.published_at <= NOW()
ORDER BY a.sort_order ASC, a.published_at DESC
LIMIT 12 OFFSET 0;

Bash (deployment script)

#!/bin/bash
set -e

echo "=== Starting deployment ==="

cd /var/www/html
git pull origin main

composer install --no-dev --optimize-autoloader
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan migrate --force

echo "=== Deployment complete ==="

JavaScript (frontend interaction)

document.querySelectorAll('.news-card').forEach((card) => {
  card.addEventListener('mouseenter', () => {
    card.querySelector('img')?.classList.add('scale-110');
  });
  card.addEventListener('mouseleave', () => {
    card.querySelector('img')?.classList.remove('scale-110');
  });
});

Code block without language tag

This is a code block with no language marker.
No syntax highlighting — monospace font and dark background only.
    Indentation should be preserved exactly.

Indented code block (4 spaces / 1 tab)

function greet($name) {
    return "Hello, " . $name . "!";
}

echo greet('Effy Deal');