Skip to content

Commit 38a8bc0

Browse files
committed
Add demo data in theme
1 parent a3e42c5 commit 38a8bc0

16 files changed

+139
-62
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title of the home page</title>
6+
<style>
7+
body {
8+
font-family: sans-serif;
9+
}
10+
main h1 {
11+
font-weight: 100;
12+
font-size: 54px;
13+
}
14+
main p {
15+
font-weight: 100;
16+
}
17+
.main-page {
18+
text-align: center;
19+
}
20+
</style>
21+
</head>
22+
<body>
23+
<main>
24+
{% block content %}{% endblock %}
25+
</main>
26+
</body>
27+
</html>

content/themes/default/main.layout.twig

-23
This file was deleted.

content/themes/default/main.twig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends "layout/main.twig" %}
2+
3+
{% block content %}
4+
<div class="main-page">
5+
<h1>Hello FlexiCMS</h1>
6+
<p>You have successfully installed FlexiCMS. Now you can customize the main page.</p>
7+
</div>
8+
{% endblock %}

content/themes/default/page.twig

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{% extends "main.layout.twig" %}
22

33
{% block content %}
4-
<div class="page-content-{{ page.getAttribute('id') }}">
5-
<h1>{{ page.getAttribute('title') }}</h1>
6-
<div>
7-
{{ page.getAttribute('content') }}
8-
</div>
9-
</div>
4+
<div></div>
105
{% endblock %}

content/themes/default/post.twig

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% extends "main.layout.twig" %}
2+
3+
{% block content %}
4+
<div></div>
5+
{% endblock %}
-163 KB
Binary file not shown.
-447 KB
Binary file not shown.
-447 KB
Binary file not shown.
-447 KB
Binary file not shown.
-258 KB
Binary file not shown.
-258 KB
Binary file not shown.
-258 KB
Binary file not shown.
File renamed without changes.

database.sql

+97-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
-- phpMyAdmin SQL Dump
22
-- version 4.7.8
33
-- https://www.phpmyadmin.net/
4-
-- Время создания: Мар 07 2018 г., 15:49
4+
--
5+
-- Хост: zzema.mysql.ukraine.com.ua
6+
-- Время создания: Апр 05 2018 г., 11:53
57
-- Версия сервера: 5.7.16-10-log
68
-- Версия PHP: 7.0.27
79

@@ -17,9 +19,36 @@ SET time_zone = "+00:00";
1719
/*!40101 SET NAMES utf8mb4 */;
1820

