PHP Classes

File: aksara/Modules/Announcements/Views/read.php

Recommend this page to a friend!
  Packages of Aby Dahana   Aksara   aksara/Modules/Announcements/Views/read.php   Download  
File: aksara/Modules/Announcements/Views/read.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Modernize UI/UX across multiple modules: blog, auth, announcements, pages, and user profiles
Refine UI design and layouts across various modules, improve typography, and clean up template structures
Refactor: move theme views to modules and update core components
Refine subscriber dashboard UI, update technical dashboard with videos, and change WhatsApp link to GitHub
Date: 22 days ago
Size: 2,699 bytes
 

Contents

Class file image Download
<?php
/**
 * @var mixed $results
 * @var mixed $meta
 */
if ($results): ?>
<section class="section-padding">
    <div class="container position-relative text-center text-md-start fade-in">
        <h1 class="display-4 fw-bold text-dark">
            <?= $meta->title; ?>
</h1>
        <p class="fs-5 text-muted mb-0">
            <?= truncate($meta->description, 256); ?>
</p>
    </div>
</section>
<?php endif; ?>
<section class="section-padding">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 offset-lg-2">
                <?php if ($results): ?>
<?php foreach($results as $key => $val): ?>
<?php if ($val->cover && 'placeholder.png' != $val->cover): ?>
<img src="<?= get_image('announcements', $val->cover); ?>" class="img-fluid rounded-4 mb-3" alt="..." />
                        <?php endif; ?>
<div class="fs-5">
                            <?= $val->content; ?>
</div>
                        <p class="text-muted">
                            <em>
                                <?= phrase('This announcement will be effective until {{end_date}}.', ['end_date' => $val->end_date]); ?>
</em>
                        </p>
                        <a href="<?= current_page('../'); ?>" class="btn btn-outline-primary rounded-pill px-5 --xhr">
                            <i class="mdi mdi-arrow-left"></i>
                            <?= phrase('Back'); ?>
</a>
                    <?php endforeach; ?>
<?php else: ?>
<div class="py-5">
                        <div class="text-center">
                            <img src="<?= base_url('assets/yao-ming.png'); ?>" width="128" alt="404" />
                        </div>
                        <h2 class="text-center">
                            <?= phrase('No announcement is found!'); ?>
</h2>
                        <p class="fs-5 text-center">
                            <?= phrase('The announcement you requested was not found or its already been removed.'); ?>
</p>
                        <p class="text-center">
                            <a href="<?= current_page('../'); ?>" class="btn btn-outline-dark rounded-pill px-5 --xhr">
                                <i class="mdi mdi-arrow-left"></i> <?= phrase('Back to Announcements'); ?>
</a>
                        </p>
                    </div>
                <?php endif; ?>
</div>
        </div>
    </div>
</section>