Skip to content

Commit

Permalink
feat: add rock-beginner profile
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Oct 12, 2023
1 parent 723404d commit 55c4791
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 0 deletions.
25 changes: 25 additions & 0 deletions profiles/rock-beginner/files/site/templates/_main.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace ProcessWire;

/** @var RockFrontend $rockfrontend */
$rockfrontend->styles()
->add('/site/templates/uikit/dist/css/uikit.min.css')
->addDefaultFolders(); // autoload styles in sections, partials, etc
$rockfrontend->scripts()
->add('/site/templates/uikit/dist/js/uikit.min.js');
?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
<?= $rockfrontend->renderLayout($page) ?>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
echo $rf->render("sections/header");
echo $rf->render("sections/main");
echo $rf->render("sections/footer");
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<footer class="uk-section uk-background-secondary uk-light">
<div class="uk-container">
## footer.php ## &copy;
<script>
// write year via JS so that it works with ProCache :)
document.write(new Date().getFullYear());
</script>
</div>
</footer>
38 changes: 38 additions & 0 deletions profiles/rock-beginner/files/site/templates/sections/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<header class="uk-background-muted" <?= alfred($page) ?>>

<div class="uk-container">
<nav class="uk-navbar-container uk-navbar-transparent">
<div class="uk-container">
<div uk-navbar>

<div class="uk-navbar-left">
<a class="uk-navbar-item uk-logo" href="/" aria-label="Back to Home">Logo</a>
</div>

<div class="uk-navbar-right">

<ul class="uk-navbar-nav">
<?php foreach ($pages->get(1)->children("include=hidden") as $item) : ?>
<li>
<a href="<?= $item->url ?>"><?= $item->title ?></a>
<?php if ($item->numChildren()) : ?>
<div class="uk-navbar-dropdown">
<ul class="uk-nav uk-navbar-dropdown-nav">
<?php foreach ($item->children as $child) : ?>
<li><a href="<?= $child->url ?>"><?= $child->title ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>

</div>

</div>
</div>
</nav>
</div>

</header>
17 changes: 17 additions & 0 deletions profiles/rock-beginner/files/site/templates/sections/main.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<main <?= alfred() ?>>
<!--
Here you would typically place your pages content.
For example the content of a TinyMCE or RockPageBuilder field.
We add two static sections to serve as placeholder.
-->
<section class="uk-section uk-section-primary uk-light">
<div class="uk-container">
## main.php ## Example of a full width section
</div>
</section>
<section class="uk-section">
<div class="uk-container">
## main.php ## Another section without background
</div>
</section>
</main>
1 change: 1 addition & 0 deletions profiles/rock-beginner/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tbd

0 comments on commit 55c4791

Please sign in to comment.