Drupal 7 themeing - drupal-7

Im new to Drupal theme'ing. Totally new. I managed to install the Omega 5 theme. I created my subtheme. But I'm like now what? I created the blocks that go in the regions where I want them. But now I need to start themeing the blocks. I need to start aligning the content int the regions. So two tasks I need to start with are:
Create a square around my block text in the user bar first zone. I have the block there. I have the content. I have the CSS. But I cannot just add it with the CKeditor on the block content. There are no template files created. I tried adding a div ID in the block on the content and adding the CSS to the global.css file. Nohting worked. I even cleared the cache. So where do I go this?
When I manage to learn how to style a block I have three of them in the user bar first zone. My theme is full width. It has 12 columns. I prefixed the zone with 9 columns as I have 3 blocks. I want the 3 blocks to appear horizontally aligned and to the right. I thought the prefix moved them to the right. My first block is not to the right but to the left. So where do I put this CSS?
Sorry to be so clueless but the Omega tutorials promise a WYSIWYG exprience but fail to deliver how. I get up to how to create the subtheme and then the tutorials end. I am an expert PHP developer but if I don't know where to put the PHP then it doesn't help much.

Related

Looking for guidance on how to add custom class to sections and modules in Squarespace?

I have a client who is using Squarespace and asked that I fix a mobile stacking issue.
I have 2 rows that have image + text alternating side by side. This looks fine on desktop, but the on mobile the stacking order is wrong.
Desktop Stacking:
Image + Text
Text + Image
Current Mobile Stacking:
ImageĀ 
Text
Text
Image
Ideal Stacking:
Image
Text
Image
Text
Typically I was accomplish this by alternating the sections with a custom class, but I'm not seeing any place to add this. Are you able to add custom classes to sections?
Any help is appreciated. Thanks!
It is not possible to directly edit the markup that appears within Squarepace's default grid and block system (they call it, "LayoutEngine"). Generally speaking, one must either write their own HTML within a Code Block (or via Code Injection points), or use JavaScript to alter the HTML after the default markup is loaded onto the page.
But in your case specifically, this is a common problem in Squarespace, and it is usually solved with just CSS, using a combination of:
first-child, last-child and nth-child selectors, and/or
the > direct-descendant/child-combinator, and/or
specific block IDs (each sqs-block has a unique id attribute), and/or
a media query so that the rules only take affect after your mobile breakpoint is reached, and/or
either display:flex with the order property. or display:table-header with display:table-footer in order to force a different stacking order.
The specific CSS often varies greatly based on the specific circumstance, whether you're trying to reorder blocks, columns, or rows. The similar question linked to above provides a specific solution to the same problem you are trying to solve, but the code that solves it in your case may look quite different, though it will likely use a combination of the five things mentioned above.
Or, you can use JavaScript to target the blocks and add your own classes, then write the CSS with those classes. Even in that case, the general approach is the same.

Sublime Text 3 find and replace in multiple files

I want to find and replace code in multiple files.
Does anyone know if the feature "find and replace in multiple files" in Sublime Text 3 is gone?
It used to be a feature for ST2 (shift-command-F), see screenshots ST2 and ST3.
Or is there a other way to do this?
The option is still there, but because you're using a custom theme the bar needs to be taller for you to see the entire contents of the panel.
You can grab the top of the panel and stretch it up so that everything is visible and then back down as far as it will go to make it compact again.
You only have to do this once; Sublime remembers the height of the panel and will use it next time (which is why it uses the incorrect height when you switch to a theme that makes everything in the panel taller).

How do you design an image for Codename One TouchCommand?

