From e17392e46259e6f2e012017987cf7c31c171488f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 28 Oct 2018 19:56:27 +0100 Subject: abstract config NWY --- w/view/templates/base.php | 10 ----- w/view/templates/body.php | 0 w/view/templates/edit.php | 47 ++++++++++++++++++++++ w/view/templates/edithelp.php | 27 +++++++++++++ w/view/templates/editsidebar.php | 40 +++++++++++++++++++ w/view/templates/edittabs.php | 19 +++++++++ w/view/templates/edittopbar.php | 12 ++++++ w/view/templates/home.php | 85 ++++++++++++++++++++++++++++++++++++++++ w/view/templates/homeopt.php | 84 +++++++++++++++++++++++++++++++++++++++ w/view/templates/layout.php | 20 ++++++++++ w/view/templates/nav.php | 42 -------------------- w/view/templates/navart.php | 64 ++++++++++++++++++++++++++++++ w/view/templates/navback.php | 54 +++++++++++++++++++++++++ w/view/templates/read.php | 55 +++++++++++++++++++------- w/view/templates/readart.php | 25 ++++++++++++ w/view/templates/readcreate.php | 3 ++ w/view/templates/reader.php | 38 ------------------ 17 files changed, 521 insertions(+), 104 deletions(-) delete mode 100644 w/view/templates/base.php create mode 100644 w/view/templates/body.php create mode 100644 w/view/templates/edit.php create mode 100644 w/view/templates/edithelp.php create mode 100644 w/view/templates/editsidebar.php create mode 100644 w/view/templates/edittabs.php create mode 100644 w/view/templates/edittopbar.php create mode 100644 w/view/templates/home.php create mode 100644 w/view/templates/homeopt.php create mode 100644 w/view/templates/layout.php delete mode 100644 w/view/templates/nav.php create mode 100644 w/view/templates/navart.php create mode 100644 w/view/templates/navback.php create mode 100644 w/view/templates/readart.php create mode 100644 w/view/templates/readcreate.php delete mode 100644 w/view/templates/reader.php (limited to 'w/view') diff --git a/w/view/templates/base.php b/w/view/templates/base.php deleted file mode 100644 index aaca8e1..0000000 --- a/w/view/templates/base.php +++ /dev/null @@ -1,10 +0,0 @@ - - - <?=$this->e($title)?> - - - -section('content')?> - - - \ No newline at end of file diff --git a/w/view/templates/body.php b/w/view/templates/body.php new file mode 100644 index 0000000..e69de29 diff --git a/w/view/templates/edit.php b/w/view/templates/edit.php new file mode 100644 index 0000000..39c2104 --- /dev/null +++ b/w/view/templates/edit.php @@ -0,0 +1,47 @@ +layout('layout', ['title' => '✏ '.$art->title()]) ?> + + + + + +start('customhead') ?> + +stop() ?> + + + + + + +start('page') ?> + + + + insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]) ?> + + +
+ + + + insert('edittopbar', ['config' => $config, 'art' => $art]) ?> + insert('editsidebar', ['config' => $config, 'art' => $art]) ?> + + + + + $art->md(), 'css' => $art->css(), 'header' => $art->header(), 'nav' => $art->nav(), 'aside' => $art->aside(), 'footer' => $art->footer(), 'html' => $art->html(), 'javascript' => $art->javascript()]; + $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface()]) + ?> + + + + + + +
+ + + +stop() ?> \ No newline at end of file diff --git a/w/view/templates/edithelp.php b/w/view/templates/edithelp.php new file mode 100644 index 0000000..fee94c7 --- /dev/null +++ b/w/view/templates/edithelp.php @@ -0,0 +1,27 @@ + +

Help !

+

To save your article, press the HOME, UPDATE, or DISPLAY buttons. You can use the keyboard shortcuts as well.

+
ALT + W : home
+
ALT + X : update
+
ALT + C : display
+

Markdown

+

The html section use Markdown encoding. Actualy, W is using Michel Fortin's Markdown Extra.

+

Links

+
[text](=article_id)
+

where article_id is the article's id you want to point to.

+

Images

+
[altimage](/img_id.extension)
+

Where img_id is the id of your image and its extension.

+

Shortcuts

+
%TITLE%
+

Show the title of your article.

+
%DESCRIPTION%
+

