Skip to content

Commit

Permalink
0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSteffanick committed Mar 25, 2019
1 parent 13034ca commit abd2038
Show file tree
Hide file tree
Showing 8 changed files with 699 additions and 437 deletions.
28 changes: 25 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [Unreleased]

## [0.4.0] - 2019-03-25
### Added
* [mvc.xquery]
* `$mvc:brand` ([mvc.xquery])
* `$mvc:brand-description` ([mvc.xquery])
* `$mvc:paths` ([mvc.xquery])
* `$mvc:template` ([mvc.xquery])
* `$mvc:title` ([mvc.xquery])
* `$mvc:version` ([mvc.xquery])
* `mvc:list-paths()` ([mvc.xquery])

### Changed
* [Bootstrap] → v4.3.1 ([bootstrap.xquery])
* `html5:html-refine()` ([html5.xquery]) → `mvc:html-refine()` ([mvc.xquery])
* refactored `bootstrap:navbar-brand()` ([bootstrap.xquery])
* refactored `bootstrap:navbar-search()` ([bootstrap.xquery])
* refactored `bootstrap:navbar-ul()` ([bootstrap.xquery])
* refactored `html5:html()` ([html5.xquery])
* refactored `html5:title()` ([html5.xquery])

## [0.3.0] - 2019-02-26
### Added
* [html5.xquery]
Expand All @@ -19,7 +39,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
* `m:html5-head()` ([model.xquery]) → `html5:head()` ([html5.xquery])
* `m:html5-head-meta()` ([model.xquery]) → `html5:meta-priority()` ([html5.xquery])
* `m:html5-link()` ([model.xquery]) → `html5:link()` ([html5.xquery])
* `m:html5-lang()` ([model.xquery]) → html5:lang()` ([html5.xquery])
* `m:html5-lang()` ([model.xquery]) → `html5:lang()` ([html5.xquery])
* `m:html5-meta()` ([model.xquery]) → `html5:meta()` ([html5.xquery])
* `m:html5-noscript()` ([model.xquery]) → `html5:noscript()` ([html5.xquery])
* `m:html5-refine()` ([model.xquery]) → `html5:html-refine` ([html5.xquery])
Expand All @@ -43,7 +63,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
* `m:html5-refine()` ([model.xquery])

### Changed
* [bootstrap.xquery][Bootstrap] v4.2.1
* [Bootstrap] → v4.2.1 ([bootstrap.xquery])
* all functions & variables → `%public` or `%private`
* `m:html5()` @param `$parameter as map(*)?``$parameter as map(*)+` ([model.xquery])

Expand Down Expand Up @@ -122,7 +142,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
* [LISENCE]
* [README.md]

[Unreleased]: https://github.com/AdamSteffanick/mvc-xquery/compare/v0.3.0...HEAD
[Unreleased]: https://github.com/AdamSteffanick/mvc-xquery/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/AdamSteffanick/mvc-xquery/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/AdamSteffanick/mvc-xquery/compare/v0.2.3...v0.3.0
[0.2.3]: https://github.com/AdamSteffanick/mvc-xquery/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/AdamSteffanick/mvc-xquery/compare/v0.2.1...v0.2.2
Expand All @@ -145,6 +166,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
[/modules/]: ./modules/
[bootstrap.xquery]: ./modules/bootstrap.xquery
[html5.xquery]: ./modules/html5.xquery
[mvc.xquery]: ./modules/mvc.xquery

[Bootstrap]: https://getbootstrap.com/
[shields.io]: http://shields.io/
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,55 @@

[![version][version-badge]][CHANGELOG] [![license][license-badge]][LICENSE]

MVC-XQuery | A Model-View-Controller framework for BaseX
MVC-XQuery | A Model-View-Controller framework in XQuery for BaseX

Copyright (C) 2018–2019 [Adam Steffanick](https://www.steffanick.com/adam/)

## Download
* [**Latest release**](https://github.com/AdamSteffanick/mvc-xquery/releases/latest)

## Documentation
### BaseX 9.1.2:
### [BaseX]:
* Download this repository and place all files within the `webapp` subdirectory of `basex`
* Modify [model.xquery], [view.xquery], and [controller.xquery] as needed
* Run the [BaseX HTTP Server](http://docs.basex.org/wiki/Startup#HTTP_Server)
* Navigate to http://localhost:8984 in your browser

### Default output
#### `html5:html()`
#### html5:html()
```
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>MVC-XQuery | A Model-View-Controller framework for BaseX</title>
<title>MVC-XQuery | A Model-View-Controller framework in XQuery for BaseX</title>
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>
```

#### `html5:html($bootstrap:template)`
#### html5:html($bootstrap:template)
```
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>MVC-XQuery | A Model-View-Controller framework for BaseX</title>
<title>MVC-XQuery | A Model-View-Controller framework in XQuery for BaseX</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
</head>
<body>
<h1>Hello, world!</h1>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"/>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"/>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"/>
</body>
</html>
```

## Features
* [Bootstrap] v4.2.1 support
* [BaseX] 9.1.2 support
* [Bootstrap] v4.3.1 support
* [HTML5] v5.2 support

## Manifest tree
Expand All @@ -64,10 +65,11 @@ mvc-xquery
├── model.xquery
├── modules
│   ├── bootstrap.xquery
│   └── html5.xquery
│   ├── html5.xquery
│   └── mvc.xquery
└── view.xquery
1 directory, 8 files
1 directory, 9 files
```

