Skip to content

Commit

Permalink
add setup.sh for github codespaces, fix cloudlink thumbnails, move wi…
Browse files Browse the repository at this point in the history
…p extensions to livetests, remove unusable extensions, getting ready for snail ide offline
  • Loading branch information
dumorando committed Mar 9, 2024
1 parent 6372412 commit d420736
Show file tree
Hide file tree
Showing 32 changed files with 5,853 additions and 5,754 deletions.
84 changes: 42 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#a thing to setup snail ide on gh codespaces
npm i -g pnpm
pnpm up
pnpm i --shamefully-hoist
webpack-dev-server
42 changes: 21 additions & 21 deletions src/components/avatar/avatar.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
const user = {
name: 'Me_rudy',
imageUrl: 'https://trampoline.turbowarp.org/avatars/by-username/Mr_rudy',
imageSize: 90,
};

export default function Profile() {
return (
<>
<h1>{user.name}</h1>
<img
className="avatar"
src={user.imageUrl}
alt={'Profile of ' + user.name}
style={{
width: user.imageSize,
height: user.imageSize
}}
/>
</>
);
const user = {
name: 'Me_rudy',
imageUrl: 'https://trampoline.turbowarp.org/avatars/by-username/Mr_rudy',
imageSize: 90,
};

export default function Profile() {
return (
<>
<h1>{user.name}</h1>
<img
className="avatar"
src={user.imageUrl}
alt={'Profile of ' + user.name}
style={{
width: user.imageSize,
height: user.imageSize
}}
/>
</>
);
}
36 changes: 18 additions & 18 deletions src/components/sn-likebtn/LikeButton.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React, { useEffect } from 'react';

const LikeButton = () => {
useEffect(() => {
if (document.getElementById("likebtn_wjs")) return;
const script = document.createElement("script");
script.async = true;
script.id = "likebtn_wjs";
script.src = "//w.likebtn.com/js/w/widget.js";
document.getElementsByTagName("head")[0].appendChild(script);
}, []);

return (
<span className="likebtn-wrapper" data-theme="custom" data-vert="true" data-show_like_label="false"></span>
);
};

export default LikeButton;
import React, { useEffect } from 'react';

const LikeButton = () => {
useEffect(() => {
if (document.getElementById("likebtn_wjs")) return;
const script = document.createElement("script");
script.async = true;
script.id = "likebtn_wjs";
script.src = "//w.likebtn.com/js/w/widget.js";
document.getElementsByTagName("head")[0].appendChild(script);
}, []);

return (
<span className="likebtn-wrapper" data-theme="custom" data-vert="true" data-show_like_label="false"></span>
);
};

export default LikeButton;
76 changes: 38 additions & 38 deletions src/components/tw-cloud-variable-badge/cloud-server-button.jsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
import React from 'react';
import PropTypes from 'prop-types';
import styles from './cloud-variable-badge.css';
import bindAll from 'lodash.bindall';
import classNames from 'classnames';

class CloudServerButton extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleClick'
]);
}

handleClick () {
this.props.onClick(this.props.cloudHost);
}

render () {
return (
<button
className={classNames(styles.server, {[styles.selected]: this.props.selected})}
onClick={this.handleClick}
title={this.props.cloudHost}
>
{this.props.name}
</button>
);
}
}

CloudServerButton.propTypes = {
cloudHost: PropTypes.string,
name: PropTypes.string,
selected: PropTypes.bool,
onClick: PropTypes.func
};

import React from 'react';
import PropTypes from 'prop-types';
import styles from './cloud-variable-badge.css';
import bindAll from 'lodash.bindall';
import classNames from 'classnames';

class CloudServerButton extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleClick'
]);
}

handleClick () {
this.props.onClick(this.props.cloudHost);
}

render () {
return (
<button
className={classNames(styles.server, {[styles.selected]: this.props.selected})}
onClick={this.handleClick}
title={this.props.cloudHost}
>
{this.props.name}
</button>
);
}
}

CloudServerButton.propTypes = {
cloudHost: PropTypes.string,
name: PropTypes.string,
selected: PropTypes.bool,
onClick: PropTypes.func
};

export default CloudServerButton;
Loading

0 comments on commit d420736

Please sign in to comment.