Show the description of your article.

+
%SUMMARY%
+

Generate a summary, the list of all your head titles using #, ##, ###...

+
%%tag_name%%
+

Generate a menu, a list of links to all articles under this tag.

+

vv

+

vv

+

vv

+

\ No newline at end of file diff --git a/w/view/templates/editsidebar.php b/w/view/templates/editsidebar.php new file mode 100644 index 0000000..99612dd --- /dev/null +++ b/w/view/templates/editsidebar.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/w/view/templates/edittabs.php b/w/view/templates/edittabs.php new file mode 100644 index 0000000..c65a7c7 --- /dev/null +++ b/w/view/templates/edittabs.php @@ -0,0 +1,19 @@ +
+ + $value) { + echo '
'; + if ($key == $opentab) { + echo ''; + } else { + echo ''; + } + echo ''; + echo '
'; + echo ''; + echo '
'; + echo '
'; +} +?> + +
\ No newline at end of file diff --git a/w/view/templates/edittopbar.php b/w/view/templates/edittopbar.php new file mode 100644 index 0000000..7e7f9e8 --- /dev/null +++ b/w/view/templates/edittopbar.php @@ -0,0 +1,12 @@ +
+ + + + + πŸ‘ + + id() ?> + + + +
\ No newline at end of file diff --git a/w/view/templates/home.php b/w/view/templates/home.php new file mode 100644 index 0000000..34bac1a --- /dev/null +++ b/w/view/templates/home.php @@ -0,0 +1,85 @@ +layout('layout', ['title' => 'home']) ?> + + + + +start('page') ?> + + + + + insert('navback', ['user' => $user]) ?> + + +
+
+ + + insert('homeopt', ['opt' => $opt]) ?> + + + +
+

Articles

+
+ + +
+

Mass Edit

+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
xideditseelogtagsummaryβ†˜ toβ†— fromlast modificationdate of creationprivacy
βœπŸ‘ΒΆtag('sort') ?>description() ?>linkto('sort') ?>linkfrom('sort') ?>datemodif('hrdi') ?>datecreation('hrdi') ?>secure('string') ?>
+
+
+
+
+ + + + +stop() ?> \ No newline at end of file diff --git a/w/view/templates/homeopt.php b/w/view/templates/homeopt.php new file mode 100644 index 0000000..cecb79b --- /dev/null +++ b/w/view/templates/homeopt.php @@ -0,0 +1,84 @@ +
+

Options

+
+ +β¬… + + + + +
Sort + +
+order() == '1' ? "checked" : "" ?>/> +
+order() == '-1' ? "checked" : "" ?>/> + +
+ +
Privacy
    +
  • secure() == 4 ? "checked" : "" ?>/>
  • +
  • secure() == 3 ? "checked" : "" ?>/>
  • +
  • secure() == 2 ? "checked" : "" ?>/>
  • +
  • secure() == 1 ? "checked" : "" ?>/>
  • +
  • secure() == 0 ? "checked" : "" ?>/>
  • +
+ +
Tag
    + + +tagcompare() == "OR" ? "checked" : "" ?> > +tagcompare() == "AND" ? "checked" : "" ?>> + +taglist() as $tagfilter => $count) { + + if ($count > $limit && $in == false) { + echo '
    >' . $limit . ''; + $in = true; + } + if ($count == $limit && $in == true && $out == false) { + echo '
    ' . $limit . ''; + $out = true; + } + + if (in_array($tagfilter, $opt->tagfilter())) { + + echo '
  • '; + } else { + echo '
  • '; + } +} +if ($in = true || $out = true) { + echo '
    '; +} +?> + +
+ + invert() == 1) { + echo ''; + } else { + echo ''; + } + echo '
diff --git a/w/view/templates/layout.php b/w/view/templates/layout.php new file mode 100644 index 0000000..263cca3 --- /dev/null +++ b/w/view/templates/layout.php @@ -0,0 +1,20 @@ + + + + + + + + <?= $title ?> + + section('customhead')?> + section('arthead')?> + + + + + +section('page')?> + + + \ No newline at end of file diff --git a/w/view/templates/nav.php b/w/view/templates/nav.php deleted file mode 100644 index e731673..0000000 --- a/w/view/templates/nav.php +++ /dev/null @@ -1,42 +0,0 @@ -