Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
Change code indentation to two spaces, remove keyboard shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
Triangle717 committed Mar 24, 2014
1 parent 3b36a02 commit 17cb8af
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
[http://mdo.github.io/code-guide/#css-syntax](http://mdo.github.io/code-guide/#css-syntax))
* Indent JavaScript using twp space soft tabs (per [https://github.com/styleguide/javascript](https://github.com/styleguide/javascript))
* Update HTML elements per aforementioned style guide
* Changed code indentation to two spaces (was four spaces)
* Removed keyboard shortcut

## 1.1.3 ##

Expand Down
13 changes: 7 additions & 6 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
.html-skeleton-modal-body { overflow-x: hidden; }

/* Hide loaded image details and path */
#img-header, #img-path { display: none; }
#img-header,
#img-path { display: none; }

/* Position the image on the right */
#img-preview {
position: relative;
right: -60px;
bottom: 30px;
width: 270px;
height: 270px;
float: right;
position: relative;
bottom: 30px;
right: -60px;
}

/* Shift the dialog content (excluding the image) up */
Expand All @@ -44,10 +45,10 @@

/* Accommodate the "Full HTML skeleton" description */
#full-skelly-description {
font-size: 12px;
display: inline-block;
position: relative;
bottom: 5px;
display: inline-block;
font-size: 12px;
}

/* Enlarge the "x" between image dimensions */
Expand Down
23 changes: 12 additions & 11 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,19 @@ define(function (require, exports, module) {

/* ------- Begin Available HTML Elements ------- */

// Assign a variable for 4 space indentation for easier coding
var fourSpaceIndent = "\u0020\u0020\u0020\u0020";
// Assign a variable for 2 space indentation for easier coding
// FUTURE Replace with Sprint 37 prefs system
var twoSpaceIndent = "\u0020\u0020";

// Placeholder variables for image size
var $imgWidth = 0,
$imgHeight = 0;

var skellyBones = [
// Only the head and body tags + title and meta
'<!DOCTYPE html>\n<html lang="">\n<head>\n' + fourSpaceIndent +
'<meta charset="UTF-8">\n' + fourSpaceIndent + '<title></title>\n' +
'\n</head>\n\n<body>\n' + fourSpaceIndent + '\n</body>\n</html>\n',
'<!DOCTYPE html>\n<html lang="">\n<head>\n' + twoSpaceIndent +
'<meta charset="UTF-8">\n' + twoSpaceIndent + '<title></title>\n' +
'\n</head>\n\n<body>\n' + twoSpaceIndent + '\n</body>\n</html>\n',

// External stylesheet
'<link rel="stylesheet" href="">',
Expand All @@ -70,10 +71,10 @@ define(function (require, exports, module) {
'<script></script>',

// Full HTML skeleton
'<!DOCTYPE html>\n<html lang="">\n<head>\n' + fourSpaceIndent +
'<meta charset="UTF-8">\n' + fourSpaceIndent + '<title></title>\n' +
fourSpaceIndent + '<link rel="stylesheet" href="">' + '\n</head>\n\n<body>\n' +
fourSpaceIndent + '<script src=""></script>\n</body>\n</html>\n'
'<!DOCTYPE html>\n<html lang="">\n<head>\n' + twoSpaceIndent +
'<meta charset="UTF-8">\n' + twoSpaceIndent + '<title></title>\n' +
twoSpaceIndent + '<link rel="stylesheet" href="">' + '\n</head>\n\n<body>\n' +
twoSpaceIndent + '<script src=""></script>\n</body>\n</html>\n'
];

// Picture/Image
Expand Down Expand Up @@ -217,10 +218,10 @@ define(function (require, exports, module) {
// Load extension CSS
ExtensionUtils.loadStyleSheet(module, "css/style.css");

// Assign a keyboard shortcut and item in Edit menu
// Create a menu item in the Edit menu
CommandManager.register(Strings.INSERT_HTML_ELEMENTS, EXTENSION_ID, _showSkellyDialog);
var menu = Menus.getMenu(Menus.AppMenuBar.EDIT_MENU);
menu.addMenuItem(EXTENSION_ID, "Ctrl-Shift-N");
menu.addMenuItem(EXTENSION_ID);
});
});

Expand Down

0 comments on commit 17cb8af

Please sign in to comment.