Layouts inside folders Nuxt js 3 - nuxtjs3

Layouts inside "layouts" folder work as expected but when I try to save a layout inside a folder like "layouts/mobile/custom.vue" does not seem to work.
just throws this message as if the layout does not exists.
Invalid layout `mobile/custom` selected.
when I try to use it inside "pages/index.vue" like this.
<NuxtLayout name="mobile/custom">
some code ...
</NuxtLayout>
This works for "layouts/custom.vue" inside "pages/index.vue".
<NuxtLayout name="custom">
some code ...
</NuxtLayout>
I know that Nuxt 2 added support for this after an issue, but I'm not familiarized with it as it has 1 failing check but at least says "merged".
Adds support for folders in /layouts #1865
I tried to search any type of information about it but not even the documentation of Nuxt 3 itself says something related to this. Nuxt 3 Issues no luck.
Nuxt 3 - Layouts
Does anybody knows why this happens ? or is it that this feature is not supported yet in Nuxt 3.0.0 rc4.
I tried on a clean Nuxt 3 installation.

This feature was added in Nuxt 2 long ago.
Adds support for folders in /layouts #1865
Nuxt.js does not respect layouts in separate folders. #1854
It does not seem to work the same way in nuxt 3.
update...
I checked the source code for Nuxt 3 and definitely is not supported.
example: layouts/folder/custom.vue
and then use it in pages like follows
<NuxtLayout name="folder/custom">some code ...</NuxtLayout>
I just sent a PR for this feature.
Adds support for folders in /layouts #5796
Hopefully it gets accepted or at least it gives someone the idea to add this.

Related

multiple pages are overlapping in ngx-extended-pdf-viewer

I am using ngx-extended-pdf-viewer for my angular app and looks like multiple pdf pages are overlapping during viewing. here is my viewer code
<ngx-extended-pdf-viewer
*ngIf="isVisible"
[src]="pdfData"
useBrowserLocale="true"
[textLayer]="true"
[showPrintButton]="true"
[showDownloadButton]="true"
[showOpenFileButton]="false"
[showBookmarkButton]="false"
[showPresentationModeButton]="false"
height='90%'
[zoom]="'100%'">
</ngx-extended-pdf-viewer>
I tried setting stylesheets for page and viewer classes but no luck.
Sounds like you've got CSS rules interfering with the CSS rule of ngx-extended-pdf-viewer. Create a greenfield project to check if it's a general problem:
Open a terminal and navigate to the root folder of your project.
Run this command and accept the defaults:
ng add ngx-extended-pdf-viewer
Add the new component <app-example-pdf-viewer> to your <app-component> to display the PDF file.
Now you've got a working project that almost certainly does not suffer from your bug. Use the developer tools of your browser to compare the CSS code of the two projects to hunt down the bug.

Xamarin.Forms: Organize images in subfolders

Is it possible to organize my images in subfolders? Something like this example.
Android Project:
·Drawable
·navbarIcons
-user.png
-stats.png
·statsImages
-goals.png
-assists.png
iOS Project:
·Resources
·navbarIcons
-user.png
-stats.png
·statsImages
-goals.png
-assists.png
Or is it mandatory to let them on the Drawable/Resources folder?
Its definitely possible to create subfolders on iOS. Also ensure that your casing is correct because they are case-sensitive and that your Build Actions are set up correctly.
UPDATE:
As you can see its possible to add them in subfolders. Don't forget to add your images in the correct sizes such as 2x and 3x for iOS as I did below.
UPDATE 2:
Another thing you could do is put the images in your Shared PCL project and go the embedded images route. I believe this route doesn't give you as much flexibility when it comes to DPIs though:
https://developer.xamarin.com/guides/xamarin-forms/user-interface/images/#Embedded_Images

How would I create a RouteModule in Angular 2 without forRoot

