Skip to content

Commit

Permalink
Merge pull request nitrogen#108 from fbrau/master
Browse files Browse the repository at this point in the history
this merge add plugin templates in the .prototypes directory
  • Loading branch information
choptastic authored Mar 20, 2019
2 parents c5bf752 + fc818bb commit cf035c9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rel/overlay/common/site/.prototypes/plugin.app.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{application, [[[NAME]]],
[
{description, "A sample plugin for the Nitrogen Web Framework"},
{vsn, ""},
{registered, []},
{applications, [
kernel,
stdlib
]},
{env, []}
]}.
Binary file added rel/overlay/common/site/.prototypes/plugin.tgz
Binary file not shown.
17 changes: 17 additions & 0 deletions rel/overlay/common/site/.prototypes/plugin_page.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%% -*- mode: nitrogen -*-
%% vim: ts=4 sw=4 et
-module ([[[NAME]]]).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include("records.hrl").

main() -> #template { file="./site/templates/bare.html" }.

title() -> "Testing plugin [[[NAME]]]!".

body() ->
wf:wire(#sample_action{}),
[
"You should see some more content and an alert: <b>",
#sample_element{}, "</b>"
].

0 comments on commit cf035c9

Please sign in to comment.