Allow simple template-based skin definitions
Summary: Lower the barrier to entry for installing and creating skins, so we can kill Wordpress. You can now install skins by dropping them into a directory, and build either "advanced" (full phutil library) skins or "basic" (simple PHP templates) skins. Next up is getting static resources working in an easy way for skins. I put these in `externals/` for now so they don't get hit by lint. Test Plan: Viewed the Pokeblog with the Oblivious skin. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T1373 Differential Revision: https://secure.phabricator.com/D3717
This commit is contained in:
1
externals/skins/oblivious/404.php
vendored
Normal file
1
externals/skins/oblivious/404.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<h2>404 Not Found</h2>
|
||||
3
externals/skins/oblivious/footer.php
vendored
Normal file
3
externals/skins/oblivious/footer.php
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
15
externals/skins/oblivious/header.php
vendored
Normal file
15
externals/skins/oblivious/header.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo _e($title); ?></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="oblivious-info">
|
||||
<h1>
|
||||
<a href="<?php echo _e($uri); ?>"><?php
|
||||
echo _e($blog->getName());
|
||||
?></a>
|
||||
</h1>
|
||||
<p><?php echo _e($blog->getDescription()); ?></p>
|
||||
</div>
|
||||
<div class="oblivious-content">
|
||||
1
externals/skins/oblivious/post-detail.php
vendored
Normal file
1
externals/skins/oblivious/post-detail.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?php echo $post->render(); ?>
|
||||
13
externals/skins/oblivious/post-list.php
vendored
Normal file
13
externals/skins/oblivious/post-list.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="oblivious-post-list">
|
||||
<?php
|
||||
|
||||
foreach ($posts as $post) {
|
||||
echo $post->renderWithSummary();
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div class="oblivious-pager">
|
||||
<?php echo $older; ?>
|
||||
<?php echo $newer; ?>
|
||||
</div>
|
||||
3
externals/skins/oblivious/skin.json
vendored
Normal file
3
externals/skins/oblivious/skin.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "Oblivious"
|
||||
}
|
||||
Reference in New Issue
Block a user