1921
--
20-
-- База данных: `flexicms`
22+
-- База данных: `zzema_demoflexi`
23+
--
24+
25+
-- --------------------------------------------------------
26+
27+
--
28+
-- Структура таблицы `category`
29+
--
30+
31+
CREATE TABLE `category` (
32+
`id` int(11) NOT NULL,
33+
`parent_id` int(11) NOT NULL,
34+
`resource_type_id` int(11) NOT NULL,
35+
`image` varchar(255) NOT NULL,
36+
`date_added` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
37+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
38+
39+
-- --------------------------------------------------------
40+
41+
--
42+
-- Структура таблицы `category_description`
2143
--
2244

45+
CREATE TABLE `category_description` (
46+
`category_id` int(11) NOT NULL,
47+
`language` varchar(2) NOT NULL,
48+
`name` varchar(255) NOT NULL,
49+
`description` text NOT NULL
50+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
51+
2352
-- --------------------------------------------------------
2453

2554
--
@@ -90,6 +119,26 @@ CREATE TABLE `file` (
90119

91120
-- --------------------------------------------------------
92121

122+
--
123+
-- Структура таблицы `language`
124+
--
125+
126+
CREATE TABLE `language` (
127+
`id` int(11) NOT NULL,
128+
`code` varchar(2) NOT NULL,
129+
`name` varchar(255) NOT NULL
130+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
131+
132+
--
133+
-- Дамп данных таблицы `language`
134+
--
135+
136+
INSERT INTO `language` (`id`, `code`, `name`) VALUES
137+
(1, 'en', 'English'),
138+
(2, 'ru', 'Русский');
139+
140+
-- --------------------------------------------------------
141+
93142
--
94143
-- Структура таблицы `menu`
95144
--
@@ -144,6 +193,25 @@ CREATE TABLE `resource` (
144193
`date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
145194
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
146195

196+
--
197+
-- Дамп данных таблицы `resource`
198+
--
199+
200+
INSERT INTO `resource` (`id`, `resource_type_id`, `title`, `content`, `thumbnail`, `segment`, `type`, `status`, `date`) VALUES
201+
(1, 2, 'Hello World', 'Hello', 0, 'hello-world', 'basic', 'publish', '2018-04-04 22:09:27'),
202+
(2, 1, 'About', '<h1>Heading</h1><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here,\r\n content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various\r\n versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>\r\n<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here,\r\n content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various\r\n versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p><p></p><h2>Heading</h2><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here, content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p><p></p>', 0, 'about', 'basic', 'publish', '2018-04-05 11:19:03');
203+
204+
-- --------------------------------------------------------
205+
206+
--
207+
-- Структура таблицы `resource_to_category`
208+
--
209+
210+
CREATE TABLE `resource_to_category` (
211+
`resource_id` int(11) NOT NULL,
212+
`category_id` int(11) NOT NULL
213+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
214+
147215
-- --------------------------------------------------------
148216

149217
--
@@ -183,8 +251,8 @@ CREATE TABLE `setting` (
183251
--
184252

185253
INSERT INTO `setting` (`id`, `name`, `key_field`, `value`, `section`) VALUES
186-
(1, 'Name site', 'name_site', 'Start site on FlexiCMS', 'general'),
187-
(2, 'Description', 'description', 'Example description for Flexi', 'general'),
254+
(1, 'Name site', 'name_site', 'Your first site on FlexiCMS', 'general'),
255+
(2, 'Description', 'description', 'Our task as a species is as much as possible the spread of beauty on the Internet.', 'general'),
188256
(3, 'Admin email', 'admin_email', 'admin@admin.test', 'general'),
189257
(4, 'Language', 'language', 'en', 'general'),
190258
(5, 'Active theme', 'active_theme', 'default', 'theme');
@@ -215,6 +283,12 @@ INSERT INTO `user` (`id`, `email`, `password`, `role`, `hash`, `date_reg`) VALUE
215283
-- Индексы сохранённых таблиц
216284
--
217285

286+
--
287+
-- Индексы таблицы `category`
288+
--
289+
ALTER TABLE `category`
290+
ADD PRIMARY KEY (`id`);
291+
218292
--
219293
-- Индексы таблицы `custom_field`
220294
--
@@ -239,6 +313,12 @@ ALTER TABLE `custom_field_value`
239313
ALTER TABLE `file`
240314
ADD PRIMARY KEY (`id`);
241315

316+
--
317+
-- Индексы таблицы `language`
318+
--
319+
ALTER TABLE `language`
320+
ADD PRIMARY KEY (`id`);
321+
242322
--
243323
-- Индексы таблицы `menu`
244324
--
@@ -287,6 +367,12 @@ ALTER TABLE `user`
287367
-- AUTO_INCREMENT для сохранённых таблиц
288368
--
289369

370+
--
371+
-- AUTO_INCREMENT для таблицы `category`
372+
--
373+
ALTER TABLE `category`
374+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
375+
290376
--
291377
-- AUTO_INCREMENT для таблицы `custom_field`
292378
--
@@ -311,6 +397,12 @@ ALTER TABLE `custom_field_value`
311397
ALTER TABLE `file`
312398
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
313399

400+
--
401+
-- AUTO_INCREMENT для таблицы `language`
402+
--
403+
ALTER TABLE `language`
404+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
405+
314406
--
315407
-- AUTO_INCREMENT для таблицы `menu`
316408
--
@@ -333,7 +425,7 @@ ALTER TABLE `plugin`
333425
-- AUTO_INCREMENT для таблицы `resource`
334426
--
335427
ALTER TABLE `resource`
336-
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
428+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
337429

338430
--
339431
-- AUTO_INCREMENT для таблицы `resource_type`

flexi/Customize/Config.php

-27
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,6 @@ class Config
2323
'title' => 'Resources',
2424
'parents' => []
2525
],
26-
'geotrip' => [
27-
'classIcon' => 'folder outline icon',
28-
'urlPath' => '#',
29-
'title' => 'Geotrip',
30-
'parents' => [
31-
'transport' => [
32-
'classIcon' => 'folder outline icon',
33-
'urlPath' => '/admin/geotrip/transport/list/',
34-
'title' => 'Транспорт',
35-
],
36-
'activity' => [
37-
'classIcon' => 'folder outline icon',
38-
'urlPath' => '/admin/geotrip/activity/list/',
39-
'title' => 'Активности',
40-
],
41-
'hotel' => [
42-
'classIcon' => 'folder outline icon',
43-
'urlPath' => '/admin/geotrip/hotel/list/',
44-
'title' => 'Гостиницы',
45-
],
46-
'ready_tour' => [
47-
'classIcon' => 'folder outline icon',
48-
'urlPath' => '/admin/ready-tour/listing/',
49-
'title' => 'Готовые туры',
50-
],
51-
]
52-
],
5326
'plugins' => [
5427
'classIcon' => 'icon-wrench icons',
5528
'urlPath' => '/admin/plugins/',

modules/Admin/View/resources/edit.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</div>
3333
<div class="field">
3434
<label>{{ __('resources.edit.label_content') }}</label>
35-
<textarea name="content" class="redactor">{{ resource.getAttribute('content') }}</textarea>
35+
<textarea name="content" id="redactor" class="redactor">{{ resource.getAttribute('content') }}</textarea>
3636
</div>
3737
</form>
3838
</div>

0 commit comments

Comments
 (0)