layout.ex 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. dd {
  32. margin: 0;
  33. }
  34. """
  35. def page_css(),
  36. do: """
  37. html {
  38. background-color: rgb(51, 73, 96);
  39. }
  40. body {
  41. width: 90%;
  42. max-width: 120ch;
  43. margin-top: 2em;
  44. margin-bottom: 2em;
  45. margin-right: auto;
  46. margin-left: auto;
  47. padding: 1em;
  48. background-color: white;
  49. font-family: 'Open Sans', Arial, Tahoma;
  50. font-weight: 400;
  51. display: grid;
  52. grid-template-areas:
  53. "basics basics"
  54. "about contact"
  55. "work skills"
  56. "work education"
  57. "work languages"
  58. "work _";
  59. grid-template-columns: 2fr 1fr;
  60. column-gap: 1em;
  61. row-gap: 0.5em;
  62. }
  63. #basics {
  64. grid-area: basics;
  65. border-bottom: lightgray solid 0.1em;
  66. }
  67. #about {
  68. grid-area: about;
  69. }
  70. #work {
  71. grid-area: work;
  72. }
  73. #education {
  74. grid-area: education;
  75. }
  76. #skills {
  77. grid-area: skills;
  78. }
  79. #languages {
  80. grid-area: languages;
  81. }
  82. .section > h1 {
  83. color: #227c74;
  84. text-transform: uppercase;
  85. font-size: larger;
  86. }
  87. a {
  88. color: #337ab7;
  89. }
  90. a:focus, a:hover {
  91. color: #23527c;
  92. }
  93. """
  94. def page_print_css(),
  95. do: """
  96. @media print {
  97. html {
  98. background-color: initial;
  99. }
  100. body {
  101. width: 100%;
  102. grid-template-areas:
  103. "basics basics"
  104. "about contact"
  105. "education skills"
  106. "education languages"
  107. "work work";
  108. grid-template-columns: 2fr 1fr;
  109. margin-top: 0;
  110. margin-bottom: 0;
  111. padding: 0;
  112. font-size: 14.7px;
  113. }
  114. #education {
  115. align-self: center;
  116. }
  117. .work {
  118. break-inside: avoid;
  119. }
  120. }
  121. """
  122. end