| # 新手上路 | ||
+12
-2
| module.exports = function(grunt) { | ||
| grunt.loadNpmTasks('grunt-contrib-less'); | ||
| grunt.loadNpmTasks('grunt-contrib-watch'); | ||
@@ -14,6 +15,15 @@ grunt.initConfig({ | ||
| } | ||
| } | ||
| }, | ||
| watch: { | ||
| scripts: { | ||
| files: ['theme/public/less/**/*.less'], | ||
| tasks: ['less'], | ||
| options: { | ||
| nospawn: true | ||
| }, | ||
| }, | ||
| }, | ||
| }); | ||
| grunt.registerTask('default', ['less']); | ||
| grunt.registerTask('default', ['less', 'watch']); | ||
| } |
+7
-3
@@ -149,4 +149,4 @@ 'use strict'; | ||
| lang.each(languages, function (name, language) { | ||
| var root_tree = root[language] || {}; | ||
| delete root_tree.parent; | ||
| var ltree = root[language] || {}; | ||
| delete ltree.parent; | ||
@@ -157,4 +157,8 @@ // It's hard to detect the closest match if user had a wrong configuration | ||
| name: name, | ||
| tree: root_tree | ||
| tree: ltree | ||
| }; | ||
| ltree.language = language; | ||
| ltree.language_text = name; | ||
| }); | ||
@@ -161,0 +165,0 @@ |
+3
-2
| { | ||
| "name": "document", | ||
| "version": "0.4.3", | ||
| "version": "0.4.4", | ||
| "description": "Create your document site with just one command.", | ||
@@ -40,4 +40,5 @@ "// main": "index.js", | ||
| "grunt": "~0.4.1", | ||
| "grunt-contrib-less": "~0.7.0" | ||
| "grunt-contrib-less": "~0.7.0", | ||
| "grunt-contrib-watch": "~0.5.3" | ||
| } | ||
| } |
+1
-0
@@ -82,2 +82,3 @@ [](http://badge.fury.io/js/document) | ||
| - Programmatical APIs. | ||
| - Watcher support so that you can uodate your documents without restarting your server. | ||
@@ -84,0 +85,0 @@ |
@@ -10,14 +10,20 @@ <% include header %> | ||
| <a class="brand pull-left" href="<%= config.site_root %>"><%= config.title %></a> | ||
| <% if (config.languages) { | ||
| var l; | ||
| var text; | ||
| for (l in config.languages) { | ||
| text = config.languages[l]; | ||
| } | ||
| %><p class="navbar-text pull-right"> | ||
| <a href="<%= config.site_root %>/<%= l %>"><%= text %></a> | ||
| </p><% | ||
| } | ||
| %> | ||
| <div class="dropdown navbar-text pull-right"> | ||
| <% if (config.languages) { | ||
| %><a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= tree.language_text %> <b class="caret"></b></a> | ||
| <ul class="dropdown-menu" role="menu"><% | ||
| var l; | ||
| var text; | ||
| for (l in config.languages) { | ||
| text = config.languages[l]; | ||
| var li_class = l === tree.language ? ' class="disabled"' : ''; | ||
| %><li<%- li_class %>> | ||
| <a href="<%= config.site_root %>/<%= l %>"><%= text %></a> | ||
| </li><% | ||
| } | ||
| %></ul><% | ||
| } %> | ||
| </div> | ||
| </div> | ||
@@ -24,0 +30,0 @@ </div> |
@@ -68,5 +68,23 @@ //Mixins, cuz they're handy | ||
| } | ||
| h1 { | ||
| font-family: 'Roboto Slab', 'Hiragino Sans GB', 'STHeiti', 'Microsoft YaHei', sans-serif; | ||
| font-size: 50px; | ||
| line-height: 54px; | ||
| margin-bottom: 20px; | ||
| padding: 10px 0; | ||
| display: block; | ||
| border-bottom: 1px solid @lines; | ||
| @media (max-width: 767px) { | ||
| font-size: 38.5px; | ||
| line-height: 40px; | ||
| } | ||
| } | ||
| a { | ||
| } | ||
| } | ||
| pre { | ||
@@ -399,3 +417,3 @@ padding: 0; | ||
| border-bottom: none; | ||
| padding: 6px 20px; | ||
| padding: 0 20px; | ||
| .brand { | ||
@@ -405,4 +423,6 @@ color: @light; | ||
| .roboto-slab.bold; | ||
| line-height: 32px; | ||
| } | ||
| .navbar-text { | ||
| padding: 10px 0; | ||
| color: @light; | ||
@@ -412,9 +432,26 @@ a { | ||
| } | ||
| &.dropdown { | ||
| padding: 10px 5px; | ||
| } | ||
| .dropdown-toggle { | ||
| display: block; | ||
| padding: 6px 0; | ||
| line-height: 20px; | ||
| } | ||
| .caret { | ||
| border-top-color: @light; | ||
| } | ||
| } | ||
| @media (max-width: 767px) { | ||
| padding: 6px 10px; | ||
| padding: 0 10px; | ||
| .navbar-text { | ||
| line-height: 16px; | ||
| line-height: 28px; | ||
| margin: 12px 6px; | ||
| font-size: 12px; | ||
| &.dropdown { | ||
| padding: 0 5px; | ||
| } | ||
| .dropdown-toggle { | ||
| padding: 4px 0; | ||
| } | ||
| } | ||
@@ -421,0 +458,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1392165
0.35%57
3.64%29791
0.5%89
1.14%5
25%