I am working on going through the Style guide for Angular 2 and I happened upon this line
Do end the filename of a RoutingModule with -routing.module.ts.
I haven't had luck finding anything on routing module examples so I went to Papa's blog. There I found this line...
The forRoot() function should only be used for creating the root modules' routes. When we get to child modules and routes, we'll use other techniques that we'll see in later posts.
So how do I create a RouteModule that isn't using forRoot like suggested.
I think I found an example here...
https://github.com/angular/angular.io/blob/master/public/docs/_examples/ngmodule/ts/app/contact/contact-routing.module.ts

django templates inline CSS

I want to create a set of widgets (tables, calendars, etc) that can be include in HTML emails we send out via Mandrill. I already have these widgets build as components pulled into web pages, I would like to reuse them in emails but in order to do that I need to inline the CSS.
I have tried using https://github.com/roverdotcom/django-inlinecss, which appears to do what I want but doesn't appear to support S3 as a staticfiles source and I can't get it to run locally. Using the tag {% inlinecss "/css/main.css" %} gives an error:
"The joined path (/css/main.css) is located outside of the base path component ([my local path]/static)" from the contrib.staticfile.find_location call to safe_join.
Question 1: can I use django-inlinecss with S3 as a staticfiles repo as it stands or would I have to fork and enhance it?
Question 2: if 1 is possible, what do I need to do to get django-inlinecss running successfully locally?
Question 3: if 1 is not possible does anyone have any alternative suggestions for inlining css using the django tempting framework.
Thanks in advance - Guy.
In the end Mandrill already solved this problem. I the message dict of the API call to mandrill you can tell Mandrill to inline the css for you.
message['inline_css'] = True

Flex builder3 is not generating html wrapper when targeting flex 4 sdk

In Flex builder 3 when I create a new flex application targeting the flex 4 sdk, it wont generate a html wrapper file.
I have hunted around the web for answers, but no success. I have made sure the box is checked in the project properties to generate html wrapper.
The only workaround is to target an older version of the sdk (i.e. 3.2), which will cause the wrapper to be generated. Then I can revert the project to sdk 4. This then means I can never do a clean of my project because this will result in the wrapper being deleted.
Has anyone else come across this? Is this just a bug with Flexbuilder3?
Check the project area folder called "html-template" from the Flex Navigator Panel within Flex3. This folder may be empty. You should have 2 files in here:
index.template.html
swobject.js
These will help you generate the wrapper.
I beat my head against this a bit and after look all over the net I combined a few solutions and finally came up with one that works for me. Try this to get it to work with with out up grading to Flash Builder 4:
STEP 1
Navigate to your Flex 3 SDK and copy the following folders from YOUR 3.0 SDK PATH\templates\ to YOUR 4.0 SDK PATH\Templates\ .
-- Client-side-detection
-- Client-side-detection-with-history
-- Express-installation
-- Express-installation-with-history
-- No-player-detection
-- No-playerdetection-with-history
Note: Greg Lafrance recommends an addition folder "Swfobject" in his instructions over at ADOBE, but I didn't need that one myself.
STEP 2
Go to File -> Switch Workspace -> Other and create a COMPLETELY NEW workspace ( i.e: I called my Flex 4).
STEP 3
Create new project. Right Click it -> Flex Compiler -> Configure Flex SDKS's -> Add... -> Navigate to your Flex 4 SDK and add it. Click Ok. DO STEP 4 BEFORE CLOSING THE PROPERTIES.
Step 4.
Change "Require Flash Player Version" to 10.0.0 .
Step 5.
Click OK and erase the based code and copy over FLEX 4 Code with spark elements and what not.
Good Luck, Hope this helps someone out there in internet land who Googles this question.
It worked for me like this way.....i changed Project->properties->FlexCompilerchosed sdk flex-3 rather than flex4(my current version) then clean and build i got the html and .swf files after that i switched to SDK - Flex 4 and i ran my mxml file without any error
Turns out this is a bug with using the flex 4 sdk inside flex builder 3. My solution was to upgrade to Flash Builder 4 which has a much nicer integration between the project and the flex sdk.
Thanks
In eclipse Problems view, there will be one problem Cannot create HTML wrapper. Right-click here to recreate folder html-template. . Right click on the problem and choose Recreate HTML Templates.

Resources