layout.ex 2.3 KB

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