Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for more italic style & TypeScript .ts / .tsx #5

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
*.vsix
.DS_Store
.DS_Store
68 changes: 68 additions & 0 deletions demo/sample.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
body {
font-family: arial;
}

h1,
p,
table {
background-color: #CCC;
border: 1px solid;
color: #39F;
text-align: center;
width: 100%;
}

.addon-store .pagehead h1 {
display: inline-block
}

.addon-store .addon-summary:after {
clear: both
}

#addon-store .pagehead .electrocat-small {
bottom: -7px;
position: absolute;
right: 0;
}

.addon-store .addons-nav a.selected {
border-bottom-color: #d26911;
color: #333;
font-weight: bold;
padding: 0 0 14px;
}

.addon-store .addon-icon {
background: #fff;
border: 1px solid #ddd;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
float: left;
height: 80px;
margin-right: 14px;
width: 80px;
}

.addon-store .developer-callout {
background-color: #f1f1f1;
background-image: -moz-linear-gradient(#fafafa, #f1f1f1);
background-image: -webkit-linear-gradient(#fafafa, #f1f1f1);
background-image: linear-gradient(#fafafa, #f1f1f1);
background-repeat: repeat-x;
border: 1px solid #ddd;
border-bottom: 1px solid #ccc;
border-radius: 3px;
box-shadow: inset 0 1px 0 #fff, 0 1px 5px #f1f1f1;
margin-top: 40px;
text-shadow: 0 1px 0 #fff;
}

.addon-field-editor .addon-field-list,
.addon-field-editor .addon-new-field {
-moz-box-sizing: border-box;
border-radius: 3px;
box-sizing: border-box;
display: inline-block;
text-align: center;
width: 595px;
}
67 changes: 67 additions & 0 deletions demo/sample.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!doctype html>
<html lang="en">

<head>
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Bootstrap</title>

<!-- Bootstrap core CSS -->
<link href="./dist/css/bootstrap.css" rel="stylesheet">

<!-- Documentation extras -->
<link href="./assets/css/docs.css" rel="stylesheet">
<link href="./assets/css/pygments-manni.css" rel="stylesheet">

<link rel="shortcut icon" href="./assets/ico/favicon.png">
</head>

<body class="bs-docs-home">

<!-- Docs master nav -->
<div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
<div class="container">
<a href="./" class="navbar-brand">Bootstrap 3 RC1</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="nav-collapse collapse bs-navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a href="./getting-started">Getting started</a>
</li>
<li>
<a href="./css">CSS</a>
</li>
<li>
<a href="./components">Components</a>
</li>
<li>
<a href="./javascript">JavaScript</a>
</li>
<li>
<a href="./customize">Customize</a>
</li>
</ul>
</div>
</div>
</div>

<!-- Page content of course! -->
<div class="bs-masthead">
<div class="container">
<h1>Bootstrap 3</h1>
<p class="lead">Sleek, intuitive, and powerful mobile-first front-end framework for faster and easier web development.</p>
<p>
<a href="http://getbootstrap.com/bs-v3.0.0-rc1-dist.zip" class="btn btn-bs btn-large" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 3.0.0 RC1']);">Download Bootstrap</a>
</p>
</div>
</div>
</body>

</html>
21 changes: 21 additions & 0 deletions demo/sample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require('path');

('use strict');

(global => {
'use strict';

const links = Array.from(document.querySelectorAll('a[href="#0"]'));

links.forEach(link => {
link.addEventListener('click', event => {
event.preventDefault();
});
});

const input = document.querySelector('input');

input.addEventListener('focus', () => {
input.setAttribute('placeholder', '');
});
})(typeof window !== 'undefined' ? window : global);
38 changes: 38 additions & 0 deletions demo/sample.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import * as React from 'react';

export class Test extends React.Component<{bar: string}, {}>{
render(){
return (
<div foo={this.props.bar} bar={true} baz={'str'} boz={"other str"}></div>
);
}
}

import * as styles from './mission.scss';

export default function MissionIcon({ key, title }) {
return <i class={classnames(
styles['mission__icon'],
{
[styles['mission__icon-letter']]: title.match(A_HEBREW_LETTER),
[styles['mission__icon-first']]: !key,
}
)}>{title}</i>;
}

@connect(
({ artists }) => ({ artists }),
dispatch => bindActionCreators({ getArtists, getArtist, addArtist, editArtist, removeArtist }, dispatch)
)
export default class AdminArtists extends Component {

componentWillMount = () => {
this.props.getArtists();
}

render = () => {
console.log(this.props.artists);
return <div>
</div>;
}
}
84 changes: 84 additions & 0 deletions demo/sample.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import * as vscode from 'vscode';
import { CanIUse } from './can-i-use';

interface Sample {
type: string | undefined;
name?: string;
click(): void;
callback: () => void;
}

type SampleType = {
myType: string;
};

export function activate(context: vscode.ExtensionContext) {
var disposable = vscode.commands.registerCommand('extension.canIUse', () => {
let caniuse = new CanIUse();

const editor = vscode.window.activeTextEditor;
if (!editor) {
return;
}
var expandedSelection = undefined;
expandedSelection = getSelection(editor);
if (expandedSelection) {
var word = editor.document.getText(expandedSelection);
if (word) {
caniuse.retrieveInformation(caniuse.getNormalizedRule(word).toLowerCase(), showOutput);
}
}
});

context.subscriptions.push(disposable);
}

(function(angular) {
'use strict';

angular.module('chrome').factory('historyService', historyService);

function historyService($q, sharedService) {
return {
historyList: historyList,
getVisits: getVisits,
monitorHistory: monitorHistory
};

function historyList(param) {
var chromeParam = {};
chromeParam.text = param.searchText;
chromeParam.startTime = param.startDate;
chromeParam.maxResults = param.maxResults;
var deferred = $q.defer();
chrome.history.search(chromeParam, function(response) {
var list = sharedService.populateList(response);
deferred.resolve(list);
});
return deferred.promise;
}

function getVisits(url) {
var deferred = $q.defer();
chrome.history.getVisits({ url: url }, function(visits) {
deferred.resolve(visits);
});
return deferred.promise;
}

function monitorHistory(addHistoryCB) {
chrome.history.onVisited.addListener(function(historyItem) {
addHistoryCB(historyItem);
});
}
}
})(angular);

const options = {
method: 'GET',
uri: 'https://api.github.com/com/search/repositores',
headers: {
'User-Agent': 'gittr-cli'
},
qs: { q: `language:${argv.lang}`, sort: 'stars' }
};
54 changes: 54 additions & 0 deletions demo/sample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import * as React from "react";

interface Sample {
type: string | undefined;
name?: string;
click(): void;
callback: () => void;
}

type SampleType = {
myType: string;
};

export class Test extends React.Component<{ bar: string }, {}> {
render() {
return (
<div foo={this.props.bar} bar={true} baz={"str"} boz={"other str"} />
);
}
}

import * as styles from "./mission.scss";

export default function MissionIcon({ key, title }) {
return (
<i
class={classnames(styles["mission__icon"], {
[styles["mission__icon-letter"]]: title.match(A_HEBREW_LETTER),
[styles["mission__icon-first"]]: !key
})}
>
{title}
</i>
);
}

@connect(
({ artists }) => ({ artists }),
dispatch =>
bindActionCreators(
{ getArtists, getArtist, addArtist, editArtist, removeArtist },
dispatch
)
)
export default class AdminArtists extends Component {
componentWillMount = () => {
this.props.getArtists();
};

render = () => {
console.log(this.props.artists);
return <div />;
};
}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@
"Themes"
],
"contributes": {
"themes": [
{
"themes": [{
"label": "Subliminal",
"uiTheme": "vs-dark",
"path": "./themes/Subliminal-color-theme.json"
},
{
"label": "Subliminal Operator",
"uiTheme": "vs-dark",
"path": "./themes/Subliminal-operator-theme.json"
}
]
}
Expand Down
Loading