layout.ex 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. defmodule CvGenView.Layout do
  2. def resets(),
  3. do: """
  4. @charset "utf-8";
  5. @-webkit-viewport {
  6. width: device-width;
  7. }
  8. @-moz-viewport {
  9. width: device-width;
  10. }
  11. @-ms-viewport {
  12. width: device-width;
  13. }
  14. @-o-viewport {
  15. width: device-width;
  16. }
  17. @viewport {
  18. width: device-width;
  19. }
  20. * {
  21. box-sizing: border-box;
  22. }
  23. h1, h2, h3, h4, h5, h6 {
  24. font-size: 1em;
  25. }
  26. ol,
  27. ul {
  28. list-style: none;
  29. padding-inline: 0;
  30. }
  31. """
  32. def page_css(),
  33. do: """
  34. html {
  35. background-color: rgb(51, 73, 96);
  36. }
  37. body {
  38. width: 90%;
  39. max-width: 120ch;
  40. margin-top: 2em;
  41. margin-bottom: 2em;
  42. margin-right: auto;
  43. margin-left: auto;
  44. padding: 1em;
  45. background-color: white;
  46. font-family: 'Open Sans', Arial, Tahoma;
  47. font-weight: 400;
  48. display: grid;
  49. grid-template-areas:
  50. "basics basics"
  51. "about skills"
  52. "work education"
  53. "work languages"
  54. "work _";
  55. grid-template-columns: 2fr 1fr;
  56. column-gap: 1em;
  57. row-gap: 0.5em;
  58. }
  59. #basics {
  60. grid-area: basics;
  61. border-bottom: lightgray solid 0.1em;
  62. }
  63. #about {
  64. grid-area: about;
  65. }
  66. #work {
  67. grid-area: work;
  68. }
  69. #education {
  70. grid-area: education;
  71. }
  72. #skills {
  73. grid-area: skills;
  74. }
  75. #languages {
  76. grid-area: languages;
  77. }
  78. .section > h1 {
  79. color: #227c74;
  80. text-transform: uppercase;
  81. font-size: larger;
  82. }
  83. """
  84. def page_print_css(),
  85. do: """
  86. @media print {
  87. html {
  88. background-color: initial;
  89. }
  90. body {
  91. width: 100%;
  92. }
  93. .work {
  94. break-inside: avoid;
  95. }
  96. }
  97. """
  98. end