I am 2 days in experimenting with Codename One and Mobile development in general and tested out some basic navigation and features so far. Now I want to work on the look and feel of the app.
I looked at the 9-border vid which was helpful, but not sure of the best way to add an image for the touchCommand that takes 3 tabs on that bar ( Example: home, profile, settings.. Similar to how instagram's TouchCommand is at the bottom of the app).
If I add the image, it does not line up with my Commands.
What is the best way to approach this to ensure the "TouchCommand" image appears as one, but is broken up to 3 parts for each individual commands when pressed, home, profile and settings? I might be asking this all wrong, forgive me as this is all new to me.
Thanks.
EDIT:
This is what was done.
In Theme -> Constants added commandBehavior= bar . This gives the default bar at the bottom. Created in photoshop a new bar 300x80 and added it to the TouchCommand. (See ScreenShot 1). Took this bar and broke it up in photoshop into 3 different buttons for the tab press etc. In GUI Builder, added Home, Profile, Settings in the commands. Added the image to Press Icon for Home and it didnt line up (screenshot 2). Very Frustrating to design layouts. I am hoping there is a much better technique as I am still experimenting with Codename one?
What is unclear to me, is I cant find any documentation on how to approach this and what the dimensions of each image should be as it seems that codename one has issue aligning them. I am assuming the steps would be to create the background image and add the icons as interactive layers for the user. I really care for the image being pressed and changes color like the instagram example. I dont see a way to do this in codename one GUI builder and themes.
EDIT:
Okay, I have decided to use tabs instead of the bar at the bottom. If I add my image to it, I get the results (screeshot 3). Is this the right method to use to accompolish what I want? If so, I dont see a way yet to alter this to become what I want :( .
Plus adding the background, shows one size in the display and looks different in the simulator. (screeshot4)
Answered Here: How do you get ActionBar from SocialBoo theme to show up in your GUI?
Tabs are customized individually so the border should apply for an individual tab to create the background. The foreground element is the icon which you define in the Tabs component itself thru the icons property which allows you to define 3 icons for the 3 tabs (assuming you use the GUI builder). If you add the tabs via addTab in the code you can specify an icon there.

Does Angular have a flex layout like extjs?

ExtJS has a very useful layout mechanism called flex. It works by summing all the things on a row or in a column. Then the space is parceled out using the flex value divided by the sum of all the flex values. This results in a layout like below:
The Red box is an hbox layout, the blocks E and F have the given flex values that sum up to 3, so E gets 1/3 the width of the screen, and F gets 2/3rds.
The Blue box is another hbox layout, where all 4 pieces (A-D) have the same flex so each one gets 25% of the space.
What isn't shown is the surrounding vbox layout where the blue box has a flex of 22 and the red box has a flex of 78.
Is there anything like this kind of layout in Angular? If there isn't, how would you put this together in Angular?
Additional information based on some of the answers below:
I want to be able to replace extjs with Angular. To do that I need some functionality that I have in extjs that I don't know exists in Angular. I've found ways to watch for screen size, change to adjust the overall display size, but I haven't seen a good example yet of a directive that essentially introspects its constituent directives for this flex value and sets their size based on a size change event of the container. Flex doesn't work from inside the divs, it works inside the container of the divs, because it has to go across all the divs in the container to divide the space correctly. I haven't seen an angular directive that does this yet.
I have no actual development experience with Angular yet (I've watched many of the videos from http://egghead.io, I've read documentation and tutorials, listened to this podcast: JSJ-Angular) and so I don't know if this is something that is easy to solve, or hard to solve, or if someone has already solved it. This flex layout is wickedly cool and easy to use, in fact for full page apps, I'm not sure there is an easier way to lay them out so that they stay full screen and are malleable to screen size changes. Grid systems are great for some things, but they don't address what the flex system addresses.
I'm trying to see if there is a way to leap from extjs to Angular without really making my life difficult.
Additional discovered information:
Looks like flex is becoming a display type now in the form of the CSS display: flex or display: inline-flex (with prefixes at the moment)
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes
Interesting to see the illustration calls it the Holy Grail Layout example. Of course IE won't implement it right, or in a timely fashion, but my customers don't mind using Chrome if it gets the job done.
Turns out someone has create one and it does MOST of what I was looking for.
http://ngmodules.org/modules/flexy-layout
You missing the point. Angular is only JS library that helps you with:
modularization your code
allow you load content asynchronously
change content using "magic" (two-way bindings)
etc.
It doesn't describe style of your site. You have to do it by yourself or use one of popular fluid/responsive CSS frameworks, i.e.:
Bootstrap by Twitter
Zurb Foundation
Inuit.css
Pure
Gumby
Metro UI
etc.
Just choose yourself and then apply to your site. Using that also make your design independent from JS (which is very bad) and JS framework (which is 9th circle of hell).

Increasing the size of a WPF application

I've just created my first WPF application (3 calculators inside 3 different tabs).
The entire application has been built using widths/margins/paddings as static values, since I originally didn't know that dynamic values can be used by just putting an asterix after the value.
The client has come back to me though and has asked me to increase the size of the app, that includes form fields, tabs, font-sizes, grids etc...
What would be the easiest (and/or quickest) way to do this? I'd hate to go value by value resizing every single element since there are quite a few.
I can provide code but there is lots of it and I'm not sure of how much help it would be.
Appreciate your help,
Marko
Put it all in one ViewBox, play with viewbox size to change the app size
Write an XSLT transform to take your XAML as input and spit out appropriate modified XAML, which you put back in your app.

Resources