## License
Expand All @@ -78,13 +80,14 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

[CHANGELOG]: ./CHANGELOG.md
[version-badge]: https://img.shields.io/badge/mvc--xquery-v0.3.0-0038e2.svg?style=flat-square
[version-badge]: https://img.shields.io/badge/mvc--xquery-v0.4.0-0038e2.svg?style=flat-square
[LICENSE]: ./LICENSE
[license-badge]: https://img.shields.io/badge/license-GPL-0038e2.svg?style=flat-square

[model.xquery]: ./model.xquery
[view.xquery]: ./view.xquery
[controller.xquery]: ./controller.xquery

[BaseX]: http://basex.org/
[Bootstrap]: https://getbootstrap.com/
[HTML5]: https://www.w3.org/TR/html52/
10 changes: 5 additions & 5 deletions controller.xquery
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ xquery version "3.1" encoding "UTF-8";
(:~
: The MVC-XQuery controller function library module.
:
: MVC-XQuery | A Model-View-Controller framework for BaseX
: MVC-XQuery | A Model-View-Controller framework in XQuery for BaseX
: Copyright (C) 2018–2019 Adam Steffanick
:
: @author Adam Steffanick
: @see https://www.steffanick.com/adam/
: @version v0.3.0
: @version v0.4.0
: @see https://github.com/AdamSteffanick/mvc-xquery
: February 26, 2019
: March 25, 2019
: @since v0.0.2
:
: This program is free software: you can redistribute it and/or modify
Expand All @@ -36,11 +36,11 @@ import module namespace m = "model" at "model.xquery";
import module namespace v = "view" at "view.xquery";

(:~
: A function to return an HTML5 home page to the user.
: A private function to return an HTML5 home page to the user.
:
: @author Adam Steffanick
: @see https://www.steffanick.com/adam/
: @version v2.0.0
: @version v2.0.1
: @since v0.1.0
:
: @return an HTML5 home page
Expand Down
11 changes: 6 additions & 5 deletions model.xquery
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ xquery version "3.1" encoding "UTF-8";
(:~
: The MVC-XQuery model function library module.
:
: MVC-XQuery | A Model-View-Controller framework for BaseX
: MVC-XQuery | A Model-View-Controller framework in XQuery for BaseX
: Copyright (C) 2018–2019 Adam Steffanick
:
: @author Adam Steffanick
: @see https://www.steffanick.com/adam/
: @version v0.3.0
: @version v0.4.0
: @see https://github.com/AdamSteffanick/mvc-xquery
: February 26, 2019
: March 25, 2019
: @since v0.0.2
:
: This program is free software: you can redistribute it and/or modify
Expand All @@ -33,16 +33,17 @@ module namespace m = "model";

(: required function library modules :)
import module namespace html5 = "html5" at "modules/html5.xquery";
import module namespace mvc = "mvc" at "modules/mvc.xquery";

(: optional function library modules :)
import module namespace bootstrap = "bootstrap" at "modules/bootstrap.xquery";

(:~
: A function to return an HTML5 home page.
: A public function to return an HTML5 home page.
:
: @author Adam Steffanick
: @see https://www.steffanick.com/adam/
: @version v1.0.0
: @version v1.0.1
: @since v0.3.0
:
: @return an HTML5 home page
Expand Down
Loading

0 comments on commit abd2038

Please sign in to comment.