styles

django won't load staticfiles from statifiles_dirs

送分小仙女□ 提交于 2020-03-05 05:50:07
问题 My style.css is placed in appname/static/appname/ . My settings.py has this code: STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static/"), ) And in my base.html I load it like this: {% load static %} <link rel="stylesheet" type="text/css" href="{% static 'appname/style.css' %}"> But the styles are not loading. If I remove STATICFILES_DIRS and change STATIC_URL = '/static/' to STATIC_URL = '/static/appname/' , it works perfectly, but I guess it's not the best practice

django won't load staticfiles from statifiles_dirs

三世轮回 提交于 2020-03-05 05:49:45
问题 My style.css is placed in appname/static/appname/ . My settings.py has this code: STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static/"), ) And in my base.html I load it like this: {% load static %} <link rel="stylesheet" type="text/css" href="{% static 'appname/style.css' %}"> But the styles are not loading. If I remove STATICFILES_DIRS and change STATIC_URL = '/static/' to STATIC_URL = '/static/appname/' , it works perfectly, but I guess it's not the best practice

Android 100多个Styles快速开发布局XML,一行搞定View属性,一键统一配置UI..

风流意气都作罢 提交于 2020-02-28 12:00:26
Android开发中大量使用XML代码作为界面的布局,使用styles能大幅精简XML代码。 比如下面这个界面从AlertDialog至PlacePickerWindow有19个样式相同的跳转Item,点击后颜色加深并跳转界面。 使用styles前XML代码是这样的(838行): 1 <? xml version="1.0" encoding="utf-8" ?> 2 < LinearLayout xmlns:android ="http://schemas.android.com/apk/res/android" 3 android:layout_width ="fill_parent" 4 android:layout_height ="fill_parent" 5 android:background ="@color/activity_bg" 6 android:orientation ="vertical" 7 android:splitMotionEvents ="false" > 8 9 < RelativeLayout 10 android:id ="@+id/rlDemoMainTopbar" 11 android:layout_width ="fill_parent" 12 android:layout_height ="@dimen/topbar_height

Loading multiple stylesheet for a component in Angular2

怎甘沉沦 提交于 2020-02-21 11:51:11
问题 I am building an angular2 application. I am facing multiple problems when i try to load multiple stylesheet for the same component. Here is a the code of what i am doing: import { Component } from '@angular/core'; @Component({ selector: 'my-tag', templateUrl: 'my-tag.component.html', styleUrls: [ './style1.css', './style2.css' ] }) export class MyTagComponent{} Now here are my problems: When i try to include the the css file from other directory like this: styleUrls: [ './style1.css', '..

no template property on grid style in WPF?

*爱你&永不变心* 提交于 2020-02-18 05:47:10
问题 i want to move all the content of a grid to a style/template/Container (don't know which one to choose...), but i tried to move it to a style. but the problem is i get the error : "Cannot find the Style Property 'Template' on the type 'System.Windows.Controls.Grid'". i know there is no template property for grid , but how else will i move the grid content to the ResourceDirectory file? This is the Grid code: <Grid Grid.Column="0" Grid.Row="0" Margin="10,15,5,5" > <Border BorderThickness="7"

Interaction Triggers Embedded in ContentControl

半腔热情 提交于 2020-02-03 09:02:57
问题 So to keep the question simple what I need for example is to use something like this dozens of times; <Rectangle> <i:Interaction.Triggers> <i:EventTrigger EventName="MouseLeftButtonDown"> <ei:ChangePropertyAction TargetName="AnotherObjectOnTheView" PropertyName="Visibility" Value="Visible" /> </i:EventTrigger> </i:Interaction.Triggers> </Rectangle> Except obviously I don't want to paste that dozens of times everywhere I need it. So I tried to plop them in a ContentControl , something like

Interaction Triggers Embedded in ContentControl

大兔子大兔子 提交于 2020-02-03 09:01:07
问题 So to keep the question simple what I need for example is to use something like this dozens of times; <Rectangle> <i:Interaction.Triggers> <i:EventTrigger EventName="MouseLeftButtonDown"> <ei:ChangePropertyAction TargetName="AnotherObjectOnTheView" PropertyName="Visibility" Value="Visible" /> </i:EventTrigger> </i:Interaction.Triggers> </Rectangle> Except obviously I don't want to paste that dozens of times everywhere I need it. So I tried to plop them in a ContentControl , something like

Trouble setting a DataTrigger in WPF

ε祈祈猫儿з 提交于 2020-02-03 05:13:13
问题 I have a ComboBox and a Button on my main view, and I want to apply a style to the button such that when the combobox index is set to 1, the button becomes visible (initially it's hidden). This is my XAML code: <Grid> <StackPanel Orientation="Vertical" Margin="10"> <ComboBox Name="comboBox"/> <Button Name="myBtn" Content="Hello" Visibility="Hidden"> <Button.Style> <Style TargetType="{x:Type Button}"> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=comboBox, Path=SelectedIndex}"

Android application theming on Sense phones

六眼飞鱼酱① 提交于 2020-02-02 11:30:06
问题 I've hit a brick wall on a UI item with regard to applications on sense phones. I have been unable to craft search queries on google or SO to find any reference to what I'm after. Is there a way that I can have my application theme its UI styles to match the phone's currently applied style? I'm basically after the styles for different UI widgets (check boxes, spinner, button, etc). I have a myTouch 3G Slide which is running the Espresso variant of HTC Sense. Update: (Thanks @Macarse for the

Android application theming on Sense phones

旧巷老猫 提交于 2020-02-02 11:29:22
问题 I've hit a brick wall on a UI item with regard to applications on sense phones. I have been unable to craft search queries on google or SO to find any reference to what I'm after. Is there a way that I can have my application theme its UI styles to match the phone's currently applied style? I'm basically after the styles for different UI widgets (check boxes, spinner, button, etc). I have a myTouch 3G Slide which is running the Espresso variant of HTC Sense. Update: (Thanks @Macarse for the