Closed jschr closed 2 years ago
I'd like to see Python. Maybe create a drop-down list of languages at the top of the site, and remove the tabs of languages that are included in each demo (at least for the dashboard showing all the themes).
Python will definitely be one of the next languages. Do you have any suggestions for the snippet to display in the preview? It would ideally by the same number of lines as the current preview (14).
I'm also thinking something similar for the drop-down. Maybe even a multi-select.
This is 14 lines and should demonstrate the color schemes. How would multi-select look?
import os
"""A string"""
# A comment
class Foo(object):
def __init__(self):
bar = 42
print(bar)
@property
def color(self):
return 'Green'
This is great, thanks for doing that.
With a multi-select you could pick up to 3 languages to replace the current tabs. Still very much in the idea phase—open to suggestions!
Look-wise, a dropdown (or modal) with something like:
[DONE]
That would be nice, the list wouldn't get too long because you're limiting the breadth of languages as you mention in the first comment?
Yeah, there is a finite number of languages I can support. The languages that are added will be based on demand and help from the community. After adding a few more I'll have a more defined process for adding one that should make it easier for others to contribute.
I would suggest C# as well 👍
Languages I'd like to see this project support:
Would love to see Javascript include JSX syntax within it, or a seperate JSX/React option.
Java and Kotlin as well, please. Below are example snippets for FizzBuzz.
public class FizzBuzz {
public static void main(String[] args) {
int num = 100;
for (int i = 1; i <= num; i++) {
if (((i % 5) == 0) && ((i % 7) == 0))
System.out.println("fizzbuzz");
else if ((i % 5) == 0)
System.out.println("fizz");
else if ((i % 7) == 0)
System.out.println("buzz");
else
System.out.println(i);
}
}
}
fun fizzBuzz(num: Int): String {
return when {
(num % 3 == 0) -> "Fizz"
(num % 5 == 0) -> "Buzz"
(num % 3 == 0 && num % 5 == 0) -> "FizzBuzz"
else -> "$num"
}
}
Update: I want to support more languages but it's going to cost more $$ (#148). Please suggest languages you'd like to see as I'll still only be able to support the most popular.