1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License
15 # Contains the main components of a webpage for Opportunity
16 module boilerplate
is i18n
21 # Header for a Opportunity page
22 class OpportunityHeader
25 # Javascript code that is included in the `OpportunityPage`
26 var page_js
: String = "" is writable # FIXME remove static type when #1530 is fixed
28 redef fun rendering
do
33 <title>{{{"Opportunity - The meetup planner"}}}</title>
34 <meta charset="utf-8">
35 <meta name="viewport" content="width=device-width, initial-scale=1">
36 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
37 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
38 <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
44 background-color: #0d8921;
45 background-repeat: repeat-x;
58 background-color: #0d8921;
64 .opportunity-action:hoverĀ {
70 <nav class="menu" role="navigation">
71 <div class="container">
72 <div class="navbar-header">
73 <a class="navbar-brand" href="./" >{{{"Opportunity"}}}</a>
77 <div class="container">
82 # Footer for a Opportunity page
83 class OpportunityFooter
86 redef fun rendering
do
90 <div class="well well-sm">
91 <p class="text-muted text-center">
92 {{{"Opportunity, the meetup planner."}}}
94 <p class="text-muted text-center">
95 {{{"Proudly powered by %0!".format("<a href=\"http://nitlanguage.org/\">Nit</a>")}}}
105 # Any Opportunity page that contains the header, body and footer.
106 class OpportunityPage
109 # The HTML code of the header and of the banner.
110 var header
= new OpportunityHeader
112 # The HTML code of the body.
113 var body
: Writable = "" is writable
115 # The HTML code of the footer.
116 var footer
= new OpportunityFooter
118 redef fun rendering
do