Fossil

Changes On Branch skinedit-css-list
Login

Changes On Branch skinedit-css-list

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch skinedit-css-list Excluding Merge-Ins

This is equivalent to a diff from 483ac3db to fd138236

2020-04-27
19:36
Initial infrastructure for "web commit". ... (check-in: cb4d48ac user: stephan tags: checkin-without-checkout)
17:57
Improvements to the CSS editor. ... (check-in: a8967ca9 user: drh tags: trunk)
11:57
Update comment. No changes to code. ... (check-in: 455b2aa6 user: drh tags: trunk)
08:31
/setup_skinedit, when editing CSS, now shows the list of built-in CSS selectors, as mentioned in /forumpost/b2d7ce8ab1. ... (Closed-Leaf check-in: fd138236 user: stephan tags: skinedit-css-list)
2020-04-26
23:10
Merge in trunk ... (check-in: 161a2106 user: george tags: wiki-history)
20:41
Fix overlength lines and commenting irregularities in http_ssl.c. No code changes. ... (check-in: 483ac3db user: drh tags: trunk)
15:39
Add the "test-ssl-trust-store" command for testing and diagnostics. ... (check-in: 67147dd6 user: drh tags: trunk)

Changes to src/default_css.txt.

839
840
841
842
843
844
845



















.accordion_closed > .accordion_btn_plus {
  display: inline-block;
}
.accordion_panel {
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}


























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
.accordion_closed > .accordion_btn_plus {
  display: inline-block;
}
.accordion_panel {
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}
#setup_skinedit_css_defaults {
  max-width: 98%;
  font-family: monospace;
// These are for the UL-based implementation:
  column-width: auto;
  column-count: 2;
  padding-top: 1em;
}
// These are for the alternate table-based skinedit CSS list:
// #setup_skinedit_css_defaults > tbody > tr > td {
//   font-family: monospace;
//   white-space: pre-wrap;
//   border: 1px solid black;
//   vertical-align: top;
// }
// #setup_skinedit_css_defaults > tbody > tr > td:nth-of-type(2) > div {
//   max-width: 30em;
//   overflow: auto;
// }

Changes to src/skins.c.

686
687
688
689
690
691
692



















































693
694
695
696
697
698
699
      if( zResult!=0 ) break;
      zLabel = "default";
    }
  }
  return zResult;
}





















































/*
** WEBPAGE: setup_skinedit
**
** Edit aspects of a skin determined by the w= query parameter.
** Requires Admin or Setup privileges.
**







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
      if( zResult!=0 ) break;
      zLabel = "default";
    }
  }
  return zResult;
}

extern const struct strctCssDefaults {
/* From the generated default_css.h, which we cannot #include here
** without causing an ODR violation.
*/
  const char *elementClass;  /* Name of element needed */
  const char *value;         /* CSS text */
} cssDefaultList[];

/*
** Emits the list of built-in default CSS selectors. Intended
** for use only from the /setup_skinedit page.
*/
static void skin_emit_css_defaults(){
  struct strctCssDefaults const * pCss;
  fossil_print("<h1>CSS Defaults</h1>");
  fossil_print("If a skin defines any of the following CSS selectors, "
               "that definition replaces the default, as opposed to "
               "cascading from it. ");
  fossil_print("See <a href=\"%s/doc/trunk/www/css-tricks.md\">this "
               "document</a> for more details.", g.zTop);
  /* To discuss: do we want to list only the default selectors or
  ** also their default values? The latter increases the size of the
  ** page considerably, but is arguably more useful. We could, of
  ** course, offer a URL param to toggle the view, but that currently
  ** seems like overkill.
  **
  ** Be sure to adjust the default_css.txt #setup_skinedit_css entry
  ** for whichever impl ends up being selected.
  */
#if 1
  /* List impl which elides style values */
  fossil_print("<div class=\"columns\" "
               "id=\"setup_skinedit_css_defaults\"><ul>");
  for(pCss = &cssDefaultList[0]; pCss->value!=0; ++pCss){
    fossil_print("<li>%s</li>", pCss->elementClass);
  }
  fossil_print("</ul>");
#else
  /* Table impl which also includes style values. */
  fossil_print("<table id=\"setup_skinedit_css_defaults\"><tbody>");
  for(pCss = &cssDefaultList[0]; pCss->value!=0; ++pCss){
    fossil_print("<tr><td>%s</td>", pCss->elementClass);
    /* A TD element apparently cannot be told to scroll its contents,
    ** so we require a DIV inside the value TD to scroll the long
    ** url(data:...) entries. */
    fossil_print("<td><div>%s</div></td>", pCss->value);
    fossil_print("</td></tr>");
  }
  fossil_print("</tbody></table>");
#endif
}

/*
** WEBPAGE: setup_skinedit
**
** Edit aspects of a skin determined by the w= query parameter.
** Requires Admin or Setup privileges.
**
812
813
814
815
816
817
818



819
820
821
822
823
824
825
      @ </pre>
    }
    blob_reset(&from);
    blob_reset(&to);
    blob_reset(&out);
  }
  @ </div></form>



  style_footer();
  db_end_transaction(0);
}

/*
** Try to initialize draft skin iSkin to the built-in or preexisting
** skin named by zTemplate.







>
>
>







863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
      @ </pre>
    }
    blob_reset(&from);
    blob_reset(&to);
    blob_reset(&out);
  }
  @ </div></form>
  if(ii==0/*CSS*/){
    skin_emit_css_defaults();
  }
  style_footer();
  db_end_transaction(0);
}

/*
** Try to initialize draft skin iSkin to the built-in or preexisting
** skin named by zTemplate.