This commit is contained in:
Joey Kimsey
2025-01-20 22:42:30 -05:00
parent 1d8d48e7c1
commit ca50450682
55 changed files with 1385 additions and 337 deletions

View File

@ -1,20 +1,28 @@
<h1>Portfolio</h1>
<hr>
{LOOP}
<div class="media portfolio-link col-md-8 col-md-offset-2">
<div class="media-left">
<a href="#">
<img class="media-object" src="{image}" alt="{title} preview">
</a>
<div class="card context-main context-main-bg col-8 offset-2 my-4 p-3">
<h2 class="text-center">Portfolio</h2>
<hr>
{LOOP}
<div class="card context-main context-third-bg py-2 my-2">
<div class="row g-0">
<div class="col-md-4 ps-2 d-flex justify-content-center align-items-center">
<a href="{url}">
<img class="img-fluid rounded" src="{image}" alt="{title} preview">
</a>
</div>
<div class="col-md-8">
<div class="card-body">
<h4 class="card-title">{title}</h4>
<p class="card-text">
{description}
</p>
</div>
</div>
</div>
</div>
<div class="media-body">
<h4 class="media-heading"><a href="{url}">{title}</a></h4>
{description}
{/LOOP}
{ALT}
<div class="card context-main context-main-bg">
<p>None Found</p>
</div>
</div>
{/LOOP}
{ALT}
<div class="portfolio-link">
<p>None Found</p>
</div>
{/ALT}
{/ALT}
</div>

View File

