I am trying to change the style-sheet from ltr to rtl on locale change.
The site is on UIKIT , vue-i18n and NUXT .
This is the closest thing I found to what I want but still don't know how to work in out.
Please help.
I added both style-sheets to the head and I ended up adding
v-bind:class="{'rtldir':($i18n.locale === 'fa')}"
to the my main layout div, to change the layout when the language is rtl
Related
Hello I am facing a problem which is to change the old routing style of a laravel project to the new style. But due to the size of my routing file it will take me a lot of time to change all this. So I would like a sample regex code to use find/replace fonction into vscode to do it automatically.
Old style image :
Image new style wanted:
I found the solution by using the find/replace function of vscode like this
I need to have over 10 language in my Nativescript-vue app. I have looked at "vue-i18next" but i don't understand how it works with single file components. I don't understand how it will work if i have exempel app.vue, register.vue, login.vue and so on.. The docs didn't show how to do it on single file components.
Can someone give me a example with nativescript-vue "vue-i18next" or another language plugin? Just show me one single file component how its done ;)
I am looking at the Theme Guide
It informs me that there are several prebuilt themes available:
#import '#angular/material/prebuilt-themes/deeppurple-amber.css'; is one.
Where do these themes come from?
My problem stems from trying to create my own theme. If for example, I follow the excellent angular-ngrx-material-starter black-theme.scss, then I appear to not define enough colours. My mat-select is unstyled.
I need to add one of the prebuilt themes above in order to get a full theme, but now I have purples in my theme and a general miss match of colours which I don't want. Clearly I am missing the full range of colours in my theme.
I feel that if I could see the "source" of a pre-built theme, I might have some idea how to make my own.
Would anyone be able to shine a light on this for me?
Shot Answer
Answer for you if your angular project is using scss. The colours are surely there if you are using a default palate from the angular material module like the example you gave above. You probably just did not add the overlay themes. Mat-select is an overlay
In your main
main.scss
#import '../node_modules/#angular/material/theming';
$anms-black-primary: mat-palette($mat-grey, 700, 300, 900);
$anms-black-accent: mat-palette($mat-blue-grey, 400);
$anms-black-warn: mat-palette($mat-red, 500);
$anms-black-theme: mat-dark-theme(
$anms-black-primary,
$anms-black-accent,
$anms-black-warn
);
#include angular-material-theme($anms-black-theme);
.whatever-theme {
#include angular-material-theme($anms-black-theme);
}
app.component.ts
export class AppComponent {
constructor(overlayContainer: OverlayContainer) {
overlayContainer.getContainerElement().classList.add('whatever-theme');
}
}
Prebuilt themes are just generated by compiling the scss file. Most of theme variables and functions are in node_modules/#angular/material/_theme.scss
Example
$(npm bin)/node-sass $FILE > $DEST_PATH/$BASENAME.css
Long Answer
To understand themes in angular you got to have a basic understanding of scss which is the default way to generate themes in angular.
https://sass-lang.com/guide
To have a good example of scss styling in a proper angular project will be the material docs repo. https://github.com/angular/material.angular.io.
In node_modules/#angular/material/_theming.scss you can see how the theme variable are defined and define custom themes on your own.
A good answer for creating custom themes.
How can I use custom theme palettes in Angular?
Today I've started using ionic 3 for the first time. I don't really know anything about it, so that's why I wanna learn how it works.
I've created a sidemenu project and now I want to add some global styling in my app.scss, so I can use it in any page of my project. Well, I've added simple styling to my app.scss but nothing happens on my page. Everything still looks the same. Now my question is: Do I have to import the app.scss somewhere? If so, where? Or how can I use the app.scss?
I thought it would happen automatically, that my page uses also the classes of my app.scss and not only of it's own stylesheet, but to me it seems like it doesn't even know the classes of the app.scss.
within the app.scss you can create class use them normally as class="class-name" on html.
Hope I helped you.
You can just use it, no need to import it anywhere. A few things to keep in mind though:
There are things you would like to add at a global scope like for example if you want to enable newlines in toast messages you add the following:
.toast-message {
white-space: pre-line;
}
If you want to add something only for iOS you add it as a sub element of the ios class:
.ios {
... // your iOS-specific css rules
}
If you want to add somehing only for Android (material design) you add it as a sub element of the md class:
.md {
... // your android-specific css rules
}
An there is also a wp class for windows phone if you should need it.
Make sure you have a look at ionics theming docs.
I am new to Pyrocms and reading the documentation I could not change fix my problem. I need my own template to be incorporated that is I want to change the default one provided. How can I do that. I really need a help.
Go into:
system/cms/themes/default/
This is the folder where you can find the default template of pyrocms. There you will see folders like "views, css, js, img" etc.
You can start by modifying views/layouts/default.html and views/partials/ folder.
Ofcourse if you need to change css and/or js you need to modify them too.
By the way this is the official pyrocms documentation for editing themes:
http://www.pyrocms.com/docs/manuals/designers