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

[RFC][Site] replace highlight.js with tempest/highlight #1742

Closed
wants to merge 3 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 .github/workflows/ux.symfony.com.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahaha ... hidden in a PR :))


- name: Install dependencies
uses: ramsey/composer-install@v3
Expand Down
2 changes: 1 addition & 1 deletion ux.symfony.com/.platform.app.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: app

type: php:8.1
type: php:8.3

dependencies:
php:
Expand Down
29 changes: 0 additions & 29 deletions ux.symfony.com/assets/controllers/code-highlighter-controller.js

This file was deleted.

76 changes: 76 additions & 0 deletions ux.symfony.com/assets/styles/vendor/_highlight.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
/** tempest/highlight theme (https://github.com/tempestphp/highlight/blob/main/src/Themes/Css/dracula.css) */
.hl-keyword {
color: #FF79C6;
}

.hl-property {
color: #50FA7B;
}

.hl-attribute {
font-style: italic;
}

.hl-type {
color: #8BE9FD;
}

.hl-generic {
color: #9d3af6;
}

.hl-value {
color: #F1FA8C;
}

.hl-variable {
color: #F8F8F2;
}

.hl-comment {
color: #6272A4;
}

.hl-blur {
filter: blur(2px);
}

.hl-strong {
font-weight: bold;
}

.hl-em {
font-style: italic;
}

.hl-addition {
display: inline-block;
min-width: 100%;
background-color: #00FF0022;
}

.hl-deletion {
display: inline-block;
min-width: 100%;
background-color: #FF000011;
}

.hl-gutter {
display: inline-block;
font-size: 0.9em;
color: #555;
padding: 0 1ch;
user-select: none;
}

.hl-gutter-addition {
background-color: #34A853;
color: #fff;
}

.hl-gutter-deletion {
background-color: #EA4334;
color: #fff;
}

/** highlight.js theme */
.hljs-comment, .hljs-prompt {
color: #8b949e;
user-select: none;
Expand Down
4 changes: 4 additions & 0 deletions ux.symfony.com/bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;

if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}

if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}
Expand Down
3 changes: 2 additions & 1 deletion ux.symfony.com/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": ">=8.1",
"php": ">=8.3",
"ext-ctype": "*",
"ext-iconv": "*",
"babdev/pagerfanta-bundle": "^3.8",
Expand Down Expand Up @@ -55,6 +55,7 @@
"symfony/yaml": "6.4.*",
"symfonycasts/dynamic-forms": "^0.1.0",
"symfonycasts/sass-bundle": "^0.2.0",
"tempest/highlight": "^2.0",
"twbs/bootstrap": "^5.3",
"twig/extra-bundle": "^2.12|^3.6.1",
"twig/html-extra": "^3.8",
Expand Down
Loading
Loading