@ -45,7 +45,7 @@ class Resume extends AdminController {
Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] );
return $this->index();
}
$result = self::$positions->create( Input::post( 'name' ), Input::post( 'position' ), Input::post( 'start' ), Input::post( 'end' ), Input::post( 'details' ) );
$result = self::$positions->create( Input::post( 'name' ), Input::post( 'position' ), Input::post( 'start' ), Input::post( 'end' ), Input::post( 'details' ), Input::post( 'detailsNobs' ) );
if ( $result ) {
Issues::add( 'success', 'Your position has been created.' );
return $this->index();
@ -69,6 +69,7 @@ class Resume extends AdminController {
'start' => Input::post( 'start' ),
'end' => Input::post( 'end' ),
'details' => Input::post( 'details' ),
'details_nobs' => Input::post( 'detailsNobs' ),
];
if ( self::$positions->update( $data, $fields ) ) {
Issues::add( 'success', 'Position Updated.' );

View File

@ -23,6 +23,15 @@ use TheTempusProject\Houdini\Classes\Template;
class Resume extends Controller {
protected static $positions;
public function __construct() {
parent::__construct();
Components::append( 'TEMPLATE_JS_INCLUDES', Template::parse(
'<script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="{ROOT_URL}app/plugins/resume/js/resume.js"></script>'
) );
}
public function index() {
self::$positions = new Positions;
self::$title = '{SITENAME} - Resume';

View File

@ -93,7 +93,6 @@
/* The actual content */
.timeline-content {
padding: 20px 30px;
background-color: white;
position: relative;
border-radius: 6px;
}

View File

@ -0,0 +1,14 @@
document.addEventListener('DOMContentLoaded', function () {
const hideBsCheckbox = document.getElementById('hidebs');
if (hideBsCheckbox) {
hideBsCheckbox.addEventListener('change', function () {
const detailsElements = document.querySelectorAll('.details, .details_nobs');
detailsElements.forEach(function (element) {
console.error(element);
element.classList.toggle('d-none');
});
});
}
});

View File

@ -26,6 +26,8 @@ class Positions extends DatabaseModel {
[ 'start', 'varchar', '16' ],
[ 'end', 'varchar', '16' ],
[ 'details', 'text', '' ],
[ 'details_nobs', 'text', '' ],
[ 'image', 'varchar', '256' ],
];
public $plugin;
@ -37,17 +39,21 @@ class Positions extends DatabaseModel {
$this->plugin = new Plugin;
}
public function create( $name, $position, $start, $end, $details ) {
public function create( $name, $position, $start, $end, $details, $detailsNobs = '' ) {
if ( !$this->plugin->checkEnabled() ) {
Debug::info( 'Resume is disabled in the config.' );
return false;
}
if ( empty( $detailsNobs ) ) {
$detailsNobs = $details;
}
$fields = [
'name' => $name,
'position' => $position,
'start' => $start,
'end' => $end,
'details' => $details,
'details_nobs' => $detailsNobs,
];
if ( !self::$db->insert( $this->tableName, $fields ) ) {
Debug::info( 'Position::create - failed to insert to db' );

View File

@ -15,5 +15,8 @@
<label for="details">Details:</label><br>
<textarea id="details" name="details" rows="20" cols="50" required></textarea><br><br>
<label for="details">Details ( No BS ):</label><br>
<textarea id="detailsNobs" name="detailsNobs" rows="20" cols="50" required></textarea><br><br>
<input type="submit" name="submit" value="Submit">
</form>

View File

@ -15,5 +15,8 @@
<label for="details">Details:</label><br>
<textarea id="details" name="details" rows="20" cols="50" required>{details}</textarea><br><br>
<label for="details">Details ( No BS ):</label><br>
<textarea id="detailsNobs" name="detailsNobs" rows="20" cols="50" required>{details_nobs}</textarea><br><br>
<input type="submit" name="submit" value="Submit">
</form>

View File

@ -1,9 +1,9 @@
<div class="col-lg-12 text-center" role="group" aria-label="Resume Downloads">
<div class="offset-4 col--4 text-center mt-3" role="group" aria-label="Resume Downloads">
<div class="btn-group text-center" role="group" aria-label="Resume Downloads">
<h3>Download</h3>
<a href="/downloads/JoeyKimsey-resume.docx" class="btn btn-default" role="button">Word</a>
<a href="/downloads/JoeyKimsey-resume.pdf" class="btn btn-default" role="button">PDF</a>
<a href="/downloads/JoeyKimsey-resume.md" class="btn btn-default" role="button">Markdown</a>
<a href="/downloads/JoeyKimsey-resume.txt" class="btn btn-default" role="button">Text</a>
<h3 class="px-3">Download</h3>
<a href="/downloads/JoeyKimsey-resume.docx" class="btn btn-primary" role="button">Word</a>
<a href="/downloads/JoeyKimsey-resume.pdf" class="btn btn-primary" role="button">PDF</a>
<a href="/downloads/JoeyKimsey-resume.md" class="btn btn-primary" role="button">Markdown</a>
<a href="/downloads/JoeyKimsey-resume.txt" class="btn btn-primary" role="button">Text</a>
</div>
</div>

View File

@ -1,4 +1,10 @@
<div class="btn-group btn-group-justified" role="group" aria-label="Resume View Type">
<a href="?view=tiimeline" class="btn btn-default" role="button">Timeliine</a>
<a href="?" class="btn btn-default" role="button">Standard</a>
<div class="mb-3 row" role="group" aria-label="Resume View Type">
<div class="btn-group btn-group-justified mb-3 col-6 offset-3" role="group" aria-label="Resume View Type">
<a href="?view=tiimeline" class="btn btn-primary" role="button">Timeline</a>
<a href="?" class="btn btn-primary" role="button">Standard</a>
</div>
<div class="form-check form-switch mb-3 col-3 d-flex align-items-center">
<input class="form-check-input" type="checkbox" role="switch" name="hidebs" id="hidebs" value="true">
<label class="form-check-label ps-2" for="hidebs">Hide the BS</label>
</div>
</div>

View File

@ -1,18 +1,34 @@
<h1>Resume</h1>
<hr>
{RESUME_NAV}
{LOOP}
<div class="resume-position">
<h3 class="resume-position-title">{name}</h3>
<p><b>{position}</b> from <i>{prettyStart}</i> to <i>{prettyEnd}</i></p>
<div class="well">
{details}
<div class="card context-main context-main-bg col-8 offset-2 my-4 p-3">
<h2 class="text-center">Resume</h2>
<hr>
{RESUME_NAV}
{LOOP}
<div class="card context-main context-third-bg py-2 my-2 rounded">
<div class="row g-0 px-3">
<div class="col-md-4 d-flex justify-content-center align-items-center">
<img class="img-fluid rounded" src="{image}" alt="{name}">
</div>
<div class="col-md-8">
<div class="card-body">
<h4 class="card-title">{name}</h4>
<p class="card-text">
<b>{position}</b> from <i>{prettyStart}</i> to <i>{prettyEnd}</i>
</p>
<div class="details card-text">
{details}
</div>
<div class="details_nobs card-text d-none">
{details_nobs}
</div>
</div>
</div>
</div>
</div>
{/LOOP}
{ALT}
<div class="resume-position">
<p>None Found</p>
</div>
{/ALT}
{RESUME_DOWNLOADS}
{/LOOP}
{ALT}
<div class="resume-position">
<p>None Found</p>
</div>
{/ALT}
{RESUME_DOWNLOADS}
</div>

View File

@ -1,22 +1,33 @@
<h1>Resume</h1>
<hr>
{RESUME_NAV}
{LOOP}
<div class="resume-timeline">
<div class="timeline-container {side}">
<div class="timeline-content">
<h3 class="resume-position-title">{name}</h3>
<p><b>{position}</b> from <i>{prettyStart}</i> to <i>{prettyEnd}</i></p>
<div class="well">
{details}
<div class="card context-main context-main-bg col-8 offset-2 my-4 p-3">
<h2 class="text-center">Resume</h2>
<hr>
{RESUME_NAV}
<div class="details_nobs card-text d-none text-center col-6 offset-3">
<p>
Honestly, I really wanted to do something fun and interactive here.
Unfortunately I didn't have a specific idea in mind and this was abandoned in favor of spending my time somewhere with a bigger impact.
</p>
</div>
{LOOP}
<div class="resume-timeline">
<div class="timeline-container {side}">
<div class="timeline-content context-third-bg">
<h3 class="resume-position-title">{name}</h3>
<p><b>{position}</b> from <i>{prettyStart}</i> to <i>{prettyEnd}</i></p>
<div class="details card-text">
{details}
</div>
<div class="details_nobs card-text d-none">
{details_nobs}
</div>
</div>
</div>
</div>
</div>
{/LOOP}
{ALT}
<div class="resume-timeline">
<p>None Found</p>
</div>
{/ALT}
{RESUME_DOWNLOADS}
{/LOOP}
{ALT}
<div class="resume-timeline">
<p>None Found</p>
</div>
{/ALT}
{RESUME_DOWNLOADS}
</div>

View File

@ -28,7 +28,7 @@ class Wip extends AdminController {
public function __construct() {
parent::__construct();
self::$projects = new Projects;
self::$title = 'Admin - Projects';
self::$title = 'Admin - WIP';
$view = Navigation::activePageSelect( 'nav.admin', '/admin/wip' );
Components::set( 'ADMINNAV', $view );
}

View File

@ -37,7 +37,7 @@ class Wip extends Plugin {
];
public $admin_links = [
[
'text' => '<i class="fa fa-fw fa-support"></i> Wip',
'text' => '<i class="fa fa-fw fa-flask"></i> Wip',
'url' => '{ROOT_URL}admin/wip',
],
];

View File

@ -1,16 +1,48 @@
<h2>Create Project</h2>
<form action="#" method="POST">
<label for="title">Title:</label><br>
<input type="text" id="title" name="title" required><br><br>
<div class="context-main-bg context-main p-3">
<legend class="text-center">Add WIP</legend>
<hr>
{ADMIN_BREADCRUMBS}
<form method="post">
<fieldset>
<!-- Title -->
<div class="mb-3 row">
<label for="title" class="col-lg-5 col-form-label text-end">Title:</label>
<div class="col-lg-3">
<input type="text" class="form-control" name="title" id="title" required>
</div>
</div>
<label for="progress">Progress:</label><br>
<input type="text" id="progress" name="progress" required><br><br>
<!-- Progress -->
<div class="mb-3 row">
<label for="progress" class="col-lg-5 col-form-label text-end">Progress:</label>
<div class="col-lg-3">
<input type="text" class="form-control" name="progress" id="progress" required>
</div>
</div>
<label for="startDate">Start Month/Year:</label><br>
<input type="month" id="startDate" name="startDate" required><br><br>
<!-- Start Month/Year -->
<div class="mb-3 row">
<label for="startDate" class="col-lg-5 col-form-label text-end">Start Month/Year:</label>
<div class="col-lg-3">
<input type="month" class="form-control" name="startDate" id="startDate" required>
</div>
</div>
<label for="description">Description:</label><br>
<textarea id="description" name="description" rows="20" cols="50" required></textarea><br><br>
<!-- Description -->
<div class="mb-3 row">
<label for="description" class="col-lg-5 col-form-label text-end">Description:</label>
<div class="col-lg-3">
<textarea class="form-control" name="description" maxlength="2000" rows="5" cols="50" id="description"></textarea>
</div>
</div>
<input type="submit" name="submit" value="Submit">
</form>
<!-- Hidden Token -->
<input type="hidden" name="token" value="{TOKEN}">
<!-- Submit Button -->
<div class="text-center">
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg">Create</button>
</div>
</fieldset>
</form>
</div>

View File

@ -1,16 +1,48 @@
<h2>Edit Project</h2>
<form action="#" method="POST">
<label for="title">Title:</label><br>
<input type="text" id="title" name="title" value="{title}" required><br><br>
<div class="context-main-bg context-main p-3">
<legend class="text-center">Edit WIP</legend>
<hr>
{ADMIN_BREADCRUMBS}
<form method="post">
<fieldset>
<!-- Title -->
<div class="mb-3 row">
<label for="title" class="col-lg-5 col-form-label text-end">Title:</label>
<div class="col-lg-3">
<input type="text" class="form-control" name="title" id="title" value="{title}" required>
</div>
</div>
<label for="progress">Progress:</label><br>
<input type="text" id="progress" name="progress" value="{progress}" required><br><br>
<!-- Progress -->
<div class="mb-3 row">
<label for="progress" class="col-lg-5 col-form-label text-end">Progress:</label>
<div class="col-lg-3">
<input type="text" class="form-control" name="progress" id="progress" value="{progress}" required>
</div>
</div>
<label for="startDate">Start Month/Year:</label><br>
<input type="month" id="startDate" name="startDate" value="{startDate}" required><br><br>
<!-- Start Month/Year -->
<div class="mb-3 row">
<label for="startDate" class="col-lg-5 col-form-label text-end">Start Month/Year:</label>
<div class="col-lg-3">
<input type="month" class="form-control" name="startDate" id="startDate" value="{startDate}" required>
</div>
</div>
<label for="description">Description:</label><br>
<textarea id="description" name="description" rows="20" cols="50" required>{description}</textarea><br><br>
<!-- Description -->
<div class="mb-3 row">
<label for="description" class="col-lg-5 col-form-label text-end">Description:</label>
<div class="col-lg-3">
<textarea class="form-control" name="description" maxlength="2000" rows="5" cols="50" id="description">{description}</textarea>
</div>
</div>
<input type="submit" name="submit" value="Submit">
</form>
<!-- Hidden Token -->
<input type="hidden" name="token" value="{TOKEN}">
<!-- Submit Button -->
<div class="text-center">
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg">Save</button>
</div>
</fieldset>
</form>
</div>

View File

@ -1,41 +1,44 @@
<legend>Works in Progress</legend>
{PAGINATION}
<form action="{ROOT_URL}admin/wip/delete" method="post">
<table class="table table-striped">
<thead>
<tr>
<th style="width: 30%">Title</th>
<th style="width: 20%">Progress</th>
<th style="width: 20%">Start Date</th>
<th style="width: 10%"></th>
<th style="width: 10%"></th>
<th style="width: 10%">
<INPUT type="checkbox" onchange="checkAll(this)" name="check.b" value="P_[]"/>
</th>
</tr>
</thead>
<tbody>
{LOOP}
<tr>
<td><a href="{ROOT_URL}admin/wip/view/{ID}">{title}</a></td>
<td>{progress}</td>
<td>{startDate}</td>
<td><a href="{ROOT_URL}admin/wip/edit/{ID}" class="btn btn-sm btn-warning" role="button"><i class="glyphicon glyphicon-edit"></i></a></td>
<td><a href="{ROOT_URL}admin/wip/delete/{ID}" class="btn btn-sm btn-danger" role="button"><i class="glyphicon glyphicon-trash"></i></a></td>
<td>
<input type="checkbox" value="{ID}" name="P_[]">
</td>
</tr>
{/LOOP}
{ALT}
<tr>
<td colspan="7">
No results to show.
</td>
</tr>
{/ALT}
</tbody>
</table>
<a href="{ROOT_URL}admin/wip/create" class="btn btn-sm btn-primary" role="button">Create</a>
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger">Delete</button>
</form>
<div class="context-main-bg context-main p-3">
<legend class="text-center">Works in Progress</legend>
<hr>
{ADMIN_BREADCRUMBS}
<form action="{ROOT_URL}admin/wip/delete" method="post">
<table class="table table-striped">
<thead>
<tr>
<th scope="col" style="width: 30%">Title</th>
<th scope="col" style="width: 20%">Progress</th>
<th scope="col" style="width: 20%">Start Date</th>
<th scope="col" style="width: 10%"></th>
<th scope="col" style="width: 10%"></th>
<th scope="col" style="width: 10%">
<input type="checkbox" onchange="checkAll(this)" name="check.b" value="P_[]">
</th>
</tr>
</thead>
<tbody>
{LOOP}
<tr>
<td><a href="{ROOT_URL}admin/wip/view/{ID}">{title}</a></td>
<td>{progress}</td>
<td>{startDate}</td>
<td><a href="{ROOT_URL}admin/wip/edit/{ID}" class="btn btn-sm btn-warning" role="button"><i class="fa fa-fw fa-pencil"></i></a></td>
<td><a href="{ROOT_URL}admin/wip/delete/{ID}" class="btn btn-sm btn-danger" role="button"><i class="fa fa-fw fa-trash"></i></a></td>
<td>
<input type="checkbox" value="{ID}" name="P_[]">
</td>
</tr>
{/LOOP}
{ALT}
<tr>
<td colspan="7">
No results to show.
</td>
</tr>
{/ALT}
</tbody>
</table>
<a href="{ROOT_URL}admin/wip/create" class="btn btn-sm btn-primary" role="button">Create</a>
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
</form>
</div>

View File

@ -1,8 +1,46 @@
<legend>WIP</legend>
<div class="wip-project">
<h3 class="wip-project-title">{name}</h3>
<p><b>{position}</b> from <i>{prettyStart}</i> to <i>{prettyEnd}</i></p>
<div class="well">
{details}
<div class="container py-4">
<div class="row justify-content-center">
<div class="col-md-8">
{ADMIN_BREADCRUMBS}
<div class="card shadow">
<!-- Card Header -->
<div class="card-header text-center bg-dark text-white">
<h3 class="card-title mb-0">{title}</h3>
</div>
<!-- Card Body -->
<div class="card-body">
<div class="row align-items-center">
<!-- Details -->
<table class="table table-borderless">
<tbody>
<tr>
<th scope="row" class="col-3">Title</th>
<td>{title}</td>
</tr>
<tr>
<th scope="row">Progress</th>
<td>{progress}</td>
</tr>
<tr>
<th scope="row">Started:</th>
<td>{DTC}{startDate}{/DTC}</td>
</tr>
<tr>
<th scope="row">Description</th>
<td>{description}</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Admin Controls -->
<div class="card-footer text-center">
<a href="{ROOT_URL}admin/wip/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a>
<a href="{ROOT_URL}admin/wip/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,19 +1,24 @@
<h1>Work in Progress</h1>
<hr>
{LOOP}
<div class="wip-project">
<h3 class="wip-project-title">{title}</h3>
<p><b>Started: </b><i>{prettyStart}</i></p>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: {progress}%" aria-valuenow="{progress}" aria-valuemin="0" aria-valuemax="100"></div>
<div class="col-8 mx-auto p-3 rounded shadow-sm my-4 context-main-bg">
<h1 class="text-center">Work in Progress</h1>
<hr>
{LOOP}
<div class="wip-project">
<h3 class="wip-project-title atb-green">{title}</h3>
<small class=""><b>Started: </b><i>{prettyStart}</i></small>
<div class="progress mt-2">
<div class="progress-bar atb-green-bg" role="progressbar" style="width: {progress}%" aria-valuenow="{progress}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="well my-3">
{description}
</div>
</div>
<div class="well">
{description}
<div class="col-6 offset-3 my-2">
<hr>
</div>
</div>
{/LOOP}
{ALT}
<div class="wip-project">
<p>None Found</p>
</div>
{/ALT}
{/LOOP}
{ALT}
<div class="wip-project">
<p>None Found</p>
</div>
{/ALT}
</div>