mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-28 17:20:22 +00:00
EJS support (#2993)
* Added EJS Language Support * Added the submodule reference for ejs-tmbundle * Adding EJS license
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -695,6 +695,9 @@
|
||||
[submodule "vendor/grammars/grace"]
|
||||
path = vendor/grammars/grace
|
||||
url = https://github.com/zmthy/grace-tmbundle
|
||||
[submodule "vendor/grammars/ejs-tmbundle"]
|
||||
path = vendor/grammars/ejs-tmbundle
|
||||
url = https://github.com/gregory-m/ejs-tmbundle
|
||||
[submodule "vendor/grammars/nix"]
|
||||
path = vendor/grammars/nix
|
||||
url = https://github.com/wmertens/sublime-nix
|
||||
|
||||
@@ -245,6 +245,8 @@ vendor/grammars/ec.tmbundle/:
|
||||
- source.c.ec
|
||||
vendor/grammars/eiffel.tmbundle:
|
||||
- source.eiffel
|
||||
vendor/grammars/ejs-tmbundle:
|
||||
- text.html.js
|
||||
vendor/grammars/elixir-tmbundle:
|
||||
- source.elixir
|
||||
- text.elixir
|
||||
|
||||
@@ -885,6 +885,15 @@ ECLiPSe:
|
||||
tm_scope: source.prolog.eclipse
|
||||
ace_mode: prolog
|
||||
|
||||
EJS:
|
||||
type: markup
|
||||
color: "#a91e50"
|
||||
group: HTML
|
||||
extensions:
|
||||
- .ejs
|
||||
tm_scope: text.html.js
|
||||
ace_mode: ejs
|
||||
|
||||
Eagle:
|
||||
type: markup
|
||||
color: "#814C05"
|
||||
|
||||
13
samples/EJS/dash.ejs
Normal file
13
samples/EJS/dash.ejs
Normal file
@@ -0,0 +1,13 @@
|
||||
<% include parts/depend %>
|
||||
|
||||
<div class="row">
|
||||
<% if (user.primaryAccount == "teacher") { %>
|
||||
<% include teacher/sidebar %>
|
||||
<% include teacher/dashboard %>
|
||||
<% } else if (user.primaryAccount == "student") { %>
|
||||
<% include student/sidebar %>
|
||||
<% include student/dashboard %>
|
||||
<% } else { %>
|
||||
<center><h2>There seems to be a problem</h2></center>
|
||||
<% } %>
|
||||
</div>
|
||||
102
samples/EJS/page.ejs
Normal file
102
samples/EJS/page.ejs
Normal file
@@ -0,0 +1,102 @@
|
||||
<% include ../parts/depend %>
|
||||
|
||||
<div class="row">
|
||||
<% include sidebar %>
|
||||
<div class="col-lg-offset-3 col-lg-9 main-content">
|
||||
<div class="page-title">
|
||||
<h1>Pieces</h1>
|
||||
<% if (pieces.length == 1) { %>
|
||||
<p>You have
|
||||
<strong>1</strong>
|
||||
piece to practice</p>
|
||||
<% } else { %>
|
||||
<p>You have
|
||||
<strong><%= pieces.length %></strong>
|
||||
pieces to practice</p>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="row">
|
||||
<% if (pieces == undefined || pieces.length == 0) { %>
|
||||
<div class="error-main">
|
||||
<h1>No Pieces</h1>
|
||||
<p>You have no
|
||||
<strong>Pieces</strong>
|
||||
assigned.</p>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div class="col-lg-12 section-title">
|
||||
<div style="margin-top: 10px; margin-bottom: 10px;" class="btn-group" role="group">
|
||||
<button id="inProgressButton" type="button" class="btn btn-md btn-super-round btn-focus-off btn-primary btn-primary-active">In Progress</button>
|
||||
<button id="completedButton" type="button" class="btn btn-md btn-super-round btn-focus-off btn-purple">Completed</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inProgressPieces">
|
||||
<% if (inProgressPieces == undefined || inProgressPieces.length == 0) { %>
|
||||
<center>
|
||||
<h2>No Pieces in Progress</h2>
|
||||
</center>
|
||||
<% } else { %>
|
||||
<% for (var i = 0; i < inProgressPieces.length; i++) { %>
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="title">
|
||||
<h1>
|
||||
<a href="/pieces/practice/<%= inProgressPieces[i].id %>"><%= inProgressPieces[i].title %></a>
|
||||
</h1>
|
||||
<p>By
|
||||
<strong><%= inProgressPieces[i].author %></strong>
|
||||
</p>
|
||||
<p>
|
||||
Teacher:
|
||||
<strong><%= inProgressPieces[i].teacherName %></strong>
|
||||
</p>
|
||||
<p>Average Practice Time:
|
||||
<strong><%= inProgressPieces[i].averagePracticeTime %>
|
||||
mins</strong>
|
||||
</p>
|
||||
<a href="/pieces/practice/<%= inProgressPieces[i].id %>" class="btn btn-success btn-block">Practice
|
||||
<%= inProgressPieces[i].title %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<div id="completedPieces" style="display: none;">
|
||||
<% if (completedPieces == undefined || completedPieces.length == 0) { %>
|
||||
<center>
|
||||
<h2>No Completed Pieces</h2>
|
||||
</center>
|
||||
<% } else { %>
|
||||
<% for (var i = 0; i < completedPieces.length; i++) { %>
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="title">
|
||||
<h1>
|
||||
<a href="/pieces/practice/<%= completedPieces[i].id %>"><%= completedPieces[i].title %></a>
|
||||
</h1>
|
||||
<p>By
|
||||
<strong><%= completedPieces[i].author %></strong>
|
||||
</p>
|
||||
<p>
|
||||
Teacher:
|
||||
<strong><%= completedPieces[i].teacherName %></strong>
|
||||
</p>
|
||||
<p>Average Practice Time:
|
||||
<strong><%= completedPieces[i].averagePracticeTime %>
|
||||
mins</strong>
|
||||
</p>
|
||||
<a href="/pieces/practice/<%= completedPieces[i].id %>" class="btn btn-success btn-block">Practice
|
||||
<%= completedPieces[i].title %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
1
vendor/grammars/ejs-tmbundle
vendored
Submodule
1
vendor/grammars/ejs-tmbundle
vendored
Submodule
Submodule vendor/grammars/ejs-tmbundle added at 0854026c99
8
vendor/licenses/grammar/ejs-tmbundle.txt
vendored
Normal file
8
vendor/licenses/grammar/ejs-tmbundle.txt
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
type: grammar
|
||||
name: ejs-tmbundle
|
||||
license: mit
|
||||
curated: true
|
||||
---
|
||||
|
||||
EJS TextMate Bundle is released under the MIT license.
|
||||
Reference in New Issue
Block a user