mirror of
				https://github.com/filebrowser/filebrowser.git
				synced 2025-11-04 03:12:57 +00:00 
			
		
		
		
	updates
This commit is contained in:
		
							parent
							
								
									92d7a5870c
								
							
						
					
					
						commit
						d8c619dd3c
					
				@ -39,6 +39,7 @@ module.exports = function(grunt) {
 | 
			
		||||
          'node_modules/font-awesome/css/font-awesome.css',
 | 
			
		||||
          'node_modules/animate.css/animate.min.css',
 | 
			
		||||
          'node_modules/codemirror/lib/codemirror.css',
 | 
			
		||||
          'node_modules/codemirror/theme/mdn-like.css',
 | 
			
		||||
          'assets/css/src/main.css'
 | 
			
		||||
        ],
 | 
			
		||||
        dest: 'assets/css/src/main.css',
 | 
			
		||||
@ -75,6 +76,7 @@ module.exports = function(grunt) {
 | 
			
		||||
            'node_modules/jquery-pjax/jquery.pjax.js',
 | 
			
		||||
            'node_modules/jquery-serializejson/jquery.serializejson.min.js',
 | 
			
		||||
            'node_modules/codemirror/lib/codemirror.js',
 | 
			
		||||
            'node_modules/codemirror/mode/markdown/markdown.js',
 | 
			
		||||
            'node_modules/textarea-autosize/dist/jquery.textarea_autosize.js',
 | 
			
		||||
            'assets/js/src/**/*.js'
 | 
			
		||||
          ]
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										6
									
								
								assets/css/main.min.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								assets/css/main.min.css
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -13,7 +13,7 @@
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.editor.full .container {
 | 
			
		||||
.full .container {
 | 
			
		||||
  position: fixed;
 | 
			
		||||
  top     : 3em;
 | 
			
		||||
  right   : 0;
 | 
			
		||||
@ -26,7 +26,8 @@
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.editor #preview-area,
 | 
			
		||||
.editor textarea {
 | 
			
		||||
.editor textarea,
 | 
			
		||||
.CodeMirror {
 | 
			
		||||
  position  : relative;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  height    : 100%;
 | 
			
		||||
@ -36,6 +37,10 @@
 | 
			
		||||
  font-size : 1.05em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.CodeMirror {
 | 
			
		||||
  padding: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.editor #preview-area *:first-child {
 | 
			
		||||
  margin-top: 0;
 | 
			
		||||
}
 | 
			
		||||
@ -142,4 +147,10 @@
 | 
			
		||||
 | 
			
		||||
.full .action-bar {
 | 
			
		||||
  width: 75%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.full .cm-s-mdn-like.CodeMirror {
 | 
			
		||||
  background: none;
 | 
			
		||||
  width     : auto;
 | 
			
		||||
  margin    : 1.5em 10%;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										4
									
								
								assets/js/app.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								assets/js/app.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -43,6 +43,16 @@ $(document).on('ready pjax:success', function() {
 | 
			
		||||
    return false;
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  if ($('#content-area')[0]) {
 | 
			
		||||
    var myCodeMirror = CodeMirror.fromTextArea($('#content-area')[0], {
 | 
			
		||||
      mode: 'markdown',
 | 
			
		||||
      theme: 'mdn-like',
 | 
			
		||||
      lineWrapping: true,
 | 
			
		||||
      lineNumbers: false,
 | 
			
		||||
      scrollbarStyle: null
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Submites any form in the page in JSON format
 | 
			
		||||
  $('form').submit(function(event) {
 | 
			
		||||
    event.preventDefault();
 | 
			
		||||
 | 
			
		||||
@ -58,6 +58,20 @@ func Execute(w http.ResponseWriter, r *http.Request) (int, error) {
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			f, err := parser.InterfaceToFrontMatter(rawFile, mark)
 | 
			
		||||
			fString := string(f)
 | 
			
		||||
 | 
			
		||||
			// If it's toml or yaml, strip frontmatter identifier
 | 
			
		||||
			if frontmatter == "toml" {
 | 
			
		||||
				fString = strings.TrimSuffix(fString, "+++\n")
 | 
			
		||||
				fString = strings.TrimPrefix(fString, "+++\n")
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if frontmatter == "yaml" {
 | 
			
		||||
				fString = strings.TrimSuffix(fString, "---\n")
 | 
			
		||||
				fString = strings.TrimPrefix(fString, "---\n")
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			f = []byte(fString)
 | 
			
		||||
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				log.Print(err)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user