Giter Site home page Giter Site logo

teknologi-umum / graphene Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 10.0 15.27 MB

Lighter Carbon alternative made with Shiki

Home Page: https://graphene.teknologiumum.com

License: MIT License

HTML 4.88% Dockerfile 0.56% TypeScript 79.94% SCSS 14.62%
code-screenshot code-snippets carbon shiki

graphene's People

Contributors

aldy505 avatar dependabot[bot] avatar elianiva avatar ghousahmed avatar karthiknatarajan-27558 avatar krowter avatar linefile avatar marianabeldi avatar ronnygunawan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphene's Issues

create the frontend

too lazy to write the issue, got some work to do, just read this:

image

INSTRUCTIONS

  • just clone ray.so or cabon.now.sh's frontend. make it as best as you can.
  • use codemirror to display user's code
  • create a footer that links to this repository and teknologi umum's telegram group

don't use macos frame

changed my mind, it's literally everywhere and I don't fancy being one of them lol

leleeettt

kemungkinan masalah:

  • startup browser lelet
  • shiki lelet (unlikely)

kemungkinan solusi:

  • pake 1 browser aja, gausah buka tutup

fix CD

me brain too smol, couldn't cope with this thing

Default font on frontend to SF Mono?

Because we have too much problems with ligature, should we change the default font on the frontend app to be SF Mono instead of JetBrains Mono?

Also should we dump the use of NerdFont and use the regular font instead?

How about adding more fonts? Lol

cc @elianiva

API not working

When I try to send a post request to the API endpoint from my AWS server, it doesn't works and gives me 403 Forbidden, where same piece of code works fine in my local enviourment. Can you please help?

Bug: Error is returned when C# code is submitted

How to reproduce:

  1. Send following code:
using System;
  1. Optional: Set language to Csharp
  2. Submit

The following data is returned instead of an image:

data:application/json;base64,eyJtc2ciOiJTb21ldGhpbmcgd2VudCB3cm9uZyBvbiBvdXIgc2lkZS4ifQ==

{"msg":"Something went wrong on our side."}

Double spaces on svg format

Choosing svg as the output format results in double spaces

Comparison
Screenshot from 2022-06-25 17-47-24

PS I used the web version, havent tried sending a POST request

Edited (1 Oct 2023):
Not reproducible anymore :/

My code at the time

function pascalsTriangle(size) {
  const result = [[1]];

  for (let i = 0; i < size; i++) {
    const row = [];

    for (let j = 0; j <= i + 1; j++) {
      row.push((result[i][j] ?? 0) + (result[i][j - 1] ?? 0));
    }

    result.push(row);
  }

  return result;
}

function formatTriangle(triangle) {
  const SPACE = '  ';
  const size = triangle.length;

  for (let rowIndex = 0; rowIndex < size; rowIndex++) {
    let row = '';
    const leftPadding = size - rowIndex;

    row += SPACE.repeat(leftPadding);
    row += triangle[rowIndex].map(num => num.toString().padStart(SPACE.length * 2)).join('');

    console.log(row);
  }
}

formatTriangle(pascalsTriangle(10));

add more image format

Task

should be able to generate png/jpg/webp/etc

Problem

right now, PNG is the default format. it kinda wastes server's bandwidth quota for serving large images. and users would need more download time

References

  • see puppeteer's screenshot options here
  • a few image converter/compressor here

dark mode support for frontend

just add dark mode support and do your best once #42 is merged

or while #42 haven't been merged yet, you may put a PR that's targeting the feat/frontend-2 branch

mobile support for frontend

right now it's desktop only. it'd be nice if it supports responsive layout like tablets and phone.

simply enhance the css for it, once #42 is merged

or while #42 haven't been merged yet, you may put a PR that's targeting the feat/frontend-2 branch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.