summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2021-03-10 16:13:52 +0100
committerDaniel Weipert <code@drogueronin.de>2021-03-10 16:13:52 +0100
commit9b8832902cc1a51b5c6e2e0890c576372a60e5e1 (patch)
treee7f1db7c2e920b63bde306fda71c187d44a7c6c1 /resources
Initial commitHEADv1.0.0main
Diffstat (limited to 'resources')
-rw-r--r--resources/css/index.scss4
-rw-r--r--resources/js/index.js1
-rw-r--r--resources/views/base.twig21
-rw-r--r--resources/views/components/menu-item.twig10
-rw-r--r--resources/views/index.twig8
-rw-r--r--resources/views/root.twig17
6 files changed, 61 insertions, 0 deletions
diff --git a/resources/css/index.scss b/resources/css/index.scss
new file mode 100644
index 0000000..b441eae
--- /dev/null
+++ b/resources/css/index.scss
@@ -0,0 +1,4 @@
+html, body {
+ padding: 0;
+ margin: 0;
+}
diff --git a/resources/js/index.js b/resources/js/index.js
new file mode 100644
index 0000000..33ddd72
--- /dev/null
+++ b/resources/js/index.js
@@ -0,0 +1 @@
+console.log('index');
diff --git a/resources/views/base.twig b/resources/views/base.twig
new file mode 100644
index 0000000..c42770a
--- /dev/null
+++ b/resources/views/base.twig
@@ -0,0 +1,21 @@
+{% extends 'root.twig' %}
+
+{% block body %}
+ <header class="header">
+ {% block header %}
+ <nav>
+ <ul>
+ {% for item in menu.main.items %}
+ {% include 'components/menu-item.twig' with { 'item': item } %}
+ {% endfor %}
+ </ul>
+ </nav>
+ {% endblock %}
+ </header>
+ <main>
+ {% block main %}{% endblock %}
+ </main>
+ <footer>
+ {% block footer %}{% endblock %}
+ </footer>
+{% endblock %}
diff --git a/resources/views/components/menu-item.twig b/resources/views/components/menu-item.twig
new file mode 100644
index 0000000..5bc41fc
--- /dev/null
+++ b/resources/views/components/menu-item.twig
@@ -0,0 +1,10 @@
+<li class="{{ (item.classes | merge(item._menu_item_classes)) | join(' ') }}">
+ <a target="{{ item.target }}" href="{{ item.link }}">{{ item.title }}</a>
+ {% if current_depth < depth and item.children %}
+ <ul>
+ {% for child in item.children %}
+ {% include 'components/menu-item.twig' with { 'item': child, 'depth': depth, 'current_depth': current_depth + 1 } %}
+ {% endfor %}
+ </ul>
+ {% endif %}
+</li>
diff --git a/resources/views/index.twig b/resources/views/index.twig
new file mode 100644
index 0000000..48b345c
--- /dev/null
+++ b/resources/views/index.twig
@@ -0,0 +1,8 @@
+{% extends 'base.twig' %}
+
+{% block main %}
+ {% for post in posts %}
+ <h1>{{ post.title }}</h1>
+ <p>{{ post.content }}</p>
+ {% endfor %}
+{% endblock %}
diff --git a/resources/views/root.twig b/resources/views/root.twig
new file mode 100644
index 0000000..3075eba
--- /dev/null
+++ b/resources/views/root.twig
@@ -0,0 +1,17 @@
+<html {{ site.language_attributes }}>
+<head>
+ <meta charset="{{ site.charset }}" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="description" content="{{ site.description }}">
+ {% block meta %}{% endblock %}
+ {{ function('wp_head') }}
+ {% block css %}{% endblock %}
+</head>
+<body class="{{ body_class }}">
+{% block body %}{% endblock %}
+{{ function('wp_footer') }}
+{% block js %}{% endblock %}
+</body>
+</html>