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

[Doc] Update customize doc as bootstrap ways #212

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
54 changes: 54 additions & 0 deletions docs/customize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Customize

As Tabler uses Bootstrap, you can use the same methods described in the [Bootstrap documentation](https://getbootstrap.com/docs/5.3/customize/color/).
Here is a basic example that can be customized according to your requirements.

```scss
// assets/styles/theme.scss
@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Mono:wght@300;400;500;700&display=swap');

// All variables available here: https://github.com/tabler/tabler/blob/main/src/scss/_variables.scss
$primary: #34495e;
$secondary: #9b59b6;
$success: #2ecc71;
$info: $secondary;
$warning: #e67e22;
$danger: #e74c3c;

$h1-font-size: 2rem;
$h2-font-size: 1.5rem;
$h3-font-size: 1.3rem;
$h4-font-size: 1.2rem;

$font-family-sans-serif: Ubuntu, sans-serif;
$font-family-monospace: "Ubuntu Mono", Consolas, sans-serif;

// Custom
$opal: #a0c0bc;
$nav-link-color: $opal;

@import '@tabler/core/src/scss/tabler';
```

Then, import it in the first position into your `app.scss` file:
```scss
// assets/styles/app.scss
@import url("./theme.scss");

// [...]
```

Finally, do not forget to add your `app` entry link in your `base.html.twig`:
```twig
{# templates/base.html.twig #}
{% extends '@Tabler/layout-vertical.html.twig' %}

{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
```

## Next steps

Please go back to the [Tabler bundle documentation](index.md) to find out more about using the theme.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ If you cannot find the needed information in this list of topics, please create
* [Error pages](error_pages.md)
* [Customizing the menu](menu.md)
* [Displaying notifications](notifications.md)
* [Override theme](override_theme.md)
* [Customize](customize.md)
* [Dynamic theme / bundle configuration](twig-context.md)
* [Customizing forms](form_theme.md)

Expand Down
21 changes: 0 additions & 21 deletions docs/override_theme.md

This file was deleted.

159 changes: 0 additions & 159 deletions docs/theme.scss

This file was deleted.