forked from zulip/zulip-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lint: Implement HTML Linting with htmlhint and fix indent.
* lint: Implement HTML Linting with htmlhint and fix indent. Implements HTML linting using htmlhint and uses indentation rules of zulip webapp - 4 spaces. Creates a separate file .htmlhintrc for the rules, most of which are defaults. Also, fixes indentation in html files and adds a missing title in about.html. * deps: Change versioning of various dependencies to exact versions. As we prefer to use exact working version for dependencies, changed the versions to exact versions. Fixes zulip#676.
- Loading branch information
1 parent
8a40e36
commit 7fa9c29
Showing
6 changed files
with
158 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"tagname-lowercase": true, | ||
"attr-lowercase": true, | ||
"attr-value-double-quotes": true, | ||
"attr-value-not-empty": false, | ||
"attr-no-duplication": true, | ||
"doctype-first": true, | ||
"tag-pair": true, | ||
"empty-tag-not-self-closed": true, | ||
"spec-char-escape": true, | ||
"id-unique": true, | ||
"src-not-empty": true, | ||
"title-require": true, | ||
"alt-require": false, | ||
"doctype-html5": true, | ||
"id-class-value": "dash", | ||
"style-disabled": false, | ||
"inline-style-disabled": false, | ||
"inline-script-disabled": false, | ||
"space-tab-mixed-disabled": "space4", | ||
"id-class-ad-disabled": false, | ||
"href-abs-or-rel": false, | ||
"attr-unsafe-chars": true, | ||
"head-script-disabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="stylesheet" href="css/about.css"> | ||
</head> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="stylesheet" href="css/about.css"> | ||
<title>Zulip - About</title> | ||
</head> | ||
|
||
<body> | ||
<div class="about"> | ||
<img class="logo" src="../resources/zulip.png" /> | ||
<p class="detail" id="version">v?.?.?</p> | ||
<div class="maintenance-info"> | ||
<p class="detail maintainer"> | ||
Maintained by | ||
<a onclick="linkInBrowser('website')">Zulip</a> | ||
</p> | ||
<p class="detail license"> | ||
Available under the | ||
<a onclick="linkInBrowser('license')">Apache 2.0 License</a> | ||
</p> | ||
</div> | ||
</div> | ||
<script> | ||
<body> | ||
<div class="about"> | ||
<img class="logo" src="../resources/zulip.png" /> | ||
<p class="detail" id="version">v?.?.?</p> | ||
<div class="maintenance-info"> | ||
<p class="detail maintainer"> | ||
Maintained by | ||
<a onclick="linkInBrowser('website')">Zulip</a> | ||
</p> | ||
<p class="detail license"> | ||
Available under the | ||
<a onclick="linkInBrowser('license')">Apache 2.0 License</a> | ||
</p> | ||
</div> | ||
</div> | ||
<script> | ||
|
||
const { app } = require('electron').remote; | ||
const { shell } = require('electron'); | ||
const version_tag = document.querySelector('#version'); | ||
version_tag.innerHTML = 'v' + app.getVersion(); | ||
const { app } = require('electron').remote; | ||
const { shell } = require('electron'); | ||
const version_tag = document.querySelector('#version'); | ||
version_tag.innerHTML = 'v' + app.getVersion(); | ||
|
||
function linkInBrowser(type) { | ||
let url; | ||
switch (type) { | ||
case 'website': | ||
url = "https://zulipchat.com"; | ||
break; | ||
case 'license': | ||
url = "https://github.com/zulip/zulip-electron/blob/master/LICENSE"; | ||
break; | ||
} | ||
shell.openExternal(url); | ||
} | ||
</script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
</body> | ||
function linkInBrowser(type) { | ||
let url; | ||
switch (type) { | ||
case 'website': | ||
url = "https://zulipchat.com"; | ||
break; | ||
case 'license': | ||
url = "https://github.com/zulip/zulip-electron/blob/master/LICENSE"; | ||
break; | ||
} | ||
shell.openExternal(url); | ||
} | ||
</script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="responsive desktop"> | ||
|
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Zulip</title> | ||
<link rel="stylesheet" href="css/main.css" type="text/css" media="screen"> | ||
</head> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Zulip</title> | ||
<link rel="stylesheet" href="css/main.css" type="text/css" media="screen"> | ||
</head> | ||
|
||
<body> | ||
<div id="content"> | ||
<div class="popup"> | ||
<span class="popuptext hidden" id="fullscreen-popup"></span> | ||
</div> | ||
<div id="sidebar" class="toggle-sidebar"> | ||
<div id="view-controls-container"> | ||
<div id="tabs-container"></div> | ||
<div id="add-tab" class="tab functional-tab"> | ||
<div class="server-tab" id="add-action"> | ||
<i class="material-icons">add</i> | ||
<body> | ||
<div id="content"> | ||
<div class="popup"> | ||
<span class="popuptext hidden" id="fullscreen-popup"></span> | ||
</div> | ||
<div id="sidebar" class="toggle-sidebar"> | ||
<div id="view-controls-container"> | ||
<div id="tabs-container"></div> | ||
<div id="add-tab" class="tab functional-tab"> | ||
<div class="server-tab" id="add-action"> | ||
<i class="material-icons">add</i> | ||
</div> | ||
<span id="add-server-tooltip" style="display:none">Add organization</span> | ||
</div> | ||
</div> | ||
<div id="actions-container"> | ||
<div class="action-button" id="dnd-action"> | ||
<i class="material-icons md-48">notifications</i> | ||
<span id="dnd-tooltip" style="display:none">Do Not Disturb</span> | ||
</div> | ||
<div class="action-button" id="reload-action"> | ||
<i class="material-icons md-48">refresh</i> | ||
<span id="reload-tooltip" style="display:none">Reload</span> | ||
</div> | ||
<div class="action-button disable" id="back-action"> | ||
<i class="material-icons md-48">arrow_back</i> | ||
<span id="back-tooltip" style="display:none">Go Back</span> | ||
</div> | ||
<div class="action-button" id="settings-action"> | ||
<i class="material-icons md-48">settings</i> | ||
<span id="setting-tooltip" style="display:none">Settings</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="main-container"> | ||
<div id="webviews-container"></div> | ||
</div> | ||
</div> | ||
<span id="add-server-tooltip" style="display:none">Add organization</span> | ||
</div> | ||
</div> | ||
<div id="actions-container"> | ||
<div class="action-button" id="dnd-action"> | ||
<i class="material-icons md-48">notifications</i> | ||
<span id="dnd-tooltip" style="display:none">Do Not Disturb</span> | ||
</div> | ||
<div class="action-button" id="reload-action"> | ||
<i class="material-icons md-48">refresh</i> | ||
<span id="reload-tooltip" style="display:none">Reload</span> | ||
</div> | ||
<div class="action-button disable" id="back-action"> | ||
<i class="material-icons md-48">arrow_back</i> | ||
<span id="back-tooltip" style="display:none">Go Back</span> | ||
</div> | ||
<div class="action-button" id="settings-action"> | ||
<i class="material-icons md-48">settings</i> | ||
<span id="setting-tooltip" style="display:none">Settings</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="main-container"> | ||
<div id="webviews-container"></div> | ||
</div> | ||
</div> | ||
|
||
<div id="feedback-modal"> | ||
<send-feedback></send-feedback> | ||
</div> | ||
</body> | ||
<script src="js/main.js"></script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
<div id="feedback-modal"> | ||
<send-feedback></send-feedback> | ||
</div> | ||
</body> | ||
<script src="js/main.js"></script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="responsive desktop"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Zulip - Network Troubleshooting</title> | ||
<link rel="stylesheet" href="css/network.css" type="text/css" media="screen"> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<div id="picture"><img src="img/zulip_network.png"></div> | ||
<div id="title">Zulip can't connect</div> | ||
<div id="description"> | ||
<div>Your computer seems to be offline.</div> | ||
<div>We will keep trying to reconnect, or you can try now.</div> | ||
</div> | ||
<div id="reconnect">Try now</div> | ||
</div> | ||
</body> | ||
<script src="js/pages/network.js"></script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Zulip - Network Troubleshooting</title> | ||
<link rel="stylesheet" href="css/network.css" type="text/css" media="screen"> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<div id="picture"><img src="img/zulip_network.png"></div> | ||
<div id="title">Zulip can't connect</div> | ||
<div id="description"> | ||
<div>Your computer seems to be offline.</div> | ||
<div>We will keep trying to reconnect, or you can try now.</div> | ||
</div> | ||
<div id="reconnect">Try now</div> | ||
</div> | ||
</body> | ||
<script src="js/pages/network.js"></script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="responsive desktop"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Zulip - Settings</title> | ||
<link rel="stylesheet" href="css/preference.css" type="text/css" media="screen"> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<div id="sidebar"></div> | ||
<div id="settings-container"></div> | ||
</div> | ||
</body> | ||
<script src="js/pages/preference/preference.js"></script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Zulip - Settings</title> | ||
<link rel="stylesheet" href="css/preference.css" type="text/css" media="screen"> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<div id="sidebar"></div> | ||
<div id="settings-container"></div> | ||
</div> | ||
</body> | ||
<script src="js/pages/preference/preference.js"></script> | ||
<script>require('./js/shared/preventdrag.js')</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters